You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

405 line
20 KiB

  1. <?php
  2. if (ALLOW_ORIGIN)
  3. header("Access-Control-Allow-Origin:*");
  4. date_default_timezone_set('PRC');
  5. define("MAKE_ORDER_URL", "http://cs1.zhizhuchuxing.com/api/submit-order");
  6. $user_id =$_COOKIE['user_id'];//getUserId();
  7. $top_org_id=$_COOKIE['top_org_id'];
  8. //$sql_user="select ";
  9. if (!$user_id) {
  10. echo json_encode(array("code" => 1,"iflogin"=>1, "info" => "未登录"));
  11. exit ;
  12. }
  13. $pdo= conn();
  14. $pdo1= conn();
  15. $ticket_info = $_POST['ticket_info'];
  16. $customer_info = $_POST['customer_info'];
  17. $run_id = $_POST['run_id'];
  18. $sql_time = "select run_date,run_time,prod_id from run_main where run_id =".$run_id;
  19. $result_time= $pdo->query($sql_time);
  20. $row_t = $result_time->fetchAll(PDO::FETCH_ASSOC);
  21. $run_date = $row_t[0]['run_date'];
  22. $run_time = $row_t[0]['run_time'];
  23. $prod_wu=array(448568,448569,/*448778,448779,*/448780,448781);
  24. if(strtotime($run_date.' '.$run_time)- time()<1800){
  25. echo json_encode(array('code'=>1,'info'=>'预定时间已过'));exit();
  26. }
  27. if(in_array($row_t[0]['prod_id'],$prod_wu)){
  28. if(date('Y-m-d', time())>=$run_date){
  29. echo json_encode(array('code'=>1,'info'=>'预定时间已过'));exit();
  30. }elseif(date('Y-m-d', time()+24*60*60)==$run_date && date('H:i', time())>'10:01'){
  31. echo json_encode(array('code'=>1,'info'=>'预定时间已过'));exit();
  32. }
  33. }
  34. $channel_id = isset($_COOKIE['org_id']) ? $_COOKIE['org_id'] : 0;
  35. //取得订单渠道名称
  36. $from_org_name = "";
  37. $sql = " SELECT SUPPLIER_NAME FROM base_supplier WHERE ID={$channel_id} ";
  38. $sql = " SELECT ORG_NAME as SUPPLIER_NAME FROM base_organization WHERE ORG_ID={$channel_id} ";
  39. $result=$pdo->query($sql);
  40. if( $result != false ) {
  41. $rowset = $result->fetchAll();
  42. $result->closeCursor();
  43. if( $rowset != false && count($rowset) > 0 ) {
  44. $from_org_name = $rowset[0]["SUPPLIER_NAME"];
  45. }
  46. }
  47. /**
  48. * 下订单必填信息
  49. */
  50. $channel_order_id = '0';
  51. $salesman = '分销';
  52. $pay_type = 275;
  53. //add by qius on 2017-05-09
  54. $customer_info_temp = substr( $customer_info , 1, strlen($customer_info) -2 );
  55. $customer_info_array = explode(",", $customer_info_temp);
  56. $customer_name = $customer_info_array[0];
  57. $customer_mobile = $customer_info_array[1];
  58. $passenger_txt = $customer_info_array[2];
  59. $customer_info_str = "{{$customer_name},{$customer_mobile},,,$passenger_txt}";
  60. $order_info_str = "{{$user_id},0,{$channel_id},,1,{$pay_type},0,{$salesman}}";
  61. $prod_str = $ticket_info;
  62. $make_order_array = array(
  63. "action" => "submit_bus_order",
  64. "prod_str" => $prod_str,
  65. "order_info_str" => $order_info_str,
  66. "customer_info_str" => $customer_info_str,
  67. "is_send_msg" => 0
  68. );
  69. $rowset = httpRequest( MAKE_ORDER_URL, $make_order_array );
  70. writeLog( "SFX SP LINE".__LINE__.":result=".json_encode($rowset) );
  71. $make_order_result = json_decode($rowset, true);
  72. if( !isset($make_order_result["code"]) || $make_order_result["code"] != 0 ) {
  73. $return_msg = $make_order_result["info"];
  74. if( isset($make_order_result["error"]) ) {
  75. $return_msg .= "({$make_order_result["error"]})";
  76. }
  77. echo json_encode( array( 'code'=>1, 'info'=> $return_msg ) );die;
  78. } else {
  79. $order_id_group = $make_order_result['data'];
  80. $post_data['order_id'] = $order_id_group;
  81. $post_data['order_status'] = 451;
  82. httpRequest("http://cs.zhizhuchuxing.com/st-xm/Api/add_order_status_log.php",$post_data);
  83. }
  84. /*
  85. $sql = "call sp_make_order1(" . $user_id . ",'" . $ticket_info . "','" . $customer_info . "'," . $channel_id . ",'" . $channel_order_id . "','" . $salesman . "'," . $pay_type . ")";
  86. $result = $pdo1->query($sql);
  87. do {
  88. $rowset = $result->fetchAll(PDO::FETCH_ASSOC);
  89. $data_arr[] = $rowset;
  90. } while ($result->nextRowset());
  91. $result->closeCursor();
  92. writeLog( "LINE".__LINE__.":data_arr=".json_encode($data_arr) );
  93. if($data_arr[0][0]['errcode'] == 0){
  94. $order_id_group = $data_arr[1][0]['order_id'];
  95. $post_data['order_id'] = $order_id_group;
  96. $post_data['order_status'] = 451;
  97. httpRequest("http://cs.zhizhuchuxing.com/st-xm/Api/add_order_status_log.php",$post_data);
  98. }else{
  99. echo json_encode(array('code'=>1,'info'=>'可售资源不足'));die;
  100. }
  101. */
  102. $update_sql = "update order_main set outside_sale_org_id =" . $top_org_id . " where order_id in(".$order_id_group.") or parent_order_id in(".$order_id_group.")";
  103. $pdo->exec($update_sql);
  104. //修改book_status和支付状态
  105. if($top_org_id == 0 || isset($_COOKIE['login_type'])){
  106. $sql_pay = "update order_pay_detail set pay_type_id_1 =278 where pay_main_id in(".$order_id_group.")";
  107. $pdo->exec($sql_pay);
  108. $sql_order_status = "update order_main set ORDER_BOOK_STATUS =1 where order_id in(".$order_id_group.") or parent_order_id in(".$order_id_group.")";
  109. //$pdo->query($sql_order_status);
  110. }else{
  111. $sql_order_status = "update order_main set order_status =146,ORDER_BOOK_STATUS =1,ORDER_PAY_STATUS=1 where order_id in(".$order_id_group.") or parent_order_id in(".$order_id_group.")";
  112. $post_data['order_id'] = $order_id_group;
  113. $post_data['order_status'] = '452,453';
  114. httpRequest("http://cs.zhizhuchuxing.com/st-xm/Api/add_order_status_log.php",$post_data);
  115. }
  116. $pdo->exec($sql_order_status);
  117. //判断票是否为往返
  118. $order_id_arr = explode(',',$order_id_group);
  119. $go_order_id = $order_id_arr[0];
  120. if(count($order_id_arr) > 1){
  121. $back_order_id = $order_id_arr[1];
  122. //订票成功写入 往返订单关系表
  123. $sql_conn = "insert into to_from values(NULL,".$go_order_id.",".$back_order_id.",'". date('Y-m-d h:i:s', time())."')";
  124. $pdo->exec($sql_conn);
  125. }else{
  126. $back_order_id = '0';
  127. }
  128. if($top_org_id!=0 && !isset($_COOKIE['login_type'])){
  129. send_msg($go_order_id);
  130. if($back_order_id != '0'){
  131. send_msg($back_order_id);
  132. }
  133. }
  134. $data['code'] = '0';
  135. $data['info'] = '下单成功';
  136. $sql = "select a.order_id,a.order_price,a.order_pay_main_id,a.customer_name,a.customer_mobile,a.customer_id_no,a.customer_memo, count(b.order_id) as num,b.PROD_START_STATION_DATE as run_date,b.PROD_START_STATION_TIME as run_time,b.PROD_START_STATION_AREA_NAME AS start_area,b.PROD_END_STATION_AREA_NAME AS end_area,b.PROD_START_STATION_RES_NAME AS start_res,b.PROD_END_STATION_RES_NAME AS end_res from order_main a,order_main b where a.order_id = b.PARENT_ORDER_ID and a.order_id = " . $go_order_id . " group by a.order_id";
  137. $result = $pdo->query($sql);
  138. $order_info_go = $result->fetchAll(PDO::FETCH_ASSOC);
  139. $data['order_id'] = $go_order_id;
  140. $data['go_list'] = $order_info_go[0];
  141. $data['go_list']['site_type'] = "普通票";
  142. $data['ifback'] = '0';
  143. $data['shengyu_time'] = 600;
  144. if($back_order_id != '0'){
  145. $sql = "select a.order_id,a.order_price,a.order_pay_main_id,a.customer_name,a.customer_mobile,a.customer_id_no,a.customer_memo, count(b.order_id) as num,b.PROD_START_STATION_DATE as run_date,b.PROD_START_STATION_TIME as run_time,b.PROD_START_STATION_AREA_NAME AS start_area,b.PROD_END_STATION_AREA_NAME AS end_area,b.PROD_START_STATION_RES_NAME AS start_res,b.PROD_END_STATION_RES_NAME AS end_res from order_main a,order_main b where a.order_id = b.PARENT_ORDER_ID and a.order_id = " . $back_order_id . " group by a.order_id";
  146. $result = $pdo->query($sql);
  147. $order_info_back = $result->fetchAll(PDO::FETCH_ASSOC);
  148. $data['order_id_f'] = $back_order_id;
  149. $data['back_list'] = $order_info_back[0];
  150. $data['back_list']['site_type'] = "普通票";
  151. $data['ifback'] = '1';
  152. $data['ifdisney'] = 0;
  153. }
  154. $current_time = date("Y-m-d H:i:s");
  155. //add opera log
  156. $order_all_price = $order_info_go[0]["order_price"];
  157. $ticket_num = $order_info_go[0]["num"];
  158. $order_per_price = $order_all_price / $ticket_num;
  159. $run_date = $order_info_go[0]["run_date"];
  160. $customer_name = $order_info_go[0]["customer_name"];
  161. $customer_mobile = $order_info_go[0]["customer_mobile"];
  162. $customer_id_no = $order_info_go[0]["customer_id_no"];
  163. $customer_memo = $order_info_go[0]["customer_memo"];
  164. $pdo_insert2 = conn1();
  165. //$opera_detail = "创建订单,出发日期{$run_date},订单渠道{$from_org_name},单价{$order_per_price},总额{$order_all_price},联系人信息:{$customer_name}, {$customer_mobile}, {$customer_id_no}, 备注信息:{$customer_memo}";
  166. //$sql = "insert into order_opera_log(order_id,opera_user_id,opera_type,opera_time,opera_detail,opera_platform) VALUES ({$go_order_id},$user_id,1,'{$current_time}','{$opera_detail}','分销系统')";
  167. //$result = $pdo_insert2->exec($sql);
  168. //if($back_order_id != '0') {
  169. // $order_all_price = $order_info_back[0]["order_price"];
  170. // $ticket_num = $order_info_back[0]["num"];
  171. // $order_per_price = $order_all_price / $ticket_num;
  172. // $run_date = $order_info_back[0]["run_date"];
  173. // $customer_name = $order_info_back[0]["customer_name"];
  174. // $customer_mobile = $order_info_back[0]["customer_mobile"];
  175. // $customer_id_no = $order_info_back[0]["customer_id_no"];
  176. // $customer_memo = $order_info_back[0]["customer_memo"];
  177. // $pdo_insert2 = conn1();
  178. // $opera_detail = "创建订单,出发日期{$run_date},订单渠道{$from_org_name},单价{$order_per_price},总额{$order_all_price},联系人信息:{$customer_name}, {$customer_mobile}, {$customer_id_no}, 备注信息:{$customer_memo}";
  179. // $sql = "insert into order_opera_log(order_id,opera_user_id,opera_type,opera_time,opera_detail,opera_platform) VALUES ({$back_order_id},$user_id,1,'{$current_time}','{$opera_detail}','分销系统')";
  180. // $result = $pdo_insert2->exec($sql);
  181. //}
  182. //end of add opera log
  183. echo json_encode($data);die;
  184. //发短信
  185. function send_msg($ORDER_ID) {
  186. $send_pdo=conn();
  187. $order_id = $ORDER_ID;
  188. $url='http://cs1.zhizhuchuxing.com/api/msg/order-send-msg';
  189. $sendInfo=array();
  190. $sendInfo['order_id']=$order_id;
  191. $sendInfo['msg_type']='sfx';
  192. $res_content = httpRequest($url,$sendInfo);
  193. //insert order extra
  194. $hotelPrice = isset($_GET['hotelPrice']) ? $_GET['hotelPrice'] : "";
  195. $doorPrice = isset($_GET["doorPrice"]) ? $_GET["doorPrice"] : "";
  196. if ($hotelPrice != "" || $doorPrice != "") {
  197. $sqlInsert = " INSERT INTO order_extra_info (order_id,hotel_price,gate_price) VALUE(" . $ORDER_ID . ",'" . $hotelPrice . "','" . $doorPrice . "') ";
  198. writeLog("insert extra info: " . $sqlInsert);
  199. $result = $send_pdo -> exec($sqlInsert);
  200. }
  201. }
  202. //..短信模板-改为17:30后OK,当天下单也OK
  203. function get_msg_info($ORDER_ID) {
  204. $msg_pdo = conn();
  205. $msg_sql = "CALL SP_GET_MESSAGE_TEMPLATE('" . $ORDER_ID . "')";
  206. $content = '';
  207. if (is_object($msg_pdo)) {
  208. $msg_result = $msg_pdo -> query($msg_sql);
  209. $i = 1;
  210. $data = array();
  211. if ($msg_result) {
  212. $data['code'] = "0";
  213. $data['info'] = "";
  214. do {
  215. $row = $msg_result -> fetchAll(PDO::FETCH_ASSOC);
  216. if ($i == 1) {
  217. $data['seat'] = isset($row) ? $row : array();
  218. } else if ($i == 2) {
  219. $data['run_info'] = isset($row) ? $row : array();
  220. } else if ($i == 3) {
  221. $data['driver'] = isset($row) ? $row : array();
  222. } else if($i==4){
  223. $data['dsn_prod']=isset($row) ? $row : array();
  224. }else if($i==5){
  225. $data['zhou_su_prod']=isset($row) ? $row : array();
  226. }
  227. $i++;
  228. } while($msg_result->nextRowset());
  229. }
  230. $json_obj = json_decode(json_encode($data), TRUE);
  231. $seat = isset($json_obj['seat'][0]) ? $json_obj['seat'][0] : array();
  232. $run_info = isset($json_obj['run_info'][0]) ? $json_obj['run_info'][0] : array();
  233. $driver = isset($json_obj['driver'][0]) ? $json_obj['driver'][0] : array();
  234. $dsn_prod = isset($json_obj['dsn_prod'])?$json_obj['dsn_prod']:array();
  235. $zhou_su_prod=isset($json_obj['zhou_su_prod'])?$json_obj['zhou_su_prod']:array();
  236. $bus_res_id = isset($json_obj['driver'][0]) ? $json_obj['driver'][0]["bus_res_id"] : 0;
  237. $short_url = false;
  238. $ticket_url = TICKET_QR_URL.$ORDER_ID;
  239. $short_url = sinaShortenUrl($ticket_url);
  240. $extra_message = "";
  241. if( $short_url != false ) {
  242. $extra_message = "点击以下链接获取您的电子票扫码上车:{$short_url}";
  243. }
  244. //出票成功
  245. // $content = "您预订的{出发日期 出发时间}{出发地}-{目的地}{票种名}{张数}张,已购票成功。乘车订单号为{订单号},请凭订单号或绑定微信(微信服务号“蜘蛛出行”)扫码上车,车牌号{车牌号},司机电话{司机姓司机电话}。";
  246. // 得到明天的时间
  247. date_default_timezone_set('PRC');
  248. //解决时区问题
  249. $tomorrow = date("Y-m-d", strtotime("+1 day"));
  250. $now_time = date('H:i:s', time());
  251. //判断当前时间是否在17:30:00之后
  252. $cur_date = date('Y-m-d', time());
  253. //迪士尼特殊情况parent_prod_id
  254. // $dsn_arr_prod = array(152752, 152759, 152763, 152770, 152777, 152784, 152791, 152801, 152808, 152815, 152822, 152832, 152842, 152852, 152859, 152866, 152873, 152877, 152884, 152891, 152898, 152905, 152915, 152922, 152929, 152936, 152946, 152956, 152966, 152973, 152980, 152990, 153003, 153016, 153023, 153033, 153034, 153044, 153057, 153070, 153083, 153090, 153100, 153110);
  255. $dsn_arr_prod = array(); //用来保存迪士尼产品的prod_id
  256. foreach($dsn_prod as $temp){
  257. $dsn_arr_prod[]=$temp['prod_id'];
  258. }
  259. $zhou_su_arr_prod = array();
  260. foreach($zhou_su_prod as $temp){
  261. $zhou_su_arr_prod[]=$temp['prod_id'];
  262. }
  263. $new_message_array = array(448569,448568);
  264. $new_message_array3 = array(450517,450522);
  265. if( in_array( $run_info['parent_prod_id'], $new_message_array ) ) {
  266. $content = "您预订的{出发日期}{出发地}-{目的地}{票种名}{张数}张,已成功出票,请在{出发时间}前十五分钟到达{上车站点}。出行前一天下午的18:00左右将会有导游和您联系,预祝您旅途愉快。";
  267. } else if( in_array( $run_info['parent_prod_id'], $new_message_array3 ) ) {
  268. if( $run_info['parent_prod_id'] == 450517 ) {
  269. $address_txt = "上车地点:吴山广场西侧河坊巷8号(吴山广场旅游集散中心候车室); 上车方式:请至吴山广场旅游集散中心候车室服务台,凭预定姓名和手机号码上车。";
  270. } else {
  271. $address_txt = "上车地点:普陀城北长途客运中心;取票方式:请提前到达(学运路18号)普陀城北长途客运中心候车大厅服务台报预订名字和电话取票。";
  272. }
  273. $content = "您已成功预定{出发日期} {出发时间} {出发地}-{目的地}汽车票{张数}张(请最晚提前10分钟到达)。{$address_txt}紧急电话:15888866564。";
  274. } else if (($now_time > "18:30:00" && $run_info['start_date'] == $tomorrow) || $cur_date == $run_info['start_date']) {//17:30之后的订单或者下单时间为今天出行为今天下午 发送短信模板
  275. // if("18:30:00">"17:30:00" && $run_info['start_date']==$tomorrow){ //17:30之后的订单 发送短信模板
  276. // $content = "您预订的{出发日期 出发时间}{出发地}-{目的地}{票种名}{张数}张,已购票成功。乘车订单号为{订单号},请凭订单号或绑定微信(微信服务号“蜘蛛出行”)扫码上车,车牌号{车牌号},司机电话{司机姓司机电话}。";
  277. $content = "订单号{订单号},{出发地}({上车站点})—{目的地}({下车站点})标准票{张数}张将于{出发日期} {出发时间}准点发车。车牌号{车牌号},司机电话{司机姓司机电话},请提前10分钟抵达上车地点:{上车站点详细地址}并点开电子车票{$short_url}进行验票。如有疑问请拨打客服电话021-33280519。";
  278. } else {
  279. // $content = "您预订的{出发日期 出发时间}{出发地}-{目的地}{票种名}{张数}张,已购票成功。乘车订单号为{订单号},请凭订单号或绑定微信(微信服务号“蜘蛛出行”)扫码上车。";
  280. $content = "订单号{订单号},{出发日期} {出发时间}{出发地}({上车站点})—{目的地}({下车站点})标准票{张数}张预定成功。发车前一天19点会短信通知您车牌号及司机电话,如未收到短信请拨打客服电话021-33280519。";
  281. }
  282. $new_message_array4 = array(450588,450589);
  283. if( in_array( $run_info['parent_prod_id'], $new_message_array4 ) ) {
  284. $content .= "紧急联系电话:18100158199。";
  285. }
  286. $new_message_array5 = array(451437,451438);
  287. if( in_array( $run_info['parent_prod_id'], $new_message_array5 ) ) {
  288. $content .= "司机会提前与您联系,如有疑问,请联系021-33280578 。";
  289. }
  290. $new_message_array5 = array(451440,451441);
  291. $new_message_array6 = array(448780,450008,448781);
  292. if( in_array( $run_info['parent_prod_id'], $new_message_array5 ) ) {
  293. $content = "订单号{订单号},{出发日期} {出发时间}{上车站点}—{目的地}标准票{张数}张预定成功。发车前一天19点会短信通知您车牌号及司机电话,如未收到短信请拨打客服电话021-33280519。";
  294. } else if( in_array( $run_info['parent_prod_id'], $new_message_array6 ) ) {
  295. $content = "订单号{订单号},{出发日期} {出发时间}{上车站点}—{目的地}标准票{张数}张预定成功。发车前一天19点会短信通知您乘车信息,如未收到短信请拨打客服电话021-33280519。";
  296. }
  297. // $content = "您预订的{出发日期 出发时间}{出发地}-{目的地}{票种名}{张数}张,已购票成功。乘车订单号为{订单号},请凭订单号或绑定微信(微信服务号“蜘蛛出行”)扫码上车。";
  298. if ($seat) {
  299. $seat_x = isset($seat['seat_x']) ? $seat['seat_x'] : "";
  300. $seat_y = isset($seat['seat_y']) ? $seat['seat_y'] : "";
  301. $seat_name = isset($seat['seat_name']) ? $seat['seat_name'] : "";
  302. $order_main_id = isset($seat['order_main_id']) ? $seat['order_main_id'] : "";
  303. } else {
  304. }
  305. if ($run_info) {
  306. $order_count = $run_info['order_count'];
  307. $start_date = $run_info['start_date'];
  308. $start_time = $run_info['start_time'];
  309. $parent_order_id = $run_info['parent_order_id'];
  310. $end_date = $run_info['end_date'];
  311. $start_area = $run_info['start_area'];
  312. $end_area = $run_info['end_area'];
  313. $res_name = $run_info['res_name'];
  314. $parent_prod_id = $run_info['parent_prod_id'];
  315. $prod_name = $run_info['prod_name'];
  316. $prod_name = "标准票";
  317. $customer_name = $run_info['customer_name'];
  318. $customer_mobile = $run_info['customer_mobile'];
  319. $start_station_address = $run_info['start_station_address'];
  320. $start_end_date = $start_date . "," . $start_time;
  321. if( $parent_prod_id == 450504 && $start_date >= "2017-01-27" && $start_date <= "2017-02-02" ) {
  322. $res_name = "迪士尼唐老鸭P停车场";
  323. $start_station_address = "上海迪士尼度假区迪士尼唐老鸭P停车场";
  324. }
  325. $content = str_replace("{出发日期}", $start_date, $content);
  326. $content = str_replace("{出发时间}", $start_time, $content);
  327. $content = str_replace("{上车站点}", $res_name, $content);
  328. $content = str_replace("{下车站点}", $run_info['end_res_name'], $content);
  329. $content = str_replace("{出发地}", $start_area, $content);
  330. $content = str_replace("{目的地}", $end_area, $content);
  331. $content = str_replace("{票种名}", $prod_name, $content);
  332. $content = str_replace("{张数}", $order_count, $content);
  333. $content = str_replace("{订单号}", $ORDER_ID, $content);
  334. $content = str_replace("{上车站点详细地址}", $start_station_address, $content);
  335. } else {
  336. $content = str_replace("{出发日期}", "", $content);
  337. $content = str_replace("{出发时间}", "", $content);
  338. $content = str_replace("{出发地}", "", $content);
  339. $content = str_replace("{目的地}", "", $content);
  340. $content = str_replace("{票种名}", "", $content);
  341. $content = str_replace("{张数}", "", $content);
  342. $content = str_replace("{订单号}", "", $content);
  343. $content = str_replace("{上车站点详细地址}", "", $content);
  344. }
  345. if ($driver) {
  346. $bus_no = isset($driver['bus_no']) ? $driver['bus_no'] : "";
  347. $driver_name = isset($driver['driver_name']) ? $driver['driver_name'] : "";
  348. $driver_mobile = isset($driver['driver_mobile']) ? $driver['driver_mobile'] : "";
  349. if ($bus_no == "") {
  350. $content = str_replace(",车牌号{车牌号}", "", $content);
  351. } else {
  352. $content = str_replace("{车牌号}", $bus_no, $content);
  353. }
  354. if ($driver_name == "") {
  355. $content = str_replace(",司机电话{司机姓司机电话},", "。", $content);
  356. } else {
  357. $driver_xing = mb_substr($driver_name, 0, 1, 'utf-8');
  358. $driver_name_mobile = $driver_xing . $driver_mobile;
  359. $content = str_replace("{司机姓司机电话}", $driver_name_mobile, $content);
  360. }
  361. } else {
  362. $content = str_replace("车牌号{车牌号},", "", $content);
  363. $content = str_replace("司机电话{司机姓司机电话},", "", $content);
  364. }
  365. /*
  366. if( $now_time < "18:30:00" ) {
  367. //判断是不是苏州或周庄
  368. // 判断如果不是迪士尼的票就不发短信
  369. if (!in_array($run_info['parent_prod_id'], $dsn_arr_prod) && !in_array($run_info['parent_prod_id'], $zhou_su_arr_prod)) {
  370. return array("", "-1", "不是迪士尼、苏州、周庄的票,目前不发送短信");
  371. }
  372. }*/
  373. return array(isset($customer_name) ? $customer_name : "", isset($customer_mobile) ? $customer_mobile : "", isset($content) ? $content : "短信错误,联系客服!!!");
  374. }
  375. }