<?php
abstract class dpanel{

static function is_access()
{
global $cache,$dcms,$user;
return $cache->get('dpanel_access.'.$user->id.'.'.$dcms->ip_long.'.'.$dcms->browser);
}

static function check_access()
{
if (self::is_access()){self::access();}
else
{
header("Location: /dpanel/login.php?return=".URL.'&'.SID);
exit;
}
}


static function access()
{
global $cache,$dcms,$user;
$cache->set('dpanel_access.'.$user->id.'.'.$dcms->ip_long.'.'.$dcms->browser,true,3600);
}

static function access_delete()
{
global $cache,$dcms,$user;
$cache->set('dpanel_access.'.$user->id.'.'.$dcms->ip_long.'.'.$dcms->browser,false,1);
}

}
?>
