public function Lockscreen() { global $user; if (isset($_POST['email']) && isset($_POST['passwd'])) { $result = array("status" => 0, "message" => "验证失败"); $passwd = htmlspecialchars($_POST['passwd']); $result['passwd'] = $passwd; $user = User::getInstance(); $user = $user->GetUserByEmail($user->email); $result['obj'] = $user; if ($user->verifyPassword($passwd)) { Util::setToken(); $result['status'] = 1; $result['message'] = "验证成功, 将跳转到 >> 仪表盘"; } else { $result['message'] = "我跟你讲, 你密码错的在试2遍就给你锁了."; } echo json_encode($result); exit; } else { if (!\Helper\Listener::checkLogin()) { \Core\Response::redirect('/Auth/login'); exit; } include Template::load('/panel/lockscreen'); } exit; }
/** * Common layout for project views * * @access protected * @param string $template Template name * @param array $params Template parameters * @return string */ protected function projectLayout($template, array $params) { $content = $this->template->load($template, $params); $params['project_content_for_layout'] = $content; $params['title'] = $params['project']['name'] === $params['title'] ? $params['title'] : $params['project']['name'] . ' > ' . $params['title']; $params['board_selector'] = $this->projectPermission->getAllowedProjects($this->acl->getUserId()); return $this->template->layout('project/layout', $params); }
public function JsonList() { global $user; $id = trim($_REQUEST['id']); $nodeList = Nodem::GetNodeArray(); $info = ""; foreach ($nodeList as $node) { $info .= NodeUtil::NodeJson($node->server, $node->port, $user->sspwd, $node->method) . ","; } include Template::load('/node/JsonAll'); exit; }
public function index() { $inviteList = \Model\Invite::GetInvitesByUid(-1); include Template::load('/home/invite'); }
/** * Get the mail content for a given template name * * @access public * @param string $template Template name * @param array $data Template data */ public function getMailContent($template, array $data) { $tpl = new Template(); return $tpl->load('notification/' . $template, $data + array('application_url' => $this->config->get('application_url'))); }
/** * Get the event html content * * @access public * @param array $params Event properties * @return string */ public function getContent(array $params) { $tpl = new Template(); return $tpl->load('event_' . str_replace('.', '_', $params['event_name']), $params); }
/** * Get the mail content for a given template name * * @access public * @param string $template Template name * @param array $data Template data */ public function getMailContent($template, array $data) { $tpl = new Template(); return $tpl->load($template, $data); }
public function ChangePlanLevel() { global $user; include Template::load("panel/changePlanLevel"); }
/** * 进入首页 */ public function index() { include Template::load('/home/index'); //throw new \Core\Error("Coming Soon..<br/>", 233); }
/** * 进入首页 */ public function index() { include Template::load('/home/index'); }
public function Help() { include Template::load('/home/help'); }
/** * @Home * @Route /Index */ function index() { include Template::load('Demo'); }
/** * Common layout for project views * * @access protected * @param string $template Template name * @param array $params Template parameters * @return string */ protected function projectLayout($template, array $params) { $content = $this->template->load($template, $params); $params['project_content_for_layout'] = $content; return $this->template->layout('project_layout', $params); }
/** * Show text and redirect to another page * @param string $text Content * @param string $link Target page * @param int $timeout Time before redirect */ public static function show($text, $link = null, $timeout = 3) { $link = Response::generateURL($link); include Template::load('Misc/Redirect'); exit; }
/** * Load a template * * @param string $name Template name * @param array $args Template parameters * @return string */ function template($name, array $args = array()) { $tpl = new Template(); return $tpl->load($name, $args); }
public function index() { global $user; include Template::load('/admin/index'); }