auth->isSuperAdmin()) { return; } # Var initialisation $p_url = 'plugin.php?p=dcLog'; $page = isset($_GET['page']) ? $_GET['page'] : 1; $status = isset($_GET['status']) ? $_GET['status'] : null; # filter initialisation $blog_id = isset($_GET['blog_id']) ? $_GET['blog_id'] : null; $user_id = isset($_GET['user_id']) ? $_GET['user_id'] : null; $table = isset($_GET['table']) ? $_GET['table'] : null; $ip = isset($_GET['ip']) ? $_GET['ip'] : null; $nb = isset($_GET['nb']) ? $_GET['nb'] : 20; # form initialisation $ids = isset($_POST['ids']) ? $_POST['ids'] : null; $del_all_log = isset($_POST['del_all_logs']) ? true : false; # Delete logs if (isset($_POST['del_logs']) || isset($_POST['del_all_logs'])) { try { $core->log->delLogs($ids,$del_all_log); $status = $del_all_log ? '2' : '1'; http::redirect($p_url.'&del='.$status); } catch (Exception $e) { $core->error->add($e->getMessage()); } } # Gets logs & prepares display object $params = array( 'blog_id' => $blog_id, 'user_id' => !is_null($user_id) && $user_id !== '' ? explode(',',$user_id) : $user_id, 'log_table' => !is_null($table) && $table !== '' ? explode(',',$table) : $table, 'log_ip' => !is_null($ip) && $ip !== '' ? explode(',',$ip) : $ip ); $l_rs = $core->log->getLogs($params); $l_nb = $l_rs->count(); $l_list = new dcLogList($core,$l_rs,$l_nb); # Display echo ''. '
'. '