function display($params) { $Log_Model = new Log_Model(); $CACHE = Cache::getInstance(); $options_cache = Option::getAll(); extract($options_cache); $page = isset($params[4]) && $params[4] == 'page' ? abs(intval($params[5])) : 1; $author = isset($params[1]) && $params[1] == 'author' ? intval($params[2]) : ''; $pageurl = ''; $user_cache = $CACHE->readCache('user'); if (!isset($user_cache[$author])) { show_404_page(); } $author_name = $user_cache[$author]['name']; //page meta $site_title = $author_name . ' - ' . $site_title; $sqlSegment = "and author={$author} order by date desc"; $sta_cache = $CACHE->readCache('sta'); $lognum = $sta_cache[$author]['lognum']; $total_pages = ceil($lognum / $index_lognum); if ($page > $total_pages) { $page = $total_pages; } $start_limit = ($page - 1) * $index_lognum; $pageurl .= Url::author($author, 'page'); $Log_Model = new Log_Model(); $logs = $Log_Model->getLogsForHome($sqlSegment, $page, $index_lognum); $page_url = pagination($lognum, $index_lognum, $page, $pageurl); include View::getView('header'); include View::getView('log_list'); }
function display($params) { $Log_Model = new Log_Model(); $options_cache = Option::getAll(); extract($options_cache); $page = isset($params[4]) && $params[4] == 'page' ? abs(intval($params[5])) : 1; $record = isset($params[1]) && $params[1] == 'record' ? intval($params[2]) : ''; $GLOBALS['record'] = $record; //for sidebar calendar $pageurl = ''; //page meta $site_title = $record . ' - ' . $site_title; if (preg_match("/^([\\d]{4})([\\d]{2})\$/", $record, $match)) { $days = getMonthDayNum($match[2], $match[1]); $record_stime = emStrtotime($record . '01'); $record_etime = $record_stime + 3600 * 24 * $days; } else { $record_stime = emStrtotime($record); $record_etime = $record_stime + 3600 * 24; } $sqlSegment = "and date>={$record_stime} and date<{$record_etime} order by date desc"; $lognum = $Log_Model->getLogNum('n', $sqlSegment); $total_pages = ceil($lognum / $index_lognum); if ($page > $total_pages) { $page = $total_pages; } $start_limit = ($page - 1) * $index_lognum; $pageurl .= Url::record($record, 'page'); $logs = $Log_Model->getLogsForHome($sqlSegment, $page, $index_lognum); $page_url = pagination($lognum, $index_lognum, $page, $pageurl); include View::getView('header'); include View::getView('log_list'); }
function display($params) { $Log_Model = new Log_Model(); $options_cache = Option::getAll(); extract($options_cache); $page = isset($params[4]) && $params[4] == 'page' ? abs(intval($params[5])) : 1; $tag = isset($params[1]) && $params[1] == 'tag' ? addslashes(urldecode(trim($params[2]))) : ''; $pageurl = ''; //page meta $site_title = stripslashes($tag) . ' - ' . $site_title; $Tag_Model = new Tag_Model(); $blogIdStr = $Tag_Model->getTagByName($tag); if ($blogIdStr === false) { show_404_page(); } $sqlSegment = "and gid IN ({$blogIdStr}) order by date desc"; $lognum = $Log_Model->getLogNum('n', $sqlSegment); $total_pages = ceil($lognum / $index_lognum); if ($page > $total_pages) { $page = $total_pages; } $pageurl .= Url::tag(urlencode($tag), 'page'); $logs = $Log_Model->getLogsForHome($sqlSegment, $page, $index_lognum); $page_url = pagination($lognum, $index_lognum, $page, $pageurl); include View::getView('header'); include View::getView('log_list'); }
function display($params) { $Log_Model = new Log_Model(); $CACHE = Cache::getInstance(); $options_cache = Option::getAll(); extract($options_cache); $page = isset($params[4]) && $params[4] == 'page' ? abs(intval($params[5])) : 1; $sortid = ''; if (!empty($params[2])) { if (is_numeric($params[2])) { $sortid = intval($params[2]); } else { $sort_cache = $CACHE->readCache('sort'); foreach ($sort_cache as $key => $value) { $alias = addslashes(urldecode(trim($params[2]))); if (array_search($alias, $value, true)) { $sortid = $key; break; } } } } $pageurl = ''; $sort_cache = $CACHE->readCache('sort'); if (!isset($sort_cache[$sortid])) { show_404_page(); } $sort = $sort_cache[$sortid]; $sortName = $sort['sortname']; //page meta $site_title = $sortName . ' - ' . $site_title; if (!empty($sort_cache[$sortid]['description'])) { $site_description = $sort_cache[$sortid]['description']; } if ($sort['pid'] != 0 || empty($sort['children'])) { $sqlSegment = "and sortid={$sortid}"; } else { $sortids = array_merge(array($sortid), $sort['children']); $sqlSegment = "and sortid in (" . implode(',', $sortids) . ")"; } $sqlSegment .= " order by sortop desc, date desc"; $lognum = $Log_Model->getLogNum('n', $sqlSegment); $total_pages = ceil($lognum / $index_lognum); if ($page > $total_pages) { $page = $total_pages; } $pageurl .= Url::sort($sortid, 'page'); $logs = $Log_Model->getLogsForHome($sqlSegment, $page, $index_lognum); $page_url = pagination($lognum, $index_lognum, $page, $pageurl); $template = !empty($sort['template']) && file_exists(TEMPLATE_PATH . $sort['template'] . '.php') ? $sort['template'] : 'log_list'; include View::getView('header'); include View::getView($template); }
/** * 登录页面 */ public static function loginPage($errorCode = NULL) { Option::get('login_code') == 'y' ? $ckcode = "<span>验证码</span>\r\n <div class=\"val\"><input name=\"imgcode\" id=\"imgcode\" type=\"text\" />\r\n <img src=\"../include/lib/checkcode.php\" align=\"absmiddle\"></div>" : ($ckcode = ''); $error_msg = ''; if ($errorCode) { switch ($errorCode) { case self::LOGIN_ERROR_AUTHCODE: $error_msg = '验证错误,请重新输入'; break; case self::LOGIN_ERROR_USER: $error_msg = '用户名错误,请重新输入'; break; case self::LOGIN_ERROR_PASSWD: $error_msg = '密码错误,请重新输入'; break; } } require_once View::getView('login'); View::output(); }
function display($params) { $Log_Model = new Log_Model(); $options_cache = Option::getAll(); extract($options_cache); $page = isset($params[4]) && $params[4] == 'page' ? abs(intval($params[5])) : 1; $keyword = isset($params[1]) && $params[1] == 'keyword' ? trim($params[2]) : ''; $keyword = addslashes(htmlspecialchars(urldecode($keyword))); $keyword = str_replace(array('%', '_'), array('\\%', '\\_'), $keyword); $pageurl = ''; $sqlSegment = "and title like '%{$keyword}%' order by date desc"; $lognum = $Log_Model->getLogNum('n', $sqlSegment); $total_pages = ceil($lognum / $index_lognum); if ($page > $total_pages) { $page = $total_pages; } $pageurl .= BLOG_URL . '?keyword=' . urlencode($keyword) . '&page='; $logs = $Log_Model->getLogsForHome($sqlSegment, $page, $index_lognum); $page_url = pagination($lognum, $index_lognum, $page, $pageurl); include View::getView('header'); include View::getView('log_list'); }
/** * 登录页面 * */ function loginPage() { Option::get('login_code') == 'y' ? $ckcode = "<span>验证码</span>\n\t<div class=\"val\"><input name=\"imgcode\" id=\"imgcode\" type=\"text\" />\n\t<img src=\"../include/lib/checkcode.php\" align=\"absmiddle\"></div>" : ($ckcode = ''); require_once View::getView('login'); View::output(); }
/** * Метод для непосредственного вывода прогноза на экран * @param string $url Путь до файла с прогнозом * @return view */ public static function getForecast($url) { self::$forecast = parent::getObjectData($url); View::getView("forecast"); }
function ascMsg($msg, $url = 'javascript:history.back(-1);') { if (isset($_GET['gid'])) { define('TEMPLATE_PATH', EMLOG_ROOT . '/m/view/'); $url = BLOG_URL . 'm/?post=' . intval($_GET['gid']); include View::getView('header'); include View::getView('msg'); include View::getView('footer'); View::output(); exit; } else { emMsg($msg, $url); } }
public function render($view, $data = array()) { View::getView($view, $data); }
*/ if (!defined('EMLOG_ROOT')) { exit('error!'); } ?> <header> <div class="container"> <a href="#" data-activates="nav-mobile" class="button-collapse top-nav waves-effect waves-light circle hide-on-large-only"> <i class="mdi-navigation-menu"></i> </a> </div> <ul id="nav-mobile" class="side-nav fixed" style="left: 0px;"> <li class="logo center"> <?php require_once View::getView('modules/blogger'); ?> </li> <?php if ($widgets_exist['search']['exists']) { ?> <li class="search"> <div class="search-wrapper card"> <form name="keyform" method="get" action="<?php echo BLOG_URL; ?> index.php"> <input name="keyword" class="search" type="text" id="search"> <i class="material-icons">search</i> </form> </div>
<?php /* Template Name:默认模板 Description:默认模板,简洁优雅 Author:emlog Author Url:http://www.emlog.net */ if (!defined('EMLOG_ROOT')) { exit('error!'); } require_once View::getView('module'); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title><?php echo $site_title; ?> </title> <meta name="keywords" content="<?php echo $site_key; ?> " /> <meta name="description" content="<?php echo $site_description; ?> " /> <meta name="generator" content="emlog" /> <meta name="viewport" content="width=device-width, initial-scale=1.0">
/** * 显示404错误页面 * */ function show_404_page() { if (is_file(TEMPLATE_PATH . '404.php')) { header("HTTP/1.1 404 Not Found"); include View::getView('404'); exit; } else { emMsg('404', BLOG_URL); } }
function authPassword($postPwd, $cookiePwd, $logPwd, $logid) { $pwd = $cookiePwd ? $cookiePwd : $postPwd; if ($pwd !== addslashes($logPwd)) { include View::getView('header'); include View::getView('logauth'); include View::getView('footer'); if ($cookiePwd) { setcookie('em_logpwd_' . $logid, ' ', time() - 31536000); } View::output(); } else { setcookie('em_logpwd_' . $logid, $logPwd); } }
public function twig($view, $attr = []) { View::getView(isset($this->layout) ? $this->layout : null)->twig($this->getClassFromPath(), $view, $attr); }
ini_set('display_errors', 1); #load models include '../models/View.php'; include "../models/UserAccount.php"; include "../models/Crud.php"; include "../models/Queries.php"; #instantiate classes $view = new View(); $user = new UserAccount(); $crud = new Crud(); $queries = new Queries(); #routes if (!empty($_GET["action"])) { # =-=-=-=-=-=-= Route for Admin log in page =-=-=-= if ($_GET['action'] == "aDmInLoGIN") { $view->getView("../views/head.php"); $view->getView("../views/nav.php"); $view->getView("../views/loginForm.php"); } # =-=-=-=-=-=-= Action to login=-=-=-=-=-=-=-=-=-= if ($_GET['action'] == "login") { $user->login(); } # =-=-=-=-=-=-= Action to logout =-=-=-=-=-=-=-=-=-= if ($_GET["action"] == "logout") { $view->getView("../views/head.php"); $view->getView("../views/footer.php"); } # =-=-=-=-=-=-= Route for admin page =-=-=-=-=-=-= if ($_GET["action"] == "aDmINDasHBoard") { $view->getView("../views/head.php");
function displayContent($element = "", $putWhiteSpace = 0) { global $contentSeparator; if (!$element) { $view =& View::getContentView(); } else { $view =& View::getView($element); } if (!$view->getEmpty() && ($putWhiteSpace == putWhiteSpaceAbove || $putWhiteSpace == putWhiteSpaceAboveAndBelow)) { echo $contentSeparator; } $view->displayContent(); if (!$view->getEmpty() && ($putWhiteSpace == putWhiteSpaceBelow || $putWhiteSpace == putWhiteSpaceAboveAndBelow)) { echo $contentSeparator; } }
<div class="collapsible-body"> <p><?php echo $comment['content']; ?> </p> <div class="comment-reply right-align"> <a class="light red-text text-lighten-2 waves-effect waves-green btn-flat" href="#comment-<?php echo $comment['cid']; ?> " cid="<?php echo $comment['cid']; ?> ">回复</a> </div> </div> </li> <?php include View::getView('modules/comment-children'); ?> </ul> <?php } ?> <div class="row" id="pagenavi"> <ul class="pagination center"> <?php echo $commentPageUrl; ?> </ul> </div>
$log_content .= ' <li style=" border:1px solid #CCC;display:inline; width:110px; height:120px; float:left; padding:5px; margin:10px 5px 5px;"> <a href="' . str_replace('thum-', '', substr($photo['filename'], 1, strlen($photo['filename']))) . '" title="相片名称:' . $photo['truename'] . ' 相片描述:' . $photo['description'] . '"> <img style="border:0px; padding:5px 5px 5px;" src="' . substr($photo['filename'], 1, strlen($photo['filename'])) . '" /></a> </li>'; } $log_content .= '</ul></div><div id="pagenavi">' . $pageurl . '<span>(共有' . $page_all_no . '张相片)</span></div>'; } } else { $log_content .= '参数错误。'; } $allow_remark = 'n'; $logid = ''; addAction('index_head', 'kl_album_show_js'); include View::getView('header'); include View::getView('page'); } } else { emMsg('不存在的页面!'); } function kl_album_show_js() { $active_plugins = Option::get('active_plugins'); echo '<script type="text/javascript" src="./content/plugins/kl_album/js/jquery.lazyload.mini.js"></script> <script type="text/javascript" src="./content/plugins/kl_album/js/jquery.lightbox-0.5.js"></script> <link rel="stylesheet" type="text/css" href="./content/plugins/kl_album/css/jquery.lightbox-0.5.css" media="screen" /> <script type="text/javascript"> jQuery(function($){ $(\'img\').lazyload({effect:\'fadeIn\',placeholder:\'./content/plugins/kl_album/images/grey.gif\',threshold:200}); $(\'#kl_album_photo_list a\').lightBox(); $(\'#kl_album_list img, #kl_album_photo_list img\').mouseover(function(){ $(this).css(\'border\', \'1px solid green\')});
} if ($action == '') { $user_cache = $CACHE->readCache('user'); $options_cache = Option::getAll(); extract($options_cache); $Twitter_Model = new Twitter_Model(); $Navi_Model = new Navi_Model(); $page = isset($_GET['page']) ? intval($_GET['page']) : 1; $tws = $Twitter_Model->getTwitters($page); $twnum = $Twitter_Model->getTwitterNum(); $pageurl = pagination($twnum, Option::get('index_twnum'), $page, BLOG_URL . 't/?page='); $avatar = empty($user_cache[UID]['avatar']) ? '../admin/views/images/avatar.jpg' : '../' . $user_cache[UID]['avatar']; $rcode = Option::get('reply_code') == 'y' ? "<img src=\"" . DYNAMIC_BLOGURL . "?action=ckcode&mode=t\" />" : ''; $site_title = $Navi_Model->getNaviNameByType(Navi_Model::navitype_t) . ' - ' . $site_title; include View::getView('header'); require_once View::getView('t'); View::output(); } // 获取回复 if ($action == 'getr') { $tid = isset($_GET['tid']) ? intval($_GET['tid']) : null; $Reply_Model = new Reply_Model(); $replys = $Reply_Model->getReplys($tid, 'n'); $response = ''; if ($replys) { foreach ($replys as $val) { $sub_reply = Option::get('istreply') == 'y' ? "<a href=\"javascript:re({$tid}, '@" . addslashes($val['name']) . ":');\">回复</a>" : ''; $response .= "\n\t <li>\n\t <span class=\"name\">{$val['name']}</span> {$val['content']}<span class=\"time\">{$val['date']}</span>\n\t <em>{$sub_reply}</em>\n\t </li>"; } } else { $response .= "<li>还没有回复!</li>";
$users = $Viporg_Model->getUsers($page, $condition); $usernum = $Viporg_Model->getUserNum(); $pageurl = pagination($usernum, Option::get('admin_perpage_num'), $page, "./viporg.php?page="); include View::getView('header'); require_once View::getView('viporg'); View::output(); } if ($action == 'detail') { $uid = intval($_GET['uid']); $options_cache = Option::getAll(); extract($options_cache); $Viporg_Model = new Viporg_Model(); $user = $Viporg_Model->getUserDetail($uid); if ($user['duty'] == 1) { $user['duty'] = '理事单位'; } if ($user['duty'] == 2) { $user['duty'] = '常务理事单位'; } if ($user['duty'] == 3) { $user['duty'] = '会员单位'; } if (empty($user['avatar'])) { $user['avatar'] = './admin/views/images/avatar.jpg'; } else { $user['avatar'] = str_replace("../", '', $user['avatar']); } include View::getView('header'); require_once View::getView('viporg_info'); View::output(); }
public function home() { $rs = Book::all(); $data = $rs->toArray(); echo View::getView()->make('home', array('data' => $data))->render(); }
public function show() { View::getView('layouts/exception', $this->getData()); }
$sql = "SELECT * FROM " . DB_PREFIX . "attachment WHERE blogid = {$logid} AND thumfor = 0"; $query = $DB->query($sql); $attach = array(); while ($row = $DB->fetch_array($query)) { $attsize = changeFileSize($row['filesize']); $filename = htmlspecialchars($row['filename']); $attach[$row['aid']] = array('attsize' => $attsize, 'aid' => $row['aid'], 'filepath' => $row['filepath'], 'filename' => $filename, 'width' => $row['width'], 'height' => $row['height']); $thum = $DB->once_fetch_array('SELECT * FROM ' . DB_PREFIX . 'attachment WHERE thumfor = ' . $row['aid']); if ($thum) { $attach[$row['aid']]['thum_filepath'] = $thum['filepath']; $attach[$row['aid']]['thum_width'] = $thum['width']; $attach[$row['aid']]['thum_height'] = $thum['height']; } } $attachnum = count($attach); include View::getView('attlib'); View::output(); } //删除附件 if ($action == 'del_attach') { LoginAuth::checkToken(); $aid = isset($_GET['aid']) ? intval($_GET['aid']) : ''; $query = $DB->query("SELECT * FROM " . DB_PREFIX . "attachment WHERE aid = {$aid} "); $attach = $DB->fetch_array($query); $logid = $attach['blogid']; if (file_exists($attach['filepath'])) { @unlink($attach['filepath']) or emMsg("删除附件失败!"); } deleteQiNiu($attach['filepath']); $query = $DB->query("SELECT * FROM " . DB_PREFIX . "attachment WHERE thumfor = " . $attach['aid']); $thum_attach = $DB->fetch_array($query);
<?php require_once 'lib/view.php'; require_once 'models/m_siswa.php'; require_once 'models/m_nationality.php'; $siswa = new Siswa(); $nat = new Nationality(); $data['title'] = "Students"; $data['page'] = "v_siswa.php"; if (!empty($_POST)) { $nis = $_POST['input_nis']; $name = $_POST['input_name']; $email = $_POST['input_email']; $id_nat = $_POST['input_nationality']; $fn = $_FILES['input_file']; $ff = 'img/' . date('YmdHis') . '.jpg'; copy($fn['tmp_name'], $ff); $siswa->createSiswa($id_nat, $nis, $name, $email, $ff); $success = "Data Berhasil di Tambahkan"; } $data['siswa'] = $siswa->readAllSiswa(); $data['nat'] = $nat->readAllNationality(); require_once View::getView('dashboard.php', $data);
function OverlayController($param = 0, $id = 0) { global $lll, $gorumroll; static $counter = 0; static $objects = array(); if (!$param) { return; } JavaScript::addInclude(GORUM_JS_DIR . "/jquery/jquery.overlay.js"); JavaScript::addInclude(GORUM_JS_DIR . "/jquery/jquery.livequery.js"); JavaScript::addCss(CSS_DIR . "/overlay.css"); // $ajaxTarget-be gyujtjul a load fuggveny parameteret: $text = $ajaxTarget = ""; if (is_string($param)) { $this->id = $id ? $id : "overlay_" . $counter++; $this->triggerSelector = "[rel=#{$this->id}]"; $text = isset($lll[$param]) ? $lll[$param] : $param; } elseif (is_object($param)) { $this->id = $id ? $id : "overlay_" . $counter++; $this->triggerSelector = "[rel=#{$this->id}]"; $ajaxTarget = "'" . $param->makeUrl() . "'"; } else { if (isset($param["id"])) { $this->id = $param["id"]; if (array_key_exists($this->id, $objects)) { foreach (get_object_vars($objects[$this->id]) as $attr => $value) { $this->{$attr} =& $objects[$this->id]->{$attr}; } return; } } else { $this->id = "overlay_" . $counter++; } if (isset($param["class"])) { $this->class = $param["class"]; } if (isset($param["ajaxFromHref"])) { $this->ajaxFromHref = $param["ajaxFromHref"]; } if (isset($param["ajaxFromContent"])) { $this->ajaxFromContent = $param["ajaxFromContent"]; } if (isset($param["triggerSelector"])) { $this->triggerSelector = $param["triggerSelector"]; } else { $this->triggerSelector = "[rel=#{$this->id}]"; } if (isset($param["content"])) { if (is_string($param["content"])) { if (substr($param["content"], 0, 6) == "http://") { $ajaxTarget = "'{$param['content']}'"; } elseif ($this->ajaxFromContent) { $ctrl =& new AppController($param["content"]); $ajaxTarget = "'" . $ctrl->makeUrl() . "'"; } else { $text = isset($lll[$param["content"]]) ? $lll[$param["content"]] : $param["content"]; } } elseif (is_array($param["content"])) { $text = call_user_func($param["content"]); } elseif (is_object($param["content"])) { if ($this->ajaxFromContent) { $ajaxTarget = "'" . $param["content"]->makeUrl() . "'"; } else { $gorumroll->processMethod($param["content"], $this->id); $tpl =& View::getView($this->id); $text = $tpl->__toString(); } } } if ($this->ajaxFromHref) { $ajaxTarget = "this.getTrigger().attr('href')"; } if (isset($param["expose"])) { $this->expose = $param["expose"]; } if (isset($param["closeOnClick"])) { $this->closeOnClick = $param["closeOnClick"]; } $this->closeOnClick = $this->closeOnClick ? 'true' : 'false'; if (isset($param["postponeOnloadAction"])) { $this->postponeOnloadAction = $param["postponeOnloadAction"]; } if (isset($param["speed"])) { $this->speed = $param["speed"]; } if (isset($param["top"])) { $this->top = $param["top"]; } if (isset($param["height"])) { $this->height = $param["height"]; } if (isset($param["close"])) { $this->close = $param["close"]; } if ($this->expose) { JavaScript::addInclude(GORUM_JS_DIR . "/jquery/jquery.expose.js"); $this->onBeforeLoad = "function() { \n this.getBackgroundImage().expose({\n speed: {$this->speed}, \n color: '#fff',\n closeOnClick: {$this->closeOnClick}\n }); \n /*insertionPoint*/\n }"; $this->onClose = "function() { \n \$.expose.close();\t\t\t\n /*insertionPoint*/\n }"; } } if ($ajaxTarget) { $onBeforeLoadForAjax = "\n this.getContent().find('.ajaxOverlayContent').load({$ajaxTarget}, '', function(){\n \$(this).find('.submitfooter input').eq(1).click( function() { \n \$('{$this->triggerSelector}').overlay().close(); \n return false; \n });\n }); \n /*insertionPoint*/\n "; if ($this->onBeforeLoad != 'null') { $this->onBeforeLoad = str_replace("/*insertionPoint*/", $onBeforeLoadForAjax, $this->onBeforeLoad); } else { $this->onBeforeLoad = "function() { {$onBeforeLoadForAjax} }"; } $ajaxOverlayContent = "<div class='ajaxOverlayContent'></div>"; } else { $ajaxOverlayContent = ""; } // ha parameterben erkeznek callback JS sorok, akkor azokat a fentebb definialt callback body-k utan szurjuk be az /*insertionPoint*/ helyere: foreach (array("onLoad", "onBeforeLoad", "onClose") as $callback) { if (is_array($param) && isset($param[$callback]) && $this->{$callback} != 'null') { $this->{$callback} = str_replace("/*insertionPoint*/", $param[$callback], $this->{$callback}); } elseif (is_array($param) && isset($param[$callback])) { $this->{$callback} = $param[$callback]; } elseif ($this->{$callback} != 'null') { $this->{$callback} = str_replace("/*insertionPoint*/", "", $this->{$callback}); } } // ajaxFromHref eseten, ha content-ben atadunk valamit, azt be lehet szurni az Ajax tartalom ele: $this->content = "<div id='{$this->id}' class='{$this->class}' style='height: {$this->height}px;'> \\\n <div class='close'></div>" . preg_replace("/\n|\r/", "", addcslashes($text, '"')) . "{$ajaxOverlayContent} \\\n </div>"; $this->prependAction = "\$('body').prepend(\"{$this->content}\");"; //var_dump($this->closeOnClick); $this->overlayAction = "\n \$('{$this->triggerSelector}').livequery(function(){ \$(this).overlay({\n onLoad: {$this->onLoad}, \n onBeforeLoad: {$this->onBeforeLoad}, \n onClose: {$this->onClose},\n closeOnClick: {$this->closeOnClick},\n speed: {$this->speed},\n close: '{$this->close}'\n });});\n "; if (!$this->postponeOnloadAction) { JavaScript::addOnload($this->prependAction, $this->id); JavaScript::addOnload($this->overlayAction, $this->triggerSelector); } if (!isset($objects[$this->id])) { $objects[$this->id] = $this; } }
<?php require_once '../init.php'; define('TEMPLATE_PATH', TPLS_PATH . Option::get('mobile_templet') . '/'); //前台模板路径 $sMenu = $_GET['s']; if ($sMenu == "m") { require_once View::getView('m_Understand'); } elseif ($sMenu == "a") { require_once View::getView('m_Apply'); } elseif ($sMenu == "s") { require_once View::getView('m_Search'); }
function displayContent($params) { $comment_page = isset($params[4]) && $params[4] == 'comment-page' ? intval($params[5]) : 1; $Log_Model = new Log_Model(); $CACHE = Cache::getInstance(); $options_cache = $CACHE->readCache('options'); extract($options_cache); $logid = 0; if (isset($params[1])) { if ($params[1] == 'post') { $logid = isset($params[2]) ? intval($params[2]) : 0; } elseif (is_numeric($params[1])) { $logid = intval($params[1]); } else { $logalias_cache = $CACHE->readCache('logalias'); if (!empty($logalias_cache)) { $alias = addslashes(urldecode(trim($params[1]))); $logid = array_search($alias, $logalias_cache); if (!$logid) { show_404_page(); } } } } $Comment_Model = new Comment_Model(); $logData = $Log_Model->getOneLogForHome($logid); if ($logData === false) { show_404_page(); } extract($logData); if (!empty($password)) { $postpwd = isset($_POST['logpwd']) ? addslashes(trim($_POST['logpwd'])) : ''; $cookiepwd = isset($_COOKIE['em_logpwd_' . $logid]) ? addslashes(trim($_COOKIE['em_logpwd_' . $logid])) : ''; $Log_Model->AuthPassword($postpwd, $cookiepwd, $password, $logid); } //meta switch ($log_title_style) { case '0': $site_title = $log_title; break; case '1': $site_title = $log_title . ' - ' . $blogname; break; case '2': $site_title = $log_title . ' - ' . $site_title; break; } $site_description = extractHtmlData($log_content, 90); $log_cache_tags = $CACHE->readCache('logtags'); if (!empty($log_cache_tags[$logid])) { foreach ($log_cache_tags[$logid] as $value) { $site_key .= ',' . $value['tagname']; } } //comments $verifyCode = ISLOGIN == false && $comment_code == 'y' ? "<img src=\"" . BLOG_URL . "include/lib/checkcode.php\" align=\"absmiddle\" /><input name=\"imgcode\" type=\"text\" class=\"input\" size=\"5\" tabindex=\"5\" />" : ''; $ckname = isset($_COOKIE['commentposter']) ? htmlspecialchars(stripslashes($_COOKIE['commentposter'])) : ''; $ckmail = isset($_COOKIE['postermail']) ? htmlspecialchars($_COOKIE['postermail']) : ''; $ckurl = isset($_COOKIE['posterurl']) ? htmlspecialchars($_COOKIE['posterurl']) : ''; $comments = $Comment_Model->getComments(0, $logid, 'n', $comment_page); include View::getView('header'); if ($type == 'blog') { $Log_Model->updateViewCount($logid); $neighborLog = $Log_Model->neighborLog($timestamp); $tb = array(); $tb_url = ''; //兼容未删除引用模板 include View::getView('echo_log'); } elseif ($type == 'page') { $template = !empty($template) && file_exists(TEMPLATE_PATH . $template . '.php') ? $template : 'page'; include View::getView($template); } }
</div> <div class="comment_form" id="comment-place"> <?php blog_comments_post($logid, $ckname, $ckmail, $ckurl, $verifyCode, $allow_remark); ?> </div><?php /*评论输入框*/ ?> <div class="comment_views"> <ol class="parents"> <?php if (isShowComment($comnum)) { blog_comments($comments, $comnum, $comment_page); } ?> </ol> </div><?php /*已有评论内容*/ ?> </div><?php /*评论布局标签结束位置*/ ?> </div><!--end content--> </div><!--end contentWrap--> <?php include View::getView('side'); ?> </section> <?php include View::getView('footer');
?> js/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="<?php echo TEMPLATE_URL; ?> js/materialize.min.js"></script> <script src="<?php echo BLOG_URL; ?> include/lib/js/common_tpl.js" type="text/javascript"></script> <script type="text/javascript" src="<?php echo TEMPLATE_URL; ?> js/main.js"></script> <!--[if lt IE 9]> <script src="<?php echo TEMPLATE_URL; ?> /js/html5.js"></script> <![endif]--> <?php doAction('index_head'); ?> </head> <body> <?php require_once View::getView('modules/nav'); ?>