first init

This commit is contained in:
Metrax
2012-05-09 20:05:43 +02:00
commit e05b7bb8f0
6205 changed files with 395435 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
class Cache_Manager
{
public function exists($cacheid)
{
if (!$cacheid)
return false;
return sql_value("SELECT count(*) FROM `caches` WHERE `cache_id`=&1", 0, $cacheid) == 1;
}
public function userMayModify($cacheid)
{
global $login;
$login->verify();
$cacheOwner = sql_value("SELECT `user_id` FROM `caches` WHERE `cache_id`=&1", -1, $cacheid);
return $cacheOwner == $login->userid;
}
}
?>