当前位置: 首页>>代码示例>>PHP>>正文


PHP get_navigator函数代码示例

本文整理汇总了PHP中get_navigator函数的典型用法代码示例。如果您正苦于以下问题:PHP get_navigator函数的具体用法?PHP get_navigator怎么用?PHP get_navigator使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_navigator函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: floatval

     $sql = "SELECT type_money FROM " . $ecs->table('bonus_type') . " WHERE type_id = '{$goods['bonus_type_id']}' " . " AND send_type = '" . SEND_BY_GOODS . "' " . " AND send_start_date <= '{$time}'" . " AND send_end_date >= '{$time}'";
     $goods['bonus_money'] = floatval($db->getOne($sql));
     if ($goods['bonus_money'] > 0) {
         $goods['bonus_money'] = price_format($goods['bonus_money']);
     }
 }
 $smarty->assign('goods', $goods);
 $smarty->assign('goods_id', $goods['goods_id']);
 $smarty->assign('bid_record', $bidrecord);
 $smarty->assign('promote_end_time', $goods['gmt_end_time']);
 $smarty->assign('categories', get_categories_tree());
 // 分类树
 /* meta */
 $smarty->assign('keywords', htmlspecialchars($goods['keywords']));
 $smarty->assign('description', htmlspecialchars($goods['goods_brief']));
 $smarty->assign('navigator_list', get_navigator($ctype, $catlist));
 //自定义导航栏
 if (!empty($GLOBALS['_CFG']['search_keywords'])) {
     $searchkeywords = explode(',', trim($GLOBALS['_CFG']['search_keywords']));
 } else {
     $searchkeywords = array();
 }
 $smarty->assign('searchkeywords', $searchkeywords);
 //热搜关键词
 /* 或得顶级分类产品名称*/
 $sql = 'SELECT cat_id FROM ' . $GLOBALS['ecs']->table('goods') . ' where goods_id =' . $goods['goods_id'];
 $parentid = $GLOBALS['db']->getOne($sql);
 $sql = 'SELECT parent_id from ' . $GLOBALS['ecs']->table('category') . ' where cat_id =' . $parentid;
 $parentid = $GLOBALS['db']->getOne($sql);
 $sql = 'SELECT cat_name FROM ' . $GLOBALS['ecs']->table('category') . ' where cat_id =' . $parentid;
 $parentcatname = $GLOBALS['db']->getOne($sql);
开发者ID:blowfishJ,项目名称:galaxyCode,代码行数:31,代码来源:goods.php

示例2: assign_template

function assign_template($ctype = '', $catlist = array())
{
    global $smarty, $db;
    $smarty->assign('image_width', $GLOBALS['_CFG']['image_width']);
    $smarty->assign('image_height', $GLOBALS['_CFG']['image_height']);
    $smarty->assign('points_name', $GLOBALS['_CFG']['integral_name']);
    $smarty->assign('qq', explode(',', $GLOBALS['_CFG']['qq']));
    $smarty->assign('ww', explode(',', $GLOBALS['_CFG']['ww']));
    $smarty->assign('ym', explode(',', $GLOBALS['_CFG']['ym']));
    $smarty->assign('msn', explode(',', $GLOBALS['_CFG']['msn']));
    $smarty->assign('skype', explode(',', $GLOBALS['_CFG']['skype']));
    $smarty->assign('stats_code', $GLOBALS['_CFG']['stats_code']);
    $smarty->assign('copyright', sprintf($GLOBALS['_LANG']['copyright'], date('Y'), $GLOBALS['_CFG']['shop_name']));
    $smarty->assign('shop_name', $GLOBALS['_CFG']['shop_name']);
    $full_uri = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    //by Bragg
    $smarty->assign('shop_url', substr($full_uri, 0, strripos($full_uri, "mobile/")));
    //by Bragg
    $smarty->assign('service_email', $GLOBALS['_CFG']['service_email']);
    $smarty->assign('service_phone', $GLOBALS['_CFG']['service_phone']);
    $smarty->assign('shop_address', $GLOBALS['_CFG']['shop_address']);
    $smarty->assign('licensed', license_info());
    $smarty->assign('ecs_version', VERSION);
    $smarty->assign('icp_number', $GLOBALS['_CFG']['icp_number']);
    $smarty->assign('username', !empty($_SESSION['user_name']) ? $_SESSION['user_name'] : '');
    $smarty->assign('category_list', cat_list(0, 0, true, 2, false));
    $smarty->assign('catalog_list', cat_list(0, 0, false, 1, false));
    $smarty->assign('navigator_list', get_navigator($ctype, $catlist));
    //自定义导航栏
    //查询地区 by wang
    $GLOBALS['_CFG']['shop_country'] = !empty($GLOBALS['_CFG']['shop_country']) ? $GLOBALS['_CFG']['shop_country'] : '0';
    $GLOBALS['_CFG']['shop_province'] = !empty($GLOBALS['_CFG']['shop_province']) ? $GLOBALS['_CFG']['shop_province'] : '0';
    $GLOBALS['_CFG']['shop_city'] = !empty($GLOBALS['_CFG']['shop_city']) ? $GLOBALS['_CFG']['shop_city'] : '0';
    $condition_arr = array($GLOBALS['_CFG']['shop_country'], $GLOBALS['_CFG']['shop_province'], $GLOBALS['_CFG']['shop_city']);
    $condition_str = implode(',', $condition_arr);
    $sql = "select region_name from " . $GLOBALS['ecs']->table('region') . " where region_id in ({$condition_str})";
    $region_arr = $GLOBALS['db']->getAll($sql);
    $shop_region = '';
    if (is_array($region_arr)) {
        foreach ($region_arr as $value) {
            $shop_region .= $value['region_name'];
        }
    }
    $smarty->assign('shop_region', $shop_region);
    //查询地区 by wang
    if (!empty($GLOBALS['_CFG']['search_keywords'])) {
        $searchkeywords = explode(',', trim($GLOBALS['_CFG']['search_keywords']));
    } else {
        $searchkeywords = array();
    }
    $smarty->assign('searchkeywords', $searchkeywords);
}
开发者ID:YangZeSummer,项目名称:NanJingSecond-Hand,代码行数:52,代码来源:lib_main.php

示例3: assign_template

function assign_template($ctype = '', $catlist = array())
{
    global $smarty;

    $smarty->assign('image_width',   $GLOBALS['_CFG']['image_width']);
    $smarty->assign('image_height',  $GLOBALS['_CFG']['image_height']);
    $smarty->assign('points_name',   $GLOBALS['_CFG']['integral_name']);
    $smarty->assign('qq',            explode(',', $GLOBALS['_CFG']['qq']));
    $smarty->assign('ww',            explode(',', $GLOBALS['_CFG']['ww']));
    $smarty->assign('ym',            explode(',', $GLOBALS['_CFG']['ym']));
    $smarty->assign('msn',           explode(',', $GLOBALS['_CFG']['msn']));
    $smarty->assign('skype',         explode(',', $GLOBALS['_CFG']['skype']));
    $smarty->assign('stats_code',    $GLOBALS['_CFG']['stats_code']);
    $smarty->assign('copyright',     sprintf($GLOBALS['_LANG']['copyright'], date('Y'), $GLOBALS['_CFG']['shop_name']));
    $smarty->assign('shop_name',     $GLOBALS['_CFG']['shop_name']);
    $smarty->assign('service_email', $GLOBALS['_CFG']['service_email']);
    $smarty->assign('service_phone', $GLOBALS['_CFG']['service_phone']);
    $smarty->assign('shop_address',  $GLOBALS['_CFG']['shop_address']);
    $smarty->assign('licensed',      license_info());
    $smarty->assign('ecs_version',   VERSION);
    $smarty->assign('icp_number',    $GLOBALS['_CFG']['icp_number']);
    $smarty->assign('username',      !empty($_SESSION['user_name']) ? $_SESSION['user_name'] : '');
    $smarty->assign('category_list', cat_list(0, 0, true,  2, false));
    $smarty->assign('catalog_list',  cat_list(0, 0, false, 1, false));
    $smarty->assign('navigator_list',        get_navigator($ctype, $catlist));  //自定义导航栏

    if (!empty($GLOBALS['_CFG']['search_keywords']))
    {
        $searchkeywords = explode(',', trim($GLOBALS['_CFG']['search_keywords']));
    }
    else
    {
        $searchkeywords = array();
    }
    $smarty->assign('searchkeywords', $searchkeywords);
}
开发者ID:noikiy,项目名称:mdwp,代码行数:36,代码来源:lib_main.php

示例4: get_navigator

?>
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
show LIMIT gallery photo at first page

<?php 
echo gallery::get_gallery_first_page("/frontend/gallery/first_page.php", 1);
?>
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
bread

<?php 
echo get_navigator();
?>
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
H1

<?php 
echo $statik['H1'];
?>
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
show ALL CONTENT

<?php 
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:31,代码来源:all.php

示例5: show_shop

function show_shop()
{
    global $x7s, $shopper, $db, $prefix, $evaluate_cost;
    $body = '';
    $retval = '';
    $evaluation = '';
    if (!isset($_POST['evaluate'])) {
        $_POST['evaluate'] = 0;
    }
    if (isset($_POST['sell'])) {
        foreach ($_POST['sell'] as $obj) {
            if (!$_POST['evaluate']) {
                $retval .= sell_obj($obj, $x7s->username, $shopper);
            } else {
                $evaluation .= get_evaluation($obj);
            }
        }
    }
    if (isset($_POST['buy'])) {
        foreach ($_POST['buy'] as $obj) {
            $retval .= sell_obj($obj, $shopper, $x7s->username);
        }
    }
    $player_nav = get_navigator($x7s->username);
    $player_list = $player_nav;
    $player_list .= get_object_list($x7s->username, $_GET['pg_start']);
    $player_list .= $player_nav;
    if (!$_POST['evaluate']) {
        $shopper_nav = get_navigator($shopper);
        $shopper_list = $shopper_nav;
        $shopper_list .= get_object_list($shopper, $_GET['shop_start']);
        $shopper_list .= $shopper_nav;
    } else {
        $shopper_list = $evaluation;
        $shopper_list .= "<p><a href='./index.php?act=shop'>\n\t\t\t[Torna all'elenco oggetti]</a></p>";
    }
    $body .= '<script language="javascript" type="text/javascript">
		function send_evaluate() {
			document.forms["sell"].evaluate.value = 1;
			document.forms["sell"].submit();
		}

	function close_err(){
		document.getElementById("popup").style.visibility="hidden";
	}

	function category_change(elem) {
		query = "&category=" + elem.options[elem.selectedIndex].value;
		window.location.href = "./index.php?act=shop&pg_start=' . $_GET['pg_start'] . '" + query;
	}
	</script>';
    if ($retval != '') {
        $body .= '<div id="popup" >' . $retval . '
			<br><br><input name="ok" type="button" class="button" value="OK"' . 'onClick="javascript: close_err(); ">
			</div>';
    }
    $categories = '';
    $query = $db->DoQuery("SELECT DISTINCT category \n\t\t\tFROM {$prefix}objects\n\t\t\tWHERE owner = '{$shopper}'\n\t\t\tORDER BY category");
    while ($row = $db->Do_Fetch_Assoc($query)) {
        if ($row['category']) {
            $categories .= "<option value=\"{$row['category']}\"";
            if (isset($_GET['category']) && $_GET['category'] == $row['category']) {
                $categories .= " selected";
            }
            $categories .= ">{$row['category']}</option>";
        }
    }
    $body .= '
		<div id="player">
		<form action="./index.php?act=shop" method="post" name="sell">
		<input type="hidden" name="evaluate" value="0">
		<div id="player_list">
		__player_list__		
		</div>
		<div id="player_buttons">
		<input class="button" type="submit" value="Vendi">
		<input class="button" type="button" 
		value="Valuta usi rimanenti (costo: ' . $evaluate_cost . ')"
		onClick="javascript: send_evaluate();">
		</div>
		</form>
		</div>
		<div id="shopper">
		<form action="./index.php?act=shop" method="post" name="buy">
		<div id="shopper_list">
		__shopper_list__		
		</div>
		<div id="shopper_buttons">
		<input class="button" type="submit" value="Compra">
		Categoria:
		<select class="button" onChange="javascript: category_change(this);">
		<option value="_tutto_">Tutto</option>
		' . $categories . '
		</select>
		</div>
		</form>
		</div>
		</div>
		';
    $body = preg_replace("/__player_list__/", $player_list, $body);
//.........这里部分代码省略.........
开发者ID:EZDM,项目名称:omeyocan,代码行数:101,代码来源:shop.php

示例6: substr

        //若是用户名和头像发生变化,修改&& is_username($userinfo_back_arr['nickname'])
        $str = "";
        if (!empty($userinfo_back_arr)) {
            if ($userinfo_back_arr['nickname'] != '' && $userinfo_back_arr['nickname'] != $rs['uname'] && !preg_match('/\'\\/^\\s*$|^c:\\\\con\\\\con$|[%,\\*\\"\\s\\t\\<\\>\\&\'\\\\]/', $userinfo_back_arr['nickname'])) {
                $str .= " uname='" . $userinfo_back_arr['nickname'] . "' ,";
            }
            if ($headimgurl != '' && $headimgurl != $rs['headimgurl']) {
                $str .= " headimgurl='" . $headimgurl . "' ,";
            }
            if (isset($userinfo_back_arr['subscribe'])) {
                $str .= " is_subscribe=" . $userinfo_back_arr['subscribe'] . " ,";
            }
            if ($str != '') {
                $str = substr($str, 0, -1);
                $sql = "update " . $hhs->table('users') . " set " . $str . " where user_id=" . $rs['user_id'];
                $db->query($sql);
            }
        }
        if ($_SESSION['user_id'] != $rs['user_id']) {
            $_SESSION['user_id'] = $rs['user_id'];
            $_SESSION['user_name'] = $rs['user_name'];
            update_user_info();
            recalculate_price();
        }
    }
}
$smarty->assign('navigator_list', get_navigator());
//自定义导航栏
$smarty->assign('current_url', substr($_SERVER[REQUEST_URI], 1));
// $user->set_session('山峰');
// $user->set_cookie('山峰', null);
开发者ID:shiruolin,项目名称:hzzshop,代码行数:31,代码来源:init.php


注:本文中的get_navigator函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。