|
@@ -25,14 +25,14 @@ class Apidsyskxcx extends Start_Controller
|
|
|
{
|
|
|
$ip = $_SERVER['REMOTE_ADDR'];
|
|
|
|
|
|
- // if (!in_array($ip, $this->ip)) {
|
|
|
- // exit("Unauthorized access");
|
|
|
- // }
|
|
|
+ if (!in_array($ip, $this->ip)) {
|
|
|
+ exit("Unauthorized access");
|
|
|
+ }
|
|
|
$user_agent = empty($_SERVER['HTTP_USER_AGENT']) ? "" : $_SERVER['HTTP_USER_AGENT'];
|
|
|
$token = empty($_SERVER['HTTP_X_AUTH_TOKEN']) ? "" : $_SERVER['HTTP_X_AUTH_TOKEN'];
|
|
|
$time = $this->input->get('time', true);
|
|
|
$api = $this->input->get('api', true);
|
|
|
- // $this->checkAuth($user_agent, $token, $time, $api);
|
|
|
+ $this->checkAuth($user_agent, $token, $time, $api);
|
|
|
if ($arg == 'jobs') //调出单
|
|
|
{
|
|
|
$this->_doRenwu();
|
|
@@ -73,7 +73,6 @@ class Apidsyskxcx extends Start_Controller
|
|
|
|
|
|
private function _doRenwu()
|
|
|
{
|
|
|
- echo "<pre>";
|
|
|
$list = $this->zzjobs->find_all("status = 0 and quque = 'ysgjcx'", "*",null, 0, 1);
|
|
|
$ids = array_column($list, 'id');
|
|
|
$this->db->query("update crowd_zzjobs set status = 10 where id in (" . implode(",", $ids) . ")");
|
|
@@ -100,7 +99,7 @@ class Apidsyskxcx extends Start_Controller
|
|
|
]
|
|
|
]
|
|
|
);
|
|
|
- var_dump($rr);
|
|
|
+
|
|
|
if($rr['code'] != 1){
|
|
|
return $this->zzjobs->save(['status'=>20,'last_time'=>time(),'result'=>json_encode($rr,JSON_UNESCAPED_UNICODE)],$v['id']);;
|
|
|
}
|