Esempio n. 1
0
function css_browser_id()
{
    $_browser = get_client_browser();
    $CssBrowserId = 'general';
    if (is_file(CONFIG_PATH . 'cssBrowsers.php')) {
        $_agentArray = (include CONFIG_PATH . 'cssBrowsers.php');
    }
    foreach ($_agentArray as $agent => $id) {
        if (stristr($_browser, $agent) !== false) {
            $cssBrowserId = $id;
            break;
        }
    }
    return $cssBrowserId;
}
Esempio n. 2
0
 /**
  * default action 'index'
  * @param Request $request
  * @param Response $response
  */
 public function index(Request $request, Response $response)
 {
     if (Common_Model::admin_logined()) {
         $admin = D()->get_one("SELECT * FROM {admin_user} WHERE admin_uid=%d", $_SESSION['logined_uid']);
         $v = new PageView('mod_user_index');
         $v->assign('admin', $admin);
         $v->assign('nav', $this->_nav);
         if ($request->is_hashreq()) {
             $srvinfo = array('PHP_OS' => PHP_OS, 'PHP_VERSION' => PHP_VERSION, 'SERVER_SOFTWARE' => $_SERVER['SERVER_SOFTWARE'], 'SYS_VERSION' => C('env.version'), 'SYS_TIME' => date('Y-m-d H:i:s'), 'SYS_TIMEZONE' => date_default_timezone_get(), 'DB_VERSION' => 'MySQL', 'DB_TIME' => date('Y-m-d H:i:s'), 'PHP_EXECTIME' => 0, 'PHP_UPLOAD' => '', 'CLIENT_IP' => $request->ip(), 'CLIENT_UA' => get_client_platform() . ' - ' . get_client_browser());
             // DB info
             $dbinfo = D()->get_one("SELECT VERSION() AS db_ver, UNIX_TIMESTAMP() AS db_time");
             $srvinfo['DB_VERSION'] = 'MySQL ' . $dbinfo['db_ver'];
             $srvinfo['DB_TIME'] = date('Y-m-d H:i:s', $dbinfo['db_time']);
             // PHP detail
             $srvinfo['PHP_EXECTIME'] = ini_get('max_execution_time') . ' 秒';
             $srvinfo['PHP_UPLOAD'] = @ini_get('file_uploads') ? '最大 ' . ini_get('upload_max_filesize') : '<font color="red">禁止上传</font>';
             $v->assign('srvinfo', $srvinfo);
         }
         $response->send($v);
     } else {
         $response->redirect('/login');
     }
 }
 function get_client_info()
 {
     $info = get_client_browser();
     $info["host_name"] = gethostname();
     $info["ip"] = $_SERVER['REMOTE_ADDR'];
     return $info;
 }