當前位置: 首頁>>代碼示例>>PHP>>正文


PHP u2g函數代碼示例

本文整理匯總了PHP中u2g函數的典型用法代碼示例。如果您正苦於以下問題:PHP u2g函數的具體用法?PHP u2g怎麽用?PHP u2g使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了u2g函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: EditKuaibkcard

 public function EditKuaibkcard()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $authorid = trim($arr_channelinfo['authorid']);
     $bkcardid = trim($arr_body['bkcardid']);
     $bkcardbankcode = trim($arr_body['bkcardbankid']);
     $bkcardbank = trim($arr_body['bkcardbank']);
     $bkcardno = trim($arr_body['bkcardno']);
     $bkcardbankman = trim($arr_body['bkcardbankman']);
     $bkcardbankphone = trim($arr_body['bkcardbankphone']);
     $bkcardyxmonth = trim($arr_body['bkcardyxmonth']);
     $bkcardyxyear = trim($arr_body['bkcardyxyear']);
     $bkcardcvv = trim($arr_body['bkcardcvv']);
     $bkcardidcard = trim($arr_body['bkcardidcard']);
     $bkcardcardtype = trim($arr_body['bkcardcardtype']);
     $bkcardisdefault = trim($arr_body['bkcardisdefault']);
     $bkcardbankid = getbankid(u2g($bkcardbank));
     if ($bkcardisdefault == 1) {
         $query = "UPDATE tb_author_quickpaycard SET fd_bkcardisdefault = 0 WHERE fd_bkauthorid = " . $authorid;
         $db->query($query);
     }
     $query = "UPDATE tb_author_quickpaycard SET fd_bkcardno = '{$bkcardno}',fd_bkcardbankid = '{$bkcardbankid}',fd_bkcardbankcode = '{$bkcardbankcode}',fd_bkcardbank = '{$bkcardbank}',fd_bkcardbankman = '{$bkcardbankman}',fd_bkcardbankphone = '{$bkcardbankphone}',fd_bkcardyxmonth = '{$bkcardyxmonth}',fd_bkcardyxyear = '{$bkcardyxyear}',fd_bkcardcvv = '{$bkcardcvv}',fd_bkcardidcard = '{$bkcardidcard}',fd_bkcardisdefault = '{$bkcardisdefault}',fd_bkcardcardtype = '{$bkcardcardtype}' WHERE fd_bkcardid = " . $bkcardid;
     $db->query(auto_charset($query, 'utf-8', 'gbk'));
     $retcode = "0";
     $arr_message = array("result" => "success", "message" => "修改成功");
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:34,代碼來源:ApiAuthorKuaibkcardInfo.php

示例2: setAnswer

 public function setAnswer()
 {
     $db = new DB_test();
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $authorid = trim($arr_channelinfo['authorid']);
     $query = "DELETE FROM tb_safeguard_secque_useranswer WHERE fd_author_id = {$authorid} ;";
     $db->query($query);
     if (count($arr_body) > 0) {
         for ($i = 0; $i < count($arr_body); $i++) {
             $itemKey = "msgchild" . ($i + 1);
             $questionid = trim($arr_body[$itemKey]['queid']);
             $answer = u2g(trim($arr_body[$itemKey]['answer']));
             if ($questionid != "" && trim($arr_body[$itemKey]['answer']) != "") {
                 $query = "REPLACE INTO tb_safeguard_secque_useranswer (`fd_question_id`, `fd_author_id`, `fd_answer`) \n\t\t\t\t\t\t\tVALUES ( {$questionid} , {$authorid} , '" . $answer . "');";
                 $db->query($query);
             }
         }
         $arr_message = array("result" => "success", "message" => "設置成功");
     } else {
         $arr_message = array("result" => "fail", "message" => "設置失敗");
     }
     $retcode = "0";
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:29,代碼來源:ApiSafeGuard.php

示例3: getcouponSale

 static function getcouponSale($xml, $listno, $listid, $paytype = 'coupon', $bkntno)
 {
     $db = new DB_test();
     $Publiccls = new PublicClass();
     //初始化類實例
     $arr_xml = $Publiccls->xml_to_array($xml);
     $arr_channelinfo = $arr_xml['operation_request']['msgheader']['channelinfo'];
     $arr_body = $arr_xml['operation_request']['msgbody'];
     $authorid = $arr_channelinfo['authorid'];
     $couponid = trim($arr_body['couponid']);
     $paymoney = trim($arr_body['couponmoney']);
     $paycardid = trim($arr_body['paycardid']);
     $fucardno = trim($arr_body['creditcardno']);
     $fubank = trim(u2g($arr_body['creditbank']));
     $fucardman = trim(u2g($arr_body['creditcardman']));
     $fucardphone = trim(u2g($arr_body['creditcardphone']));
     $method = 'in';
     $method = u2g($method);
     $query1 = "insert into tb_agentpaymoneylist(\n\t\t\t\t\t\t\tfd_agpm_no\t\t\t,fd_agpm_paycardid\t\t,fd_agpm_authorid\t ,\n\t\t\t\t            fd_agpm_paydate\t    ,fd_agpm_shoucardno\t    ,fd_agpm_fucardno\t ,\n\t\t\t\t            fd_agpm_bkntno\t\t,fd_agpm_payrq          ,fd_agpm_paytype     ,\n\t\t\t\t            fd_agpm_current\t    ,fd_agpm_paymoney\t\t,fd_agpm_payfee\t\t ,\n\t\t\t\t            fd_agpm_money\t\t,fd_agpm_shoucardbank   ,fd_agpm_shoucardman ,\n\t\t\t\t            fd_agpm_shoucardmobile,fd_agpm_fucardbank\t,fd_agpm_fucardmobile,\n\t\t\t\t            fd_agpm_fucardman   ,fd_agpm_feebankid      ,fd_agpm_state       ,\n\t\t\t\t            fd_agpm_listid     , fd_agpm_listno         ,fd_agpm_method ,\n\t\t\t\t            fd_agpm_datetime     )values\n\t\t\t\t\t\t   ('{$listno}'\t\t,'{$paycardid}'\t,'{$authorid}'\t\t,\n\t\t\t\t\t\t   now()\t\t,'{$shoucardno}'\t,'{$fucardno}'\t\t,\n\t\t\t\t\t\t   '{$bkntno}'\t\t,'01'\t\t\t,'{$paytype}'\t\t\t,\n\t\t\t\t\t\t   '{$current}'\t\t,'{$paymoney}'\t,'{$payfee}'\t\t\t,\n\t\t\t\t\t\t   '{$paymoney}'\t\t\t,'{$shoucardbank}','{$shoucardman}'\t\t,\n\t\t\t\t\t\t   '{$shoucardmobile}','{$fucardbank}'\t,'{$fucardphone}'  \t,\n\t\t\t\t\t\t   '{$fucardman}'\t\t,'{$feebankid}'\t,'0'\t            ,\t\t\n\t\t\t\t\t\t   '{$listid}'\t\t,'{$listno}'\t    ,'{$method}'\t,now()        \t\t\t\n\t\t\t\t\t\t  )";
     $db->query($query1);
     $authorid = $authorid + 0;
     $file = "./" . date('Y-m-d') . "-paylist" . ".txt";
     $filehandle = fopen($file, "a");
     fwrite($filehandle, "\r\n======響應內容:\r\n" . $query1 . "\r\n\r\n\r\n\r\n<!--------------結束------------>\r\n\r\n\r\n");
     fclose($filehandle);
     return 1;
 }
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:27,代碼來源:tfbslotcard.class.php

示例4: get_gpath

 /**
  * get_gpath獲取以/開頭的虛擬路徑,GB2312 用於訪問文件係統
  * get_upath獲取以/開頭的虛擬路徑,UTF-8  用於頁麵輸出
  * @param unknown_type $path
  * @param unknown_type $type
  * @return unknown
  */
 function get_gpath($path, $type = 'u')
 {
     if ('r' == $type) {
         $path = str_replace('//', '/', REAL_ROOT_PATH . $path);
     }
     if ('u' == $type) {
         $path = str_replace('//', '/', REAL_USER_PATH . $path);
     }
     $path = SYS_WIN ? u2g($path) : $path;
     return $path;
 }
開發者ID:nomagame,項目名稱:ZiFeiYu-Management-System,代碼行數:18,代碼來源:FileFS.class.php

示例5: readBankList

 public function readBankList()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $activemobilesms = trim($arr_body['activemobilesms']);
     $querysql = trim(u2g(trim($arr_body['querywhere'])));
     //$appversion = trim($arr_body['appversion']);
     $msgstart = $arr_body['msgstart'] + 0;
     $msgdisplay = $arr_body['msgdisplay'] + 0;
     if ($msgstart < 0) {
         $msgstart = 0;
     }
     if ($msgdisplay == 0) {
         $msgdisplay = 40;
     }
     if ($activemobilesms) {
         $querywhere = " and fd_bank_activemobilesms = '1'";
     }
     if ($querysql != "") {
         $querywhere .= " and fd_bank_name like '%{$querysql}%'";
     }
     $query = "select  1 from tb_bank where fd_bank_active = '1' {$querywhere}  ";
     $db->query($query);
     $msgallcount = $db->nf();
     if ($msgstart >= $msgallcount) {
         $msgstart = $msgallcount - $msgdisplay;
         if ($msgstart < 0) {
             $msgstart = 0;
         }
     }
     $query = "select fd_bank_id as bankid,fd_bank_no as bankno,fd_bank_name as bankname from \n\t\t\t       tb_bank where fd_bank_active = '1' {$querywhere} order by fd_bank_no asc limit {$msgstart}, {$msgdisplay} ";
     //隻顯示激活的銀行列表
     $db->query($query);
     $arr_msg = auto_charset($db->getData('', 'msgbody'), 'gbk', 'utf-8');
     $msgdiscount = $db->nf();
     if (!$arr_msg) {
         $arr_message = array("result" => "failure", "message" => "查詢銀行列表數據為空!");
         $retcode = "0";
         //反饋狀態 0 成功 200 自定義錯誤
     } else {
         $arr_message = array("result" => "success", "message" => "讀取成功!");
         $retcode = "0";
         //反饋狀態 0 成功 200 自定義錯誤
     }
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $arr_msg['msgbody']['msgallcount'] = $msgallcount;
     $arr_msg['msgbody']['msgdiscount'] = $msgdiscount + $msgstart;
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:54,代碼來源:ApiAppInfo.php

示例6: getorderinfo

 public function getorderinfo($querywhere, $start, $display)
 {
     $dbmsale = new DB_mssale();
     if ($start < 0) {
         $start = 0;
     }
     $start = $start + 0;
     $display = $display + 0;
     $query = "select 1  from web_order where 1=1    {$querywhere} ";
     $dbmsale->query($query);
     $msgallcount = $dbmsale->nf();
     $wfstate = '未付款';
     $wfstate = u2g($wfstate);
     $yfstate = '已付款';
     $yfstate = u2g($yfstate);
     $qfstate = '其他';
     $qfstate = u2g($qfstate);
     $query = "select case \n\t        when fd_order_state ='6' then '" . $wfstate . "'\n\t        when fd_order_state ='7' then '" . $yfstate . "'\n\t        else '" . $qfstate . "' END  orderstate,fd_order_id as orderid,fd_order_no as orderno ,\n\t\t                 fd_order_date as ordertime  ,fd_order_allmoney as ordermoney,fd_order_alldunshu as orderpronum,\n\t\t                 fd_order_type as orderpaytype,fd_order_shman as shman,fd_order_comnpany as shcmpyname,\n\t\t                 fd_order_receiveadderss as shaddress , '' as fhstorage,'' as fhwltype,\n\t\t                 fd_order_memo as ordermemo,'' as allpromoney,'' as fhwlmoney\n\t\t                 from web_order " . "where 1=1  {$querywhere} limit {$start} ,{$display}";
     $dbmsale->query($query);
     //echo $query;
     $msgdiscount = $dbmsale->nf();
     $arr_value = $dbmsale->getData('', 'msorder');
     //$arr_orderinfo = $dbmsale->get_all($query);
     foreach ($arr_value as $key => $value) {
         foreach ($value as $k => $v) {
             $orderid = $v['orderid'];
             $query = "select fd_orderdetail_quantity as pronum,fd_orderdetail_productname as proname,\n\t\t\t\t\t          fd_orderdetail_price as proprice \n\t\t\t\t\t          ,(fd_orderdetail_price*fd_orderdetail_quantity) as promoney from web_orderdetail \n\t\t\t\t\t          where fd_orderdetail_orderid ='{$orderid}'";
             $dbmsale->query($query);
             //echo $query;
             if ($dbmsale->nf()) {
                 $arr_value[$key][$k]['msproinfo'] = $dbmsale->getFiledData('msgchild');
             }
         }
     }
     if (!$arr_value) {
         $arr_message = array("result" => "failure", "message" => "很抱歉,沒有找到相關的訂單信息!");
     } else {
         $arr_message = array("result" => "success", "message" => "讀取成功");
     }
     //echo var_dump($arr_value);
     $arr_message = auto_charset($arr_message, 'utf-8', 'gbk');
     $arr_msg['msgbody'] = $arr_value;
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $arr_msg['msgbody']['msgallcount'] = $msgallcount;
     $arr_msg['msgbody']['msgdiscount'] = $msgdiscount + $start;
     return $arr_msg['msgbody'];
 }
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:48,代碼來源:mssale.class.php

示例7: CreateOrder

 public function CreateOrder($requestBody, $authorId, $payChannel)
 {
     $logger = Logger::getLogger("transfermoney");
     $logger->debug("開始創建轉賬付款訂單");
     // 調用外部函數******
     $logger->debug("正在創建轉賬付款訂單 : 調用函數GetPayCalcuInfo::readpaycardid,傳入參數(" . $requestBody["cardReaderId"] . ", " . $authorId . ")");
     $agentInfo = GetPayCalcuInfo::readpaycardid($requestBody["cardReaderId"], $authorId);
     $logger->debug("正在創建轉賬付款訂單 : 調用函數GetPayCalcuInfo::readpaycardid,返回的結果" . print_r($agentInfo, true));
     // ******調用外部函數
     $cardReaderId = $agentInfo["paycardid"];
     // 刷卡器ID
     $agentId = $agentInfo["cusid"];
     // 代理商ID
     $payChannelFee = 0;
     switch ($payChannel) {
         case "YiBao":
             $payChannelFee = YiBaoPay::GetPayFee($requestBody['payMoney']);
             break;
     }
     $orderId = "tfbtfs" . date("YmdHiss") . mt_rand(1000, 9999);
     // 調用外部函數******
     $orderListNumber = makeorderno("transfermoneyglist", "tfmglist", "tfs");
     // ******調用外部函數
     $payDate = date("Y-m-d H:i:s");
     $feeMoney = 0;
     // 調用外部函數******
     $logger->debug("正在創建轉賬付款訂單 : 調用函數getbankid,傳入參數(" . $requestBody["receiveBankName"] . ")");
     $receiveBankId = getbankid(u2g($requestBody["receiveBankName"]));
     if ($receiveBankId == "") {
         ErrorReponse::reponError(array("retcode" => "200", "retmsg" => "不支持的銀行"));
     }
     $logger->debug("正在創建轉賬付款訂單 : 調用函數getbankid,返回的結果" . $receiveBankId);
     $logger->debug("正在創建轉賬付款訂單 : 調用函數GetPayCalcuInfo :: readPayFee,傳入參數({$authorId}, {$receiveBankId}, " . $requestBody['transferMoney'] . ", " . $requestBody['arriveId'] . ", 2, " . $requestBody["payType"] . ")");
     $payChannelFeeInfo = GetPayCalcuInfo::readPayFee($authorId, $receiveBankId, $requestBody['transferMoney'], $requestBody['arriveId'], 2, $requestBody["payType"]);
     $logger->debug("正在創建轉賬付款訂單 : 調用函數GetPayCalcuInfo :: readPayFee,返回的結果" . print_r($payChannelFeeInfo, true));
     if (is_array($payChannelFeeInfo)) {
         $feeMoney = $payChannelFeeInfo["feemoney"];
     }
     $arriveDate = GetPayCalcuInfo::getfeedate($payDate, $payChannelFeeInfo['addday']);
     $logger->debug("正在創建轉賬付款訂單 : 調用函數GetPayCalcuInfo :: getfeedate,返回的結果" . $arriveDate);
     // ******調用外部函數
     $query = "INSERT INTO tb_transfermoneyglist (fd_tfmglist_no, fd_tfmglist_bkordernumber, fd_tfmglist_payrq, fd_tfmglist_paycardid, fd_tfmglist_authorid, fd_tfmglist_sdcrid, fd_tfmglist_sdcrpayfeemoney, fd_tfmglist_sdcragentfeemoney, fd_tfmglist_paytype, fd_tfmglist_paydate, fd_tfmglist_payfeedirct, fd_tfmglist_fucardno, fd_tfmglist_fucardbank, \n\t\tfd_tfmglist_fucardmobile, fd_tfmglist_fucardman, \n\t\tfd_tfmglist_shoucardno, fd_tfmglist_shoucardbank, \n\t\tfd_tfmglist_shoucardman, fd_tfmglist_shoucardmobile, fd_tfmglist_sendsms, fd_tfmglist_shoucardmemo, fd_tfmglist_current, fd_tfmglist_paymoney, fd_tfmglist_payfee, fd_tfmglist_money, fd_tfmglist_feebankid, fd_tfmglist_arrivedate, fd_tfmglist_arriveid, fd_tfmglist_state) VALUES \n\t\t('{$orderListNumber}', '{$orderId}', '01', \n\t\t'{$cardReaderId}', {$authorId}, 3, {$payChannelFee}, \n\t\t0.00, '" . $requestBody["payType"] . "', '{$payDate}', 'f', \n\t\t'" . $requestBody["sendBankCardId"] . "', '" . $requestBody["sendBankName"] . "', \n\t\t'" . $requestBody["sendPhone"] . "', '" . $requestBody["sendPersonName"] . "', \n\t\t'" . $requestBody["receiveBankCardId"] . "', '" . $requestBody["receiveBankName"] . "', \n\t\t'" . $requestBody["receivePersonName"] . "', '" . $requestBody["receivePhone"] . "', 0, '', \n\t\t'RMB', " . $requestBody["transferMoney"] . ", {$feeMoney}, " . $requestBody["payMoney"] . ", {$receiveBankId}, \n\t\t'{$arriveDate}', '" . $requestBody['arriveId'] . "', '0')";
     $logger->debug("新增數據進 tb_transfermoneyglist 的sql" . $query);
     $db = new DB_test();
     $db->query(u2g($query));
     return $orderId;
 }
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:47,代碼來源:transfermoney.php

示例8: authorReg

 function authorReg()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $aumobile = trim($arr_body['aumobile']);
     $aupassword = trim(md5($arr_body['aupassword']));
     $autruename = u2g(trim($arr_body['autruename']));
     $auidcard = trim($arr_body['auidcard']);
     $auemail = trim($arr_body['auemail']);
     $query = "select 1 from tb_author  where fd_author_username = '{$aumobile}'";
     $db->query($query);
     if ($db->nf()) {
         $arr_message = array("result" => "failure", "message" => "該手機號碼已注冊");
         $retcode = "200";
         //反饋狀態 0 成功 200 自定義錯誤
         $havemobile = 1;
     } else {
         $havemobile = 0;
     }
     if ($havemobile != 1) {
         $query = "insert into tb_author (fd_author_password ,fd_author_mobile ,fd_author_truename,\n\t\t\t\t\t\t\t          fd_author_idcard,fd_author_email ,fd_author_username,fd_author_regtime,fd_author_datetime \n\t\t\t\t\t\t\t          )values( '{$aupassword}' ,'{$aumobile}','{$autruename}','{$auidcard}','{$auemail}','{$aumobile}',now(),now())";
         $db->query($query);
         $listid = $db->insert_id();
         $sdcrid = 3;
         $auindustryid = 4;
         $slotpayfsetid = 8;
         $slotscdmsetid = 14;
         $bkcardpayfsetid = 25;
         $bkcardscdmsetid = 9;
         $memid = 3554;
         $shopid = 102;
         $authortypeid = 5;
         $query = "update tb_author set \n\t\t\t\t\t   fd_author_isstop='0'," . "fd_author_state = '9'," . "fd_author_sdcrid = '{$sdcrid}'," . "fd_author_auindustryid = '{$auindustryid}',\n\t\t               fd_author_slotpayfsetid = '{$slotpayfsetid}',\n\t\t               fd_author_slotscdmsetid = '{$slotscdmsetid}',\n\t\t\t\t\t   fd_author_bkcardpayfsetid='{$bkcardpayfsetid}',\n\t\t\t\t\t   fd_author_bkcardscdmsetid='{$bkcardscdmsetid}' ,\n\t\t\t\t\t   fd_author_couponstate      = 0   ," . "fd_author_memid          = '{$memid}'," . "fd_author_shopid         = '{$shopid}'," . "fd_author_authortypeid   = '{$authortypeid}' \n\t\t\t\t\t   \t\t\t\t\t\t\n\t\t\t\t\t   where fd_author_id='{$listid}'";
         $db->query($query);
         $arr_message = array("result" => "success", "message" => "恭喜您,注冊成功!");
         $retcode = "0";
         //反饋狀態 0 成功 200 自定義錯誤
     }
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:46,代碼來源:ApiAuthorReg.php

示例9: authorFeedbck

 public function authorFeedbck()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $authorid = trim($arr_channelinfo['authorid']);
     $fdcontent = u2g(trim($arr_body['fdcontent']));
     $fdlinkmethod = u2g(trim($arr_body['fdlinkmethod']));
     $fdcontent = str_replace("'", "‘", $fdcontent);
     $fdcontent = str_replace("¥", "¥", $fdcontent);
     //addslashes
     $query = "insert into tb_feedback (fd_feedback_authorid ,fd_feedback_content ,fd_feedback_linkman,\n\t          fd_feedback_datetime)values( '{$authorid}' ,'{$fdcontent}','{$fdlinkmethod}',now())";
     $db->query($query);
     $arr_message = array("error_id" => "0", "result" => "success", "message" => "感謝您的寶貴意見!");
     $retcode = "0";
     //反饋狀態 0 成功 200 自定義錯誤
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:23,代碼來源:ApiAuthorfeedbck.php

示例10: modifyAuBkCardInfo

 public function modifyAuBkCardInfo()
 {
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $authorid = trim($arr_channelinfo['authorid']);
     $shoucardman = u2g(trim($arr_body['aushoucardman']));
     $shoucardphone = trim($arr_body['aushoucardphone']);
     $shoucardno = trim($arr_body['aushoucardno']);
     $shoucardbank = u2g(trim($arr_body['aushoucardbank']));
     $query = "select * from tb_author  where fd_author_id = '{$authorid}'  and fd_author_couponstate='1'";
     $db->query($query);
     if ($db->nf()) {
         $arr_message = array("result" => "failure", "message" => "銀行卡資料已經審批,如需修改請聯係客服!");
         $retcode = "200";
         //反饋狀態 0 成功 200 自定義錯誤
         $Error = array('result' => 'failure', 'retcode' => '200', 'retmsg' => $arr_message['message']);
         $arr_msg['msgbody'] = array("result" => "failure", "message" => "銀行卡資料已經審批,如需修改請聯係客服!");
         $retcode = "200";
         //反饋狀態 0 成功 200 自定義錯誤
         $returnvalue = array("msgbody" => $arr_msg['msgbody']);
         $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
         return $returnval;
         //$ErrorReponse->reponError($Error); //出錯反饋
         //return false;
     }
     $query = "update tb_author set   fd_author_shoucardman = '{$shoucardman}',\n\t\t\t   fd_author_shoucardphone = '{$shoucardphone}',\n\t\t\t   fd_author_shoucardno='{$shoucardno}',\n\t\t\t   fd_author_shoucardbank='{$shoucardbank}',fd_author_couponstate = '0' where fd_author_id  = '{$authorid}' ";
     $db->query($query);
     $arr_msg['msgbody'] = array("error_id" => "0", "result" => "success", "message" => "恭喜您,我的銀行卡修改成功!");
     $retcode = "0";
     //反饋狀態 0 成功 200 自定義錯誤
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:36,代碼來源:ApiAuCardInfo.php

示例11: u2g

        }
        if ($openid) {
            if (!$user && $openid) {
                C::t('#aljwsq#aljwsq_user')->insert(array('nickname' => u2g($wuser['nickname']), 'username' => $_GET['username'], 'openid' => $openid, 'latitude' => $_GET['latitude'], 'longitude' => $_GET['longitude'], 'bindtime' => TIMESTAMP, 'sex' => $wuser['sex'], 'city' => u2g($wuser['city']), 'country' => u2g($wuser['country']), 'province' => u2g($wuser['province']), 'language' => $wuser['language'], 'headimgurl' => $wuser['headimgurl'], 'subscribe_time' => TIMESTAMP));
            } else {
                C::t('#aljwsq#aljwsq_user')->update($openid, array('nickname' => u2g($wuser['nickname']), 'username' => $_GET['username'], 'latitude' => $_GET['latitude'], 'longitude' => $_GET['longitude'], 'bindtime' => TIMESTAMP, 'sex' => $wuser['sex'], 'city' => u2g($wuser['city']), 'country' => u2g($wuser['country']), 'province' => u2g($wuser['province']), 'language' => $wuser['language'], 'headimgurl' => $wuser['headimgurl']));
            }
        }
        showmessage(lang('plugin/aljwsq', 'bind6'), 'forum.php?openid=' . $openid);
    } else {
        $binduser = DB::fetch_first('SELECT * FROM %t WHERE openid=%s', array('aljwsq_user', $openid));
        if ($binduser && $binduser['username']) {
            echo '<script>alert("' . $config['albindtips'] . '");location.href="forum.php?mobile=2&openid=' . $openid . '"</script>';
            exit;
        }
        $_GET['nickname'] = u2g($_GET['nickname']);
        include template('aljwsq:bind');
    }
} else {
    if ($_GET['act'] == 'showqcode') {
        include template('aljwsq:showqcode');
    } else {
        if ($_GET['act'] == 'qrcode') {
            if ($_GET['qid']) {
                DB::query('update %t set num = num+1 where id=%d', array('aljwsq_qrcode', $_GET['qid']));
                $qrcode = C::t('#aljwsq#aljwsq_qrcode')->fetch($_GET['qid']);
                header('Location: ' . $qrcode['url']);
            }
        }
    }
}
開發者ID:deepziyu,項目名稱:JX3PVE,代碼行數:31,代碼來源:bind.inc.php

示例12: header

<?php

require "../include/common.inc.php";
require "../include/json.php";
header('Content-Type:text/html;charset=utf-8');
$db = new db_test();
$prov = u2g(unescape($prov));
$query = "select fd_china_city as city  from tb_china  where fd_china_prov = '{$prov}'\n                   group by fd_china_city order by fd_china_areacode asc";
$db->query($query);
if ($db->nf()) {
    while ($db->next_record()) {
        $arr_city_code = g2u($db->f(city));
        $arr_city_name = g2u($db->f(city));
        $select[] = array("id" => $arr_city_code, "title" => $arr_city_name);
    }
}
if (empty($select)) {
    $select[] = array("id" => "", "title" => "");
}
echo json_encode($select);
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:20,代碼來源:readnewcity.php

示例13: payagentOrderRq

 function payagentOrderRq()
 {
     global $weburl;
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $authorid = trim($arr_channelinfo['authorid']);
     $agentid = trim($arr_channelinfo['agentid']);
     $paytype = 'agentbuy';
     $orderprodureid = trim($arr_body['orderprodureid']);
     //支付類型id
     $ordernum = trim($arr_body['ordernum']);
     //充值金額
     $orderprice = trim(u2g($arr_body['orderprice']));
     //實際支付金額
     $ordermoney = trim(u2g($arr_body['ordermoney']));
     //訂單金額
     $orderfucardno = trim(u2g($arr_body['orderfucardno']));
     //認證信息
     $orderfucardbank = trim(u2g($arr_body['orderfucardbank']));
     //認證信息
     $ordermemo = trim(u2g($arr_body['ordermemo']));
     //認證信息
     $agentno = trim(u2g($arr_body['agentno']));
     //認證信息
     $arr_paycard = GetPayCalcuInfo::readpaycardid($arr_body['paycardid'], $authorid);
     //刷卡器設備號
     $paycardid = $arr_paycard['paycardid'];
     //刷卡器id
     $cusid = trim($arr_paycard['cusid']);
     //代理商
     $ordermemo = "自訂刷卡器" . $ordernum;
     $bkmoney = $ordermoney;
     //promoney+yunmoney
     $paymoney = $ordermoney;
     $listno = makeorderno("salelist", "selt", "xs");
     $arr_bkinfo = BankPayInfo::bankpayorder($authorid, $paycardid, $bkmoney, $orderfucardno);
     $bkntno = trim($arr_bkinfo['bkntno']);
     $sdcrid = trim($arr_bkinfo['sdcrid']);
     $datetime = date("Y-m-d H:i:s");
     $date = date("Y-m-d");
     $bkorderNumber = trim($arr_bkinfo['bkorderNumber']);
     $type = "app";
     //自訂
     $datadetailArray['fd_selt_paytype'] = $paytype;
     $datadetailArray['fd_selt_no'] = $listno;
     $datadetailArray['fd_selt_authorid'] = $authorid;
     $datadetailArray['fd_selt_bkntno'] = $bkntno;
     $datadetailArray['fd_selt_date'] = $date;
     $datadetailArray['fd_selt_payrq'] = '01';
     //剛請求的交易碼狀態為01
     $datadetailArray['fd_selt_bkordernumber'] = $bkorderNumber;
     $datadetailArray['fd_selt_sdcrid'] = $sdcrid;
     $datadetailArray['fd_selt_produreid'] = $orderprodureid;
     $datadetailArray['fd_selt_allquantity'] = $ordernum;
     $datadetailArray['fd_selt_saleprice'] = $orderprice;
     $datadetailArray['fd_selt_fucardno'] = $orderfucardno;
     $datadetailArray['fd_selt_fucardbank'] = $orderfucardbank;
     $datadetailArray['fd_selt_memo'] = u2g($ordermemo);
     $datadetailArray['fd_selt_datetime'] = $datetime;
     $datadetailArray['fd_selt_cusid'] = $agentid;
     //代理商id
     $datadetailArray['fd_selt_paymoney'] = $paymoney;
     //代理商id
     $datadetailArray['fd_selt_authorid'] = $authorid;
     //代理商id
     $datadetailArray['fd_selt_type'] = $type;
     $datadetailArray['fd_selt_skfs'] = '5';
     //在線支付
     $db->insert("tb_salelist", $datadetailArray);
     $listid = $db->insert_id();
     $arr_message = array("result" => "success", "message" => "請求交易碼成功!");
     $retcode = "0";
     //反饋狀態 0 成功 200 自定義錯誤
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $arr_msg['msgbody']['bkntno'] = $bkntno;
     $returnvalue = array("msgbody" => $arr_msg['msgbody']);
     $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
     return $returnval;
 }
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:82,代碼來源:ApiAgentInfo.php

示例14: RechaMoneyRq

 function RechaMoneyRq()
 {
     global $weburl;
     $db = new DB_test();
     $arr_header = $this->arr_header;
     $arr_body = $this->arr_body;
     $arr_channelinfo = $this->arr_channelinfo;
     $authorid = trim($arr_channelinfo['authorid']);
     $paytype = 'qqrecharge';
     $paycardid = trim($arr_body['paycardid']);
     $paytypeid = trim($arr_body['rechapaytypeid']);
     //支付類型id
     $rechamoney = trim($arr_body['rechamoney']);
     //充值金額
     $rechapaymoney = trim(u2g($arr_body['rechapaymoney']));
     //實際支付金額
     $rechaqq = trim(u2g($arr_body['rechaqq']));
     //充值手機號碼
     $qqhasrechamoney = $this->readQQhasRechamoney($rechaqq);
     $allqqremoney = $qqhasrechamoney + $rechamoney;
     if ($allqqremoney > 5000) {
         $retcode = "200";
         $arr_msg['msgbody']['result'] = "failure";
         $arr_msg['msgbody']['message'] = "對不起,每個QQ號碼每天累計充值Q幣數不能大於5000!";
         $returnvalue = array("msgbody" => $arr_msg['msgbody']);
         $returnval = TfbxmlResponse::ResponsetoApp($retcode, $returnvalue);
         return $returnval;
     }
     $rechaqqprov = trim($arr_body['rechaqqprov']);
     //手機所屬地區
     $rechabkcardno = trim(u2g($arr_body['rechabkcardno']));
     //銀行卡號
     $rechabkcardid = trim($arr_body['rechabkcardid']);
     //銀行卡關聯id tb_banckcard.fd_bankcard_id
     $merReserved = trim(u2g($arr_body['merReserved']));
     //認證信息
     // $current = trim($arr_body['current']); //幣種
     // $paycardid = trim(GetPayCalcuInfo::readpaycardid($paycardid)); //刷卡器設備號
     $arr_paycard = GetPayCalcuInfo::readpaycardid($arr_body['paycardid'], $authorid);
     //刷卡器設備號
     $paycardid = $arr_paycard['paycardid'];
     //刷卡器id
     $cusid = trim($arr_paycard['cusid']);
     //代理商
     $paycardkey = trim($arr_paycard['paycardkey']);
     //刷卡器key
     //$feebankid = getbankid($shoucardbank); //獲得銀行id返回string
     $onepayfee = $this->readRechacostmoney($rechamoney);
     $payfee = $onepayfee * $rechamoney;
     //金額也就是數量
     $bkmoney = $rechapaymoney;
     $arr_bkinfo = BankPayInfo::bankpayorder($authorid, $paycardid, $bkmoney, $rechabkcardno);
     $bkntno = trim($arr_bkinfo['bkntno']);
     $sdcrid = trim($arr_bkinfo['sdcrid']);
     $sdcrpayfee = substr($arr_bkinfo['sdcrpayfee'], 0, -1);
     //銀聯收取明盛浮動費率
     $sdcrpayfeemoney = $bkmoney * $sdcrpayfee / 100 > $arr_bkinfo['minsdcrpayfee'] ? $bkmoney * $sdcrpayfee / 100 : $arr_bkinfo['minsdcrpayfee'];
     $paydate = date("Y-m-d H:i:s");
     $today = date("Ymd");
     //$bkmoney  =
     $bkorderNumber = trim($arr_bkinfo['bkorderNumber']);
     $listno = makeorderno("qqrechargelist", "mrclist", "mrc");
     $datadetailArray['fd_mrclist_no'] = $listno;
     $datadetailArray['fd_mrclist_paycardid'] = $paycardid;
     $datadetailArray['fd_mrclist_authorid'] = $authorid;
     $datadetailArray['fd_mrclist_bkntno'] = $bkntno;
     $datadetailArray['fd_mrclist_paydate'] = $paydate;
     $datadetailArray['fd_mrclist_payrq'] = '01';
     //剛請求的交易碼狀態為01
     $datadetailArray['fd_mrclist_paytypeid'] = $paytypeid;
     //手機充值支付類型 跟paytype 無任何關係
     $datadetailArray['fd_mrclist_paytype'] = $paytype;
     //業務類型
     $datadetailArray['fd_mrclist_bkordernumber'] = $bkorderNumber;
     $datadetailArray['fd_mrclist_sdcrpayfeemoney'] = $sdcrpayfeemoney;
     $datadetailArray['fd_mrclist_sdcrid'] = $sdcrid;
     $datadetailArray['fd_mrclist_rechamoney'] = $rechamoney;
     $datadetailArray['fd_mrclist_bkmoney'] = $bkmoney;
     $datadetailArray['fd_mrclist_qq'] = $rechaqq;
     $datadetailArray['fd_mrclist_paymoney'] = $rechapaymoney;
     $datadetailArray['fd_mrclist_payfee'] = $payfee;
     $datadetailArray['fd_mrclist_qqprov'] = u2g($rechaqqprov);
     $datadetailArray['fd_mrclist_bankcardno'] = $rechabkcardno;
     $datadetailArray['fd_mrclist_bankcardid'] = $rechabkcardid;
     $datadetailArray['fd_mrclist_bankcardbank'] = $rechabkcardname;
     $datadetailArray['fd_mrclist_date'] = $today;
     $datadetailArray['fd_mrclist_datetime'] = $paydate;
     $datadetailArray['fd_mrclist_cusid'] = $cusid;
     $db->insert("tb_qqrechargelist", $datadetailArray);
     $listid = $db->insert_id();
     //$listid = $db->insert_id();
     // $method = 'in';
     // $method = u2g($method);
     //$gettrue = AgentPayglist :: insertPayglist($this->reqxmlcontext, $bkntno, $listid, $ccgno, $paytype, $method, $arr_feeinfo);
     $arr_message = array("result" => "success", "message" => "請求交易碼成功!");
     $retcode = "0";
     //反饋狀態 0 成功 200 自定義錯誤
     $arr_msg['msgbody']['result'] = $arr_message['result'];
     $arr_msg['msgbody']['message'] = $arr_message['message'];
     $arr_msg['msgbody']['bkntno'] = $bkntno;
//.........這裏部分代碼省略.........
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:101,代碼來源:ApiQQRechangeInfo.php

示例15: loaducenter

$wechatuser = C::t('#wechat#common_member_wechat')->fetch_by_openid($postObj->FromUserName);
$user = C::t('#aljwsq#aljwsq_user')->fetch($postObj->FromUserName);
echo $this->responsetext(123);
exit;
if (empty($wechatuser) && empty($user)) {
    loaducenter();
    $username = 'wx_' . random(5);
    $return = register($username);
    WeChatHook::bindOpenId($return['uid'], $postObj->FromUserName, 1);
    require_once 'source/plugin/aljwsq/function_core.php';
    $wuser = getwuserinfo($postObj, $config['appid'], $config['appsecret']);
    $user = C::t('#aljwsq#aljwsq_user')->fetch($postObj->FromUserName);
    if (!$user) {
        C::t('#aljwsq#aljwsq_user')->insert(array('nickname' => u2g($wuser['nickname']), 'username' => $username, 'openid' => $postObj->FromUserName, 'bindtime' => TIMESTAMP, 'sex' => $wuser['sex'], 'city' => u2g($wuser['city']), 'country' => u2g($wuser['country']), 'province' => u2g($wuser['province']), 'language' => $wuser['language'], 'headimgurl' => $wuser['headimgurl'], 'subscribe_time' => $wuser['subscribe_time']));
    } else {
        C::t('#aljwsq#aljwsq_user')->update($postObj->FromUserName, array('nickname' => u2g($wuser['nickname']), 'username' => $username, 'bindtime' => TIMESTAMP, 'sex' => $wuser['sex'], 'city' => u2g($wuser['city']), 'country' => u2g($wuser['country']), 'province' => u2g($wuser['province']), 'language' => $wuser['language'], 'headimgurl' => $wuser['headimgurl'], 'subscribe_time' => $wuser['subscribe_time']));
    }
    echo $this->responsetext($postObj, '您已成功注冊本站帳號,用戶名' . $return['username'] . ',密碼' . $return['password'] . '.此帳戶已與微信帳戶成功綁定,並支持微信掃碼登錄.');
} else {
    if (empty($user)) {
        $user = getuserbyuid($wechatuser['uid']);
    }
    echo $this->responsetext($postObj, '您已成功注冊過帳號,用戶名' . $user['username']);
}
function g2u($a)
{
    return is_array($a) ? array_map('g2u', $a) : diconv($a, CHARSET, 'UTF-8');
}
function u2g($a)
{
    return is_array($a) ? array_map('u2g', $a) : diconv($a, 'UTF-8', CHARSET);
開發者ID:deepziyu,項目名稱:JX3PVE,代碼行數:31,代碼來源:r.inc.php


注:本文中的u2g函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。