diff --git a/src/classes/logstream.class.php b/src/classes/logstream.class.php index 789fd77..bb1ea34 100644 --- a/src/classes/logstream.class.php +++ b/src/classes/logstream.class.php @@ -313,6 +313,33 @@ abstract class LogStream { } // --- break; + case "messagetype": + $tmpKeyName = SYSLOG_MESSAGETYPE; + $tmpFilterType = FILTER_TYPE_NUMBER; + // --- Extra Check to convert string representations into numbers! + if ( isset($tmpValues) ) + { + foreach( $tmpValues as $mykey => $szValue ) + { + if ( !is_numeric($szValue) ) + { + $tmpMsgTypeCode = $this->ConvertMessageTypeString($szValue); + if ( $tmpMsgTypeCode != -1 ) + $tmpValues[$mykey] = $tmpMsgTypeCode; + } + } + } + else + { + if ( !is_numeric($tmpArray[FILTER_TMP_VALUE]) ) + { + $tmpMsgTypeCode = $this->ConvertMessageTypeString($tmpArray[FILTER_TMP_VALUE]); + if ( $tmpMsgTypeCode != -1 ) + $tmpArray[FILTER_TMP_VALUE] = $tmpMsgTypeCode; + } + } + // --- + break; case "syslogtag": $tmpKeyName = SYSLOG_SYSLOGTAG; $tmpFilterType = FILTER_TYPE_STRING; @@ -470,6 +497,24 @@ abstract class LogStream { return -1; } + /* + * Helper function to convert a messagetype string into a messagetype number + */ + private function ConvertMessageTypeString($szValue) + { + global $content; + + foreach ( $content['filter_messagetype_list'] as $mymsgtype ) + { + if ( stripos( $mymsgtype['DisplayName'], $szValue) !== false ) + return $mymsgtype['ID']; + } + + // reached here means we failed to convert the facility! + return -1; + } + + } ?> diff --git a/src/classes/logstreamconfigdb.class.php b/src/classes/logstreamconfigdb.class.php index d59d197..672758f 100644 --- a/src/classes/logstreamconfigdb.class.php +++ b/src/classes/logstreamconfigdb.class.php @@ -47,6 +47,7 @@ class LogStreamConfigDB extends LogStreamConfig { public $DBType = DB_MYSQL; // Default = MYSQL! public $DBTableType = 'winsyslog'; // Default = WINSYSLOG DB Layout! public $DBTableName = 'systemevents'; // Default Tabelname from WINSYSLOG + public $DBEnableRowCounting = true; // Default RowCounting is enabled! // Runtime configuration variables public $RecordsPerQuery = 100; // This will determine how to limit sql statements diff --git a/src/classes/logstreamdb.class.php b/src/classes/logstreamdb.class.php index 24a7d3a..93c073f 100644 --- a/src/classes/logstreamdb.class.php +++ b/src/classes/logstreamdb.class.php @@ -112,12 +112,6 @@ class LogStreamDB extends LogStream { // Create SQL Where Clause first! $this->CreateSQLWhereClause(); - // Obtain count of records - $this->_totalRecordCount = $this->GetRowCountFromTable(); - - if ( $this->_totalRecordCount <= 0 ) - return ERROR_NOMORERECORDS; - // Success, this means we init the Pagenumber to ONE! $this->_currentPageNumber = 1; @@ -275,7 +269,13 @@ class LogStreamDB extends LogStream { $bFound = false; $tmpuID = $uID; $ret = ERROR_NOMORERECORDS; // Set Default error code! - $totalpages = intval($this->_totalRecordCount / $this->_logStreamConfigObj->_pageCount); + + // Set totalpages number if available + if ( $this->_totalRecordCount != -1 ) + $totalpages = intval($this->_totalRecordCount / $this->_logStreamConfigObj->_pageCount); + else + $totalpages = 1; + while( $bFound == false && $this->ReadNextIDsFromDB() == SUCCESS ) { foreach ( $this->bufferedRecords as $myRecord ) @@ -602,6 +602,15 @@ class LogStreamDB extends LogStream { // Free Query ressources mysql_free_result ($myquery); + // Only obtain count if enabled and not done before + if ( $this->_logStreamConfigObj->DBEnableRowCounting && $this->_totalRecordCount == -1 ) + { + $this->_totalRecordCount = $this->GetRowCountFromTable(); + + if ( $this->_totalRecordCount <= 0 ) + return ERROR_NOMORERECORDS; + } + // Increment for the Footer Stats $querycount++; @@ -641,6 +650,15 @@ class LogStreamDB extends LogStream { // Free Query ressources mysql_free_result ($myquery); + // Only obtain count if enabled and not done before + if ( $this->_logStreamConfigObj->DBEnableRowCounting && $this->_totalRecordCount == -1 ) + { + $this->_totalRecordCount = $this->GetRowCountFromTable(); + + if ( $this->_totalRecordCount <= 0 ) + return ERROR_NOMORERECORDS; + } + // Increment for the Footer Stats $querycount++; @@ -659,8 +677,13 @@ class LogStreamDB extends LogStream { $szTableType = $this->_logStreamConfigObj->DBTableType; $szSortColumn = $this->_logStreamConfigObj->SortColumn; - // Create SQL String - $sqlString = "SELECT " . $dbmapping[$szTableType][SYSLOG_UID]; + // Create Basic SQL String + if ( $this->_logStreamConfigObj->DBEnableRowCounting ) // with SQL_CALC_FOUND_ROWS + $sqlString = "SELECT SQL_CALC_FOUND_ROWS " . $dbmapping[$szTableType][SYSLOG_UID]; + else // without row calc + $sqlString = "SELECT " . $dbmapping[$szTableType][SYSLOG_UID]; + + // Append fields if needed if ( $includeFields && $this->_arrProperties != null ) { // Loop through all requested fields @@ -758,9 +781,24 @@ class LogStreamDB extends LogStream { */ private function GetRowCountFromTable() { + if ( $myquery = mysql_query("Select FOUND_ROWS();", $this->_dbhandle) ) + { + // Get first and only row! + $myRow = mysql_fetch_array($myquery); + + // copy row count + $numRows = $myRow[0]; + } + else + $numRows = -1; + + // return result! + return $numRows; + + /* OLD slow code! global $dbmapping,$querycount; $szTableType = $this->_logStreamConfigObj->DBTableType; - + // Create Statement and perform query! $szSql = "SELECT count(" . $dbmapping[$szTableType][SYSLOG_UID] . ") FROM " . $this->_logStreamConfigObj->DBTableName . $this->_SQLwhereClause; if ($myQuery = mysql_query($szSql, $this->_dbhandle)) @@ -777,9 +815,7 @@ class LogStreamDB extends LogStream { } else $numRows = -1; - - // return result! - return $numRows; + */ } diff --git a/src/css/defaults.css b/src/css/defaults.css index 2ccf210..523489f 100644 --- a/src/css/defaults.css +++ b/src/css/defaults.css @@ -24,7 +24,7 @@ .SelectSavedFilter { - margin-top: 3px; + margin-top: 2px; border: 1px solid; border-color: #233B51 #124A7C #124A7C #233B51; } diff --git a/src/css/menu.css b/src/css/menu.css index f42df92..f6c2f3f 100644 --- a/src/css/menu.css +++ b/src/css/menu.css @@ -14,11 +14,11 @@ border-width: 1px; border-style: solid; margin: 0; - padding: 2px 3px; + padding: 1px 1px; } #menu h2 { - font: bold 11px/16px; + font: bold; text-align: center; } @@ -33,22 +33,27 @@ } #menu li { - z-index:10; /* make the list elements a containing block for the nested lists */ position: relative; } #menu ul ul { + z-index:10; + position: absolute; - top: 16px; - left: 0px; /* to position them to the right of their containing block */ - width: 300; /* width is based on the containing block */ + top: 12px; + left: 4px; /* to position them to the right of their containing block */ + width: 350; /* width is based on the containing block */ } div#menu ul ul, div#menu ul li:hover ul ul -{display: none;} +{ + display: none; +} div#menu ul li:hover ul, div#menu ul ul li:hover ul -{display: block;} \ No newline at end of file +{ + display: block; +} \ No newline at end of file diff --git a/src/images/icons/bullet_ball_glass_blue.png b/src/images/icons/bullet_ball_glass_blue.png new file mode 100644 index 0000000..143f23c Binary files /dev/null and b/src/images/icons/bullet_ball_glass_blue.png differ diff --git a/src/images/icons/bullet_ball_glass_green.png b/src/images/icons/bullet_ball_glass_green.png new file mode 100644 index 0000000..9e8a4b4 Binary files /dev/null and b/src/images/icons/bullet_ball_glass_green.png differ diff --git a/src/images/icons/bullet_ball_glass_grey.png b/src/images/icons/bullet_ball_glass_grey.png new file mode 100644 index 0000000..5ae8681 Binary files /dev/null and b/src/images/icons/bullet_ball_glass_grey.png differ diff --git a/src/images/icons/bullet_ball_glass_red.png b/src/images/icons/bullet_ball_glass_red.png new file mode 100644 index 0000000..9c6e7a1 Binary files /dev/null and b/src/images/icons/bullet_ball_glass_red.png differ diff --git a/src/images/icons/bullet_ball_glass_yellow.png b/src/images/icons/bullet_ball_glass_yellow.png new file mode 100644 index 0000000..ae0ef19 Binary files /dev/null and b/src/images/icons/bullet_ball_glass_yellow.png differ diff --git a/src/include/constants_filters.php b/src/include/constants_filters.php index 4bea7c8..5447e78 100644 --- a/src/include/constants_filters.php +++ b/src/include/constants_filters.php @@ -105,8 +105,9 @@ $content['filter_severity_list'][] = array( "ID" => SYSLOG_DEBUG, "DisplayName" // --- // Init MessageType LIST -$content['filter_messagetype_list'][] = array( "ID" => IUT_Unknown, "DisplayName" => "Unknown", "selected" => "" ); +//$content['filter_messagetype_list'][] = array( "ID" => IUT_Unknown, "DisplayName" => "Unknown", "selected" => "" ); $content['filter_messagetype_list'][] = array( "ID" => IUT_Syslog, "DisplayName" => "Syslog", "selected" => "" ); -$content['filter_messagetype_list'][] = array( "ID" => IUT_NT_EventReport, "DisplayName" => "EventReporter", "selected" => "" ); +$content['filter_messagetype_list'][] = array( "ID" => IUT_NT_EventReport, "DisplayName" => "WinEventLog", "selected" => "" ); +$content['filter_messagetype_list'][] = array( "ID" => IUT_File_Monitor, "DisplayName" => "File Monitor", "selected" => "" ); ?> \ No newline at end of file diff --git a/src/include/constants_logstream.php b/src/include/constants_logstream.php index d720bc5..6c14185 100644 --- a/src/include/constants_logstream.php +++ b/src/include/constants_logstream.php @@ -89,7 +89,7 @@ $fields[SYSLOG_HOST]['FieldCaptionID'] = 'LN_FIELDS_HOST'; $fields[SYSLOG_HOST]['FieldType'] = FILTER_TYPE_STRING; $fields[SYSLOG_HOST]['Sortable'] = true; $fields[SYSLOG_HOST]['DefaultWidth'] = "80"; -$fields[SYSLOG_HOST]['FieldAlign'] = "center"; +$fields[SYSLOG_HOST]['FieldAlign'] = "left"; $fields[SYSLOG_MESSAGETYPE]['FieldID'] = SYSLOG_MESSAGETYPE; $fields[SYSLOG_MESSAGETYPE]['FieldCaptionID'] = 'LN_FIELDS_MESSAGETYPE'; $fields[SYSLOG_MESSAGETYPE]['FieldType'] = FILTER_TYPE_NUMBER; @@ -115,7 +115,7 @@ $fields[SYSLOG_SYSLOGTAG]['FieldCaptionID'] = 'LN_FIELDS_SYSLOGTAG'; $fields[SYSLOG_SYSLOGTAG]['FieldType'] = FILTER_TYPE_STRING; $fields[SYSLOG_SYSLOGTAG]['Sortable'] = true; $fields[SYSLOG_SYSLOGTAG]['DefaultWidth'] = "85"; -$fields[SYSLOG_SYSLOGTAG]['FieldAlign'] = "center"; +$fields[SYSLOG_SYSLOGTAG]['FieldAlign'] = "left"; $fields[SYSLOG_PROCESSID]['FieldID'] = SYSLOG_PROCESSID; $fields[SYSLOG_PROCESSID]['FieldCaptionID'] = 'LN_FIELDS_PROCESSID'; $fields[SYSLOG_PROCESSID]['FieldType'] = FILTER_TYPE_NUMBER; diff --git a/src/include/functions_common.php b/src/include/functions_common.php index b424412..bc27351 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -183,6 +183,9 @@ function InitPhpLogCon() // Init Predefined Searches List CreatePredefinedSearches(); + // Init predefined paging sizes + CreatePagesizesList(); + // --- Enable PHP Debug Mode InitPhpDebugMode(); // --- @@ -241,6 +244,25 @@ function CreateDBTypesList( $selectedDBType ) } +function CreatePagesizesList() +{ + global $CFG, $content; + + $content['pagesizes'][0] = array( "ID" => 0, "Selected" => "", "DisplayName" => $content['LN_GEN_PRECONFIGURED'] . " (" . $CFG['ViewEntriesPerPage'] . ")", "Value" => $CFG['ViewEntriesPerPage'] ); + $content['pagesizes'][1] = array( "ID" => 1, "Selected" => "", "DisplayName" => " 25 " . $content['LN_GEN_RECORDSPERPAGE'], "Value" => 25 ); + $content['pagesizes'][2] = array( "ID" => 2, "Selected" => "", "DisplayName" => " 50 " . $content['LN_GEN_RECORDSPERPAGE'], "Value" => 50 ); + $content['pagesizes'][3] = array( "ID" => 3, "Selected" => "", "DisplayName" => " 75 " . $content['LN_GEN_RECORDSPERPAGE'], "Value" => 75 ); + $content['pagesizes'][4] = array( "ID" => 4, "Selected" => "", "DisplayName" => " 100 " . $content['LN_GEN_RECORDSPERPAGE'], "Value" => 100 ); + $content['pagesizes'][5] = array( "ID" => 5, "Selected" => "", "DisplayName" => " 250 " . $content['LN_GEN_RECORDSPERPAGE'], "Value" => 250 ); + $content['pagesizes'][6] = array( "ID" => 6, "Selected" => "", "DisplayName" => " 500 " . $content['LN_GEN_RECORDSPERPAGE'], "Value" => 500 ); + + // Set default selected pagesize + $content['pagesizes'][ $_SESSION['PAGESIZE_ID'] ]["Selected"] = "selected"; + + // The content variable will now contain the user selected oaging size + $content["ViewEntriesPerPage"] = $content['pagesizes'][ $_SESSION['PAGESIZE_ID'] ]["Value"]; +} + function CreatePredefinedSearches() { global $CFG, $content; @@ -316,17 +338,20 @@ function InitFrontEndVariables() { global $content; - $content['MENU_FOLDER_OPEN'] = "image=" . $content['BASEPATH'] . "images/icons/folder_closed.png"; - $content['MENU_FOLDER_CLOSED'] = "overimage=" . $content['BASEPATH'] . "images/icons/folder.png"; - $content['MENU_HOMEPAGE'] = "image=" . $content['BASEPATH'] . "images/icons/home.png"; - $content['MENU_LINK'] = "image=" . $content['BASEPATH'] . "images/icons/link.png"; - $content['MENU_PREFERENCES'] = "image=" . $content['BASEPATH'] . "images/icons/preferences.png"; - $content['MENU_ADMINENTRY'] = "image=" . $content['BASEPATH'] . "images/icons/star_blue.png"; - $content['MENU_ADMINLOGOFF'] = "image=" . $content['BASEPATH'] . "images/icons/exit.png"; - $content['MENU_ADMINUSERS'] = "image=" . $content['BASEPATH'] . "images/icons/businessmen.png"; - $content['MENU_SEARCH'] = "image=" . $content['BASEPATH'] . "images/icons/view.png"; - $content['MENU_SELECTION_DISABLED'] = "image=" . $content['BASEPATH'] . "images/icons/selection.png"; - $content['MENU_SELECTION_ENABLED'] = "image=" . $content['BASEPATH'] . "images/icons/selection_delete.png"; + $content['MENU_FOLDER_OPEN'] = $content['BASEPATH'] . "images/icons/folder_closed.png"; + $content['MENU_FOLDER_CLOSED'] = $content['BASEPATH'] . "images/icons/folder.png"; + $content['MENU_HOMEPAGE'] = $content['BASEPATH'] . "images/icons/home.png"; + $content['MENU_LINK'] = $content['BASEPATH'] . "images/icons/link.png"; + $content['MENU_LINK_VIEW'] = $content['BASEPATH'] . "images/icons/link_view.png"; + $content['MENU_VIEW'] = $content['BASEPATH'] . "images/icons/view.png"; + $content['MENU_PREFERENCES'] = $content['BASEPATH'] . "images/icons/preferences.png"; + $content['MENU_ADMINENTRY'] = $content['BASEPATH'] . "images/icons/star_blue.png"; + $content['MENU_ADMINLOGOFF'] = $content['BASEPATH'] . "images/icons/exit.png"; + $content['MENU_ADMINUSERS'] = $content['BASEPATH'] . "images/icons/businessmen.png"; + $content['MENU_SEARCH'] = $content['BASEPATH'] . "images/icons/view.png"; + $content['MENU_SELECTION_DISABLED'] = $content['BASEPATH'] . "images/icons/selection.png"; + $content['MENU_SELECTION_ENABLED'] = $content['BASEPATH'] . "images/icons/selection_delete.png"; + $content['MENU_TEXT_FIND'] = $content['BASEPATH'] . "images/icons/text_find.png"; $content['MENU_PAGER_BEGIN'] = $content['BASEPATH'] . "images/icons/media_beginning.png"; $content['MENU_PAGER_PREVIOUS'] = $content['BASEPATH'] . "images/icons/media_rewind.png"; @@ -336,11 +361,16 @@ function InitFrontEndVariables() $content['MENU_NAV_RIGHT'] = $content['BASEPATH'] . "images/icons/navigate_right.png"; $content['MENU_NAV_CLOSE'] = $content['BASEPATH'] . "images/icons/navigate_close.png"; $content['MENU_NAV_OPEN'] = $content['BASEPATH'] . "images/icons/navigate_open.png"; - $content['MENU_PAGER_BEGIN_GREY'] = $content['BASEPATH'] . "images/icons/grey/media_beginning.png"; $content['MENU_PAGER_PREVIOUS_GREY'] = $content['BASEPATH'] . "images/icons/grey/media_rewind.png"; $content['MENU_PAGER_NEXT_GREY'] = $content['BASEPATH'] . "images/icons/grey/media_fast_forward.png"; $content['MENU_PAGER_END_GREY'] = $content['BASEPATH'] . "images/icons/grey/media_end.png"; + + $content['MENU_BULLET_BLUE'] = $content['BASEPATH'] . "images/icons/bullet_ball_glass_blue.png"; + $content['MENU_BULLET_GREEN'] = $content['BASEPATH'] . "images/icons/bullet_ball_glass_green.png"; + $content['MENU_BULLET_RED'] = $content['BASEPATH'] . "images/icons/bullet_ball_glass_red.png"; + $content['MENU_BULLET_YELLOW'] = $content['BASEPATH'] . "images/icons/bullet_ball_glass_yellow.png"; + $content['MENU_BULLET_GREY'] = $content['BASEPATH'] . "images/icons/bullet_ball_glass_grey.png"; } // Lang Helper for Strings with ONE variable @@ -412,6 +442,13 @@ function InitConfigurationValues() } } + // Paging Size handling! + if ( !isset($_SESSION['PAGESIZE_ID']) ) + { + // Default is 0! + $_SESSION['PAGESIZE_ID'] = 0; + } + // Theme Handling if ( !isset($content['web_theme']) ) { $content['web_theme'] = $CFG['ViewDefaultTheme'] /*"default"*/; } if ( isset($_SESSION['CUSTOM_THEME']) && VerifyTheme($_SESSION['CUSTOM_THEME']) ) diff --git a/src/include/functions_config.php b/src/include/functions_config.php index 639aed9..bb81085 100644 --- a/src/include/functions_config.php +++ b/src/include/functions_config.php @@ -98,6 +98,7 @@ if ( isset($mysource['DBPort']) ) { $content['Sources'][$iSourceID]['ObjRef']->DBPort = $mysource['DBPort']; } if ( isset($mysource['DBUser']) ) { $content['Sources'][$iSourceID]['ObjRef']->DBUser = $mysource['DBUser']; } if ( isset($mysource['DBPassword']) ) { $content['Sources'][$iSourceID]['ObjRef']->DBPassword = $mysource['DBPassword']; } + if ( isset($mysource['DBEnableRowCounting']) ) { $content['Sources'][$iSourceID]['ObjRef']->DBEnableRowCounting = $mysource['DBEnableRowCounting']; } } else { diff --git a/src/include/functions_filters.php b/src/include/functions_filters.php index ba439ec..867a284 100644 --- a/src/include/functions_filters.php +++ b/src/include/functions_filters.php @@ -150,27 +150,25 @@ function InitFilterHelpers() if ( $filters['filter_lastx_default'] == DATE_LASTX_31DAYS ) { $content['filter_daterange_last_x_list'][4]['selected'] = "selected"; } else { $content['filter_daterange_last_x_list'][4]['selected'] = ""; } // --- - // Init Default Syslog Facility from SESSION! + // --- Init Default Syslog Facility from SESSION! if ( isset($_SESSION['filter_facility']) ) $filters['filter_facility'] = intval($_SESSION['filter_facility']); else - $filters['filter_facility'] = array ( SYSLOG_KERN, SYSLOG_USER, SYSLOG_MAIL, SYSLOG_DAEMON, SYSLOG_AUTH, SYSLOG_SYSLOG, SYSLOG_LPR, SYSLOG_NEWS, SYSLOG_UUCP, SYSLOG_CRON, SYSLOG_LOCAL0, SYSLOG_LOCAL1, SYSLOG_LOCAL2, SYSLOG_LOCAL3, SYSLOG_LOCAL4, SYSLOG_LOCAL5, SYSLOG_LOCAL6, SYSLOG_LOCAL7 ); -// $filters['filter_facility'] = SYSLOG_LOCAL0; + $filters['filter_facility'] = array ( SYSLOG_KERN, SYSLOG_USER, SYSLOG_MAIL, SYSLOG_DAEMON, SYSLOG_AUTH, SYSLOG_SYSLOG, SYSLOG_LPR, SYSLOG_NEWS, SYSLOG_UUCP, SYSLOG_CRON, SYSLOG_SECURITY, SYSLOG_FTP, SYSLOG_NTP, SYSLOG_LOGAUDIT, SYSLOG_LOGALERT, SYSLOG_CLOCK, SYSLOG_LOCAL0, SYSLOG_LOCAL1, SYSLOG_LOCAL2, SYSLOG_LOCAL3, SYSLOG_LOCAL4, SYSLOG_LOCAL5, SYSLOG_LOCAL6, SYSLOG_LOCAL7 ); $iCount = count($content['filter_facility_list']); for ( $i = 0; $i < $iCount; $i++ ) { -// echo $content['filter_facility_list'][$i]["ID"] . "-" . $filters['filter_facility'] . "
"; if ( in_array($content['filter_facility_list'][$i]["ID"], $filters['filter_facility']) ) $content['filter_facility_list'][$i]["selected"] = "selected"; } + // --- - // Init Default Syslog Severity from SESSION! + // --- Init Default Syslog Severity from SESSION! if ( isset($_SESSION['filter_severity']) ) $filters['filter_severity'] = intval($_SESSION['filter_severity']); else $filters['filter_severity'] = array ( SYSLOG_EMERG, SYSLOG_ALERT, SYSLOG_CRIT, SYSLOG_ERR, SYSLOG_WARNING, SYSLOG_NOTICE, SYSLOG_INFO, SYSLOG_DEBUG ); -// $filters['filter_severity'] = SYSLOG_NOTICE; $iCount = count($content['filter_severity_list']); for ( $i = 0; $i < $iCount; $i++ ) @@ -178,6 +176,21 @@ function InitFilterHelpers() if ( in_array( $content['filter_severity_list'][$i]["ID"], $filters['filter_severity']) ) $content['filter_severity_list'][$i]["selected"] = "selected"; } + // --- + + // --- Init Default Message Type from SESSION! + if ( isset($_SESSION['filter_messagetype']) ) + $filters['filter_messagetype'] = intval($_SESSION['filter_messagetype']); + else + $filters['filter_messagetype'] = array ( IUT_Syslog, IUT_NT_EventReport, IUT_File_Monitor ); + + $iCount = count($content['filter_messagetype_list']); + for ( $i = 0; $i < $iCount; $i++ ) + { + if ( in_array( $content['filter_messagetype_list'][$i]["ID"], $filters['filter_messagetype']) ) + $content['filter_messagetype_list'][$i]["selected"] = "selected"; + } + // --- } diff --git a/src/index.php b/src/index.php index 24e08a9..ee60133 100644 --- a/src/index.php +++ b/src/index.php @@ -189,6 +189,11 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c $content['fields'][$mycolkey]['FieldType'] = $fields[$mycolkey]['FieldType']; $content['fields'][$mycolkey]['FieldSortable'] = $stream->IsPropertySortable($mycolkey); // $fields[$mycolkey]['Sortable']; $content['fields'][$mycolkey]['DefaultWidth'] = $fields[$mycolkey]['DefaultWidth']; + + if ( $mycolkey == SYSLOG_MESSAGE ) + $content['fields'][$mycolkey]['colspan'] = ''; //' colspan="2" '; + else + $content['fields'][$mycolkey]['colspan'] = ''; } // --- @@ -212,14 +217,24 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c else $ret = $stream->ReadNext($uID, $logArray); - // --- If Forward direction is used, we need to SKIP one entry! - if ( $ret == SUCCESS && $content['read_direction'] == EnumReadDirection::Forward ) + // --- Check if Read was successfull! + if ( $ret == SUCCESS ) { - // Ok the current ID is our NEXT ID in this reading direction, so we save it! - $content['uid_next'] = $uID; + // If Forward direction is used, we need to SKIP one entry! + if ( $content['read_direction'] == EnumReadDirection::Forward ) + { + // Ok the current ID is our NEXT ID in this reading direction, so we save it! + $content['uid_next'] = $uID; - // Skip this entry and move to the next - $stream->ReadNext($uID, $logArray); + // Skip this entry and move to the next + $stream->ReadNext($uID, $logArray); + } + } + else + { + // This will disable to Main SyslogView and show an error message + $content['syslogmessagesenabled'] = "false"; + $content['detailederror'] = "No syslog messages found."; } // --- @@ -262,9 +277,12 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c if ( isset($logArray[$mycolkey]) ) { // Set defaults + $content['syslogmessages'][$counter]['values'][$mycolkey]['FieldColumn'] = $mycolkey; + $content['syslogmessages'][$counter]['values'][$mycolkey]['uid'] = $uID; $content['syslogmessages'][$counter]['values'][$mycolkey]['FieldAlign'] = $fields[$mycolkey]['FieldAlign']; $content['syslogmessages'][$counter]['values'][$mycolkey]['fieldcssclass'] = $content['syslogmessages'][$counter]['cssclass']; $content['syslogmessages'][$counter]['values'][$mycolkey]['fieldbgcolor'] = ""; + $content['syslogmessages'][$counter]['values'][$mycolkey]['isnowrap'] = "nowrap"; $content['syslogmessages'][$counter]['values'][$mycolkey]['hasdetails'] = "false"; // Set default link @@ -295,6 +313,14 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c // Use default colour! $content['syslogmessages'][$counter]['values'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $facility_colors[SYSLOG_LOCAL0] . '" '; } + + // Set OnClick Menu for SYSLOG_FACILITY + $content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true; + $content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array( + 'ButtonUrl' => '?filter=facility%3A' . $logArray[$mycolkey] . '&search=Search', + 'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . GetFacilityDisplayName( $logArray[$mycolkey] ). "'", + 'IconSource' => $content['MENU_BULLET_BLUE'] + ); } else if ( $mycolkey == SYSLOG_SEVERITY ) { @@ -311,6 +337,14 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c // Use default colour! $content['syslogmessages'][$counter]['values'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $severity_colors[SYSLOG_INFO] . '" '; } + + // Set OnClick Menu for SYSLOG_FACILITY + $content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true; + $content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array( + 'ButtonUrl' => '?filter=severity%3A' . $logArray[$mycolkey] . '&search=Search', + 'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . GetSeverityDisplayName( $logArray[$mycolkey] ). "'", + 'IconSource' => $content['MENU_BULLET_BLUE'] + ); } else if ( $mycolkey == SYSLOG_MESSAGETYPE ) { @@ -327,6 +361,14 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c // Use default colour! $content['syslogmessages'][$counter]['values'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $msgtype_colors[IUT_Unknown] . '" '; } + + // Set OnClick Menu for SYSLOG_MESSAGETYPE + $content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true; + $content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array( + 'ButtonUrl' => '?filter=messagetype%3A' . $logArray[$mycolkey] . '&search=Search', + 'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . GetMessageTypeDisplayName( $logArray[$mycolkey] ). "'", + 'IconSource' => $content['MENU_BULLET_BLUE'] + ); } } @@ -338,13 +380,16 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c // Special Handling for the Syslog Message! if ( $mycolkey == SYSLOG_MESSAGE ) { + // No NOWRAP for Syslog Message! + $content['syslogmessages'][$counter]['values'][$mycolkey]['isnowrap'] = ""; + // Set truncasted message for display if ( isset($logArray[SYSLOG_MESSAGE]) ) { $content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue'] = GetStringWithHTMLCodes(strlen($logArray[SYSLOG_MESSAGE]) > $CFG['ViewMessageCharacterLimit'] ? substr($logArray[SYSLOG_MESSAGE], 0, $CFG['ViewMessageCharacterLimit'] ) . " ..." : $logArray[SYSLOG_MESSAGE]); // Enable LINK property! for this field - $content['syslogmessages'][$counter]['values'][$mycolkey]['haslink'] = true; + $content['syslogmessages'][$counter]['values'][$mycolkey]['ismessagefield'] = true; $content['syslogmessages'][$counter]['values'][$mycolkey]['detaillink'] = "details.php?uid=" . $uID; } else @@ -388,7 +433,40 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c $content['syslogmessages'][$counter]['values'][$mycolkey]['messagesdetails'][$myIndex]['detailfieldvalue'] = $myfield['fieldvalue']; } } + + if ( strlen($content['searchstr']) > 0 ) + { + // Set OnClick Menu for SYSLOG_MESSAGE + $content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true; + $content['syslogmessages'][$counter]['values'][$mycolkey]['hasdropdownbutton'] = true; + $content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array( + 'ButtonUrl' => '?uid=' . $uID, + 'DisplayName' => $content['LN_VIEW_MESSAGECENTERED'], + 'IconSource' => $content['MENU_BULLET_GREEN'] + ); + } } + else if ( $mycolkey == SYSLOG_SYSLOGTAG ) + { + // Set OnClick Menu for SYSLOG_SYSLOGTAG + $content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true; + $content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array( + 'ButtonUrl' => '?filter=syslogtag%3A' . $logArray[$mycolkey] . '&search=Search', + 'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . $logArray[$mycolkey] . "'", + 'IconSource' => $content['MENU_BULLET_BLUE'] + ); + } + else if ( $mycolkey == SYSLOG_HOST ) + { + // Set OnClick Menu for SYSLOG_HOST + $content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true; + $content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array( + 'ButtonUrl' => '?filter=source%3A' . $logArray[$mycolkey] . '&search=Search', + 'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . $logArray[$mycolkey] . "'", + 'IconSource' => $content['MENU_BULLET_BLUE'] + ); + } + } } } @@ -396,11 +474,11 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c // Increment Counter $counter++; - } while ($counter < $CFG['ViewEntriesPerPage'] && ($ret = $stream->ReadNext($uID, $logArray)) == SUCCESS); + } while ($counter < $content['ViewEntriesPerPage'] && ($ret = $stream->ReadNext($uID, $logArray)) == SUCCESS); //print_r ( $content['syslogmessages'] ); - if ( $content['main_recordcount'] == -1 || $content['main_recordcount'] > $CFG['ViewEntriesPerPage'] ) + if ( $content['main_recordcount'] == -1 || $content['main_recordcount'] > $content['ViewEntriesPerPage'] ) { // Enable Pager in any case here! $content['main_pagerenabled'] = true; diff --git a/src/install.php b/src/install.php index fd58d56..46d4258 100644 --- a/src/install.php +++ b/src/install.php @@ -476,6 +476,17 @@ else if ( $content['INSTALL_STEP'] == 7 ) if ( isset($_SESSION['SourceDBTableName']) ) { $content['SourceDBTableName'] = $_SESSION['SourceDBTableName']; } else { $content['SourceDBTableName'] = "systemevents"; } if ( isset($_SESSION['SourceDBUser']) ) { $content['SourceDBUser'] = $_SESSION['SourceDBUser']; } else { $content['SourceDBUser'] = "user"; } if ( isset($_SESSION['SourceDBPassword']) ) { $content['SourceDBPassword'] = $_SESSION['SourceDBPassword']; } else { $content['SourceDBPassword'] = ""; } + if ( isset($_SESSION['SourceDBEnableRowCounting']) ) { $content['SourceDBEnableRowCounting'] = $_SESSION['SourceDBEnableRowCounting']; } else { $content['SourceDBEnableRowCounting'] = "false"; } + if ( $content['SourceDBEnableRowCounting'] == "true" ) + { + $content['SourceDBEnableRowCounting_true'] = "checked"; + $content['SourceDBEnableRowCounting_false'] = ""; + } + else + { + $content['SourceDBEnableRowCounting_true'] = ""; + $content['SourceDBEnableRowCounting_false'] = "checked"; + } // Check for Error Msg if ( isset($_GET['errormsg']) ) @@ -550,7 +561,14 @@ else if ( $content['INSTALL_STEP'] == 8 ) $_SESSION['SourceDBPassword'] = DB_RemoveBadChars($_POST['SourceDBPassword']); else $_SESSION['SourceDBPassword'] = ""; - + + if ( isset($_POST['SourceDBEnableRowCounting']) ) + { + $_SESSION['SourceDBEnableRowCounting'] = DB_RemoveBadChars($_POST['SourceDBEnableRowCounting']); + if ( $_SESSION['SourceDBEnableRowCounting'] != "true" ) + $_SESSION['SourceDBEnableRowCounting'] = "false"; + } + // TODO: Check database connectivity! } @@ -592,6 +610,7 @@ else if ( $content['INSTALL_STEP'] == 8 ) "\$CFG['Sources']['Source1']['DBUser'] = '" . $_SESSION['SourceDBUser'] . "';\r\n" . "\$CFG['Sources']['Source1']['DBPassword'] = '" . $_SESSION['SourceDBPassword'] . "';\r\n" . "\$CFG['Sources']['Source1']['DBTableName'] = '" . $_SESSION['SourceDBTableName'] . "';\r\n" . + "\$CFG['Sources']['Source1']['DBEnableRowCounting'] = " . $_SESSION['SourceDBEnableRowCounting'] . ";\r\n" . ""; } $patterns[] = "/\/\/ --- \%Insert Source Here\%/"; diff --git a/src/js/common.js b/src/js/common.js index db35439..5bfcb47 100644 --- a/src/js/common.js +++ b/src/js/common.js @@ -133,4 +133,81 @@ function toggleFormareaVisibility(FormFieldName, FirstHiddenArea, SecondHiddenAr hidevisibility(FirstHiddenArea); togglevisibility(SecondHiddenArea); } -} \ No newline at end of file +} + +// helper array to keep track of the timeouts! +var runningTimeouts = new Array(); +var defaultMenuTimeout = 1500; +/* +* Toggle display type from NONE to BLOCK +*/ +function ToggleDisplayTypeById(ObjID) +{ + var obj = document.getElementById(ObjID); + if (obj != null) + { + if (obj.style.display == '' || obj.style.display == 'none') + { + obj.style.display='block'; + + // Set Timeout to make sure the menu disappears + ToggleDisplaySetTimeout(ObjID); + } + else + { + obj.style.display='none'; + + // Abort Timeout if set! + ToggleDisplayClearTimeout(ObjID); + } + } +} + +function ToggleDisplaySetTimeout(ObjID) +{ + // Set Timeout + var szTimeOut = "ToggleDisplayOffTypeById('" + ObjID + "')"; + runningTimeouts[ObjID] = window.setTimeout(szTimeOut, defaultMenuTimeout); +} + +function ToggleDisplayClearTimeout(ObjID) +{ + // Abort Timeout if set! + if ( runningTimeouts[ObjID] != null ) + { + window.clearTimeout(runningTimeouts[ObjID]); + } +} + +function ToggleDisplayEnhanceTimeOut(ObjID) +{ + // First clear timeout + ToggleDisplayClearTimeout(ObjID); + + // Set new timeout + ToggleDisplaySetTimeout(ObjID); +} + +/* +* Make Style sheet display OFF in any case +*/ +function ToggleDisplayOffTypeById(ObjID) +{ + var obj = document.getElementById(ObjID); + if (obj != null) + { + obj.style.display='none'; + } +} + +/* +* Debug Helper function to read possible properties of an object +*/ +function DebugShowElementsById(ObjName) +{ + var obj = document.getElementById(ObjName); + for (var key in obj) { + document.write(obj[key]); + } +} + diff --git a/src/lang/de/main.php b/src/lang/de/main.php index 055cbf6..b135411 100644 --- a/src/lang/de/main.php +++ b/src/lang/de/main.php @@ -43,6 +43,9 @@ $content['LN_GEN_PAGE'] = "Seite"; $content['LN_GEN_PREDEFINEDSEARCHES'] = "Vordefinierte Suchkriterien"; $content['LN_GEN_SOURCE_DISK'] = "Datei"; $content['LN_GEN_SOURCE_DB'] = "Datenbank"; + $content['LN_GEN_RECORDSPERPAGE'] = "records per page"; + $content['LN_GEN_PRECONFIGURED'] = "Preconfigured"; + $content['LN_GEN_AVAILABLESEARCHES'] = "Available searches"; // Index Site $content['LN_ERROR_INSTALLFILEREMINDER'] = "Warnung! Du hast das Installationsscript 'install.php' noch nicht aus dem phpLogCon Hauptordner entfernt!"; @@ -56,6 +59,9 @@ $content['LN_SEARCH_ADVANCED'] = "Erweiterte Suche"; $content['LN_SEARCH'] = "Suche"; $content['LN_SEARCH_RESET'] = "Suche zurücksetzen"; $content['LN_SEARCH_PERFORMADVANCED'] = "Erweiterte Suche starten"; +$content['LN_VIEW_MESSAGECENTERED'] = "Back to unfiltered view with this message at top"; +$content['LN_VIEW_RELATEDMSG'] = "View related syslog messages"; +$content['LN_VIEW_FILTERFOR'] = "Filter message for "; $content['LN_HIGHLIGHT'] = "Hightlight >>"; $content['LN_HIGHLIGHT_OFF'] = "Hightlight <<"; @@ -84,6 +90,7 @@ $content['LN_FILTER_OTHERS'] = "Andere Filter"; $content['LN_FILTER_MESSAGE'] = "Syslog Meldungen"; $content['LN_FILTER_SYSLOGTAG'] = "Syslogtag"; $content['LN_FILTER_SOURCE'] = "Quelle (Hostname)"; + $content['LN_FILTER_MESSAGETYPE'] = "Message Type"; // Field Captions $content['LN_FIELDS_DATE'] = "Datum"; @@ -118,5 +125,6 @@ $content['LN_CFG_FIRSTSYSLOGSOURCE'] = "Erste Syslog Quelle"; // Details page $content['LN_DETAILS_FORSYSLOGMSG'] = "Details for the syslog messages with id"; $content['LN_DETAILS_DETAILSFORMSG'] = "Details for message id"; +$content['LN_DETAIL_BACKTOLIST'] = "Back to Listview"; ?> diff --git a/src/lang/en/main.php b/src/lang/en/main.php index eeca194..84c25b4 100644 --- a/src/lang/en/main.php +++ b/src/lang/en/main.php @@ -43,6 +43,10 @@ $content['LN_GEN_PAGE'] = "Page"; $content['LN_GEN_PREDEFINEDSEARCHES'] = "Predefined Searches"; $content['LN_GEN_SOURCE_DISK'] = "Diskfile"; $content['LN_GEN_SOURCE_DB'] = "Database"; +$content['LN_GEN_RECORDSPERPAGE'] = "records per page"; +$content['LN_GEN_PRECONFIGURED'] = "Preconfigured"; +$content['LN_GEN_AVAILABLESEARCHES'] = "Available searches"; + // Main Index Site $content['LN_ERROR_INSTALLFILEREMINDER'] = "Warning! You still have NOT removed the 'install.php' from your phpLogCon main directory!"; @@ -56,6 +60,10 @@ $content['LN_SEARCH_ADVANCED'] = "Advanced Search"; $content['LN_SEARCH'] = "Search"; $content['LN_SEARCH_RESET'] = "Reset search"; $content['LN_SEARCH_PERFORMADVANCED'] = "Perform Advanced Search"; +$content['LN_VIEW_MESSAGECENTERED'] = "Back to unfiltered view with this message at top"; +$content['LN_VIEW_RELATEDMSG'] = "View related syslog messages"; +$content['LN_VIEW_FILTERFOR'] = "Filter message for "; + $content['LN_HIGHLIGHT'] = "Hightlight >>"; $content['LN_HIGHLIGHT_OFF'] = "Hightlight <<"; @@ -84,6 +92,7 @@ $content['LN_FILTER_OTHERS'] = "Other Filters"; $content['LN_FILTER_MESSAGE'] = "Syslog Message"; $content['LN_FILTER_SYSLOGTAG'] = "Syslogtag"; $content['LN_FILTER_SOURCE'] = "Source (Hostname)"; +$content['LN_FILTER_MESSAGETYPE'] = "Message Type"; // Field Captions $content['LN_FIELDS_DATE'] = "Date"; @@ -114,9 +123,11 @@ $content['LN_CFG_DBSTORAGEENGINE'] = "Database Storage Engine"; $content['LN_CFG_DBTABLENAME'] = "Database Tablename"; $content['LN_CFG_NAMEOFTHESOURCE'] = "Name of the Source"; $content['LN_CFG_FIRSTSYSLOGSOURCE'] = "First Syslog Source"; +$content['LN_CFG_DBROWCOUNTING'] = "Enable Row Counting"; // Details page $content['LN_DETAILS_FORSYSLOGMSG'] = "Details for the syslog messages with id"; $content['LN_DETAILS_DETAILSFORMSG'] = "Details for message id"; +$content['LN_DETAIL_BACKTOLIST'] = "Back to Listview"; ?> \ No newline at end of file diff --git a/src/search.php b/src/search.php index 7781006..b031264 100644 --- a/src/search.php +++ b/src/search.php @@ -117,7 +117,7 @@ if ( (isset($_POST['search']) || isset($_GET['search'])) ) } } - if ( isset($_GET['filter_facility']) && count($_GET['filter_facility']) < 18 ) // If we have more than 18 elements, this means all facilities are enabled + if ( isset($_GET['filter_facility']) && count($_GET['filter_facility']) < count($content['filter_facility_list']) ) // If we have more elements as in the filter list array, this means all are enabled { $tmpStr = ""; foreach ($_GET['filter_facility'] as $tmpfacility) @@ -129,7 +129,7 @@ if ( (isset($_POST['search']) || isset($_GET['search'])) ) $content['searchstr'] .= "facility:" . $tmpStr . " "; } - if ( isset($_GET['filter_severity']) && count($_GET['filter_severity']) < 7 ) // If we have more than 7 elements, this means all facilities are enabled) + if ( isset($_GET['filter_severity']) && count($_GET['filter_severity']) < count($content['filter_severity_list']) ) // If we have more elements as in the filter list array, this means all are enabled { $tmpStr = ""; foreach ($_GET['filter_severity'] as $tmpfacility) @@ -141,6 +141,19 @@ if ( (isset($_POST['search']) || isset($_GET['search'])) ) $content['searchstr'] .= "severity:" . $tmpStr . " "; } + if ( isset($_GET['filter_messagetype']) && count($_GET['filter_messagetype']) < count($content['filter_messagetype_list']) ) // If we have more elements as in the filter list array, this means all are enabled + { + $tmpStr = ""; + foreach ($_GET['filter_messagetype'] as $tmpmsgtype) + { + if ( strlen($tmpStr) > 0 ) + $tmpStr .= ","; + $tmpStr .= $tmpmsgtype; + } + $content['searchstr'] .= "messagetype:" . $tmpStr . " "; + } + + // Spaces need to be converted! if ( isset($_GET['filter_syslogtag']) && strlen($_GET['filter_syslogtag']) > 0 ) { diff --git a/src/templates/details.html b/src/templates/details.html index e3d1b65..3df4db9 100644 --- a/src/templates/details.html +++ b/src/templates/details.html @@ -7,7 +7,8 @@ - - + + diff --git a/src/templates/install.html b/src/templates/install.html index e07614d..f3bd217 100644 --- a/src/templates/install.html +++ b/src/templates/install.html @@ -331,6 +331,12 @@ + + + +
+ + {LN_DETAIL_BACKTOLIST} {LN_GEN_PAGE} {main_currentpagenumber} diff --git a/src/templates/index.html b/src/templates/index.html index 2636778..b973f81 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -10,11 +10,13 @@ {LN_GEN_PAGERSIZE}:{ViewEntriesPerPage} + +
+ + + + + +
+ +
+
+ +
Pager:   @@ -160,7 +179,7 @@ - + @@ -179,35 +198,72 @@ - - - - - - - {fieldvalue} - - + + + + + + + + + + + + + + + + {fieldvalue} + + + + + {fieldvalue} + + + + + + + {fieldvalue} + + + + + + + {fieldvalue} + + + + + + + + + +
{popupcaption}
{detailfieldtitle}{detailfieldvalue}
+
- - - - {fieldvalue} - - - - - - - - - -
{popupcaption}
{detailfieldtitle}{detailfieldvalue}
-
-
- +
{LN_CFG_DBPASSWORD}
{LN_CFG_DBROWCOUNTING} + Yes No +
diff --git a/src/templates/search.html b/src/templates/search.html index 55f04fb..3b9df58 100644 --- a/src/templates/search.html +++ b/src/templates/search.html @@ -116,7 +116,7 @@ {LN_FILTER_FACILITY} - + {LN_FILTER_SEVERITY} - + + + {LN_FILTER_MESSAGETYPE} + + + + diff --git a/src/themes/dark/main.css b/src/themes/dark/main.css index 3a54fe5..a663adf 100644 --- a/src/themes/dark/main.css +++ b/src/themes/dark/main.css @@ -243,12 +243,12 @@ font /* Cell Columns */ .cellmenu1 { - height: 15px; +/* height: 15px; */ border:1px solid; border-color: #353A3F #050A0F #050A0F #353A3F; text-indent:5px; - font: 10px Verdana, Arial, Helvetica, sans-serif; + font: bold 10px Verdana, Arial, Helvetica, sans-serif; color: #FFFCE5; background-color: #103B65; } diff --git a/src/themes/default/main.css b/src/themes/default/main.css index f3bf131..daeab01 100644 --- a/src/themes/default/main.css +++ b/src/themes/default/main.css @@ -123,6 +123,7 @@ font /* Cells for listening */ .line0 { + height: 16px; font-size: 8pt; color: #000000; background-color: #DDDDDD; @@ -134,6 +135,7 @@ font .line1 { + height: 16px; font-size: 8pt; color: #000000; background-color: #EEEEEE; @@ -145,6 +147,7 @@ font .line2 { + height: 16px; font-size: 8pt; color: #000000; background-color: #F5F5F5; @@ -188,12 +191,12 @@ font } */ -.lineColouredWhite +.lineColouredWhite, .lineColouredWhite:hover, A.lineColouredWhite { font-size: 8pt; color: #FFFFFF; } -.lineColouredBlack +.lineColouredBlack, .lineColouredBlack:hover, A.lineColouredBlack { font-size: 8pt; color: #000000; @@ -272,12 +275,12 @@ font /* Cell Columns */ .cellmenu1 { - height: 16px; +/* height: 16px; */ border:1px ridge; border-color: #79AABE #09506C #09506C #79AABE; text-indent:5px; - font: 10px Verdana, Arial, Helvetica, sans-serif; + font: bold 10px Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; background-color: #6C8E9C; } diff --git a/src/userchange.php b/src/userchange.php index 4a4a36e..be99fa6 100644 --- a/src/userchange.php +++ b/src/userchange.php @@ -50,17 +50,24 @@ else if ( isset($_GET['op']) ) { - if ( $_GET['op'] == "changestyle" ) + if ( $_GET['op'] == "changestyle" && isset($_GET['stylename']) ) { if ( VerifyTheme($_GET['stylename']) ) $_SESSION['CUSTOM_THEME'] = $_GET['stylename']; } - if ( $_GET['op'] == "changelang" ) + if ( $_GET['op'] == "changelang" && isset($_GET['langcode']) ) { if ( VerifyLanguage($_GET['langcode']) ) $_SESSION['CUSTOM_LANG'] = $_GET['langcode']; } + + if ( $_GET['op'] == "changepagesize" && isset($_GET['pagesizeid']) ) + { + if ( intval($_GET['pagesizeid']) >= 0 && intval($_GET['pagesizeid']) < 7 ) + $_SESSION['PAGESIZE_ID'] = intval($_GET['pagesizeid']); + } + } // Final redirect