PHP 变量分页标签页面源代码技术分享

最近在研究PHP的常规变量的分页源代码。  现在发布一个给大家看一下。

defined('IN_DUOAO') or exit('No permission resources.');
$smarty = $GLOBALS['smarty'];

$tplFile = '../m/m_shop.tpl.php'; //模板文件
/*----- 基础信息 -----*/
$Shop['nick'] = duoao_checknick(duoao_auth(trim(request('nick')), 1)); //店铺掌柜名

if(!$Shop['nick'] || $Shop['nick']=='err') showmessage('无法获取该店铺的商品数据,请浏览其他店铺或商品!', DUOAO_URL);

$Shop['link'] = DUOAO_URLS.duoao_geturl('m_shop', '', $Shop['nick']); //店铺连接

/*-- 店铺信息 --*/
$Shoparr = duoao_getShopInfo($Shop['nick'], 3); //获取API店铺信息
$Shopinfo = $Shoparr['shopinfo']; //店铺信息
$URL = http://www.aniutao.com/   ; // 主页多少钱

$ShopItems = $Shoparr['shopitems']; //店铺商品

//$ShopRelate = $Shopinfo['shop_title'] ? duoao_getShopRelate($Shop['nick']) : ''; //获取关联店铺

//$ShopList = isset($ShopRelate['tbk_shops']['tbk_shop']) && $ShopRelate['tbk_shops']['tbk_shop'] ? $ShopRelate['tbk_shops']['tbk_shop'] : ''; //店铺分类
// if($ShopList && !isset($ShopList[0])){ $_ShopList[] = $ShopList; $ShopList = $_ShopList; }

/*-- 其他 --*/
//$Shopinfo['level'] = isset($ShopItems[0]['seller_credit_score']) ? $ShopItems[0]['seller_credit_score'] : ''; //信用等级
$Shop['seo_params'] = array('title'=>$Shopinfo['shop_title'], 'nick'=>$Shop['nick'], 'catname'=>$Shop['catname'], 'page'=>$Shop['page']); //seo字符串
$duoao_seo = duoao_seo('shop', $Shop['seo_params']); //标题,关键字,简介

duoao_load::func('taoke_keywords'); //加载热门关键字函数库
$duoao_hotkey = duoao_hotkeywords($Shop['top_id'], 38); //热门关键字,38个 (只能为*分类ID)

$get_page = iconv('GBK','UTF-8',$get_page);
/*----- 储存到模板 -----*/
$smarty->assign('ShopItems', $ShopItems);
//$smarty->assign('ShopList', $ShopList);
$smarty->assign('Shopinfo', $Shopinfo);
$smarty->assign('duoao_seo', $duoao_seo);
$smarty->assign('duoao_hotkey', $duoao_hotkey);
$smarty->assign('Shop', $Shop);

/*----- 过滤器 -----*/
if(BADWORDS_SYS) $smarty->register_outputfilter('duoao_check_badwords');

/*----- 模板输出 -----*/
$smarty->display($tplFile);

?>

我现在比较纠结的是 get m_shop 的时候无法获取到数据。

上一篇:卷积神经网络(CNN)学习算法之----基于LeNet网络的中文验证码识别


下一篇:一小时搞定DIV+CSS布局-固定页面开度布局