Esempio n. 1
0
foreach ($arr as $v) {
    $f = substr($v, 0, -4);
    $style->{$f} = '';
}
$task = @$_REQUEST['task'];
$task = preg_replace("/[^a-z0-9]+/i", "", $task);
$basename = basename($_SERVER['PHP_SELF'], '.php');
if ($task == 'login') {
    $basename = 'login';
}
$style->{$basename} = ' class="here"';
//addStylesheet('simple.css');
$title = 'Zhpanel v' . $zh_version;
session_id();
session_start();
isset($_SESSION['zmessage']) || ($_SESSION['zmessage'] = '');
isset($_SESSION[$sess_key]) || ($_SESSION[$sess_key] = array());
$me = getmyname();
$isadmin = isadmin();
$role = ZUser::getRole($me);
$token = token();
$switch_from = isswitch();
if ($task !== 'login' && $task !== 'logout') {
    if (!$me) {
        redirect('misc.php?task=login');
    }
}
$sys = $pdo->fetchRow("SELECT * FROM system WHERE id=1");
//print_r($sys);
//$lang = parse_ini_file(ZH."/tpl/{$sys->theme}/lang.ini.php", false, INI_SCANNER_RAW);
include ZH . "/tpl/{$sys->theme}/lang.ini.php";