public static function GetTaskID() { $ret = false; $query = 'insert into ' . self::$_mysql_ini['prefix'] . 'online_task_lock values(?)'; $stmt = self::$_db->prepare($query); for ($retry = 10; $retry; $retry--) { $TaskId = GlobalFunc::random(32); $stmt->bind_param('s', $TaskId); if (!$stmt->execute()) { if (false !== strstr($stmt->error, 'Duplicate') and $retry > 1) { continue; } } else { self::$_tid = $TaskId; $ret = true; break; } } $stmt->close(); return $ret; }
} } if (!$lasterror) { ReqFunc::TaskInsertDB($shortCutId); } if (!$lasterror) { //select_drones($cid,$fail_drones,$remain_drones,$fin_drones); //$remain_drone_num = count($remain_drones); include "{$IPC_mod_path}" . 'IPC_' . HYP_IPC_MODE . '.php'; if (false === ReqFunc::ConnectDrone()) { $lasterror[] = $language['request_status_-9']; //$requestStatus = -9; } else { ReqFunc::BlockConnDrone(); } } } } } $ret = ReqFunc::OutputResult($needTitleShow); //var_dump ($ret); $ret = rawurlencode(json_encode($ret)); exit($ret); var_dump($ret); exit; ?>