代码拉取完成,页面将自动刷新
同步操作将从 焦虑的羽毛/p2_plan_team 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
// turn off errors on prod
ini_set('display_errors', 'Off');
ini_set("arg_separator.output", "&");
ini_set('default_charset', 'utf-8');
// Start output buffering with gzip compression and start the session
ob_start('ob_gzhandler');
session_start();
// get full path to 2-plan
define("CL_ROOT", realpath(dirname(__FILE__)));
// configuration to load
define("CL_CONFIG", "standard");
// 2-plan version
define("CL_VERSION", 0.6);
// uncomment for debugging
//error_reporting(E_ALL | E_STRICT);
// include config file , pagination and global functions
require(CL_ROOT . "/config/" . CL_CONFIG . "/config.php");
require(CL_ROOT . "/include/smarylibs/Smarty.class.php");
require(CL_ROOT . "/include/SmartyPaginate.class.php");
require(CL_ROOT . "/include/initfunctions.php");
// Start database connection
if (!empty($db_name) and !empty($db_user))
{
$tdb = new datenbank();
$conn = $tdb->connect($db_name, $db_user, $db_pass, $db_host);
}
// Start template engine
$template = new Smarty();
// get the available languages
$languages = getAvailableLanguages();
// get URL to 2-plan
$url = getMyUrl();
$template->assign("url", $url);
$template->assign("languages", $languages);
$template->assign("myversion", "0.6.4");
$template->assign("cl_config", CL_CONFIG);
// Assign globals to all templates
if (isset($_SESSION["userid"]))
{
// unique ID of the user
$userid = $_SESSION["userid"];
// name of the user
$username = $_SESSION["username"];
// hash of the user
$userhash = $_SESSION["userhash"];
// timestamp of last login
$lastlogin = $_SESSION["lastlogin"];
// selected locale
$locale = $_SESSION["userlocale"];
// gender
$gender = $_SESSION["usergender"];
// what the user may or may not do
$rolesobj = new roles();
$userpermissions = $rolesobj->getUserRole($userid);
// logout user if the client is not active
$clientobj = new client();
if(!$clientobj->isActive((int)$_SESSION["userid"])) {
header("Location: manageuser.php?action=logout");
}
// assign it all to the templates
$template->assign("userid", $userid);
$template->assign("username", $username);
$template->assign("userhash", $userhash);
$template->assign("lastlogin", $lastlogin);
$template->assign("usergender", $gender);
$template->assign("userpermissions", $userpermissions);
$template->assign("loggedin", 1);
}
else
{
$template->assign("loggedin", 0);
}
// get system settings
if (isset($conn))
{
$set = new settings();
$settings = $set->getSettings();
define("CL_DATEFORMAT", $settings["dateformat"]);
date_default_timezone_set($settings["timezone"]);
// set iphone template
if(preg_match('/\/iphone.*/i', $_SERVER["REQUEST_URI"])) {
$settings["template"] = "iphone";
$settings["template2"] = "iphone";
}
if(preg_match('/\/bb.*/i', $_SERVER["REQUEST_URI"])) {
$settings['template'] = "iphone";
$settings['template2'] = "bb";
}
$template->assign("settings", $settings);
}
// Set Template directory
// If no directory is set in the system settings, default to the standard theme
if (!isset($settings['template']))
$settings['template'] = "standard";
$template->template_dir = CL_ROOT . "/templates/$settings[template]/";
$template->compile_dir = CL_ROOT . "/templates_c/$settings[template]/";
$template->tname = $settings["template"];
//添加插件
$template->addPluginsDir(CL_ROOT . "/include/plugins/");
if (!isset($locale))
{
if (isset($settings["locale"]))
{
$locale = $settings['locale'];
}
else
{
$locale = "en";
}
$_SESSION['userlocale'] = $locale;
}
// if detected locale doesnt have a corresponding langfile , use system default locale
// if, for whatever reason, no system default language is set, default to english as a last resort
if (!file_exists(CL_ROOT . "/language/$locale/lng.conf"))
{
$locale = $settings['locale'];
$_SESSION['userlocale'] = $locale;
}
// Set locale directory , .tpl 文件中的config_load路径 {config_load file="test.conf" section="setup"} 的配置
$template->config_dir = CL_ROOT . "/language/".$locale."/";
// read language file into PHP array
$langfile = readLangfile($locale);
$template->assign("langfile", $langfile);
$template->assign("locale", $locale);
// css classes for headmenue
// this indicates which of the 3 main stages the user is on
$mainclasses = array("desktop" => "desktop",
"profil" => "profil",
"admin" => "admin"
);
$template->assign("mainclasses", $mainclasses);
$they = date("Y");
$them = date("n");
$template->assign("theM", $them);
$template->assign("theY", $they);
// clear session data for pagination
SmartyPaginate::disconnect();
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。