function __construct() { parent::__construct(); if (!is_login()) { redirect_to_login(); } $this->theme = theme(); $this->theme->setBreadcrumb("消息中心", "Message"); l_h("html_tag.php"); }
/** * 构造函数,加载管理员函数,初始化用户 */ function __construct() { l_h("admin.php"); $this->user = new \ULib\User(true); if (!user()->login_status()) { redirect(user()->login_go()); } lib()->load('menu')->add('menu', new \ULib\Menu()); theme()->header_add("<script>var SITE_URL = '" . URL_WEB . "';</script>", 0); set_title(null, '控制中心'); }
/** * 添加钩子,并初始化部分信息 */ public function add() { if (!db()->status()) { hook()->add('UriInfo_process', array($this, 'sql_error')); } else { c_lib()->load('cookie')->add('cookie', new \CLib\Cookie(cfg()->get('cookie', 'encode'))); lib()->load('setting', 'user', 'plugin', 'version_hook')->add('setting', new Setting()); lib()->add('user', new User(true)); lib()->add("version_hook", new Version_Hook()); l_h('theme.php'); hook()->add('UriInfo_process', array($this, 'router')); lib()->add('plugin', new Plugin(_BasePath_ . "/ex/plugin")); } }
function __construct() { parent::__construct(); if (!is_login()) { redirect_to_login(); } else { if (!login_user()->is_active()) { redirect(['User', 'activation']); } } $this->theme = theme(); $this->theme->setBreadcrumb("图片中心", "Photo"); l_h("html_tag.php"); }
public function edit() { l_h('html_tag.php'); $this->theme->setBreadcrumb("编辑文章"); $this->theme->setTitle("编辑文章"); $id = intval(req()->get('id')); $this->__lib('Post'); $post = new Post($id); $info = $post->getInfo(login_user()->getId()); $this->theme->header_add($this->theme->css(get_bootstrap_plugin_url("markdown/markdown.min.css"))); $this->theme->header_add($this->theme->js(['src' => get_bootstrap_plugin_url("markdown/markdown.js")])); if (!isset($info['post_id']) || $info['post_id'] != $id) { $this->__view("User/header.php"); $this->__view("Posts/not_found.php"); } else { $this->__view("User/header.php"); $this->__view("Posts/edit.php", ['info' => $info, 'post' => $post]); } $this->__view("User/footer.php"); }
public function cdn() { l_h('html_tag.php'); $this->__view("Control/cdn.php"); }
public function add() { l_h("system.php", "theme.php"); lib()->load('Page'); }
<?php set_time_limit(0); if (is_file("../config/install.lock")) { die("Please try again to delete the file /config/install.lock."); } require_once "../sys/config.php"; cfg()->load('../config/all.php'); //加载其他配置文件 l_h("system.php", "theme.php"); c_lib()->load('session'); $session = new \CLib\Session(); $info = ['number' => 1, 'list' => []]; $s = $session->get('install'); if (isset($s['number'])) { $info = $s; } $setup = isset($_GET['setup']) ? $_GET['setup'] : "1"; if ($setup == "import_sql" && $info['number'] == '2') { include "../install/import_sql.php"; exit; } else { if ($setup == "setting" && $info['number'] == '3') { include "../install/setting.php"; exit; } else { if ($setup == "system" && $info['number'] == '4') { include "../install/system.php"; exit; } else { }
/** * 构造函数 */ function __construct() { set_language(); c_lib()->load('sql', 'ip')->add('sql', new Sql(cfg()->get('sql', 'write'), cfg()->get('sql', 'read'))); l_h("system.php", 'theme.php'); }