Example #1
0
 function User()
 {
     $this->db = $GLOBALS['db'];
     $this->ip = get_onlineip();
     $this->referer = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'];
     $this->check_user();
     if (!@(include CACHE_ROOT . 'cache_usergroup_' . $this->groupid . '.php')) {
         include_once TOA_ROOT . 'include/func_cache.php';
         recache('usergroup');
         //exit('成功缓存用户组信息,请刷新页面!');
     } else {
         $this->groupname = $groupname;
         $this->purview = $purview;
     }
 }
Example #2
0
function get_cache($cachename)
{
    global $_CACHE;
    !is_array($cachename) && ($cachename = array($cachename));
    foreach ($cachename as $cache) {
        if (isset($_CACHE[$cache])) {
            continue;
        }
        $cachefile = CACHE_ROOT . 'cache_' . $cache . '.php';
        if (!file_exists($cachefile)) {
            require_once TOA_ROOT . './include/function_cache.php';
            recache($cache);
        }
        include_once $cachefile;
    }
}