include('user_inc.htm'); // Map the column names to the constants in the CMI model $columnMap = array( "ticketNumber" => 1, "state" => 5, "priority" => 6, "updateTime" => 4, "name" => 2); $Brand = getenv(ADICLIBRARY_BRAND); $TicketPriority = array( "Unspecified", "Low", "High", "Urgent" ); switch( $Brand ) { case 'dell': $TicketPriority = array( "Unspecified", "3", "2", "1" ); break; } $sortCriteria = new SortCriteria(); if ($_SERVER[REQUEST_METHOD] == "POST") { $sortCriteria->sortColumn = $columnMap[$_POST['orderOn']]; $sortCriteria->ascending = $_POST['orderBy'] == "ASC"; //$sortCriteria->filterPattern = $_POST['filterPattern']; // Get the value of the "Include Closed Tickets" Checkbox //var theForm = document.forms.SystemStatusForm; //if( !theForm.showClosedTickets.checked ) error_log( print_r($_POST, TRUE) ); $bShowClosedTickets = $_POST['showClosedTickets']; error_log( "bShowClosedTickets = ". $bShowClosedTickets ); // Handle the RAS ticket token if( isset($_POST[token]) && $_POST[token] != '' ) { error_log("Releasing RAS Token '". $_POST[token] ."' in systemStatusList.htm"); set_ras_token_in_use($user, $_POST[token], false); } } else { // Default sorting is on updateTime $sortCriteria->sortColumn = $columnMap['updateTime']; $sortCriteria->ascending = false; } $subsystem = "all"; $state = 4; // 1=UnOpen 2=Open 3=Closed 4=All(Open and Unopend) if ($_GET['filter'] != "") { $subsystem = $_GET['filter']; error_log("We are getting tickets for the Subsystem of ". $subsystem ); } $tickets = get_ras_tickets($user, $sortCriteria, $state, $subsystem, ($bShowClosedTickets=='on' ? true : false)); $specificTicket = ""; if ($_POST['specificTicket'] != "") { $specificTicket = $_POST['specificTicket']; $numTickets = 1; $numPages = 1; } else { $numTickets = count($tickets); $numPages = ceil($numTickets / ITEMS_PER_PAGE); } $lowPageList = 1; $highPageList = min($numRows, DRIVES_PER_PAGE); ?>