/** * 功能号:2050 * 频道列表 * */ public function client_update() { $clientmac = Core::$_dataFilter->valueCheck(Core::get("mac"), "Limit", "数据非法", false, 13); $rtime = Core::$_dataFilter->valueCheck(Core::get("time"), "Limit", "数据非法", false, 13); $host = $this->_host; //$network = Core::connect_check($host); // if ($network) { if ($clientmac) { $param = array("m" => 2050, "mac" => $clientmac, "time" => $rtime); $sign = Core::get_signature($param); $param["sign"] = $sign; $url = "http://{$host}/tvmv/?m=2050"; $temp = Core::request_url($url, $param, 1); $return = json_decode($temp); if ($return->status === 1) { $rdata = $return->data; $boxid = $rdata->boxid; $addate = COMCommon::sysTime(); $clientbox = new Boxs(); $one = $clientbox->getOne("id=?", $boxid); if ($one) { $clientbox->edit($rtime, $one->id); } else { $clientbox->add($boxid, $clientmac, $addate, 1, $rtime); } $data["boxid"] = $boxid; $data["status"] = $rdata->status; Core::json_result($data, 'ok'); } else { Core::json_error('fail'); } } else { Core::json_error('MAC为空'); } // }else{ // Core::json_error('无网络'); // } }