Esempio n. 1
0
// 增加一个动态显示所有促销信息的标签栏
$smarty->assign('invoice_list', index_get_invoice_query());
// 发货查询
$smarty->assign('new_articles', index_get_new_articles());
// 最新文章
//dump(index_get_new_articles());
$smarty->assign('group_buy_goods', index_get_group_buy());
// 团购商品
$smarty->assign('auction_list', index_get_auction());
// 拍卖活动
$smarty->assign('shop_notice', $_CFG['shop_notice']);
// 商店公告
//获取资讯分类及信息
$obj_info = new class_information(admin_agency_id());
$info_cats = $obj_info->get_info_cats();
$info_lists = $obj_info->get_infos_list();
$smarty->assign('info_cats', $info_cats);
$smarty->assign('info_lists', $info_lists);
//dump($infos_list);
/* 首页主广告设置 */
$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);