public function update_epg() { if (!$this->isAjax || $this->method != 'POST' || empty($this->postData['id'])) { $this->app->abort(404, 'Page not found...'); } if ($no_auth = $this->checkAuth()) { return $no_auth; } $data = array(); $data['action'] = 'manageEPG'; $data['id'] = $this->postData['id']; $error = ''; $epg = new \Epg(); $data['msg'] = nl2br($epg->updateEpg(!empty($this->postData['force']))); $response = $this->generateAjaxResponse($data, $error); return new Response(json_encode($response), empty($error) ? 200 : 500); }
} } if (@$_GET['edit'] && !empty($id)) { $action_name = 'edit'; $action_value = _('Save'); $edit = Mysql::getInstance()->from('epg_setting')->where(array('id' => $id))->get()->first(); } if (isset($_GET['update_epg'])) { Admin::checkAccess(AdminAccess::ACCESS_PAGE_ACTION); $epg = new Epg(); if (isset($_GET['force'])) { $force = true; } else { $force = false; } $error = $epg->updateEpg($force); } $settings = Mysql::getInstance()->from('epg_setting')->get()->all(); $debug = '<!--' . ob_get_contents() . '-->'; ob_clean(); echo $debug; ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> body { font-family: Arial, Helvetica, sans-serif; font-weight: bold; }
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <?php set_time_limit(0); include "./common.php"; $epg = new Epg(); if (isset($_GET['force'])) { $force = true; } else { $force = false; } echo "<pre>"; echo $epg->updateEpg($force); echo "</pre>"; ?> </body> </html>