Example #1
0
 public function index()
 {
     init_app_page();
     $s_account_info = $GLOBALS["account_info"];
     $supplier_id = intval($s_account_info['supplier_id']);
     $supplier_info = $GLOBALS['db']->getRow("select * from  " . DB_PREFIX . "supplier where id=" . $supplier_id);
     //分页
     $page_size = 10;
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * $page_size . "," . $page_size;
     $list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "supplier_money_submit  where supplier_id=" . $supplier_id . " order by status asc,create_time desc limit " . $limit);
     foreach ($list as $k => $v) {
         if ($v['status'] == 1) {
             $list[$k]['status'] = "已确认提现";
         } else {
             $list[$k]['status'] = "待审核";
         }
     }
     $total = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "supplier_money_submit  where supplier_id=" . $supplier_id);
     $page = new Page($total, $page_size);
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     $GLOBALS['tmpl']->assign("sms_lesstime", load_sms_lesstime());
     $GLOBALS['tmpl']->assign("sms_ipcount", load_sms_ipcount());
     $GLOBALS['tmpl']->assign("list", $list);
     $GLOBALS['tmpl']->assign("supplier_info", $supplier_info);
     $GLOBALS['tmpl']->assign("head_title", "商户提现");
     $GLOBALS['tmpl']->display("pages/withdrawal/index.html");
 }
Example #2
0
 public function register()
 {
     init_app_page();
     if ($GLOBALS['user_info']) {
         $GLOBALS['tmpl']->assign("user_info", $GLOBALS['user_info']);
     }
     $step = intval($_REQUEST['step']);
     if (empty($step)) {
         $step = 1;
     }
     if ($step == 2) {
         $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 = load_auto_cache("city_list_result");
         $GLOBALS['tmpl']->assign("city_list", $deal_city_list['ls']);
     } elseif ($step == 3) {
         if ($_POST) {
             $data['name'] = addslashes(htmlspecialchars(trim($_REQUEST['name'])));
             $data['deal_cate_id'] = intval($_REQUEST['deal_cate_id']);
             foreach ($_REQUEST['deal_cate_type_id'] as $type) {
                 $data['deal_cate_type_id'][] = intval($type);
             }
             foreach ($_REQUEST['area_id'] as $area) {
                 $data['area_id'][] = intval($area);
             }
             $data['address'] = strim($_REQUEST['address']);
             $data['xpoint'] = doubleval($_REQUEST['xpoint']);
             $data['ypoint'] = doubleval($_REQUEST['ypoint']);
             $data['tel'] = strim($_REQUEST['tel']);
             $data['open_time'] = strim($_REQUEST['open_time']);
             $data['location_id'] = 0;
             $data['city_id'] = intval($_REQUEST['city_id']);
         } else {
             app_redirect(url("biz", "user#register"));
         }
         $GLOBALS['tmpl']->assign("base_data", base64_encode(serialize($data)));
         $user_id = intval($GLOBALS['user_info']['id']);
         if ($user_id) {
             $GLOBALS['tmpl']->assign("user_info", $GLOBALS['user_info']);
         }
     } elseif ($step == 4) {
         $sid = $_REQUEST['sid'];
         if ($sid > 0) {
             $supplier_data = $GLOBALS['db']->getRow("SELECT * FROM " . DB_PREFIX . "supplier_submit WHERE id=" . $sid);
             $supplier_data['h_bank_info'] = preg_replace("/(\\d{4})(?=\\d)/", "\$1 ", $supplier_data['h_bank_info']);
             $GLOBALS['tmpl']->assign("supplier_data", $supplier_data);
         }
     }
     $GLOBALS['tmpl']->assign("sms_lesstime", load_sms_lesstime());
     $GLOBALS['tmpl']->assign("sms_ipcount", load_sms_ipcount());
     $GLOBALS['tmpl']->assign("step", $step);
     $GLOBALS['tmpl']->display("register.html");
 }
Example #3
0
 public function index()
 {
     init_app_page();
     $s_account_info = $GLOBALS["account_info"];
     $supplier_id = intval($s_account_info['supplier_id']);
     $supplier_info = $GLOBALS['db']->getRow("select * from  " . DB_PREFIX . "supplier where id=" . $supplier_id);
     $GLOBALS['tmpl']->assign("sms_lesstime", load_sms_lesstime());
     $GLOBALS['tmpl']->assign("sms_ipcount", load_sms_ipcount());
     $GLOBALS['tmpl']->assign("supplier_info", $supplier_info);
     $GLOBALS['tmpl']->assign("head_title", "银行卡绑定");
     $GLOBALS['tmpl']->display("pages/bankinfo/index.html");
 }
Example #4
0
 public function order()
 {
     global_run();
     init_app_page();
     if (check_save_login() != LOGIN_STATUS_LOGINED) {
         app_redirect(url("index", "user#login"));
     }
     $id = intval($_REQUEST['id']);
     $order_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_order where id = " . $id . " and is_delete = 0 and pay_status <> 2 and order_status <> 1 and user_id =" . intval($GLOBALS['user_info']['id']));
     if (!$order_info) {
         app_redirect(url("index"));
     }
     if ($order_info['type'] == 1) {
         app_redirect(url("index", "uc_money#incharge"));
     }
     $GLOBALS['tmpl']->assign('order_info', $order_info);
     $cart_list = $GLOBALS['db']->getAll("select doi.*,d.id as did,d.icon,d.uname as duname from " . DB_PREFIX . "deal_order_item as doi left join " . DB_PREFIX . "deal as d on doi.deal_id = d.id where doi.order_id = " . $order_info['id']);
     if (!$cart_list) {
         app_redirect(url("index"));
     } else {
         foreach ($cart_list as $k => $v) {
             $bind_data = array();
             $bind_data['id'] = $v['id'];
             if ($v['buy_type'] == 1) {
                 $cart_list[$k]['unit_price'] = abs($v['return_score']);
                 $cart_list[$k]['total_price'] = abs($v['return_total_score']);
             }
             if ($v['duname'] != "") {
                 $cart_list[$k]['url'] = url("index", "deal#" . $v['duname']);
             } else {
                 $cart_list[$k]['url'] = url("index", "deal#" . $v['did']);
             }
         }
     }
     //输出购物车内容
     $GLOBALS['tmpl']->assign("cart_list", $cart_list);
     $GLOBALS['tmpl']->assign('total_price', $order_info['deal_total_price']);
     $is_delivery = 0;
     foreach ($cart_list as $k => $v) {
         if ($GLOBALS['db']->getOne("select is_delivery from " . DB_PREFIX . "deal where id = " . $v['deal_id']) == 1) {
             $is_delivery = 1;
             break;
         }
     }
     if ($is_delivery) {
         //输出配送方式
         $consignee_count = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "user_consignee where user_id = " . $GLOBALS['user_info']['id']);
         $GLOBALS['tmpl']->assign("consignee_count", intval($consignee_count));
     }
     //配送方式由ajax由 consignee 中的地区动态获取
     //输出支付方式
     $payment_list = load_auto_cache("cache_payment");
     foreach ($cart_list as $k => $v) {
         if ($GLOBALS['db']->getOne("select define_payment from " . DB_PREFIX . "deal where id = " . $v['deal_id']) == 1) {
             $define_payment_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_payment where deal_id = " . $v['deal_id']);
             $define_payment = array();
             foreach ($define_payment_list as $kk => $vv) {
                 array_push($define_payment, $vv['payment_id']);
             }
             foreach ($payment_list as $k => $v) {
                 if (in_array($v['id'], $define_payment)) {
                     unset($payment_list[$k]);
                 }
             }
         }
     }
     $icon_paylist = array();
     //用图标展示的支付方式
     $disp_paylist = array();
     //特殊的支付方式(Voucher,Account,Otherpay)
     $bank_paylist = array();
     //网银直连
     foreach ($payment_list as $k => $v) {
         if ($v['class_name'] == "Voucher" || $v['class_name'] == "Account" || $v['class_name'] == "Otherpay") {
             if ($v['class_name'] == "Account") {
                 $directory = APP_ROOT_PATH . "system/payment/";
                 $file = $directory . '/' . $v['class_name'] . "_payment.php";
                 if (file_exists($file)) {
                     require_once $file;
                     $payment_class = $v['class_name'] . "_payment";
                     $payment_object = new $payment_class();
                     $v['display_code'] = $payment_object->get_display_code();
                 }
             }
             if ($v['class_name'] == "Account" || $v['class_name'] == "Otherpay") {
                 //代金券在订单修改时不再允许支付
                 $disp_paylist[] = $v;
             }
         } else {
             if ($v['is_bank'] == 1) {
                 $bank_paylist[] = $v;
             } else {
                 $icon_paylist[] = $v;
             }
         }
     }
     $GLOBALS['tmpl']->assign("icon_paylist", $icon_paylist);
     $GLOBALS['tmpl']->assign("disp_paylist", $disp_paylist);
     $GLOBALS['tmpl']->assign("bank_paylist", $bank_paylist);
     $GLOBALS['tmpl']->assign("is_delivery", $is_delivery);
     $is_coupon = 0;
     foreach ($cart_list as $k => $v) {
         if ($GLOBALS['db']->getOne("select is_coupon from " . DB_PREFIX . "deal where id = " . $v['deal_id']) == 1) {
             $is_coupon = 1;
             break;
         }
     }
     $GLOBALS['tmpl']->assign("is_coupon", $is_coupon);
     $GLOBALS['tmpl']->assign("coupon_name", app_conf("COUPON_NAME"));
     $GLOBALS['tmpl']->assign("show_payment", true);
     $GLOBALS['tmpl']->assign("user_info", $GLOBALS['user_info']);
     //关于短信发送的条件
     $GLOBALS['tmpl']->assign("sms_lesstime", load_sms_lesstime());
     $GLOBALS['tmpl']->assign("sms_ipcount", load_sms_ipcount());
     //购物车检测页
     $GLOBALS['tmpl']->display("cart_check.html");
 }
Example #5
0
 public function index()
 {
     //==基本参数定义==
     global_run();
     init_app_page();
     $user_info = $GLOBALS['user_info'];
     //==业务逻辑部分==
     if ($GLOBALS['user_info']['is_tmp'] == 1) {
         if (check_save_login() == LOGIN_STATUS_NOLOGIN) {
             app_redirect(url("index", "user#login"));
         }
     } else {
         if (check_save_login() != LOGIN_STATUS_LOGINED) {
             app_redirect(url("index", "user#login"));
         }
     }
     /*第三方微博列表*/
     $iconfont = (require_once APP_ROOT_PATH . 'system/weibo_iconfont_cfg.php');
     $apis = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "api_login");
     foreach ($apis as $k => $v) {
         if ($user_info[strtolower($v['class_name']) . "_id"]) {
             $apis[$k]['is_bind'] = 1;
             if ($user_info["is_syn_" . strtolower($v['class_name'])] == 1) {
                 $apis[$k]['is_syn'] = 1;
             } else {
                 $apis[$k]['is_syn'] = 0;
             }
         } else {
             $apis[$k]['is_bind'] = 0;
         }
         if (file_exists(APP_ROOT_PATH . "system/api_login/" . $v['class_name'] . "_api.php")) {
             require_once APP_ROOT_PATH . "system/api_login/" . $v['class_name'] . "_api.php";
             $api_class = $v['class_name'] . "_api";
             $api_obj = new $api_class($v);
             $api_item = $api_obj->get_bind_api_url_arr();
             $apis[$k]['api_item'] = $api_item;
             $apis[$k]['url'] = $api_url['url'];
             $apis[$k]['iconfont'] = $iconfont[strtolower($v['class_name'])];
         }
     }
     //地区列表
     $region_lv2 = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "region_conf where region_level = 2");
     //二级地址
     foreach ($region_lv2 as $k => $v) {
         if ($v['id'] == intval($GLOBALS['user_info']['province_id'])) {
             $region_lv2[$k]['selected'] = 1;
             break;
         }
     }
     $region_lv3 = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "region_conf where pid = " . intval($GLOBALS['user_info']['province_id']));
     //三级地址
     foreach ($region_lv3 as $k => $v) {
         if ($v['id'] == intval($GLOBALS['user_info']['city_id'])) {
             $region_lv3[$k]['selected'] = 1;
             break;
         }
     }
     //==模版数据申明==
     $GLOBALS['tmpl']->assign("user_info", $GLOBALS['user_info']);
     $GLOBALS['tmpl']->assign("region_lv2", $region_lv2);
     $GLOBALS['tmpl']->assign("region_lv3", $region_lv3);
     $GLOBALS['tmpl']->assign("sms_lesstime", load_sms_lesstime());
     $GLOBALS['tmpl']->assign("sms_ipcount", load_sms_ipcount());
     $GLOBALS['tmpl']->assign("apis", $apis);
     //==通用模版参数定义==
     assign_uc_nav_list();
     //左侧导航菜单
     $GLOBALS['tmpl']->assign("no_nav", true);
     //无分类下拉
     $GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['UC_ACCOUNT']);
     $GLOBALS['tmpl']->display("uc/uc_account_index.html");
 }
Example #6
0
 /**
  * 提现
  */
 public function withdraw()
 {
     global_run();
     if (check_save_login() != LOGIN_STATUS_LOGINED) {
         app_redirect(url("index", "user#login"));
     }
     init_app_page();
     $user_info = $GLOBALS['user_info'];
     //取出等级信息
     $level_data = load_auto_cache("cache_user_level");
     $cur_level = $level_data[$user_info['level_id']];
     //游标移动获取下一个等级
     reset($level_data);
     do {
         $current_data = current($level_data);
         if ($current_data['id'] == $cur_level['id']) {
             $next_data = next($level_data);
             break;
         }
     } while (next($level_data));
     $uc_query_data = array();
     $uc_query_data['cur_level'] = $cur_level['level'];
     //当前等级
     $uc_query_data['cur_point'] = $user_info['point'];
     $uc_query_data['cur_level_name'] = $cur_level['name'];
     if ($next_data) {
         $uc_query_data['next_level'] = $next_data['id'];
         $uc_query_data['next_point'] = $next_data['point'] - $user_info['point'];
         //我再增加:100 经验值,就可以升级为:青铜五
         $uc_query_data['next_level_name'] = $next_data['name'];
     }
     $uc_query_data['cur_score'] = $user_info['score'];
     $cur_group = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user_group where id=" . $user_info['group_id']);
     $uc_query_data['cur_gourp'] = $cur_group['id'];
     $uc_query_data['cur_gourp_name'] = $cur_group['name'];
     $uc_query_data['cur_discount'] = doubleval(sprintf('%.2f', $cur_group['discount'] * 10));
     $GLOBALS['tmpl']->assign("uc_query_data", $uc_query_data);
     $GLOBALS['tmpl']->assign("sms_lesstime", load_sms_lesstime());
     require_once APP_ROOT_PATH . "system/model/user_center.php";
     require_once APP_ROOT_PATH . "app/Lib/page.php";
     //输出充值订单
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
     $result = get_user_withdraw($limit, $GLOBALS['user_info']['id']);
     $GLOBALS['tmpl']->assign("list", $result['list']);
     $page = new Page($result['count'], app_conf("PAGE_SIZE"));
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     //通用模版参数定义
     assign_uc_nav_list();
     //左侧导航菜单
     $GLOBALS['tmpl']->assign("no_nav", true);
     //无分类下拉
     $GLOBALS['tmpl']->assign("page_title", "会员提现");
     //title
     $GLOBALS['tmpl']->display("uc/uc_money_withdraw.html");
     //title
 }
Example #7
0
 public function m_getpassword()
 {
     global_run();
     init_app_page();
     $GLOBALS['tmpl']->assign("sms_lesstime", load_sms_lesstime());
     $GLOBALS['tmpl']->assign("sms_ipcount", load_sms_ipcount());
     $GLOBALS['tmpl']->assign("no_nav", true);
     //无分类下拉
     $GLOBALS['tmpl']->assign("page_title", "短信找回");
     $GLOBALS['tmpl']->display("user_m_getpassword.html");
 }