$qs->MoveView($submit); /* increment the view if necessary */ $page_title = gettext("Event Listing"); if ($qs->isCannedQuery()) { PrintBASESubHeader($page_title . ": " . $qs->GetCurrentCannedQueryDesc(), $page_title . ": " . $qs->GetCurrentCannedQueryDesc(), $cs->GetBackLink(), 0); } else { PrintBASESubHeader($page_title, $page_title, $cs->GetBackLink(), 0); } /* Connect to the Alert database */ $db = NewBASEDBConnection($DBlib_path, $DBtype); $db->baseDBConnect($db_connect_method, $alert_dbname, $alert_host, $alert_port, $alert_user, $alert_password); if ($event_cache_auto_update == 1) { UpdateAlertCache($db); } $criteria_clauses = ProcessCriteria(); $qro = new QueryResultsOutput("base_qry_main.php" . $qs->SaveStateGET()); $qro->AddTitle(qroReturnSelectALLCheck()); // Timezone $tz = Util::get_timezone(); /* Apply sort criteria */ if ($qs->isCannedQuery()) { $sort_sql = " ORDER BY timestamp DESC "; } else { $sort_sql = $qro->GetSortSQL($qs->GetCurrentSort(), $qs->GetCurrentCannedQuerySort()); // 3/23/05 BDB mods to make sort by work for Searches $sort_sql = ""; if (!isset($sort_order)) { $sort_order = NULL; } if ($sort_order == "sip_a") { $sort_sql = " ORDER BY ip_src ASC";