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


PHP Filter::str方法代碼示例

本文整理匯總了PHP中Filter::str方法的典型用法代碼示例。如果您正苦於以下問題:PHP Filter::str方法的具體用法?PHP Filter::str怎麽用?PHP Filter::str使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Filter的用法示例。


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

示例1: insertResult

 public function insertResult($resultXML, $resultKbn)
 {
     $jkfResult = $resultXML->body->list->jkfResult;
     $this->db->dosql("LOCK TABLES tiny_result,tiny_result_list WRITE");
     //mysql_query("SET AUTOCOMMIT=0");
     $retVal = $this->resultModel->fields("result_seq")->order("result_seq desc")->limit(1)->select();
     if (!isset($retVal) || !isset($retVal[0]["result_seq"])) {
         $retVal[0]["result_seq"] = 0;
     }
     $resultSeq = 1 + Filter::int($retVal[0]["result_seq"]);
     $sqlRet = $this->resultModel->data(array('result_seq' => $resultSeq, 'company_code' => Filter::str($jkfResult->companyCode), 'business_no' => Filter::str($jkfResult->businessNo), 'business_type' => Filter::str($jkfResult->businessType), 'result_kbn' => Filter::str($resultKbn), 'declare_type' => Filter::str($jkfResult->declareType), 'chk_mark' => Filter::str($jkfResult->chkMark), 'notice_date' => Filter::str($jkfResult->noticeDate), 'notice_time' => Filter::str($jkfResult->noticeTime), 'note' => Filter::str($jkfResult->note)))->insert();
     if (!$sqlRet) {
         $jkfResultList = $resultXML->body->list->jkfResult->resultList;
         foreach ($jkfResultList->jkfResultDetail as $detail) {
             $retVal = $this->resultListModel->fields("result_list_seq")->where("result_seq = {$resultSeq}")->order("result_list_seq desc")->find();
             if (!isset($retVal) || !isset($retVal["result_list_seq"])) {
                 $retVal["result_list_seq"] = 0;
             }
             $resultListSeq = 1 + Filter::int($retVal["result_list_seq"]);
             $this->resultListModel->data(array('result_seq' => $resultSeq, 'result_list_seq' => $resultListSeq, 'result_info' => Filter::str($detail->resultInfo)))->insert();
         }
     }
     $this->db->dosql("UNLOCK TABLES");
     //mysql_query('ROLLBACK');
     //mysql_query("END");
     //mysql_query("SET AUTOCOMMIT=1");
 }
開發者ID:sammychan1981,項目名稱:quanpin,代碼行數:27,代碼來源:GatewayModel.php

示例2: callerporder

 public static function callerporder($order_no)
 {
     $url = 'http://192.168.1.28:8088/quanpinMIS/doAPI.iss';
     $ordermodel = new Model("order");
     $pushordermodel = new Model("push_order");
     $pushorderhismodel = new Model("push_order_his");
     $orderconet = $ordermodel->where("order_no=" . $order_no)->find();
     $pushordermodel->data(array('order_id' => $orderconet['id'], 'order_no' => $order_no, 'express_id' => 0, 'tracking_no' => null, 'push_flg' => 1, 'push_type' => 1, 'ins_dt' => Filter::str(date('Y-m-d H:i:s')), 'upd_dt' => Filter::str(date('Y-m-d H:i:s'))))->inserttoerp();
     $pushorderhismodel->data(array('order_id' => $orderconet['id'], 'order_no' => $order_no, 'express_id' => 0, 'tracking_no' => null, 'push_flg' => 1, 'push_type' => 1, 'ins_dt' => Filter::str(date('Y-m-d H:i:s')), 'upd_dt' => Filter::str(date('Y-m-d H:i:s'))))->inserttoerp();
     //        $param = array("order_no" => $order_no, "id" => $orderconet['id']);
     //        $returnVal = Http::doPost($url, $param);
     //        $returnObj = json_decode($returnVal);
     //        if ($returnObj->returnVal == "OK") {
     if (1) {
         $pushordermodel->data(array('push_flg' => 0))->where("order_no=" . $order_no)->updatetoerp();
         $pushorderhismodel->data(array('order_id' => $orderconet['id'], 'order_no' => $order_no, 'express_id' => 0, 'tracking_no' => null, 'push_flg' => 0, 'push_type' => 1, 'ins_dt' => Filter::str(date('Y-m-d H:i:s')), 'upd_dt' => Filter::str(date('Y-m-d H:i:s'))))->inserttoerp();
     } else {
         // 請求失敗
     }
 }
開發者ID:sammychan1981,項目名稱:quanpin,代碼行數:20,代碼來源:ApiToErp.php

示例3: doc_invoice_save

 public function doc_invoice_save()
 {
     Req::post("admin", $this->manager['name']);
     Req::post("create_time", date('Y-m-d H:i:s'));
     Req::post("invoice_no", date('YmdHis') . rand(100, 999));
     $order_id = Filter::int(Req::args("order_id"));
     $express_no = Filter::str(Req::args("express_no"));
     $express_company_id = Filter::int(Req::args('express_company_id'));
     $mobile = Filter::str(Req::args('mobile'));
     $model = new Model("doc_invoice");
     $delivery_status = Req::args("delivery_status");
     if ($delivery_status == 3) {
         $model->where("order_id={$order_id}")->insert();
     } else {
         $obj = $model->where("order_id={$order_id}")->find();
         if ($obj) {
             $model->where("order_id={$order_id}")->update();
         } else {
             $model->where("order_id={$order_id}")->insert();
         }
     }
     //同步發貨信息
     $order_info = $model->table("order")->where("id={$order_id}")->find();
     if ($order_info) {
         $payment_id = $order_info['payment'];
         $payment = new Payment($payment_id);
         $payment_plugin = $payment->getPaymentPlugin();
         $express_company = $model->table('express_company')->where('id=' . $express_company_id)->find();
         if ($express_company) {
             $express = $express_company['name'];
         } else {
             $express = $express_company_id;
         }
         if ($order_info['trading_info'] != '') {
             //處理同步發貨
             $delivery = $payment_plugin->afterAsync();
             if ($delivery != null && method_exists($delivery, "send")) {
                 $delivery->send($order_info['trading_info'], $express, 'express_no');
             }
         }
         //SKM-SMS 發送短信功能
         $sms_inst = new Sms();
         $orderNo = $order_info['order_no'];
         $text = "【全品電台】感謝您使用全品電台。您的訂單 " . $orderNo . " 已經發貨,快遞單號為" . $express_no . ",快遞公司為" . $express . "。";
         //$mobile = $order_info['mobile']; //去掉, 取 訂單中心-發貨 頁麵中填寫的mobile
         if ($mobile != "") {
             $sms_inst->sendSms($text, $mobile);
         }
         /* S 二次開發 */
         //發送郵件
         $user_id = $order_info['user_id'];
         $user = $model->table('user')->where('id=' . $user_id)->find();
         $email_message_model = new Model('email_message');
         $email_message = $email_message_model->where('`trigger`=3 and status=1')->find();
         if (isset($user['email']) && $user['email'] != '' && $email_message) {
             $order_url = Url::fullUrlFormat("/ucenter/order_detail/id/{$order_info['id']}");
             $body = str_replace(array('{$order_no}', '{$user_name}', '{$current_time}', '{$express_name}', '{$express_no}', '{$order_url}'), array($order_info['order_no'], $user['name'], date('Y-m-d H:i:s'), $express, $express_no, $order_url), $email_message['content']);
             $mail = new Mail();
             $mail->send_email($user['email'], $email_message['title'], $body);
         }
         /* E 二次開發 */
     }
     $model->table("order")->where("id={$order_id}")->data(array('delivery_status' => 1, 'send_time' => date('Y-m-d H:i:s')))->update();
     echo "<script>parent.send_dialog_close();</script>";
 }
開發者ID:sammychan1981,項目名稱:quanpin,代碼行數:65,代碼來源:order.php

示例4: order_get

 public function order_get()
 {
     $my_order = array();
     $order_no = Filter::str(Req::args('order_no'));
     $ret = Order::getOrderWithDetailByNo($order_no);
     if (isset($ret['status']) && $ret['status'] == 1) {
         $order = $ret['data'];
         if ($order != NULL) {
             $my_order = $order;
             $my_order_detail = array();
             if (isset($order['OrderGoods'])) {
                 foreach ($order['OrderGoods'] as $key => $val) {
                     if ($val['prom_type'] == 'bundling') {
                         $arr_ids = explode(',', $val['products_ids']);
                         $product_inst = new Products();
                         $ret_p = $product_inst->getProducts($arr_ids);
                         if (isset($ret_p['status']) && $ret_p['status'] == 1) {
                             $products_list = $ret_p['data'];
                             foreach ($products_list as $sub_key => $sub_val) {
                                 $product_item = array('goods_id' => $sub_val['goods_id'], 'goods_no' => $sub_val['goods_no'], 'weight' => $sub_val['weight'], 'num' => $val['goods_nums']);
                                 $my_order_detail[] = $product_item;
                             }
                         }
                     } else {
                         $product_item = array('goods_id' => $sub_val['goods_id'], 'goods_no' => $val['goods_no'], 'weight' => $val['weight'], 'num' => $val['num']);
                         $my_order_detail[] = $product_item;
                     }
                 }
             }
             $my_order['OrderGoods'] = $my_order_detail;
         }
     }
     echo json_encode($my_order, JSON_UNESCAPED_SLASHES);
 }
開發者ID:sammychan1981,項目名稱:quanpin,代碼行數:34,代碼來源:api.php

示例5: bundling_del

 public function bundling_del()
 {
     $id = Filter::str(Req::args("id"));
     $ship_id = Filter::int(Req::args("ship_id"));
     $bundling_id = Filter::int(Req::args("bundling_id"));
     // $goods_info = array("ship_id" => $ship_id, "goods_id" => $id);
     $goods_info = array("ship_id" => $ship_id, "bundling_id" => $bundling_id, "products_ids" => $id);
     $cart = Cart::getCart();
     $cart->delBundling($goods_info);
     $info = array('status' => "fail");
     if (!$cart->hasBundling($goods_info)) {
         $info = array('status' => "success");
     }
     echo JSON::encode($info);
 }
開發者ID:sammychan1981,項目名稱:quanpin,代碼行數:15,代碼來源:index.php


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