public function step1() { check_issupplier(); $user_id = intval($GLOBALS['user_info']['id']); if ($user_id == 0) { es_session::set('before_login', $_SERVER['REQUEST_URI']); app_redirect(url("shop", "user#login")); } $cate_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_cate where is_effect = 1 and is_delete = 0 order by sort desc"); $GLOBALS['tmpl']->assign("cate_list", $cate_list); $deal_city_list = get_deal_citys(); $GLOBALS['tmpl']->assign("city_list", $deal_city_list['ls']); $GLOBALS['tmpl']->assign("step", 1); $GLOBALS['tmpl']->assign("page_title", "商家入驻"); $GLOBALS['tmpl']->display("biz/biz_join_step1.html"); }
$city_name = trim(addslashes($_REQUEST['city'])); $deal_city = ''; if ($city_name) { if ($city_name == 'all') { $deal_city = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_city where pid = 0"); } else { $deal_city = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_city where uname='" . $city_name . "' and is_effect = 1 and is_delete = 0"); } } if (!$deal_city) { $deal_city = get_current_deal_city(); } es_cookie::set("deal_city", $deal_city['id'], 24 * 3600 * 30); $GLOBALS['tmpl']->assign("deal_city", $deal_city); //输出城市 $deal_city_list = get_deal_citys(); $GLOBALS['tmpl']->assign("deal_city_list", $deal_city_list['ls']); $GLOBALS['tmpl']->assign("deal_city_list_zm", $deal_city_list['zm']); $GLOBALS['tmpl']->assign("shop_info", get_shop_info()); $GLOBALS['tmpl']->assign("deal_city", $deal_city); $GLOBALS['tmpl']->assign("show_city_title", true); if (count($deal_city_list['ls']) > 1) { $GLOBALS['tmpl']->assign("city_title", $deal_city['name']); } //输出根路径 $GLOBALS['tmpl']->assign("APP_ROOT", APP_ROOT); //输出语言包的js if (!file_exists(get_real_path() . "public/runtime/app/lang.js")) { $str = "var LANG = {"; foreach ($lang as $k => $lang_row) { $str .= "\"" . $k . "\":\"" . str_replace("nbr", "\\n", addslashes($lang_row)) . "\",";