示例#1
0
 private function prourl()
 {
     if (isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] != '/' && !empty($_SERVER['PATH_INFO'])) {
         $this->prourlexp('pathinfo');
         return;
     }
     if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
         $this->prourlexp('query');
         return;
     }
     if (isset($this->domain[$_SERVER['HTTP_HOST']])) {
         $this->route_url[1] = $this->domain[$_SERVER['HTTP_HOST']]['m'];
         $this->route_url[2] = $this->domain[$_SERVER['HTTP_HOST']]['c'];
         $this->route_url[3] = $this->domain[$_SERVER['HTTP_HOST']]['a'];
         return;
     }
     if (_is_mobile()) {
         foreach ($this->domain as $key => $v) {
             if (isset($v['m']) && $v['m'] == 'mobile') {
                 header("location: " . dirname(G_HTTP . $key . $_SERVER['SCRIPT_NAME']));
             }
         }
         return;
     }
     return;
 }
示例#2
0
 private function return_meg($content = '', $title = '', $type = "")
 {
     if (_is_mobile()) {
         _messagemobile($content, $title, $type);
     } else {
         _message($content);
     }
 }
示例#3
0
 private function qiantai()
 {
     if (_is_mobile()) {
         $message = '_messagemobile';
     } else {
         $message = '_message';
     }
     $out_trade_no = $this->out_trade_no;
     $dingdaninfo = $this->db->GetOne("select * from `@#_member_addmoney_record` where `code` = '{$out_trade_no}'");
     if (!$dingdaninfo || $dingdaninfo['status'] == '未付款') {
         _message("支付失败");
     } else {
         if (empty($dingdaninfo['scookies'])) {
             _message("充值成功!", WEB_PATH . "/member/home/userbalance");
         } else {
             if ($dingdaninfo['scookies'] == '1') {
                 _message("支付成功!", WEB_PATH . "/member/cart/paysuccess");
             } else {
                 _message("商品还未购买,请重新购买商品!", WEB_PATH . "/member/cart/cartlist");
             }
         }
     }
 }