Ejemplo n.º 1
0
if ($_REQUEST['act'] == 'district') {
    $smarty->assign('full_page', 1);
    $list = get_district_list();
    $city = get_city_list();
    $smarty->assign('ur_here', '入驻商商圈管理');
    $smarty->assign('action_link', array('text' => '添加新商圈', 'href' => 'virtual_goods.php?act=add_district'));
    $smarty->assign('city', $city);
    $smarty->assign('district_list', $list['item']);
    $smarty->assign('filter', $list['filter']);
    $smarty->assign('record_count', $list['record_count']);
    $smarty->assign('page_count', $list['page_count']);
    $smarty->display('virtual_goods_district.htm');
}
/* 查询商圈 */
if ($_REQUEST['act'] == 'query_district') {
    $list = get_district_list();
    $smarty->assign('district_list', $list['item']);
    $smarty->assign('filter', $list['filter']);
    $smarty->assign('record_count', $list['record_count']);
    $smarty->assign('page_count', $list['page_count']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);
    make_json_result($smarty->fetch('virtual_goods_district.htm'), '', array('filter' => $list['filter'], 'page_count' => $list['page_count']));
}
/* 修改商圈模板赋值 */
if ($_REQUEST['act'] == 'edit_district' || $_REQUEST['act'] == 'add_district') {
    $district_id = empty($_REQUEST['district_id']) ? 0 : intval($_REQUEST['district_id']);
    $region = get_region_list();
    $smarty->assign('region', $region);
    $sql = "select a.district_id, a.district_name,a.province,a.city,a.county,a.sort,a.is_show, b.region_name as city_name, c.region_name as county_name from " . $GLOBALS['ecs']->table('virtual_goods_district') . " as a left join " . $GLOBALS['ecs']->table('region') . " as b on b.region_id = a.city" . " left join " . $GLOBALS['ecs']->table('region') . " as c on c.region_id = a.county  where district_id = {$district_id}";
    $district = $GLOBALS['db']->getRow($sql);
    $smarty->assign('district', $district);
Ejemplo n.º 2
0
    $link[0]['text'] = $_LANG['continus_add'];
    $link[0]['href'] = 'postman.php?act=add';
    $link[1]['text'] = $_LANG['back_list'];
    $link[1]['href'] = 'postman.php?act=list';
    sys_msg($_LANG['add'] . " " . $_POST['postman_name'] . " " . $_LANG['attradd_succed'], 0, $link);
}
/*------------------------------------------------------ */
//-- 快递员编辑页面
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'edit') {
    admin_priv('users_manage');
    /* 获取快递员数据 */
    $postman_id = !empty($_GET['postman_id']) ? intval($_GET['postman_id']) : 0;
    $postman = $db->getRow("SELECT * FROM " . $ecs->table('postman') . " WHERE postman_id = '{$postman_id}'");
    $smarty->assign('lang', $_LANG);
    $smarty->assign('district_list', get_district_list());
    $smarty->assign('ur_here', $_LANG['postman_edit']);
    $smarty->assign('action_link', array('href' => 'postman.php?act=list&' . list_link_postfix(), 'text' => $_LANG['09_postman_list']));
    $smarty->assign('form_act', 'update');
    $smarty->assign('postman', $postman);
    assign_query_info();
    $smarty->display('postman_info.htm');
}
/*------------------------------------------------------ */
//-- 快递员编辑的处理
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'update') {
    /* 对数据的处理 */
    $postman_name = !empty($_POST['postman_name']) ? trim($_POST['postman_name']) : '';
    $postman_id = !empty($_POST['postman_id']) ? intval($_POST['postman_id']) : 0;
    $sql = "UPDATE " . $ecs->table('postman') . " SET " . "postman_name       = '{$postman_name}', " . "region_id      = '{$_POST['region_id']}', " . "mobile      = '{$_POST['mobile']}' " . "WHERE postman_id   = '{$postman_id}'";
Ejemplo n.º 3
0
 $default_sort_order_method = $_CFG['sort_order_method'] == '0' ? 'DESC' : 'ASC';
 $default_sort_order_type = $_CFG['sort_order_type'] == '0' ? 'goods_id' : ($_CFG['sort_order_type'] == '1' ? 'sort_order' : 'last_update');
 $smarty->assign('list_default_sort', $default_sort_order_type);
 $search_info = array('cat_id' => $cat_id, 'catch_id' => $catch_id, 'city_id' => $city_id, 'county_id' => $county_id, 'district_id' => $district_id, 'list_default_sort' => $default_sort_order_type);
 $smarty->assign('search_info', $search_info);
 $zimu_city = get_city_list();
 $smarty->assign('nowcityname', $GLOBALS['db']->getOne("select region_name from " . $GLOBALS['ecs']->table("region") . " where region_id=" . $city_id));
 $smarty->assign('zimu_city', $zimu_city);
 $county_list = get_county_list($city_id);
 $smarty->assign('county_list', $county_list);
 $position = assign_ur_here(0, $_LANG['advanced_search']);
 $smarty->assign('page_title', $position['title']);
 // 页面标题
 $smarty->assign('ur_here', $position['ur_here']);
 // 当前位置
 $district = get_district_list($county_id);
 $smarty->assign('district', $district);
 $category = get_virtual_category();
 $category_chr = get_virtual_category_chr($cat_id);
 $smarty->assign('category_chr', $category_chr);
 $smarty->assign('category', $category);
 $smarty->assign('ur_here', '首页 > 虚拟团购');
 if ($show == 'goods') {
     $virtual_goods_list = get_virtual_goods_list($search_info);
     $smarty->assign('pager', $virtual_goods_list['pager']);
     $smarty->assign('virtual_goods', $virtual_goods_list['virtual_goods']);
 }
 if ($show == 'street') {
     $virtual_street_list = get_virtual_street_list($search_info);
     $smarty->assign('pager', $virtual_street_list['pager']);
     $smarty->assign('virtual_street', $virtual_street_list['virtual_street']);