$smarty->assign('promotion_info', get_promotion_info()); // 增加一个动态显示所有促销信息的标签栏 $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']);
$db->autoExecute($ecs->table('information'), $info, 'INSERT'); /* 记录管理员操作 */ admin_log($_POST['info_cat'], 'add', 'information'); clear_cache_files(); // 清除缓存文件 /* 提示信息 */ sys_msg($_LANG['add'] . " " . $info['title_describe'] . " " . $_LANG['attradd_succed'], 0, $link, false); } elseif ($_REQUEST['act'] == 'edit') { admin_priv('information'); /* 获取某条资讯数据 */ $sql = "SELECT info_id,info_cat_id,img_spec,img_file,title_describe,content_describe,link_url,is_start,admin_agency_id FROM " . $ecs->table('information') . " WHERE info_id =" . intval($_REQUEST['info_id']); $info_one = $db->getRow($sql); $info_one['img_file'] = '../' . $info_one['img_file']; //获取资讯分类 $obj_info = new class_information(admin_agency_id()); $info_type = $obj_info->get_info_cats(); $smarty->assign('info_type', $info_type); $info_specs = array('475x340' => '475x340', '240x160' => '240x160', '540x175' => '540x175', '240x330' => '240x330', '240x320' => '240x320'); $smarty->assign('info_specs', $info_specs); $smarty->assign('edit', 1); $smarty->assign('form_act', 'update'); $smarty->assign('info', $info_one); $smarty->assign('admin_agency_id', $info_one['admin_agency_id']); assign_query_info(); $smarty->display('information.htm'); } elseif ($_REQUEST['act'] == 'update') { admin_priv('information'); $info_id = intval($_POST['info_id']); $info['info_cat_id'] = isset($_POST['info_cat']) ? intval($_POST['info_cat']) : ''; $info['img_spec'] = isset($_POST['img_spec']) ? trim($_POST['img_spec']) : ''; $img_file = isset($_FILES['img_file']) ? $_FILES['img_file'] : '';