本文整理汇总了PHP中get_nav_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_nav_url函数的具体用法?PHP get_nav_url怎么用?PHP get_nav_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_nav_url函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
hook('homeIndex');
$default_url = C('DEFUALT_HOME_URL');
//获得配置,如果为空则显示聚合,否则跳转
if ($default_url != '') {
redirect(get_nav_url($default_url));
}
$this->display();
}
开发者ID:fishling,项目名称:chatPro,代码行数:10,代码来源:IndexController.class.php
示例2: index
public function index()
{
if (is_login()) {
}
hook('homeIndex');
$default_url = C('DEFUALT_HOME_URL');
//获得配置,如果为空则显示聚合,否则跳转
if ($default_url != '' && strtolower($default_url) != 'home/index/index') {
redirect(get_nav_url($default_url));
}
$show_blocks = get_kanban_config('BLOCK', 'enable', array(), 'Home');
$this->assign('showBlocks', $show_blocks);
$enter = modC('ENTER_URL', '', 'Home');
$this->assign('enter', get_nav_url($enter));
$sub_menu['left'] = array(array('tab' => 'home', 'title' => L('_SQUARE_'), 'href' => U('index')));
$this->assign('sub_menu', $sub_menu);
$this->assign('current', 'home');
$this->display();
}
开发者ID:weihuagu,项目名称:commonmodel,代码行数:19,代码来源:IndexController.class.php
示例3: get_list_field
function get_list_field($data, $grid)
{
// 获取当前字段数据
foreach ($grid['field'] as $field) {
$array = explode('|', $field);
$temp = $data[$array[0]];
// 函数支持
if (isset($array[1])) {
$temp = call_user_func($array[1], $temp);
}
$data2[$array[0]] = $temp;
}
if (!empty($grid['format'])) {
$value = preg_replace_callback('/\\[([a-z_]+)\\]/', function ($match) use($data2) {
return $data2[$match[1]];
}, $grid['format']);
} else {
$value = implode(' ', $data2);
}
// 链接支持
if (!empty($grid['href'])) {
$links = explode(',', $grid['href']);
foreach ($links as $link) {
$array = explode('|', $link);
$href = $array[0];
if (preg_match('/^\\[([a-z_]+)\\]$/', $href, $matches)) {
$val[] = $data2[$matches[1]];
} else {
$show = isset($array[1]) ? $array[1] : $value;
// 替换系统特殊字符串
$href = str_replace(array('[DELETE]', '[EDIT]', '[SEE]', '[LIST]'), array('del?ids=[id]&model=[model_id]', 'edit?id=[id]&model=[model_id]&cate_id=[category_id]', get_index_url() . '/index.php?s=/home/article/detail/id/[id].html', 'index?pid=[id]&model=[model_id]&cate_id=[category_id]'), $href);
// 替换数据变量
$href = preg_replace_callback('/\\[([a-z_]+)\\]/', function ($match) use($data) {
return $data[$match[1]];
}, $href);
$val[] = '<a href="' . get_nav_url($href) . '" target="' . get_target_attr($href) . '">' . $show . '</a>';
}
}
$value = implode(' ', $val);
}
return $value;
}
开发者ID:gitchenze,项目名称:soloshop,代码行数:42,代码来源:function.php
示例4: foreach
<?php
if (is_array($__MENU__["main"])) {
$i = 0;
$__LIST__ = $__MENU__["main"];
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $menu) {
$mod = $i % 2;
++$i;
?>
<li class="<?php
echo isset($menu["class"]) && $menu["class"] !== "" ? $menu["class"] : '';
?>
"><a href="<?php
echo get_nav_url($menu["url"]);
?>
"><?php
echo $menu["title"];
?>
</a></li><?php
}
}
} else {
echo "";
}
?>
<li><a href="<?php
echo get_index_url();
?>
" target="_blank">网站首页</a></li>
开发者ID:a1357479,项目名称:techan,代码行数:31,代码来源:65a5c81e2e43da849a7b345f7d20293b.php
示例5: D
<ul class="nav">
<?php
$__NAV__ = D('Channel')->lists();
if (is_array($__NAV__)) {
$i = 0;
$__LIST__ = $__NAV__;
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $nav) {
$mod = $i % 2;
++$i;
?>
<li>
<a href="<?php
echo get_nav_url($nav["url"]);
?>
"><?php
echo $nav["title"];
?>
</a>
</li><?php
}
}
} else {
echo "";
}
?>
</ul>
</div>
<div class="nav-collapse collapse pull-right">
开发者ID:commiunty,项目名称:Mytest,代码行数:31,代码来源:9a9e4227b3c0b552fe0f4e7e528d8737.php
示例6: login
public function login()
{
$this->setTitle('用户登录');
if (IS_POST) {
$result = A('Ucenter/Login', 'Widget')->doLogin();
if ($result['status']) {
//$this->success($result['info'], get_nav_url(C('AFTER_LOGIN_JUMP_URL')));
$this->success('登陆成功', get_nav_url(C('AFTER_LOGIN_JUMP_URL')));
} else {
$this->error($result['info']);
}
} else {
//显示登录页面
$this->display();
}
}
开发者ID:smartymoon,项目名称:e-anjia,代码行数:16,代码来源:MemberController.class.php
示例7: get_nav_url
<li><a style="color:<?php
echo $vo["color"];
?>
"
target="<?php
if ($vo["target"] == "1") {
?>
_blank<?php
} else {
?>
_self<?php
}
?>
"
href="<?php
echo get_nav_url($vo['url']);
?>
"><span
class="icon-<?php
echo $vo["icon"];
?>
"></span> <?php
echo $vo["title"];
?>
<span
class="label label-badge rank-label" title="<?php
echo $vo["band_text"];
?>
"
style="background: <?php
echo $vo["band_color"];
开发者ID:RaiN24,项目名称:rain,代码行数:31,代码来源:6ef1c8f2cea7316f39547add01bf3380.php
示例8: login
public function login()
{
$this->setTitle('用户登录');
if (IS_POST) {
$result = A('Ucenter/Login', 'Widget')->doLogin();
// echo $result['html']; //输出同步登录的js,包括登录到Ucenter和Ocenter的
if ($result['status']) {
$this->success($result['info'], get_nav_url(C('AFTER_LOGIN_JUMP_URL'), 3));
} else {
$this->error($result['info']);
}
} else {
//显示登录页面
$this->display();
}
}
开发者ID:suhanyujie,项目名称:digitalOceanVps,代码行数:16,代码来源:MemberController.class.php
示例9: login
public function login($username = '', $password = '', $verify = '', $remember = '')
{
$this->setTitle('用户登录');
if (IS_POST) {
//登录验证
/* 检测验证码 */
if (C('VERIFY_OPEN') == 1 or C('VERIFY_OPEN') == 3) {
if (!check_verify($verify)) {
$this->error('验证码输入错误。');
}
}
/* 调用UC登录接口登录 */
$user = new UserApi();
$uid = $user->login($username, $password);
if (0 < $uid) {
//UC登录成功
/* 登录用户 */
$Member = D('Member');
if ($Member->login($uid, $remember == 'on')) {
//登录用户
//TODO:跳转到登录前页面
$this->success('登录成功!', get_nav_url(C('AFTER_LOGIN_JUMP_URL')));
} else {
$this->error($Member->getError());
}
} else {
//登录失败
switch ($uid) {
case -1:
$error = '用户不存在或被禁用!';
break;
//系统级别禁用
//系统级别禁用
case -2:
$error = '密码错误!';
break;
default:
$error = '未知错误27!';
break;
// 0-接口参数错误(调试阶段使用)
}
$this->error($error);
}
} else {
//显示登录表单
if (is_login()) {
redirect(U('Home/Index/index'));
}
$this->display();
}
}
开发者ID:yaomoo,项目名称:bbs,代码行数:51,代码来源:UserController.class.php
示例10: foreach
<div class="product-wrap pos">
<!--子分类-->
<div class="cf">
<div class="fl wd252 pr20">
<?php
if (is_array($cate['child'])) {
$i = 0;
$__LIST__ = $cate['child'];
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $cate_sub) {
$mod = $i % 2;
++$i;
?>
<ul class="cf"> <li><span><a href="<?php
echo U('home/article/lists/category/' . $cate_sub['name']);
?>
"><?php
echo $cate_sub["title"];
?>
</a></span>
<?php
if ($cate_sub['child']) {
if (is_array($cate_sub['child'])) {
$i = 0;
$__LIST__ = $cate_sub['child'];
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $cate_sub_two) {
开发者ID:a1357479,项目名称:techan,代码行数:31,代码来源:769e70f2e46f34ceb60619bbda5e4691.php
注:本文中的get_nav_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论