if ((DEBUG_MODE & 2) != 2) { $smarty->caching = true; } $tpl = 'stores.dwt'; $cache_id = sprintf('%X', crc32($cat_id . '-' . $display . '-' . $sort . '-' . $order . '-' . $page . '-' . $size . '-' . $_SESSION['user_rank'] . '-' . $_CFG['lang'] . '-' . $brand . '-' . $price_max . '-' . $price_min . '-' . $filter_attr_str . '-' . $filter)); $filter['id'] = empty($_REQUEST['id']) ? 0 : intval($_REQUEST['id']); $filter['keywords'] = isset($_REQUEST['keywords']) ? trim(addslashes(htmlspecialchars($_REQUEST['keywords']))) : ''; $filter['sort_by'] = empty($_REQUEST['sort_by']) ? 'sort_order' : trim($_REQUEST['sort_by']); $filter['sort_order'] = empty($_REQUEST['sort_order']) ? 'ASC' : trim($_REQUEST['sort_order']); $filter['page'] = empty($_REQUEST['page']) || intval($_REQUEST['page']) <= 0 ? 1 : intval($_REQUEST['page']); $cache_id = sprintf('%X', crc32(date('ymd' . '-' . $filter))); if (!$smarty->is_cached($tpl, $cache_id)) { //店铺分类 $cats = get_all_category(); //店铺列表 $shop_list = get_all_supplier(); //推荐分类中的店铺 //$tuijian = get_tuijian_shop($cats['tuijian']); /* 模板赋值 */ assign_template(); $position = assign_ur_here(); $smarty->assign('page_title', $position['title']); // 页面标题 $smarty->assign('ur_here', $position['ur_here'] . '> ' . $topic['title']); // 当前位置 $smarty->assign('helps', get_shop_help()); // 网店帮助 $smarty->assign('all', $cats['all']); //$smarty->assign('tuijian', $tuijian); $smarty->assign('logopath', '/' . DATA_DIR . '/supplier/logo/'); $smarty->assign('shops_list', $shop_list['shops']);
setcookie('region_' . $i, 0); $_COOKIE['region_' . $i] = 0; $_REQUEST[$_REQUEST['datainfo'][$i]] = 0; } } } $tpl = 'stores.dwt'; //当前地址下对应仓库的店铺显示 $address = cookie_to_str(); $keywords = isset($_REQUEST['keywords']) ? trim(addslashes(htmlspecialchars($_REQUEST['keywords']))) : ''; $cache_id = sprintf('%X', crc32($category_id . '-' . implode('', $address) . '-' . date('ymd') . '-' . $keywords)); if (!$smarty->is_cached($tpl, $cache_id)) { //店铺分类 $cats = get_all_category(); //店铺列表 $shop_list = get_all_supplier($address); //echo "<pre>"; //print_r($shop_list); //推荐分类中的店铺 $tuijian = get_tuijian_shop($cats['tuijian']); /* 模板赋值 */ assign_template(); $position = assign_ur_here(); $smarty->assign('page_title', $position['title']); // 页面标题 $smarty->assign('ur_here', $position['ur_here'] . '> ' . $topic['title']); // 当前位置 $smarty->assign('helps', get_shop_help()); // 网店帮助 $smarty->assign('all', $cats['all']); $smarty->assign('tuijian', $tuijian);