本文整理汇总了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");
}
示例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 {
// 请求失败
}
}
示例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>";
}
示例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);
}
示例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);
}