function admin_screen_log()
 {
     include dirname(__FILE__) . '/models/pager.php';
     if (isset($_POST['deleteall']) && check_admin_referer('redirection-process_logs')) {
         if (isset($_GET['module'])) {
             RE_Log::delete_all(array('module_id' => intval($_GET['module'])), new RE_Pager($_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log'));
         } else {
             if (isset($_GET['group'])) {
                 RE_Log::delete_all(array('group_id' => intval($_GET['group'])), new RE_Pager($_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log'));
             } else {
                 RE_Log::delete_all(array(), new RE_Pager($_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log'));
             }
         }
         $this->render_message(__('Your logs have been deleted', 'redirection'));
     }
     $pager = new RE_Pager($_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log');
     if (isset($_GET['module'])) {
         $logs = RE_Log::get_by_module($pager, intval($_GET['module']));
     } else {
         if (isset($_GET['group'])) {
             $logs = RE_Log::get_by_group($pager, intval($_GET['group']));
         } else {
             if (isset($_GET['redirect'])) {
                 $logs = RE_Log::get_by_redirect($pager, intval($_GET['redirect']));
             } else {
                 $logs = RE_Log::get($pager);
             }
         }
     }
     $options = $this->get_options();
     $this->render_admin('log', array('logs' => $logs, 'pager' => $pager, 'lookup' => $options['lookup']));
 }
 function admin_screen_log()
 {
     $options = red_get_options();
     if (isset($_POST['delete-all']) && check_admin_referer('redirection-log_management')) {
         RE_Log::delete_all();
         $this->render_message(__('Your logs have been deleted', 'redirection'));
     }
     $table = new Redirection_Log_Table($options);
     if (isset($_GET['module'])) {
         $table->prepare_items('module', intval($_GET['module']));
     } else {
         if (isset($_GET['group'])) {
             $table->prepare_items('group', intval($_GET['group']));
         } else {
             if (isset($_GET['redirect'])) {
                 $table->prepare_items('redirect', intval($_GET['redirect']));
             } else {
                 $table->prepare_items();
             }
         }
     }
     $this->render('log', array('options' => $options, 'table' => $table, 'lookup' => $options['lookup'], 'type' => 'log'));
 }
 function admin_screen_log()
 {
     include dirname(__FILE__) . '/models/pager.php';
     if (isset($_POST['deleteall']) && check_admin_referer('redirection-process_logs')) {
         if (isset($_GET['module'])) {
             RE_Log::delete_all('module', intval($_GET['module']));
         } else {
             if (isset($_GET['group'])) {
                 RE_Log::delete_all('group', intval($_GET['group_id']));
             } else {
                 RE_Log::delete_all();
             }
         }
         $this->render_message(__('Your logs have been deleted', 'redirection'));
     }
     $options = $this->get_options();
     $table = new Redirection_Log_Table($options);
     if (isset($_GET['module'])) {
         $table->prepare_items('module', intval($_GET['module']));
     } else {
         if (isset($_GET['group'])) {
             $table->prepare_items('group', intval($_GET['group']));
         } else {
             if (isset($_GET['redirect'])) {
                 $table->prepare_items('redirect', intval($_GET['redirect']));
             } else {
                 $table->prepare_items();
             }
         }
     }
     $this->render_admin('log', array('options' => $options, 'table' => $table, 'lookup' => $options['lookup']));
 }