Пример #1
0
 // 最新文章
 $smarty->assign('group_buy_goods', index_get_group_buy());
 // 团购商品
 $smarty->assign('auction_list', index_get_auction());
 // 拍卖活动
 $smarty->assign('shop_notice', $_CFG['shop_notice']);
 // 商店公告
 //yyy添加start
 $smarty->assign('wap_index_ad', get_wap_advlist('wap首页幻灯广告', 5));
 //wap首页幻灯广告位
 $smarty->assign('wap_index_icon', get_wap_advlist('wap端首页8个图标', 8));
 //wap首页幻灯广告位
 $smarty->assign('wap_tree1', get_wap_parent_id_tree(1));
 //wap首页分类广告下子分类
 $smarty->assign('wap_tree2', get_wap_parent_id_tree(20));
 $smarty->assign('wap_tree3', get_wap_parent_id_tree(19));
 $smarty->assign('menu_list', get_menu());
 //yyy添加end
 /* 首页主广告设置 */
 $smarty->assign('index_ad', $_CFG['index_ad']);
 if ($_CFG['index_ad'] == 'cus') {
     $sql = 'SELECT ad_type, content, url FROM ' . $ecs->table("ad_custom") . ' WHERE ad_status = 1';
     $ad = $db->getRow($sql, true);
     $smarty->assign('ad', $ad);
 }
 /* links */
 $links = index_get_links();
 $smarty->assign('img_links', $links['img']);
 $smarty->assign('txt_links', $links['txt']);
 $smarty->assign('data_dir', DATA_DIR);
 // 数据目录
Пример #2
0
<?php

$GLOBALS['smarty']->assign('thiscid1', get_wap_parent_id_tree($GLOBALS['smarty']->_var['goods_cat']['id']));
?>
<section class="index_floor_lou">
    <div class="floor_body ">
        <h2>
            <em></em><?php 
echo htmlspecialchars($this->_var['goods_cat']['name']);
?>
<div class="geng"><a href="<?php 
echo $this->_var['goods_cat']['url'];
?>
" >更多</a> <span></span></div>
         </h2>
        <ul>
            <?php 
$_from = $this->_var['cat_goods'];
if (!is_array($_from) && !is_object($_from)) {
    settype($_from, 'array');
}
$this->push_vars('', 'goods_0_45495900_1447000649');
$this->_foreach['name'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['name']['total'] > 0) {
    foreach ($_from as $this->_var['goods_0_45495900_1447000649']) {
        $this->_foreach['name']['iteration']++;
        ?>
            <li>
                <a href="<?php 
        echo $this->_var['goods_0_45495900_1447000649']['url'];
        ?>