当前位置: 首页>>代码示例>>PHP>>正文


PHP get_regions函数代码示例

本文整理汇总了PHP中get_regions函数的典型用法代码示例。如果您正苦于以下问题:PHP get_regions函数的具体用法?PHP get_regions怎么用?PHP get_regions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_regions函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionList_edit

 public function actionList_edit()
 {
     //配置列表
     $model = new Shop_config();
     //处理表单提交
     if (\Yii::$app->request->isPost) {
         $model->postDataHandle(\Yii::$app->request->post());
     }
     $settingList = $model->get_settings(null, [5]);
     //可选语言
     $language = new Language();
     $lang_list = $language->get_lang_list();
     //rewrite_confirm
     if (strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'iis') !== false) {
         $rewrite_confirm = $this->_lang['rewrite_confirm_iis'];
     } else {
         $rewrite_confirm = $this->_lang['rewrite_confirm_apache'];
     }
     //
     if ($this->_cfg['shop_country'] > 0) {
         $this->viewBag['provinces'] = get_regions(1, $this->_cfg['shop_country']);
         if ($this->_cfg['shop_province']) {
             $this->viewBag['cities'] = get_regions(2, $this->_cfg['shop_province']);
         }
     }
     $this->viewBag['cfg'] = $this->_cfg;
     $this->viewBag['lang_list'] = $lang_list;
     $this->viewBag['ur_here'] = $this->_lang['01_shop_config'];
     $this->viewBag['group_list'] = $settingList;
     $this->viewBag['rewrite_confirm'] = $rewrite_confirm;
     $this->viewBag['countries'] = get_regions();
     assign_query_info();
     return $this->render('list_edit', ['viewBag' => $this->viewBag]);
 }
开发者ID:xiaohongyang,项目名称:yii_shop,代码行数:34,代码来源:Shop_configController.php

示例2: region_result

/**
 * 创建地区的返回信息
 *
 * @access  public
 * @param   array   $arr    地区数组 *
 * @return  void
 */
function region_result($parent, $sel_name, $type)
{
    global $cp;
    $arr = get_regions($type, $parent);
    foreach ($arr as $v) {
        $region =& $cp->add_node('region');
        $region_id =& $region->add_node('id');
        $region_name =& $region->add_node('name');
        $region_id->set_data($v['region_id']);
        $region_name->set_data($v['region_name']);
    }
    $select_obj =& $cp->add_node('select');
    $select_obj->set_data($sel_name);
}
开发者ID:songtaiwu,项目名称:mordercms,代码行数:21,代码来源:lib_common.php

示例3: intval

    $smarty->display('region.dwt');
}
if ($_REQUEST['act'] == 'change_city') {
    $city_id = intval($_REQUEST['city_id']);
    $sql_url = "SELECT agency_url FROM " . $ecs->table('agency_url') . 'WHERE region_id =' . $city_id;
    $agency_url = $db->getOne($sql_url);
    if ($agency_url) {
        header("Location:http://" . $agency_url);
    } else {
        echo "<script type='text/javascript'>alert('您所选择的城市还没有代理商哦!')</script>";
        exit;
    }
} elseif ($_REQUEST['act'] == 'user_address') {
    $type = !empty($_REQUEST['type']) ? intval($_REQUEST['type']) : 0;
    $parent = !empty($_REQUEST['parent']) ? intval($_REQUEST['parent']) : 0;
    $address['regions'] = get_regions($type, $parent);
    $address['type'] = $type;
    $address['target'] = !empty($_REQUEST['target']) ? stripslashes(trim($_REQUEST['target'])) : '';
    $address['target'] = htmlspecialchars($address['target']);
    die($json->encode($address));
} elseif ($_POST['act'] == 'inquer_region') {
    $region = $_POST['region'] ? mysql_real_escape_string($_POST['region']) : '';
    $parent = $_POST['parent'] ? intval($_POST['parent']) : 0;
    switch ($region) {
        case 'province':
            $region_type = 1;
            break;
        case 'city':
            $region_type = 2;
            break;
        case 'area':
开发者ID:dlpc,项目名称:ecshop,代码行数:31,代码来源:region.php

示例4: action_address_list

function action_address_list()
{
    $user = $GLOBALS['user'];
    $_CFG = $GLOBALS['_CFG'];
    $_LANG = $GLOBALS['_LANG'];
    $smarty = $GLOBALS['smarty'];
    $db = $GLOBALS['db'];
    $ecs = $GLOBALS['ecs'];
    $user_id = $_SESSION['user_id'];
    include_once ROOT_PATH . 'includes/lib_transaction.php';
    include_once ROOT_PATH . 'languages/' . $_CFG['lang'] . '/shopping_flow.php';
    $smarty->assign('lang', $_LANG);
    /* 取得国家列表、商店所在国家、商店所在国家的省列表 */
    $smarty->assign('country_list', get_regions());
    $smarty->assign('shop_province_list', get_regions(1, $_CFG['shop_country']));
    /* 获得用户所有的收货人信息 */
    $consignee_list = get_consignee_list($_SESSION['user_id']);
    if (count($consignee_list) < 5 && $_SESSION['user_id'] > 0) {
        /* 如果用户收货人信息的总数小于5 则增加一个新的收货人信息 */
        $consignee_list[] = array('country' => $_CFG['shop_country'], 'email' => isset($_SESSION['email']) && is_email($_SESSION['email']) ? $_SESSION['email'] : '');
    }
    $smarty->assign('consignee_list', $consignee_list);
    // 取得国家列表,如果有收货人列表,取得省市区列表
    foreach ($consignee_list as $region_id => $consignee) {
        $consignee['country'] = isset($consignee['country']) ? intval($consignee['country']) : 0;
        $consignee['province'] = isset($consignee['province']) ? intval($consignee['province']) : 0;
        $consignee['city'] = isset($consignee['city']) ? intval($consignee['city']) : 0;
        $province_list[$region_id] = get_regions(1, $consignee['country']);
        $city_list[$region_id] = get_regions(2, $consignee['province']);
        $district_list[$region_id] = get_regions(3, $consignee['city']);
    }
    /* 获取默认收货ID */
    $address_id = $db->getOne("SELECT address_id FROM " . $ecs->table('users') . " WHERE user_id='{$user_id}'");
    // 赋值于模板
    $smarty->assign('real_goods_count', 1);
    $smarty->assign('shop_country', $_CFG['shop_country']);
    $smarty->assign('shop_province', get_regions(1, $_CFG['shop_country']));
    $smarty->assign('province_list', $province_list);
    $smarty->assign('address', $address_id);
    $smarty->assign('city_list', $city_list);
    $smarty->assign('district_list', $district_list);
    $smarty->assign('currency_format', $_CFG['currency_format']);
    $smarty->assign('integral_scale', $_CFG['integral_scale']);
    $smarty->assign('name_of_region', array($_CFG['name_of_region_1'], $_CFG['name_of_region_2'], $_CFG['name_of_region_3'], $_CFG['name_of_region_4']));
    $smarty->display('user_transaction.dwt');
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:46,代码来源:user.php

示例5: check_consignee_info

/**
 * 检查收货人信息是否完整
 * @param   array   $consignee  收货人信息
 * @param   int     $flow_type  购物流程类型
 * @return  bool    true 完整 false 不完整
 */
function check_consignee_info($consignee, $flow_type)
{
    if (exist_real_goods(0, $flow_type)) {
        /* 如果存在实体商品 */
        $res = !empty($consignee['consignee']) && !empty($consignee['country']) && !empty($consignee['email']) && !empty($consignee['tel']);
        if ($res) {
            if (empty($consignee['province'])) {
                /* 没有设置省份,检查当前国家下面有没有设置省份 */
                $pro = get_regions(1, $consignee['country']);
                $res = empty($pro);
            } elseif (empty($consignee['city'])) {
                /* 没有设置城市,检查当前省下面有没有城市 */
                $city = get_regions(2, $consignee['province']);
                $res = empty($city);
            } elseif (empty($consignee['district'])) {
                $dist = get_regions(3, $consignee['city']);
                $res = empty($dist);
            }
        }
        return $res;
    } else {
        /* 如果不存在实体商品 */
        return !empty($consignee['consignee']) && !empty($consignee['email']) && !empty($consignee['tel']);
    }
}
开发者ID:dlpc,项目名称:ecshop,代码行数:31,代码来源:lib_order.php

示例6: get_regions

                 $smarty->assign('order', $order);
             }
         }
     }
     if ($exist_real_goods) {
         /* 取得国家 */
         $smarty->assign('country_list', get_regions());
         if ($order['country'] > 0) {
             /* 取得省份 */
             $smarty->assign('province_list', get_regions(1, $order['country']));
             if ($order['province'] > 0) {
                 /* 取得城市 */
                 $smarty->assign('city_list', get_regions(2, $order['province']));
                 if ($order['city'] > 0) {
                     /* 取得区域 */
                     $smarty->assign('district_list', get_regions(3, $order['city']));
                 }
             }
         }
     }
 } elseif ('shipping' == $step) {
     /* 如果不存在实体商品 */
     if (!exist_real_goods($order_id)) {
         die('Hacking Attemp');
     }
     /* 取得可用的配送方式列表 */
     $region_id_list = array($order['country'], $order['province'], $order['city'], $order['district']);
     $shipping_list = available_shipping_list($region_id_list);
     /* 取得配送费用 */
     $total = order_weight_price($order_id);
     foreach ($shipping_list as $key => $shipping) {
开发者ID:norain2050,项目名称:benhu,代码行数:31,代码来源:order.php

示例7: get_inv_consignee_regions

function get_inv_consignee_regions($order)
{
    $inv_regions = array('inv_consignee_province_list' => get_regions(1, $order['inv_consignee_country']), 'inv_consignee_city_list' => get_regions(2, $order['inv_consignee_province']), 'inv_consignee_district_list' => get_regions(3, $order['inv_consignee_city']));
    return $inv_regions;
}
开发者ID:moonlight-wang,项目名称:feilun,代码行数:5,代码来源:order.php

示例8: get_shop_help

$smarty->assign('page_title', $position['title']);
// 页面标题
$smarty->assign('ur_here', $position['ur_here']);
// 当前位置
$smarty->assign('helps', get_shop_help());
// 网店帮助
$smarty->assign('lang', $_LANG);
$smarty->assign('choose', $choose);
$province_list[NULL] = get_regions(1, $choose['country']);
$city_list[NULL] = get_regions(2, $choose['province']);
$district_list[NULL] = get_regions(3, $choose['city']);
$smarty->assign('province_list', $province_list);
$smarty->assign('city_list', $city_list);
$smarty->assign('district_list', $district_list);
/* 取得国家列表、商店所在国家、商店所在国家的省列表 */
$smarty->assign('country_list', get_regions());
/* 取得配送列表 */
$region = array($choose['country'], $choose['province'], $choose['city'], $choose['district']);
$shipping_list = available_shipping_list($region);
$cart_weight_price = 0;
$insure_disabled = true;
$cod_disabled = true;
foreach ($shipping_list as $key => $val) {
    $shipping_cfg = unserialize_config($val['configure']);
    $shipping_fee = shipping_fee($val['shipping_code'], unserialize($val['configure']), $cart_weight_price['weight'], $cart_weight_price['amount']);
    $shipping_list[$key]['format_shipping_fee'] = price_format($shipping_fee, false);
    $shipping_list[$key]['fee'] = $shipping_fee;
    $shipping_list[$key]['free_money'] = price_format($shipping_cfg['free_money'], false);
    $shipping_list[$key]['insure_formated'] = strpos($val['insure'], '%') === false ? price_format($val['insure'], false) : $val['insure'];
}
$smarty->assign('shipping_list', $shipping_list);
开发者ID:dw250100785,项目名称:ECShop-1,代码行数:31,代码来源:myship.php

示例9: get_regions

        /*
         * 收货人信息填写界面
         */
        if (isset($_REQUEST['direct_shopping'])) {
            $_SESSION['direct_shopping'] = 1;
        }
        /* 取得国家列表、商店所在国家、商店所在国家的省列表 */
        $smarty->assign('country_list', get_regions());
        $smarty->assign('shop_country', $_CFG['shop_country']);
        $smarty->assign('shop_province_list', get_regions(1, $_CFG['shop_country']));
        $consignee_list = get_consignee_list($_SESSION['user_id']);
        /* 取得每个收货地址的省市区列表 */
        $province_list = array();
        $city_list = array();
        $district_list = array();
        foreach ($consignee_list as $region_id => $consignee) {
            $consignee['country'] = isset($consignee['country']) ? intval($consignee['country']) : 0;
            $consignee['province'] = isset($consignee['province']) ? intval($consignee['province']) : 0;
            $consignee['city'] = isset($consignee['city']) ? intval($consignee['city']) : 0;
            $province_list = get_regions(1, $consignee['country']);
            $city_list = get_regions(2, $consignee['province']);
            $district_list = get_regions(3, $consignee['city']);
        }
        $smarty->assign('buy_type', 1);
        $smarty->assign('province_list', $province_list);
        $smarty->assign('city_list', $city_list);
        $smarty->assign('district_list', $district_list);
    }
}
$smarty->assign('footer', get_footer());
$smarty->display('buy.html');
开发者ID:fromzyy2ann,项目名称:mescake,代码行数:31,代码来源:buy.php

示例10: insert_right_my_info

/**
 * 调用配送地址信息
 *
 * @access  public
 * @return  string
 */
function insert_right_my_info()
{
    require_once ROOT_PATH . 'includes/lib_order.php';
    $need_cache = $GLOBALS['smarty']->caching;
    $need_compile = $GLOBALS['smarty']->force_compile;
    $GLOBALS['smarty']->caching = false;
    $GLOBALS['smarty']->force_compile = true;
    $consignee = get_consignee($_SESSION['user_id']);
    $GLOBALS['smarty']->assign('consignee', $consignee);
    /* 取得国家列表、商店所在国家、商店所在国家的省列表 */
    $GLOBALS['smarty']->assign('country_list', get_regions());
    $GLOBALS['smarty']->assign('shop_country', $_CFG['shop_country']);
    //if($consignee['country'] >0)
    //{
    //$GLOBALS['smarty']->assign('city_list', get_regions(2, 2));
    $GLOBALS['smarty']->assign('district_list', get_regions(2, 501));
    //}
    $val = $GLOBALS['smarty']->fetch('library/right_my_info.lbi');
    $GLOBALS['smarty']->caching = $need_cache;
    $GLOBALS['smarty']->force_compile = $need_compile;
    return $val;
}
开发者ID:songtaiwu,项目名称:m-cmsold,代码行数:28,代码来源:lib_insert.php

示例11: admin_log

    //admin_priv('shiparea_manage');
    $sql = "INSERT INTO " . $hhs->table('shipping_point') . " (shop_name, province,city,district, address,longitude,latitude,tel) " . "VALUES" . " ('{$_POST['shop_name']}', '{$_POST['province']}','{$_POST['city']}','{$_POST['district']}','{$_POST['address']}','{$_POST['longitude']}','{$_POST['latitude']}','{$_POST['tel']}' )";
    $db->query($sql);
    $new_id = $db->insert_Id();
    admin_log($_POST['shop_name'], 'add', 'shipping_point');
    $lnk[] = array('text' => '返回列表', 'href' => 'shipping_point.php?act=list');
    $lnk[] = array('text' => '继续添加', 'href' => 'shipping_point.php?act=add');
    sys_msg('添加成功', 0, $lnk);
} elseif ($_REQUEST['act'] == 'edit') {
    //admin_priv('shiparea_manage');
    $smarty->assign('ur_here', '编辑');
    $sql = "SELECT *  FROM " . $GLOBALS['hhs']->table('shipping_point') . " where id=" . $_REQUEST['id'];
    $point = $db->getRow($sql);
    $province_list = get_regions(1, 1);
    $city_list = get_regions(2, $point['province']);
    $district_list = get_regions(3, $point['city']);
    $smarty->assign('point', $point);
    $smarty->assign('province_list', $province_list);
    $smarty->assign('city_list', $city_list);
    $smarty->assign('district_list', $district_list);
    $smarty->assign('form_act', "update");
    assign_query_info();
    $smarty->assign('id', $_REQUEST['id']);
    $smarty->display('shipping_point_info.htm');
} elseif ($_REQUEST['act'] == 'update') {
    $sql = "UPDATE " . $hhs->table('shipping_point') . " SET shop_name='{$_POST['shop_name']}', " . "province='{$_POST['province']}',city='{$_POST['city']}' ,longitude='{$_POST['longitude']}' ,latitude='{$_POST['latitude']}' ,tel='{$_POST['tel']}',district='{$_POST['district']}'," . "address='{$_POST['address']}' " . "WHERE id='{$_POST['id']}'";
    $db->query($sql);
    admin_log($_POST['shop_name'], 'edit', 'shipping_point');
    $lnk[] = array('text' => '返回列表', 'href' => 'shipping_point.php?act=list');
    sys_msg('修改成功', 0, $lnk);
} elseif ($_REQUEST['act'] == 'multi_remove') {
开发者ID:shiruolin,项目名称:hzzshop,代码行数:31,代码来源:shipping_point.php

示例12: action_address

function action_address()
{
    $user = $GLOBALS['user'];
    $_CFG = $GLOBALS['_CFG'];
    $_LANG = $GLOBALS['_LANG'];
    $smarty = $GLOBALS['smarty'];
    $db = $GLOBALS['db'];
    $ecs = $GLOBALS['ecs'];
    $address_id = empty($_REQUEST['address_id']) ? 0 : intval($_REQUEST['address_id']);
    include_once ROOT_PATH . 'includes/lib_transaction.php';
    include_once ROOT_PATH . 'languages/' . $_CFG['lang'] . '/shopping_flow.php';
    $smarty->assign('lang', $_LANG);
    /* 取得国家列表、商店所在国家、商店所在国家的省列表 */
    $smarty->assign('country_list', get_regions());
    $smarty->assign('shop_province_list', get_regions(1, $_CFG['shop_country']));
    /* 获得用户所有的收货人信息 */
    $consignee = get_consignee_by_id($address_id);
    $smarty->assign('consignee', $consignee);
    // 取得国家列表,如果有收货人列表,取得省市区列表
    $consignee['country'] = isset($consignee['country']) ? intval($consignee['country']) : 1;
    $consignee['province'] = isset($consignee['province']) ? intval($consignee['province']) : -1;
    $consignee['city'] = isset($consignee['city']) ? intval($consignee['city']) : -1;
    $consignee['district'] = isset($consignee['district']) ? intval($consignee['district']) : -1;
    $province_list = get_regions_wap($consignee['country']);
    $city_list = get_regions_wap($consignee['province']);
    $district_list = get_regions_wap($consignee['city']);
    $xiangcun_list = get_regions_wap($consignee['district']);
    // 赋值于模板
    $smarty->assign('real_goods_count', 1);
    $smarty->assign('shop_country', $_CFG['shop_country']);
    $smarty->assign('shop_province', get_regions(1, $_CFG['shop_country']));
    $smarty->assign('province_list', $province_list);
    $smarty->assign('city_list', $city_list);
    $smarty->assign('district_list', $district_list);
    $smarty->assign('xiangcun_list', $xiangcun_list);
    $smarty->assign('address_id', $address_id);
    $smarty->assign('currency_format', $_CFG['currency_format']);
    $smarty->assign('integral_scale', $_CFG['integral_scale']);
    $smarty->assign('name_of_region', array($_CFG['name_of_region_1'], $_CFG['name_of_region_2'], $_CFG['name_of_region_3'], $_CFG['name_of_region_4']));
    $smarty->display('user_transaction.dwt');
}
开发者ID:moonlight-wang,项目名称:feilun,代码行数:41,代码来源:user9-9.php

示例13: get_image_path

        if ($row) {
            $sql = "select lu.*,l.shop_price,l.goods_id,(select goods_name from " . $GLOBALS['ecs']->table('goods') . " as g where g.goods_id=l.goods_id) as goods_name " . ",(select goods_thumb from " . $GLOBALS['ecs']->table('goods') . " as g where g.goods_id=l.goods_id) as goods_thumb " . ",(select user_name from " . $GLOBALS['ecs']->table('users') . " as u where u.user_id=lu.user_id) as user_name " . " from " . $GLOBALS['ecs']->table('lottery_user') . "as lu left join " . $GLOBALS['ecs']->table('lottery') . " as l on l.id=lu.lid where lu.id='{$id}' limit 1";
            $row = $GLOBALS['db']->getRow($sql);
            if ($row) {
                $smarty->assign('goods_name', $row['goods_name']);
                $smarty->assign('goods_thumb', get_image_path($row['goods_id'], $row['goods_thumb'], true));
                $smarty->assign('shop_price', $row['shop_price']);
                $smarty->assign('goods_id', $row['goods_id']);
                $smarty->assign('speech', "1");
                $smarty->assign('id', $id);
                $smarty->assign('goods_url', build_uri('goods', array('gid' => $row['goods_id']), $row['goods_name']));
                /* 取得国家列表、商店所在国家、商店所在国家的省列表 */
                $smarty->assign('country_list', get_regions());
                $smarty->assign('province_list', get_regions(1, 1));
                $smarty->assign('city_list', get_regions(2, 0));
                $smarty->assign('district_list', get_regions(3, 0));
            }
        }
    }
    $smarty->display('lottery_winlist.dwt');
} elseif ($_REQUEST['act'] == 'submitspeech') {
    require ROOT_PATH . 'includes/cls_json.php';
    $json = new JSON();
    $result = array('error' => 0, 'message' => '', 'content' => '提交失败1.0!');
    $_REQUEST['cmt'] = json_str_iconv($_REQUEST['cmt']);
    $cmt = $json->decode($_REQUEST['cmt']);
    $user_id = $_SESSION['user_id'];
    $id = $cmt->id;
    $sql = "select applystatus from " . $GLOBALS['ecs']->table('lottery_user') . " where id=" . $id;
    $applystatus = $GLOBALS['db']->getOne($sql);
    if ($applystatus == 1) {
开发者ID:norain2050,项目名称:benhu,代码行数:31,代码来源:lottery.php

示例14: action_edit


//.........这里部分代码省略.........
        $user['mobile_phone'] = $row['mobile_phone'];
        /* 代码增加2014-12-23 by www.68ecshop.com _star */
        $user['real_name'] = $row['real_name'];
        $user['card'] = $row['card'];
        $user['face_card'] = $row['face_card'];
        $user['back_card'] = $row['back_card'];
        $user['country'] = $row['country'];
        $user['province'] = $row['province'];
        $user['city'] = $row['city'];
        $user['district'] = $row['district'];
        $user['address'] = $row['address'];
        $user['status'] = $row['status'];
        /* 代码增加2014-12-23 by www.68ecshop.com _end */
    } else {
        $link[] = array('text' => $_LANG['go_back'], 'href' => 'users.php?act=list');
        sys_msg($_LANG['username_invalid'], 0, $links);
        // $user['sex'] = 0;
        // $user['pay_points'] = 0;
        // $user['rank_points'] = 0;
        // $user['user_money'] = 0;
        // $user['frozen_money'] = 0;
        // $user['credit_line'] = 0;
        // $user['formated_user_money'] = price_format(0);
        // $user['formated_frozen_money'] = price_format(0);
    }
    /* 取出注册扩展字段 */
    $sql = 'SELECT * FROM ' . $ecs->table('reg_fields') . ' WHERE type < 2 AND display = 1 AND id != 6 ORDER BY dis_order, id';
    $extend_info_list = $db->getAll($sql);
    $sql = 'SELECT reg_field_id, content ' . 'FROM ' . $ecs->table('reg_extend_info') . " WHERE user_id = {$user['user_id']}";
    $extend_info_arr = $db->getAll($sql);
    $temp_arr = array();
    foreach ($extend_info_arr as $val) {
        $temp_arr[$val['reg_field_id']] = $val['content'];
    }
    foreach ($extend_info_list as $key => $val) {
        switch ($val['id']) {
            case 1:
                $extend_info_list[$key]['content'] = $user['msn'];
                break;
            case 2:
                $extend_info_list[$key]['content'] = $user['qq'];
                break;
            case 3:
                $extend_info_list[$key]['content'] = $user['office_phone'];
                break;
            case 4:
                $extend_info_list[$key]['content'] = $user['home_phone'];
                break;
            case 5:
                $extend_info_list[$key]['content'] = $user['mobile_phone'];
                break;
            default:
                $extend_info_list[$key]['content'] = empty($temp_arr[$val['id']]) ? '' : $temp_arr[$val['id']];
        }
    }
    $smarty->assign('extend_info_list', $extend_info_list);
    /* 当前会员推荐信息 */
    $affiliate = unserialize($GLOBALS['_CFG']['affiliate']);
    $smarty->assign('affiliate', $affiliate);
    empty($affiliate) && ($affiliate = array());
    if (empty($affiliate['config']['separate_by'])) {
        // 推荐注册分成
        $affdb = array();
        $num = count($affiliate['item']);
        $up_uid = "'{$_GET['id']}'";
        for ($i = 1; $i <= $num; $i++) {
            $count = 0;
            if ($up_uid) {
                $sql = "SELECT user_id FROM " . $ecs->table('users') . " WHERE parent_id IN({$up_uid})";
                $query = $db->query($sql);
                $up_uid = '';
                while ($rt = $db->fetch_array($query)) {
                    $up_uid .= $up_uid ? ",'{$rt['user_id']}'" : "'{$rt['user_id']}'";
                    $count++;
                }
            }
            $affdb[$i]['num'] = $count;
        }
        if ($affdb[1]['num'] > 0) {
            $smarty->assign('affdb', $affdb);
        }
    }
    /* 代码增加2014-12-23 by www.68ecshop.com _star */
    $smarty->assign('lang', $_LANG);
    $smarty->assign('country_list', get_regions());
    $province_list = get_regions(1, $row['country']);
    $city_list = get_regions(2, $row['province']);
    $district_list = get_regions(3, $row['city']);
    $smarty->assign('province_list', $province_list);
    $smarty->assign('city_list', $city_list);
    $smarty->assign('district_list', $district_list);
    /* 代码增加2014-12-23 by www.68ecshop.com _end */
    assign_query_info();
    $smarty->assign('ur_here', $_LANG['users_edit']);
    $smarty->assign('action_link', array('text' => $_LANG['03_users_list'], 'href' => 'users.php?act=list&' . list_link_postfix()));
    $smarty->assign('user', $user);
    $smarty->assign('form_action', 'update');
    $smarty->assign('special_ranks', get_rank_list(true));
    $smarty->display('user_info.htm');
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:101,代码来源:users.php

示例15: empty

	$consignee_id = empty($_GET['address_id']) ? 0: intval($_GET['address_id']);
	if (drop_consignee($consignee_id))
	{
		$msg = rpcLang('user.php', 'address_delete_success');
		$code = '0';
	}else
	{
		$msg = rpcLang('user.php', 'address_delete_failure');
		$code = '1';
	}
	jsonExit("{\"status\":\"$msg\",\"code\":\"$code\"}");
}else if($act == 'get_regions')//得到省市区列表
{
	$type   = empty($_GET['type'])   ? 0 : intval($_GET['type']);
	$parent = empty($_GET['parent']) ? 0 : intval($_GET['parent']);
	$area_arr = get_regions($type,$parent);
	if(empty($area_arr))
	{
		$msg = rpcLang('user.php', 'get_regions_failure');
		jsonExit("{\"status\":\"$msg\"}");
	}else
	{
		jsonExit($area_arr);
	}
}else if($act == 'order_list')//我的订单
{
	checkLogin();
	include_once('includes/lib_transaction.php');
	$user_id = intval($_SESSION['user_id']);
	$page = isset($_GET['page']) ? intval($_GET['page']) : 1;
	$record_count = $db->getOne("SELECT COUNT(*) FROM " .$ecs->table('order_info'). " WHERE user_id = '$user_id'");
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:user.php


注:本文中的get_regions函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。