); $count_pay = Table::Count('order',$con_pay); $count_smsneed = Table::Count('order',$con_smsneed); $count_smsyes = Table::Count('order',$con_smsyes); $s = "总付款订单:{$count_pay},已发短信:{$count_smsyes},待发短信:{$count_smsneed}"; $n = time(); $orders = DB::LimitQuery('order', array( 'condition' => $con_smsneed, )); $index = 0; foreach($orders AS $one) { $r = sms_express($one['id']); $q = time(); $index++; if ($q-$n>20) json("{$s},本次发送:{$index}", 'alert'); } json("{$s},本次发送:{$index}", 'alert'); } /** * */ elseif($action == 'subAreaList'){ $area_id = $_GET['id']; $conn = array(); $conn['zone'] = 'bizarea'; $conn['fid'] = $area_id;
<?php require_once dirname(dirname(dirname(__FILE__))) . '/app.php'; need_manager(); need_auth('admin'); $action = strval($_GET['action']); $id = abs(intval($_GET['id'])); if ('smsexpress' == $action) { sms_express($id, $flag); if (true === $flag) { json('发送快递单号短信成功', 'alert'); } json($flag, 'alert'); json('发送单号失败', 'alert'); }