示例#1
0
}
#[定义网址]
define("SITE_URL", $system["siteurl"]);
#[计算当前时间]
if (function_exists("date_default_timezone_set")) {
    if (!$system["timezone"]) {
        $system["timezone"] = "8";
    }
    date_default_timezone_set("Etc/GMT" . intval($system["timezone"]));
    $system_time = $system_now = time() + $system["timerevise"];
} else {
    $system_time = $system_now = mktime(gmdate("H") + $system["timezone"], gmdate("i") + $system["timerevise"], gmdate("s"), gmdate("m"), gmdate("d"), gmdate("Y"));
}
#[模板信息参数]
require_once SYSTEM_ROOT . "/class/tpl.php";
$TPL = new QG_C_TEMPLATE();
$TPL->set("tplid", 1);
$TPL->set("tpldir", "templates/default");
$TPL->set("cache", "data/yui_tplc");
$TPL->set("phpdir", "");
$TPL->set("ext", "tpl.php");
#[模板扩展,为了保护程序,设置为php以保证数据的安全]
$TPL->set("autorefresh", true);
$TPL->set("autoimg", true);
#[加载模块]
include_once SYSTEM_ROOT . "/include/mod.func.php";
#[判断URLSEO]
if ($system["urlseo"] == "urlseo") {
    $__GetUrl = $_SERVER["REQUEST_URI"];
    if (strpos($__GetUrl, "/list.php/") !== false) {
        $__ExplodeUrl = explode("/list.php/", $__GetUrl);
示例#2
0
#[加载工厂类]
require_once SYSTEM_ROOT . "/class/factory.php";
$CF = new C_Factory($DB, $prefix, $dbType);
#[加载session,session存放在不同数据库,有不同的安全机制,因此在这里特别设置]
$t_sfile = SYSTEM_ROOT . "/class/db/" . $dbType . "/session.php";
$d_sfile = SYSTEM_ROOT . "/class/session.php";
file_exists($t_sfile) ? include_once $t_sfile : (include $d_sfile);
unset($t_sfile, $d_sfile);
#[文件操作类]
include_once SYSTEM_ROOT . "/class/file.php";
$FS = new files();
#[加载常用函数]
include_once SYSTEM_ROOT . "/include/admin.func.php";
#[加载模板配置]
require_once SYSTEM_ROOT . "/class/tpl.php";
$TPL = new QG_C_TEMPLATE();
#[设置TPL参数]
$TPL->set("tplid", 1);
$TPL->set("tpldir", "templates/admin");
$TPL->set("cache", "data/admin_tplc");
$TPL->set("phpdir", "");
$TPL->set("ext", "htm");
$TPL->set("autorefresh", true);
$TPL->set("autoimg", true);
#[获取系统用到的两个重要参数,file及act]
#[这两个参数是系统专用,贯穿整个后台]
#[兼容大部分的写作习惯]
$SysFile = $sysfile = $sys_file = $sysFile = $STR->safe($file);
$SysAct = $sysact = $sys_act = $sysAct = $STR->safe($act);
#[判断加载的验证码,要求系统支持GD库]
if ($isCheckCode && function_exists("imagecreate") && $SysAct == "chkcode") {