Esempio n. 1
0
 public function __construct()
 {
     bpBase::loadAppFunc('global', 'manage');
     //access
     //$_SESSION['token']='tokenvalue';
     if (!isset($_SESSION['token']) || !strlen($_SESSION['token'])) {
         header('Location:/index.php?g=User&m=Index&a=index');
     }
     $this->token = $_SESSION['token'];
     //
     $site_db = M('site');
     $this->site = $site_db->getSiteByToken($this->token);
     $this->siteid = intval($this->site['id']);
 }