function check_isMobile() { $site = Basic::thisurl(); $istrue = Import::basic()->isMobile(); if ($istrue == true && !strpos($site, 'ajaxfile') && !strpos($site, 'user.php')) { $this->jump(SITE_URL . 'm/'); exit; } }
function write($name, $data) { if ($name == '__last_visit') { if (count($this->__last_visit) > 10) { array_shift($this->__last_visit); } $thisurl = Basic::thisurl(); $this->__last_visit[md5($thisurl)] = $thisurl; } $vars = explode('.', $name); $str = null; foreach ($vars as $var) { $var == '' || $var == '[]' ? $str .= "[]" : ($str .= "['{$var}']"); } if (empty($data)) { eval('unset($_SESSION' . $str . ');'); } else { eval('$_SESSION' . $str . '=$data;'); } }