代码拉取完成,页面将自动刷新
<?php
/**
* DDXY 文章内容
* ============================================================================
* 版权所有 2005-2016 山东叮咚小愿信息科技有限公司,并保留所有权利。
* 网站地址: http://www.dingdongxiaoyuan.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: article.php 17069 2010-03-26 05:28:01Z liuhui $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
//require(dirname(__FILE__) . '/includes/lib_main.php');
if ((DEBUG_MODE & 2) != 2)
{
$smarty->caching = true;
}
require(ROOT_PATH . '/includes/lib_area.php'); //叮咚小愿 --zhuo
$warehouse_other = [
'province_id' => $province_id,
'city_id' => $city_id
];
$warehouse_area_info = get_warehouse_area_info($warehouse_other);
$region_id = $warehouse_area_info['region_id'];
$area_id = $warehouse_area_info['area_id'];
$area_city = $warehouse_area_info['city_id'];
$id = empty($_REQUEST['id']) ? '' : intval($_REQUEST['id']);
$cat_id = empty($_REQUEST['cat_id']) ? '' : intval($_REQUEST['cat_id']);
$cat_select = array('parent_id', 'is_top_style', 'top_style_tpl', 'cat_name', 'cat_icon', 'cat_id');
$cat_row = get_cat_info($cat_id, $cat_select);
/*------------------------------------------------------ */
//--获取二级分类和商品
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'virtual_cat'){
include_once(ROOT_PATH . 'includes/cls_json.php');
$json = new JSON;
$id = empty($_REQUEST['id']) ? '' : intval($_REQUEST['id']); //顶级分类
$order = empty($_REQUEST['order']) ? 'DESC' : $_REQUEST['order']; //排序
$min = empty($_REQUEST['min']) ? 0 : intval($_REQUEST['min']); //二级分类
$max = empty($_REQUEST['max']) ? 0 : intval($_REQUEST['max']); //二级分类
if(!empty($id)){
if(empty($id)) make_json_response('分类id必传');
$virtual_id = get_virtual_list($id);
$vir_list = get_seller_list_date($virtual_id,$order);
$data = get_goods_virtual_list($vir_list);
}else{
make_json_response('参数错误');die;
}
$num = [];
foreach($data as $k=>$v){
$num[$k]['shop_price'] = $v['shop_price'];
}
if($min > 0 ){
array_multisort($num,SORT_ASC,$data);
}else if($max > 0){
array_multisort($num,SORT_DESC,$data);
}
$val = $json->encode($data);
exit($val);
}
/*------------------------------------------------------ */
//-- PROCESSOR
/*------------------------------------------------------ */
$cache_id = sprintf('%X', crc32($_REQUEST['id'] . '-' . $_CFG['lang']));
if (!$smarty->is_cached('virtual_all.dwt', $cache_id))
{
$position = assign_ur_here(0, $_LANG['all_category']);
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
for($i=1;$i<=$_CFG['auction_ad'];$i++){
$category_all_left .= "'category_all_left".$i.","; //左边广告位
$category_all_right .= "'category_all_right".$i.","; //左边广告位
}
$smarty->assign('category_all_left', $category_all_left);
$smarty->assign('category_all_right', $category_all_right);
$categories_list = get_seller_list_date();
$smarty->assign('categories_list', $categories_list);
$virtual_list = get_virtual_list();
$smarty->assign('virtual_list', $virtual_list);
$top_goods = get_top10(0, '', 0, $region_id, $area_id, $area_city);
$smarty->assign('top_goods', $top_goods); // 销售排行
$smarty->assign('helps', get_shop_help()); // 网店帮助
assign_dynamic('category_all');
assign_template('c', $catlist);
}
$hot_seller = get_seller_hot();
$categories_child = get_parent_cat_tree($cat_id);
//获取传来的分类id(顶级)
$smarty->assign('categories_child', $categories_child); //获取当前顶级分类下的所有子分类
$smarty->assign('cat_id',$cat_id);
$smarty->assign('id',$id);
$smarty->assign('cate_info', $cat_row);//by wang
$smarty->assign('hot_seller',$hot_seller);
$smarty->display('virtual_all.dwt', $cache_id);
/**
* 创建一个JSON格式的数据
*
* @access public
* @param string $content
* @param integer $error
* @param string $message
* @param array $append
* @return void
*/
function make_json_response($content = '', $error = 0, $message = '', $append = array())
{
include_once(ROOT_PATH . 'includes/cls_json.php');
$json = new JSON;
$res = array('error' => $error, 'message' => $message, 'content' => $content);
if (!empty($append))
{
foreach ($append AS $key => $val)
{
$res[$key] = $val;
}
}
$val = $json->encode($res);
exit($val);
}
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。