/** * go to last accessed page, excluding current page */ function gobackurl($url_to_skip = false, $no_history_goto = false) { // prepare url_to_skip if ($url_to_skip == false) { $url_to_skip = get_cur_page_url(); } else { $skip_postfix = $url_to_skip; } // prepare no_history_goto if ($no_history_goto == false) { $no_history_goto = uri(''); } $rtn = false; // only update gobackurl when current url does not match stored history url if ($url_to_skip == false) { if ($_SESSION['gobackurl'] != get_cur_page_url()) { $rtn = $_SESSION['gobackurl']; $_SESSION['gobackurl'] = get_cur_page_url(); } } else { if (!preg_match('/' . preg_quote($url_to_skip, '/') . '/', get_cur_page_url())) { $rtn = $_SESSION['gobackurl']; $_SESSION['gobackurl'] = get_cur_page_url(); } } return $rtn ? $rtn : $no_history_goto; }
} ?> <li><a href="<?php echo uri('users/logout'); ?> ">登出</a></li> </ul> </div> <div class="logo-element"> ct21 </div> </li> <?php if ($user->hasPermission('管理本公司用户')) { $current_url = get_cur_page_url(); ?> <li <?php echo_link_active_class('/^siteuser/', $current_url); ?> > <a href="#"><i class="fa fa-th-large"></i> <span class="nav-label">用户管理</span> <span class="fa arrow"></span></a> <ul class="nav nav-second-level collapse"> <li <?php echo_link_active_class('/^siteuser\\/list/', $current_url); ?> ><a href="<?php echo uri('siteuser/list'); ?> ">所有本公司用户</a></li> <li <?php
<?php require_once 'classes/htmlwarrior.php'; $htmlwarrior = new htmlwarrior(); require_once 'includes/functions.php'; if (!file_exists('config.php')) { copy('config-sample.php', 'config.php'); } require 'config.php'; require $htmlwarrior->config['code_path'] . '/externals/smarty/libs/Smarty.class.php'; $smarty = new Smarty(); #$smarty->allow_php_tag = true; $smarty->error_reporting = $htmlwarrior->config['php_error_reporting']; error_reporting($htmlwarrior->config['php_error_reporting']); if (!isset($txt)) { $txt = array(); require_once 'locale/' . $htmlwarrior->config['locale']; } $smarty->assign('txt', $txt); require_once 'includes/db.php'; $htmlwarrior->runtime = array('url' => get_cur_page_url(), 'parsed_url' => parse_url(get_cur_page_url())); $htmlwarrior->runtime['lang_current'] = get_cur_lang();
<div class="container" id="mainnav"> <div class="row"> <div class="col-xs-6 <?php echo preg_match('/^\\/articles/', get_cur_page_url()) ? 'active' : ''; ?> item"> <a href="<?php echo uri('articles'); ?> ">文章</a> </div> <div class="col-xs-6 <?php echo preg_match('/^\\/accounts/', get_cur_page_url()) ? 'active' : ''; ?> item"> <a href="<?php echo uri('accounts'); ?> ">公众号</a> </div> </div> </div>
<a href="<?php echo strpos($cc->getUri(), 'http') === 0 ? $cc->getUri() : uri($cc->getUri()); ?> "><?php echo $cc->getName(); ?> </a> <?php if (sizeof($cc->getChildren())) { ?> <ul class="sub-menu"> <?php foreach ($cc->getChildren() as $ccc) { ?> <li class="menu-item <?php echo_link_active_class('/^' . $ccc->getUri() . '$/', get_cur_page_url(), 'current-menu-item'); ?> <?php if (sizeof($ccc->getChildren())) { ?> menu-item-has-children<?php } ?> "> <a href="<?php echo strpos($ccc->getUri(), 'http') === 0 ? $ccc->getUri() : uri($ccc->getUri()); ?> "><?php echo $ccc->getName(); ?> </a>
<?php require $smartysh->config["code_path"] . '/externals/smarty/libs/Smarty.class.php'; $smarty = new Smarty(); $smarty->allow_php_tag = true; $smarty->error_reporting = ~E_NOTICE; require_once "includes/db.php"; $smartysh->runtime = array("url" => get_cur_page_url(), "parsed_url" => parse_url(get_cur_page_url()));