diff --git a/include.php b/include.php index 2059bee..9e8b860 100644 --- a/include.php +++ b/include.php @@ -1,784 +1,758 @@ -. See AUTHORS to learn who helped make -it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - - /* - * This file validate all variable comming from the web, - * also it includes all necessary files (e.g. config, db-drv, ...) - * and provide some usefull functions - */ - - // enable it only for testing purposes - error_reporting(E_ALL); - - header("Pragma: no-cache"); - // very important to include config settings at beginning! - include 'config.php'; - - - session_cache_expire($session_time); - session_start(); - //*** Begin Validate var input and/or default values *** - - //The following is required for IIS! Otherwise it will cause an error "undefined index" - $_SERVER['QUERY_STRING'] = ''; - - if( !isset($_SESSION['save_cookies']) ) - session_register('save_cookies'); - - // select the language - // use the language code, only two letters are permitted - if (!isset($_SESSION['language'])) - { - $_SESSION['language'] = _DEFLANG; - } - - /* - * get the stylesheet to use - * only letters are permitted - */ - if (!isset($_SESSION['stylesheet'])) - { - $_SESSION['stylesheet'] = 'phplogcon'; // default - } - - if (!isset($_SESSION['debug'])) - { - $_SESSION['debug'] = 0; // default - } - - if (!isset($_SESSION['savefiltersettings'])) - { - $_SESSION['savefiltersettings'] = 0; // default - } - - /* - * Load the default quick filter settings, - * if the quick filter settings not configured yet. - */ - if (!isset($_SESSION['FilterInfoUnit'])) - $_SESSION['FilterInfoUnit'] = _FilterInfoUnit; - if (!isset($_SESSION['FilterOrderby'])) - $_SESSION['FilterOrderby'] = _FilterOrderby; - if (!isset($_SESSION['FilterRefresh'])) - $_SESSION['FilterRefresh'] = _FilterRefresh; - if (!isset($_SESSION['FilterColExp'])) - $_SESSION['FilterColExp'] = _FilterColExp; - if (!isset($_SESSION['FilterHost'])) - $_SESSION['FilterHost'] = _FilterHost; - if (!isset($_SESSION['FilterMsg'])) - $_SESSION['FilterMsg'] = _FilterMsg; - - - /* - * Function prepare strings from textboxes for using it for db queries. - */ - function PreStrFromTxt4DB($var) - { - if (get_magic_quotes_gpc()) - $var = stripslashes($var); - - return str_replace("'", "''", trim($var)); - } - - /* - * Function prepare strings from textboxes for output - */ - function PreStrFromTxt4Out($var) - { - if (get_magic_quotes_gpc()) - $var = stripslashes($var); - - return htmlspecialchars(trim($var)); - } - - /* - * Filtering by ip/host - * if a string for filter host submitted, check this string. - */ - if (isset($_POST['filhost'])) - { - $_SESSION['filhost'] = PreStrFromTxt4DB($_POST['filhost']); - $_POST['filhost'] = PreStrFromTxt4Out($_POST['filhost']); - } - else - $_SESSION['filhost'] = ''; - - - /* - * Filtering the message, msg must contain a certain string. - * if a string submitted, check this string. - */ - if (isset($_POST['searchmsg'])) - { - $_SESSION['searchmsg'] = PreStrFromTxt4DB($_POST['searchmsg']); - $_POST['searchmsg'] = PreStrFromTxt4Out($_POST['searchmsg']); - } - else - $_SESSION['searchmsg'] = ''; - - - /* - * For CLASS EventFilter (classes/eventfilter.php) - * get/set the "manually events date" - * only numbers are permitted - */ - function SetManuallyDateDefault() - { - $_SESSION['d1'] = 1; - $_SESSION['m1'] = 1; - $_SESSION['y1'] = 2004; - - $_SESSION['d2'] = date("d"); - $_SESSION['m2'] = date("m"); - $_SESSION['y2'] = date("Y"); - - } - if (isset($_POST['d1'])) - { - $tmp = true; - if (!is_numeric($_POST['d1'])) { $tmp = false; } - if (!is_numeric($_POST['m1'])) { $tmp = false; } - if (!is_numeric($_POST['y1'])) { $tmp = false; } - if (!is_numeric($_POST['d2'])) { $tmp = false; } - if (!is_numeric($_POST['m2'])) { $tmp = false; } - if (!is_numeric($_POST['y2'])) { $tmp = false; } - - if ($tmp) - { - //is ok, but add a int to ensure that it is now handled as an integer - $_SESSION['d1'] = $_POST['d1']+0; - $_SESSION['m1'] = $_POST['m1']+0; - $_SESSION['y1'] = $_POST['y1']+0; - $_SESSION['d2'] = $_POST['d2']+0; - $_SESSION['m2'] = $_POST['m2']+0; - $_SESSION['y2'] = $_POST['y2']+0; - } - else - SetManuallyDateDefault(); - - } - elseif (!isset($_SESSION['d1'])) - SetManuallyDateDefault(); - - // quick-filter.php - // manually or predefined - if (isset($_POST['change'])) - { - if ($_POST['change'] == 'Predefined') - $_SESSION['change'] = 'Predefined'; - else - $_SESSION['change'] = 'Manually'; - } - elseif (!isset($_SESSION['change'])) - $_SESSION['change'] = 'Predefined'; - - - // Apply changed quick filter settings - if( isset($_POST['quickFilter']) && $_POST['quickFilter'] == 'change' ) - { - // save current settings. Because: - // the quick filter and the filter config are using the same variables. - // when you change the quick filter settings, the filter settings - // would be changed to. - // settings must be reloaded in filter-config.php - $_SESSION['ti_old'] = $_SESSION['ti']; - $_SESSION['infounit_sl_old'] = $_SESSION['infounit_sl']; - $_SESSION['infounit_er_old'] = $_SESSION['infounit_er']; - $_SESSION['infounit_o_old'] = $_SESSION['infounit_o']; - $_SESSION['order_old'] = $_SESSION['order']; - $_SESSION['tag_order_old'] = $_SESSION['tag_order']; - $_SESSION['tag_sort_old'] = $_SESSION['tag_sort']; - $_SESSION['refresh_old'] = $_SESSION['refresh']; - - if( isset($_POST['ti']) ) - $_SESSION['ti'] = $_POST['ti']; - $_SESSION['infounit_sl'] = (isset($_POST['infounit_sl'])) ? 1 : 0; - $_SESSION['infounit_er'] = (isset($_POST['infounit_er'])) ? 1 : 0; - $_SESSION['infounit_o'] = (isset($_POST['infounit_o'])) ? 1 : 0; - if( !isset($_POST['order']) ) - { - $_POST['order'] = ''; - $_SESSION['tag_order'] = $_POST['tag_order']; - } - else - { - $_POST['tag_order'] = ''; - $_SESSION['order'] = $_POST['order']; - } - if( isset($_POST['tag_sort']) ) - $_SESSION['tag_sort'] = $_POST['tag_sort']; - $_SESSION['refresh'] = $_POST['refresh']; - if( isset($_POST['show_methode']) ) - $_SESSION['show_methode'] = $_POST['show_methode']; - } - - - //events-display.php - - // InitVariable(2, "search", ""); - // InitVariable(1, "regexp", ""); - - - // implement this - //InitVariable(1, "color", "red"); - - if (!isset($_SESSION['infounit_sl'])) - $_SESSION['infounit_sl'] = 1; - if (!isset($_SESSION['infounit_er'])) - $_SESSION['infounit_er'] = 1; - if (!isset($_SESSION['infounit_o'])) - $_SESSION['infounit_o'] = 1; - - if (!isset($_SESSION['priority_0'])) - $_SESSION['priority_0'] = 1; - if (!isset($_SESSION['priority_1'])) - $_SESSION['priority_1'] = 1; - if (!isset($_SESSION['priority_2'])) - $_SESSION['priority_2'] = 1; - if (!isset($_SESSION['priority_3'])) - $_SESSION['priority_3'] = 1; - if (!isset($_SESSION['priority_4'])) - $_SESSION['priority_4'] = 1; - if (!isset($_SESSION['priority_5'])) - $_SESSION['priority_5'] = 1; - if (!isset($_SESSION['priority_6'])) - $_SESSION['priority_6'] = 1; - if (!isset($_SESSION['priority_7'])) - $_SESSION['priority_7'] = 1; - - - // forms/events-date.php - // selected time interval, validation check of ti in eventfilter.php - if (!isset($_SESSION['ti'])) - $_SESSION['ti'] = 'today'; // default - - // forms/order-by.php - // validation in eventfilter.php - if (!isset($_SESSION['order'])) - $_SESSION['order'] = 'date'; - - // forms/tag-order-by.php - // validation in eventfilter.php - if (!isset($_SESSION['tag_order'])) - $_SESSION['tag_order'] = 'Occurences'; - - // forms/tag-sort.php - // check sort ascending/descending - if (!isset($_SESSION['tag_sort'])) - $_SESSION['tag_sort'] = 'Asc'; - - // forms/refresh.php - if (!isset($_SESSION['refresh'])) - $_SESSION['refresh'] = 0; // default - - //syslog-index.php - if( !isset($_SESSION['show_methode']) ) - $_SESSION['show_methode'] = "SysLogTag"; - - // forms/logs-per-page.php - // number of lines to be displayed, only numbers are allowed - if (isset($_POST['epp'])) - { - if (is_numeric($_POST['epp'])) - $_SESSION['epp'] = $_POST['epp']+0; //+0 makes sure that is an int - else - $_SESSION['epp'] = 20; - } - elseif (!isset($_SESSION['epp'])) - $_SESSION['epp'] = 20; - - - //*** End Validate var input and/or default values *** - - //***Begin including extern files*** - - // include the language file - include _LANG . $_SESSION['language'] . '.php'; - //design things - include 'layout/theme.php'; - //include required database driver - if(strtolower(_CON_MODE) == "native") - include _DB_DRV . _DB_APP . ".php"; - else - include _DB_DRV . _CON_MODE . "_" . _DB_APP . ".php"; - //***End including extern files*** - - //***Global used variables - // Used to hold the global connection handle - $global_Con = db_connection(); - - - //***Begin usefull functions*** - - /************************************************************************/ - /* expect a path to a folder ('.' for current) and return all */ - /* filenames order by name - /************************************************************************/ - function GetFilenames($dir) - { - $handle = @opendir($dir); - while ($file = @readdir ($handle)) - { - if (eregi("^\.{1,2}$",$file)) - { - continue; - } - - if(!is_dir($dir.$file)) - { - $info[] = $file; - } - - } - @closedir($handle); - sort($info); - - return $info; - } - - /*! - * Remove the parameter $Arg from the given $URL - * \r Returns the url without the $Arg parameter - */ - - function RemoveArgFromURL($URL,$Arg) - { - while($Pos = strpos($URL,"$Arg=")) - { - if ($Pos) - { - if ($URL[$Pos-1] == "&") - { - $Pos--; - } - $nMax = strlen($URL); - $nEndPos = strpos($URL,"&",$Pos+1); - - if ($nEndPos === false) - { - $URL = substr($URL,0,$Pos); - } - else - { - $URL = str_replace(substr($URL,$Pos,$nEndPos-$Pos), '', $URL); - } - } - } - return $URL; - } - - //***End usefull functions*** - - - - // encodes a string one way - function encrypt($txt) - { - return crypt($txt,"vI").crc32($txt); - } - - // returns current date and time - function now() - { - $dat = getdate(strtotime("now")); - return "$dat[year]-$dat[mon]-$dat[mday] $dat[hours]:$dat[minutes]:00"; - } - - // it makes the authentification - function auth() - { - global $session_time; - - // if no session is available, but a cookie => the session will be set and the settings loaded - // if no session and no cookie is available => link to index.php to login will be displayed - if( !isset($_SESSION['usr']) ) - { - if( !isset($_COOKIE['valid']) || $_COOKIE['valid'] == "0" ) - { - header("Location: index.php"); - exit; - } - else - { - session_register('usr'); - session_register('usrdis'); - $_SESSION['usr'] = $_COOKIE['usr']; - $_SESSION['usrdis'] = $_COOKIE['usrdis']; - LoadUserConfig(); - } - } - - /* - //*** FOR SESSION EXPIRE *** - //if(diff("now", $result["phplogcon_dtime"]) > $session_time) - if( !isset($_COOKIE["valid"]) ) - { - WriteHead("phpLogCon :: " . $msg030, "", "", $msg030, 0); - echo "
..:: " . _MSGSesExp . " ::..
"; - echo "
..:: " . _MSGReLog . " ::.."; - exit; - } - */ - //refresh cookies - if($_SESSION['save_cookies']) - { - setcookie("valid", $_COOKIE["valid"], _COOKIE_EXPIRE, "/"); - setcookie("usr", $_COOKIE["usr"], _COOKIE_EXPIRE, "/"); - } - } - -/* - // generates a unique string - function gen() - { - mt_srand((double)microtime() * 1000000); - return mt_rand(1000, 9999) . "-" . mt_rand(1000, 9999) . "-" . mt_rand(1000, 9999) . "-" . mt_rand(1000, 9999); - } -*/ - - // Calculates the different between the given times - function diff($date1, $date2) - { - $a1 = getdate(strtotime($date1)); - $a2 = getdate(strtotime($date2)); - - return ($a1["year"]-$a2["year"])*525600 + ($a1["mon"]-$a2["mon"])*43200 + ($a1["mday"]-$a2["mday"])*1440 + ($a1["hours"]-$a2["hours"])*60 + ($a1["minutes"]-$a2["minutes"]); - } - - /*! - * This function create a combobox with all filenames (without extension - * if it '.php') from the given folder. Firt param is the path to the - * folder, second is the name of of the combobox. - */ - function ComboBoxWithFilenames($dir, $combobox) - { - $handle = @opendir($dir); - while ($file = @readdir($handle)) - { - if (eregi("^\.{1,2}$",$file)) - continue; - - if(!is_dir($dir.$file)) - $info[] = ereg_replace(".php","",$file); - } - @closedir($handle); - sort($info); - - echo ""; - } - - function CheckSQL($SQLcmd) - { - if( stristr($SQLcmd, "'") || stristr($SQLcmd, """)) - return FALSE; - else - return TRUE; - } - - function WriteStandardHeader($myMsg) - { - if(_ENABLEUI == 1) - { - // *** AUTH ID | WHEN TRUE, LOGOUT USER *** - auth(); - if(isset($_GET["do"])) - { - if ($_GET["do"] == "logout") - { - setcookie("usr", "|", _COOKIE_EXPIRE, "/"); - setcookie("valid", "0", _COOKIE_EXPIRE, "/"); - session_unset(); - header("Location: index.php"); - } - } - - // **************************************** - /* - if( !isset($_COOKIE["valid"]) || $_COOKIE["valid"] == "0" ) - WriteHead("phpLogCon :: " . $myMsg , "", "", $myMsg, 0); - else - WriteHead("phpLogCon :: " . $myMsg, "", "", $myMsg, $_COOKIE["valid"]); - */ - WriteHead("phpLogCon :: " . $myMsg , "", "", $myMsg); - - echo "
"; - - // If a user is logged in, display logout text - if( isset($_COOKIE["usr"]) || $_COOKIE["usr"] != "|") - { - echo ''; - echo ''; - echo ''; - echo ''; - echo '
' . _MSGLogout . '
'; - } - } - else - { - /* - if(isset($_COOKIE["valid"])) - WriteHead("phpLogCon :: " . $myMsg, "", "", $myMsg, $_COOKIE["sesid"]); - else - WriteHead("phpLogCon :: " . $myMsg, "", "", $myMsg, 0); - */ - WriteHead("phpLogCon :: " . $myMsg , "", "", $myMsg); - } - CheckInstallDir(); - } - - /*! - * Format the priority for displaying purposes. - * Get the number of the priority and change it to a word, - * also the default css style for design format is required. - * If coloring priority enabled, this function change the given - * param to the right color of the priority. - * - * /param pri - priority (number!) - * /param col - css style class (as a reference!) - * /ret priword - returns priority as a word - */ - function FormatPriority($pri, &$col) - { - $priword =''; - $tmpcol = ''; - switch($pri){ - case 0: - $priword = _MSGPRI0; - $tmpcol = 'PriorityEmergency'; - break; - case 1: - $priword = _MSGPRI1; - $tmpcol = 'PriorityAlert'; - break; - case 2: - $priword = _MSGPRI2; - $tmpcol = 'PriorityCrit'; - break; - case 3: - $priword = _MSGPRI3; - $tmpcol = 'PriorityError'; - break; - case 4: - $priword = _MSGPRI4; - $tmpcol = 'PriorityWarning'; - break; - case 5: - $priword = _MSGPRI5; - $tmpcol = 'PriorityNotice'; - break; - case 6: - $priword = _MSGPRI6; - $tmpcol = 'PriorityInfo'; - break; - case 7: - $priword = _MSGPRI7; - $tmpcol = 'PriorityDebug'; - break; - default: - die('priority is false'); - } - - // if coloring enabled - if (_COLPriority) { - $col = $tmpcol; - } - return $priword; - } - - /*! - Gets Args from the active URL and returns them. - !*/ - function GetSortedArgs($mode) - { - $arCount = count($_SERVER["argv"]); - - if($arCount == 0 || $mode != 1) - $sArgs = ""; - else - { - $sArgs = ""; - for($i = 0; $i < $arCount; $i++) - { - if($i > 0) - { - if( stristr($_SERVER["argv"][$i], "pagenum=") == FALSE) - $sArgs .= "&" . $_SERVER["argv"][$i]; - } - else - { - if( stristr($_SERVER["argv"][$i], "pagenum=") == FALSE) - $sArgs .= $_SERVER["argv"][$i]; - } - } - } - return $sArgs; - } - - function CheckInstallDir() - { - if(file_exists("install/")) - { - echo "

" . _MSGInstDir . "

"; - } - clearstatcache(); - } - - /*! - Loads the Users Filter Configuration from database - !*/ - function LoadFilterConfig() - { - global $global_Con; - - $query = "SELECT Name, PropValue FROM UserPrefs WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_%'"; - $result = db_exec($global_Con, $query); - - while($value = db_fetch_array($result)) - { - $sValName = explode("PHPLOGCON_", $value['Name']); - $_SESSION["$sValName[1]"] = $value['PropValue']; - } - } - - function LoadUserConfig() - { - global $global_Con; - - $query = "SELECT Name, PropValue FROM UserPrefs WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_u%'"; - $result = db_exec($global_Con, $query); - while($value = db_fetch_array($result)) - { - $sValName = explode("PHPLOGCON_u", $value['Name']); - $_SESSION[strtolower($sValName[1])] = $value['PropValue']; - } - } - - /*! - Creates the array for saving the Filter Settings to database - !*/ - function GetFilterConfigArray() - { - if( !isset($_POST['infounit_sl']) ) - $query[0] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_infounit_sl'"; - else - $query[0] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_infounit_sl'"; - if( !isset($_POST['infounit_er']) ) - $query[1] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_infounit_er'"; - else - $query[1] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_infounit_er'"; - if( !isset($_POST['infounit_o']) ) - $query[2] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_infounit_o'"; - else - $query[2] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_infounit_o'"; - - if( !isset($_POST['priority_0']) ) - $query[3] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_0'"; - else - $query[3] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_0'"; - if( !isset($_POST['priority_1']) ) - $query[4] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_1'"; - else - $query[4] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_1'"; - if( !isset($_POST['priority_2']) ) - $query[5] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_2'"; - else - $query[5] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_2'"; - if( !isset($_POST['priority_3']) ) - $query[6] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_3'"; - else - $query[6] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_3'"; - if( !isset($_POST['priority_4']) ) - $query[7] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_4'"; - else - $query[7] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_4'"; - if( !isset($_POST['priority_5']) ) - $query[8] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_5'"; - else - $query[8] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_5'"; - if( !isset($_POST['priority_6']) ) - $query[9] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_6'"; - else - $query[9] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_6'"; - if( !isset($_POST['priority_7']) ) - $query[10] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_7'"; - else - $query[10] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_7'"; - - $query[11] = "UPDATE UserPrefs SET PropValue='" . $_POST['ti'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_ti'"; - $query[12] = "UPDATE UserPrefs SET PropValue='" . $_POST['order'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_order'"; - $query[13] = "UPDATE UserPrefs SET PropValue='" . $_POST['tag_order'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_tag_order'"; - $query[14] = "UPDATE UserPrefs SET PropValue='" . $_POST['tag_sort'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_tag_sort'"; - $query[15] = "UPDATE UserPrefs SET PropValue='" . $_POST['refresh'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_refresh'"; - - if( !isset($_POST['FilterInfoUnit']) ) - $query[16] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterInfoUnit'"; - else - $query[16] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterInfoUnit'"; - if( !isset($_POST['FilterOrderby']) ) - $query[17] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterOrderby'"; - else - $query[17] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterOrderby'"; - if( !isset($_POST['FilterRefresh']) ) - $query[18] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterRefresh'"; - else - $query[18] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterRefresh'"; - if( !isset($_POST['FilterColExp']) ) - $query[19] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterColExp'"; - else - $query[19] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterColExp'"; - if( !isset($_POST['FilterHost']) ) - $query[20] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterHost'"; - else - $query[20] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterHost'"; - if( !isset($_POST['FilterMsg']) ) - $query[21] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterMsg'"; - else - $query[21] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterMsg'"; - - return $query; - } - - function GetUserConfigArray() - { - $query[0] = "UPDATE UserPrefs SET PropValue='" . $_POST['stylesheet'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uStylesheet'"; - $query[1] = "UPDATE UserPrefs SET PropValue='" . $_POST['language'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uLanguage'"; - - if( !isset($_POST['savefiltersettings']) ) - $query[2] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uSaveFilterSettings'"; - else - $query[2] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uSaveFilterSettings'"; - if( !isset($_POST['debug']) ) - $query[3] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uDebug'"; - else - $query[3] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uDebug'"; - - return $query; - } - -?> +. See AUTHORS to learn who helped make +it become a reality. + +*/#### #### #### #### #### #### #### #### #### #### + + +/* +* This file validate all variable comming from the web, +* also it includes all necessary files (e.g. config, db-drv, ...) +* and provide some usefull functions +*/ + +// enable it only for testing purposes +error_reporting(E_ALL); + +//if (!headers_sent()) { header("Pragma: no-cache"); } +header("Pragma: no-cache"); +// very important to include config settings at beginning! +include 'config.php'; + +session_cache_expire($session_time); + +//*** Begin Validate var input and/or default values *** + +//The following is required for IIS! Otherwise it will cause an error "undefined index" +$_SERVER['QUERY_STRING'] = ''; + +if( !isset($_SESSION['save_cookies']) ) + session_start(); + +// select the language +// use the language code, only two letters are permitted +if (!isset($_SESSION['language'])) +{ +$_SESSION['language'] = _DEFLANG; +} + +/* +* get the stylesheet to use +* only letters are permitted +*/ +if (!isset($_SESSION['stylesheet'])) +{ +$_SESSION['stylesheet'] = 'phplogcon'; // default +} + +if (!isset($_SESSION['debug'])) +{ +$_SESSION['debug'] = 0; // default +} + +if (!isset($_SESSION['savefiltersettings'])) +{ +$_SESSION['savefiltersettings'] = 0; // default +} + +/* +* Load the default quick filter settings, +* if the quick filter settings not configured yet. +*/ +if (!isset($_SESSION['FilterInfoUnit'])) +$_SESSION['FilterInfoUnit'] = _FilterInfoUnit; +if (!isset($_SESSION['FilterOrderby'])) +$_SESSION['FilterOrderby'] = _FilterOrderby; +if (!isset($_SESSION['FilterRefresh'])) +$_SESSION['FilterRefresh'] = _FilterRefresh; +if (!isset($_SESSION['FilterColExp'])) +$_SESSION['FilterColExp'] = _FilterColExp; +if (!isset($_SESSION['FilterHost'])) +$_SESSION['FilterHost'] = _FilterHost; +if (!isset($_SESSION['FilterMsg'])) +$_SESSION['FilterMsg'] = _FilterMsg; + +/* +* Filtering by ip/host +* if a string for filter host submitted, check this string. +*/ +if (isset($_POST['filhost'])) +{ +$_SESSION['filhost'] = PreStrFromTxt4DB($_POST['filhost']); +$_POST['filhost'] = PreStrFromTxt4Out($_POST['filhost']); +} +else +$_SESSION['filhost'] = ''; + + +/* +* Filtering the message, msg must contain a certain string. +* if a string submitted, check this string. +*/ +if (isset($_POST['searchmsg'])) +{ +$_SESSION['searchmsg'] = PreStrFromTxt4DB($_POST['searchmsg']); +$_POST['searchmsg'] = PreStrFromTxt4Out($_POST['searchmsg']); +} +else +$_SESSION['searchmsg'] = ''; + +if (isset($_POST['d1'])) +{ + $tmp = true; + if (!is_numeric($_POST['d1'])) { $tmp = false; } + if (!is_numeric($_POST['m1'])) { $tmp = false; } + if (!is_numeric($_POST['y1'])) { $tmp = false; } + if (!is_numeric($_POST['d2'])) { $tmp = false; } + if (!is_numeric($_POST['m2'])) { $tmp = false; } + if (!is_numeric($_POST['y2'])) { $tmp = false; } + + if ($tmp) + { + //is ok, but add a int to ensure that it is now handled as an integer + $_SESSION['d1'] = $_POST['d1']+0; + $_SESSION['m1'] = $_POST['m1']+0; + $_SESSION['y1'] = $_POST['y1']+0; + $_SESSION['d2'] = $_POST['d2']+0; + $_SESSION['m2'] = $_POST['m2']+0; + $_SESSION['y2'] = $_POST['y2']+0; + } + else + SetManuallyDateDefault(); +} +elseif (!isset($_SESSION['d1'])) +SetManuallyDateDefault(); + +// quick-filter.php +// manually or predefined +if (isset($_POST['change'])) +{ +if ($_POST['change'] == 'Predefined') + $_SESSION['change'] = 'Predefined'; +else + $_SESSION['change'] = 'Manually'; +} +elseif (!isset($_SESSION['change'])) + $_SESSION['change'] = 'Predefined'; + +// Apply changed quick filter settings +if( isset($_POST['quickFilter']) && $_POST['quickFilter'] == 'change' ) +{ +// save current settings. Because: +// the quick filter and the filter config are using the same variables. +// when you change the quick filter settings, the filter settings +// would be changed to. +// settings must be reloaded in filter-config.php +$_SESSION['ti_old'] = $_SESSION['ti']; +$_SESSION['infounit_sl_old'] = $_SESSION['infounit_sl']; +$_SESSION['infounit_er_old'] = $_SESSION['infounit_er']; +$_SESSION['infounit_o_old'] = $_SESSION['infounit_o']; +$_SESSION['order_old'] = $_SESSION['order']; +$_SESSION['tag_order_old'] = $_SESSION['tag_order']; +$_SESSION['tag_sort_old'] = $_SESSION['tag_sort']; +$_SESSION['refresh_old'] = $_SESSION['refresh']; + +if( isset($_POST['ti']) ) + $_SESSION['ti'] = $_POST['ti']; +$_SESSION['infounit_sl'] = (isset($_POST['infounit_sl'])) ? 1 : 0; +$_SESSION['infounit_er'] = (isset($_POST['infounit_er'])) ? 1 : 0; +$_SESSION['infounit_o'] = (isset($_POST['infounit_o'])) ? 1 : 0; +if( !isset($_POST['order']) ) +{ + $_POST['order'] = ''; + $_SESSION['tag_order'] = $_POST['tag_order']; +} +else +{ + $_POST['tag_order'] = ''; + $_SESSION['order'] = $_POST['order']; +} +if( isset($_POST['tag_sort']) ) + $_SESSION['tag_sort'] = $_POST['tag_sort']; +$_SESSION['refresh'] = $_POST['refresh']; +if( isset($_POST['show_methode']) ) + $_SESSION['show_methode'] = $_POST['show_methode']; +} + + +//events-display.php + +// InitVariable(2, "search", ""); +// InitVariable(1, "regexp", ""); + + +// implement this +//InitVariable(1, "color", "red"); + +if (!isset($_SESSION['infounit_sl'])) +$_SESSION['infounit_sl'] = 1; +if (!isset($_SESSION['infounit_er'])) +$_SESSION['infounit_er'] = 1; +if (!isset($_SESSION['infounit_o'])) +$_SESSION['infounit_o'] = 1; + +if (!isset($_SESSION['priority_0'])) +$_SESSION['priority_0'] = 1; +if (!isset($_SESSION['priority_1'])) +$_SESSION['priority_1'] = 1; +if (!isset($_SESSION['priority_2'])) +$_SESSION['priority_2'] = 1; +if (!isset($_SESSION['priority_3'])) +$_SESSION['priority_3'] = 1; +if (!isset($_SESSION['priority_4'])) +$_SESSION['priority_4'] = 1; +if (!isset($_SESSION['priority_5'])) +$_SESSION['priority_5'] = 1; +if (!isset($_SESSION['priority_6'])) +$_SESSION['priority_6'] = 1; +if (!isset($_SESSION['priority_7'])) +$_SESSION['priority_7'] = 1; + + +// forms/events-date.php +// selected time interval, validation check of ti in eventfilter.php +if (!isset($_SESSION['ti'])) +$_SESSION['ti'] = 'today'; // default + +// forms/order-by.php +// validation in eventfilter.php +if (!isset($_SESSION['order'])) +$_SESSION['order'] = 'date'; + +// forms/tag-order-by.php +// validation in eventfilter.php +if (!isset($_SESSION['tag_order'])) +$_SESSION['tag_order'] = 'Occurences'; + +// forms/tag-sort.php +// check sort ascending/descending +if (!isset($_SESSION['tag_sort'])) +$_SESSION['tag_sort'] = 'Asc'; + +// forms/refresh.php +if (!isset($_SESSION['refresh'])) +$_SESSION['refresh'] = 0; // default + +//syslog-index.php +if( !isset($_SESSION['show_methode']) ) +$_SESSION['show_methode'] = "SysLogTag"; + +// forms/logs-per-page.php +// number of lines to be displayed, only numbers are allowed +if (isset($_POST['epp'])) +{ +if (is_numeric($_POST['epp'])) + $_SESSION['epp'] = $_POST['epp']+0; //+0 makes sure that is an int +else + $_SESSION['epp'] = 20; +} +elseif (!isset($_SESSION['epp'])) +$_SESSION['epp'] = 20; +//*** End Validate var input and/or default values *** + +//***Begin including extern files*** +// include the language file +include _LANG . $_SESSION['language'] . '.php'; +//design things +include 'layout/theme.php'; + + +// --- Added here, the Install direcgtory has to be removed before we do anything else +CheckInstallDir(); +// --- + + +//include required database driver +if(strtolower(_CON_MODE) == "native") + include _DB_DRV . _DB_APP . ".php"; +else + include _DB_DRV . _CON_MODE . "_" . _DB_APP . ".php"; +//***End including extern files*** + +//***Global used variables +// Used to hold the global connection handle +$global_Con = db_connection(); + + +//***Begin usefull functions*** + +/* +* Function prepare strings from textboxes for using it for db queries. +*/ +function PreStrFromTxt4DB($var) +{ + if (get_magic_quotes_gpc()) + $var = stripslashes($var); + + return str_replace("'", "''", trim($var)); +} + +/* +* Function prepare strings from textboxes for output +*/ +function PreStrFromTxt4Out($var) +{ + if (get_magic_quotes_gpc()) + $var = stripslashes($var); + + return htmlspecialchars(trim($var)); +} + +/* +* For CLASS EventFilter (classes/eventfilter.php) +* get/set the "manually events date" +* only numbers are permitted +*/ +function SetManuallyDateDefault() +{ + $_SESSION['d1'] = 1; + $_SESSION['m1'] = 1; + $_SESSION['y1'] = 2004; + + $_SESSION['d2'] = date("d"); + $_SESSION['m2'] = date("m"); + $_SESSION['y2'] = date("Y"); +} + +/************************************************************************/ +/* expect a path to a folder ('.' for current) and return all */ +/* filenames order by name +/************************************************************************/ +function GetFilenames($dir) +{ + $handle = @opendir($dir); + while ($file = @readdir ($handle)) + { + if (eregi("^\.{1,2}$",$file)) + { + continue; + } + + if(!is_dir($dir.$file)) + { + $info[] = $file; + } + + } + @closedir($handle); + sort($info); + + return $info; +} + +/*! + * Remove the parameter $Arg from the given $URL + * \r Returns the url without the $Arg parameter + */ + +function RemoveArgFromURL($URL,$Arg) +{ + while($Pos = strpos($URL,"$Arg=")) + { + if ($Pos) + { + if ($URL[$Pos-1] == "&") + { + $Pos--; + } + $nMax = strlen($URL); + $nEndPos = strpos($URL,"&",$Pos+1); + + if ($nEndPos === false) + { + $URL = substr($URL,0,$Pos); + } + else + { + $URL = str_replace(substr($URL,$Pos,$nEndPos-$Pos), '', $URL); + } + } + } + return $URL; +} + +//***End usefull functions*** + + + +// encodes a string one way +function encrypt($txt) +{ + return crypt($txt,"vI").crc32($txt); +} + +// returns current date and time +function now() +{ + $dat = getdate(strtotime("now")); + return "$dat[year]-$dat[mon]-$dat[mday] $dat[hours]:$dat[minutes]:00"; +} + +// it makes the authentification +function auth() +{ + global $session_time; + + // if no session is available, but a cookie => the session will be set and the settings loaded + // if no session and no cookie is available => link to index.php to login will be displayed + if( !isset($_SESSION['usr']) ) + { + if( !isset($_COOKIE['valid']) || $_COOKIE['valid'] == "0" ) + { + header("Location: index.php"); + exit; + } + else + { + session_register('usr'); + session_register('usrdis'); + $_SESSION['usr'] = $_COOKIE['usr']; + $_SESSION['usrdis'] = $_COOKIE['usrdis']; + LoadUserConfig(); + } + } + + /* + //*** FOR SESSION EXPIRE *** + //if(diff("now", $result["phplogcon_dtime"]) > $session_time) + if( !isset($_COOKIE["valid"]) ) + { + WriteHead("phpLogCon :: " . $msg030, "", "", $msg030, 0); + echo "
..:: " . _MSGSesExp . " ::..
"; + echo "
..:: " . _MSGReLog . " ::.."; + exit; + } + */ + //refresh cookies + if($_SESSION['save_cookies']) + { + setcookie("valid", $_COOKIE["valid"], _COOKIE_EXPIRE, "/"); + setcookie("usr", $_COOKIE["usr"], _COOKIE_EXPIRE, "/"); + } +} + +/* +// generates a unique string +function gen() +{ + mt_srand((double)microtime() * 1000000); + return mt_rand(1000, 9999) . "-" . mt_rand(1000, 9999) . "-" . mt_rand(1000, 9999) . "-" . mt_rand(1000, 9999); +} +*/ + +// Calculates the different between the given times +function diff($date1, $date2) +{ + $a1 = getdate(strtotime($date1)); + $a2 = getdate(strtotime($date2)); + + return ($a1["year"]-$a2["year"])*525600 + ($a1["mon"]-$a2["mon"])*43200 + ($a1["mday"]-$a2["mday"])*1440 + ($a1["hours"]-$a2["hours"])*60 + ($a1["minutes"]-$a2["minutes"]); +} + +/*! + * This function create a combobox with all filenames (without extension + * if it '.php') from the given folder. Firt param is the path to the + * folder, second is the name of of the combobox. + */ +function ComboBoxWithFilenames($dir, $combobox) +{ + $handle = @opendir($dir); + while ($file = @readdir($handle)) + { + if (eregi("^\.{1,2}$",$file)) + continue; + + if(!is_dir($dir.$file)) + $info[] = ereg_replace(".php","",$file); + } + @closedir($handle); + sort($info); + + echo ""; +} + +function CheckSQL($SQLcmd) +{ + if( stristr($SQLcmd, "'") || stristr($SQLcmd, """)) + return FALSE; + else + return TRUE; +} + +function WriteStandardHeader($myMsg) +{ + if(_ENABLEUI == 1) + { + // *** AUTH ID | WHEN TRUE, LOGOUT USER *** + auth(); + if(isset($_GET["do"])) + { + if ($_GET["do"] == "logout") + { + setcookie("usr", "|", _COOKIE_EXPIRE, "/"); + setcookie("valid", "0", _COOKIE_EXPIRE, "/"); + session_unset(); + header("Location: index.php"); + } + } + + // **************************************** + /* + if( !isset($_COOKIE["valid"]) || $_COOKIE["valid"] == "0" ) + WriteHead("phpLogCon :: " . $myMsg , "", "", $myMsg, 0); + else + WriteHead("phpLogCon :: " . $myMsg, "", "", $myMsg, $_COOKIE["valid"]); + */ + WriteHead("phpLogCon :: " . $myMsg , "", "", $myMsg); + + echo "
"; + + // If a user is logged in, display logout text + if( isset($_COOKIE["usr"]) || $_COOKIE["usr"] != "|") + { + echo ''; + echo ''; + echo ''; + echo ''; + echo '
' . _MSGLogout . '
'; + } + } + else + { + /* + if(isset($_COOKIE["valid"])) + WriteHead("phpLogCon :: " . $myMsg, "", "", $myMsg, $_COOKIE["sesid"]); + else + WriteHead("phpLogCon :: " . $myMsg, "", "", $myMsg, 0); + */ + WriteHead("phpLogCon :: " . $myMsg , "", "", $myMsg); + } + CheckInstallDir(); +} + +/*! + * Format the priority for displaying purposes. + * Get the number of the priority and change it to a word, + * also the default css style for design format is required. + * If coloring priority enabled, this function change the given + * param to the right color of the priority. + * + * /param pri - priority (number!) + * /param col - css style class (as a reference!) + * /ret priword - returns priority as a word + */ + function FormatPriority($pri, &$col) + { + $priword =''; + $tmpcol = ''; + switch($pri){ + case 0: + $priword = _MSGPRI0; + $tmpcol = 'PriorityEmergency'; + break; + case 1: + $priword = _MSGPRI1; + $tmpcol = 'PriorityAlert'; + break; + case 2: + $priword = _MSGPRI2; + $tmpcol = 'PriorityCrit'; + break; + case 3: + $priword = _MSGPRI3; + $tmpcol = 'PriorityError'; + break; + case 4: + $priword = _MSGPRI4; + $tmpcol = 'PriorityWarning'; + break; + case 5: + $priword = _MSGPRI5; + $tmpcol = 'PriorityNotice'; + break; + case 6: + $priword = _MSGPRI6; + $tmpcol = 'PriorityInfo'; + break; + case 7: + $priword = _MSGPRI7; + $tmpcol = 'PriorityDebug'; + break; + default: + die('priority is false'); + } + + // if coloring enabled + if (_COLPriority) { + $col = $tmpcol; + } + return $priword; + } + + + + function CheckInstallDir() + { + if(file_exists("install/")) + { + echo "


" . _MSGInstDir . "

"; + exit; + } + clearstatcache(); + } + +/*! +Loads the Users Filter Configuration from database +!*/ +function LoadFilterConfig() +{ + global $global_Con; + + $query = "SELECT Name, PropValue FROM UserPrefs WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_%'"; + $result = db_exec($global_Con, $query); + + while($value = db_fetch_array($result)) + { + $sValName = explode("PHPLOGCON_", $value['Name']); + $_SESSION["$sValName[1]"] = $value['PropValue']; + } +} + +function LoadUserConfig() +{ + global $global_Con; + + $query = "SELECT Name, PropValue FROM UserPrefs WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_u%'"; + $result = db_exec($global_Con, $query); + while($value = db_fetch_array($result)) + { + $sValName = explode("PHPLOGCON_u", $value['Name']); + $_SESSION[strtolower($sValName[1])] = $value['PropValue']; + } +} + +/*! +Creates the array for saving the Filter Settings to database +!*/ +function GetFilterConfigArray() +{ + if( !isset($_POST['infounit_sl']) ) + $query[0] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_infounit_sl'"; + else + $query[0] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_infounit_sl'"; + if( !isset($_POST['infounit_er']) ) + $query[1] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_infounit_er'"; + else + $query[1] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_infounit_er'"; + if( !isset($_POST['infounit_o']) ) + $query[2] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_infounit_o'"; + else + $query[2] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_infounit_o'"; + + if( !isset($_POST['priority_0']) ) + $query[3] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_0'"; + else + $query[3] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_0'"; + if( !isset($_POST['priority_1']) ) + $query[4] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_1'"; + else + $query[4] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_1'"; + if( !isset($_POST['priority_2']) ) + $query[5] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_2'"; + else + $query[5] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_2'"; + if( !isset($_POST['priority_3']) ) + $query[6] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_3'"; + else + $query[6] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_3'"; + if( !isset($_POST['priority_4']) ) + $query[7] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_4'"; + else + $query[7] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_4'"; + if( !isset($_POST['priority_5']) ) + $query[8] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_5'"; + else + $query[8] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_5'"; + if( !isset($_POST['priority_6']) ) + $query[9] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_6'"; + else + $query[9] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_6'"; + if( !isset($_POST['priority_7']) ) + $query[10] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_7'"; + else + $query[10] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_priority_7'"; + + $query[11] = "UPDATE UserPrefs SET PropValue='" . $_POST['ti'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_ti'"; + $query[12] = "UPDATE UserPrefs SET PropValue='" . $_POST['order'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_order'"; + $query[13] = "UPDATE UserPrefs SET PropValue='" . $_POST['tag_order'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_tag_order'"; + $query[14] = "UPDATE UserPrefs SET PropValue='" . $_POST['tag_sort'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_tag_sort'"; + $query[15] = "UPDATE UserPrefs SET PropValue='" . $_POST['refresh'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_refresh'"; + + if( !isset($_POST['FilterInfoUnit']) ) + $query[16] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterInfoUnit'"; + else + $query[16] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterInfoUnit'"; + if( !isset($_POST['FilterOrderby']) ) + $query[17] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterOrderby'"; + else + $query[17] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterOrderby'"; + if( !isset($_POST['FilterRefresh']) ) + $query[18] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterRefresh'"; + else + $query[18] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterRefresh'"; + if( !isset($_POST['FilterColExp']) ) + $query[19] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterColExp'"; + else + $query[19] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterColExp'"; + if( !isset($_POST['FilterHost']) ) + $query[20] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterHost'"; + else + $query[20] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterHost'"; + if( !isset($_POST['FilterMsg']) ) + $query[21] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterMsg'"; + else + $query[21] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterMsg'"; + + return $query; +} + +function GetUserConfigArray() +{ + $query[0] = "UPDATE UserPrefs SET PropValue='" . $_POST['stylesheet'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uStylesheet'"; + $query[1] = "UPDATE UserPrefs SET PropValue='" . $_POST['language'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uLanguage'"; + + if( !isset($_POST['savefiltersettings']) ) + $query[2] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uSaveFilterSettings'"; + else + $query[2] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uSaveFilterSettings'"; + if( !isset($_POST['debug']) ) + $query[3] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uDebug'"; + else + $query[3] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uDebug'"; + + return $query; +} + +?> diff --git a/install/install.php b/install/install.php index b15f9a3..fa198d4 100644 --- a/install/install.php +++ b/install/install.php @@ -1,181 +1,181 @@ -. See AUTHORS to learn who helped make -it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - -include "include.php"; - - - -WriteHead("phpLogCon :: Installation"); - -if(!isset($_POST['instLang'])) -{ - echo "
Welcome to the installation of phpLogCon, the WebInterface to log data.
"; - echo "
"; - echo ""; - echo "Please select your language for Installation progress: "; - echo ""; - echo "
"; - echo "
"; -} -else -{ - - include "../lang/" . $_POST['language'] . ".php"; - -?> - - -


-

-

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.: :. 
: * - -
Host/IP: *
Port ():
:
:
:
: *
: * - -
- -

-

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.: :. 
: - -
: - -
: 
 
  
:
:
:
:
: - -
  
 
- - -. See AUTHORS to learn who helped make +it become a reality. + +*/#### #### #### #### #### #### #### #### #### #### + +include "include.php"; + + + +WriteHead("phpLogCon :: Installation"); + +if(!isset($_POST['instLang'])) +{ + echo "
Welcome to the installation of phpLogCon, the WebInterface to log data.
"; + echo "
"; + echo ""; + echo "Please select your language for Installation progress: "; + echo ""; + echo "
"; + echo "
"; +} +else +{ + + include "../lang/" . $_POST['language'] . ".php"; + +?> + + +


+

+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
.: :. 
: * + +
Host/IP: *
Port ():
:
:
:
: *
: * + +
+ +

+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
.: :. 
: + +
: + +
: 
 
  
:
:
:
:
: + +
  
 
+ + + \ No newline at end of file diff --git a/install/perform.php b/install/perform.php index df8673d..8dc030e 100644 --- a/install/perform.php +++ b/install/perform.php @@ -1,347 +1,366 @@ -. See AUTHORS to learn who helped make -it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - -include "include.php"; -include "../lang/" . $_POST['lang'] . ".php"; - - - -WriteHead("phpLogCon :: Installation Progress"); - -?> - -
- -" . $strErrorMsg . ""; -else - $strDbErrMsg = ""; - -if( isset($_POST["ui"]) ) - $_POST["ui"] = 1; -else - $_POST["ui"] = 0; - -$strErrorMsg = ""; -if($_POST["ui"] == 1) -{ - if($_POST["uiuser"] != "") - { - if($_POST["uidisname"] == "") - $strErrorMsg .= "Display name"; - if($_POST["uipass"] == "") - { - if($strErrorMsg != "") - $strErrorMsg .= " - "; - $strErrorMsg .= "Password"; - } - if($_POST["uipassre"] == "") - { - if($strErrorMsg != "") - $strErrorMsg .= " - "; - $strErrorMsg .= "Re-type Password"; - } - if($_POST["uipass"] != "" && $_POST["uipassre"] != "") - { - if(strcmp($_POST["uipass"], $_POST["uipassre"]) != 0) - $strErrorMsg .= "Password and Re-typed Password aren't the same"; - } - if($strErrorMsg != "") - $strUiErrMsg = "User Interface Settings: " . $strErrorMsg . ""; - else - $strUiErrMsg = ""; - } - else - $strUiErrMsg = ""; -} -else - $strUiErrMsg = ""; - -if($strDbErrMsg != "" || $strUiErrMsg != "") -{ - echo "
"; - echo "While installing phpLogCon, there caused an error (Date: ".date("d.m.Y @ H:i")."):

"; - echo "Operation: Check user's input!
"; - echo "Error: You have to fill out following fields: " . $strDbErrMsg . "
" . $strUiErrMsg . "


Go back and correct this!
..:: Go back to installation ::..
"; - echo "

"; - exit; -} - -?> - - -
- - - -
-
- -", $_POST['uiuser'], $arQueries[$i]); - $arQueries[$i] = ereg_replace("", $_POST['uipass'], $arQueries[$i]); - $arQueries[$i] = ereg_replace("", $_POST['uidisname'], $arQueries[$i]); - $arQueries[$i] = ereg_replace("", $now, $arQueries[$i]); - $arQueries[$i] = ereg_replace("", $_POST['uilang'], $arQueries[$i]); - - db_exec($installCon, $arQueries[$i]); - } - elseif( stristr($arQueries[$i], "INSERT INTO UserPrefs") ) - { - $arQueries[$i] = ereg_replace("", $_POST['uiuser'], $arQueries[$i]); - $arQueries[$i] = ereg_replace("", $_POST['uilang'], $arQueries[$i]); - db_exec($installCon, $arQueries[$i]); - } - elseif( stristr($arQueries[$i], "SET IDENTITY_INSERT UserPrefs") ) - db_exec($installCon, $arQueries[$i]); - } -} - -//close database connection -db_close($installCon); - -?> - -
-
- - - -
-
- -









.
-

- -. See AUTHORS to learn who helped make +it become a reality. + +*/#### #### #### #### #### #### #### #### #### #### + +include "include.php"; +include "../lang/" . $_POST['lang'] . ".php"; + + + +WriteHead("phpLogCon :: Installation Progress"); + +?> + +
+ +" . $strErrorMsg . ""; +else + $strDbErrMsg = ""; + +if( isset($_POST["ui"]) ) + $_POST["ui"] = 1; +else + $_POST["ui"] = 0; + +$strErrorMsg = ""; +if($_POST["ui"] == 1) +{ + if($_POST["uiuser"] != "") + { + if($_POST["uidisname"] == "") + $strErrorMsg .= "Display name"; + if($_POST["uipass"] == "") + { + if($strErrorMsg != "") + $strErrorMsg .= " - "; + $strErrorMsg .= "Password"; + } + if($_POST["uipassre"] == "") + { + if($strErrorMsg != "") + $strErrorMsg .= " - "; + $strErrorMsg .= "Re-type Password"; + } + if($_POST["uipass"] != "" && $_POST["uipassre"] != "") + { + if(strcmp($_POST["uipass"], $_POST["uipassre"]) != 0) + $strErrorMsg .= "Password and Re-typed Password aren't the same"; + } + if($strErrorMsg != "") + $strUiErrMsg = "User Interface Settings: " . $strErrorMsg . ""; + else + $strUiErrMsg = ""; + } + else + $strUiErrMsg = ""; +} +else + $strUiErrMsg = ""; + +if($strDbErrMsg != "" || $strUiErrMsg != "") +{ + echo "
"; + echo "While installing phpLogCon, there caused an error (Date: ".date("d.m.Y @ H:i")."):

"; + echo "Operation: Check user's input!
"; + echo "Error: You have to fill out following fields: " . $strDbErrMsg . "
" . $strUiErrMsg . "


Go back and correct this!
..:: Go back to installation ::..
"; + echo "

"; + exit; +} + +?> + + +
+ + + +
+
+ +", $_POST['uiuser'], $arQueries[$i]); + $arQueries[$i] = ereg_replace("", $_POST['uipass'], $arQueries[$i]); + $arQueries[$i] = ereg_replace("", $_POST['uidisname'], $arQueries[$i]); + $arQueries[$i] = ereg_replace("", $now, $arQueries[$i]); + $arQueries[$i] = ereg_replace("", $_POST['uilang'], $arQueries[$i]); + + db_exec($installCon, $arQueries[$i]); + } + elseif( stristr($arQueries[$i], "INSERT INTO UserPrefs") ) + { + $arQueries[$i] = ereg_replace("", $_POST['uiuser'], $arQueries[$i]); + $arQueries[$i] = ereg_replace("", $_POST['uilang'], $arQueries[$i]); + db_exec($installCon, $arQueries[$i]); + } + elseif( stristr($arQueries[$i], "SET IDENTITY_INSERT UserPrefs") ) + db_exec($installCon, $arQueries[$i]); + } +} + +//close database connection +db_close($installCon); + +?> + +
+
+ +Error: The file '../config.php' is not writeable. Please check the permissions

Go back and correct this!
..:: Go back to installation ::..
"; + echo "

"; + exit; +} + + +//open file handle +$hConfigSrc = fopen("../scripts/config.php.ex", "r"); +$hConfigDes = @fopen("../config.php", "w"); + +if ($hConfigDes == FALSE) +{ + $strDbErrMsg = "Database Settings: "; + echo "
Error: The file '../config.php' is not writeable. Please check the permissions

Go back and correct this!
..:: Go back to installation ::..
"; + echo "

"; + exit; + +} + +while (!feof($hConfigSrc)) +{ + $strLine = fgets($hConfigSrc); + //if the current line contains the searchstring, insert values and write line + if(stristr($strLine, "define('_DBSERVER'")) + { + if($_POST['dbport'] != "") + fwrite($hConfigDes, " define('_DBSERVER', '" . $_POST["dbhost"] . ":" . $_POST['dbport'] . "');\r\n"); + else + fwrite($hConfigDes, " define('_DBSERVER', '" . $_POST["dbhost"] . "');\r\n"); + } + elseif(stristr($strLine, "define('_DBNAME'")) + fwrite($hConfigDes, " define('_DBNAME', '" . $_POST["dbname"] . "');\r\n"); + elseif(stristr($strLine, "define('_DBUSERID'")) + fwrite($hConfigDes, " define('_DBUSERID', '" . $_POST["dbuser"] . "');\r\n"); + elseif(stristr($strLine, "define('_DBPWD'")) + fwrite($hConfigDes, " define('_DBPWD', '" . $_POST["dbpass"] . "');\r\n"); + elseif(stristr($strLine, "define('_CON_MODE'")) + fwrite($hConfigDes, " define('_CON_MODE', '" . $dbcon . "');\r\n"); + elseif(stristr($strLine, "define('_DB_APP'")) + fwrite($hConfigDes, " define('_DB_APP', '" . $dbapp . "');\r\n"); + elseif(stristr($strLine, "define('_ENABLEUI'")) + fwrite($hConfigDes, " define('_ENABLEUI', " . $_POST["ui"] . ");\r\n"); + elseif(stristr($strLine, "define('_DEFLANG'")) + fwrite($hConfigDes, " define('_DEFLANG', '" . $_POST["lang"] . "');\r\n"); + elseif(stristr($strLine, "define('_UTCtime'")) + { + if($_POST["dbtime"] == "utc") + $dbTime = 1; + else + $dbTime = 0; + fwrite($hConfigDes, " define('_UTCtime', " . $dbTime . ");\r\n"); + } + else + fwrite($hConfigDes, $strLine); +} + +fclose($hConfigSrc); +fclose($hConfigDes); + +?> + +
+
+ +









.
+

+ + \ No newline at end of file diff --git a/lang/de.php b/lang/de.php index 0860b50..80688ab 100644 --- a/lang/de.php +++ b/lang/de.php @@ -1,222 +1,222 @@ -. See AUTHORS to learn who helped make -it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - -/* -* German language file for phpLogCon -*/ - -define('_MSG001', 'Willkommen bei phpLogCon! Bittle loggen Sie sich zuerst mit Ihrem benutzernamen und Passwort ein'); -define('_MSGUsrnam', 'Benutzername'); -define('_MSGpas', 'Passwort'); -define('_MSGLogSuc', 'Login erfolgreich'); -define('_MSGWel', 'Willkommen bei phpLogCon'); -define('_MSGChoOpt', '! Wählen sie unter den Optionen aus dem obrigen Menü aus'); -define('_MSGQuiInf', 'Kurz-Info (Unter Berücksichtigung der Filtereinstellungen)'); -define('_MSGTop5', 'Top fünf Logs (Unter Berücksichtigung der Filtereinstellungen)'); -define('_MSGNoData', 'Keine Daten gefunden'); -define('_MSGDate', 'Datum'); -define('_MSGFac', 'Facility'); -define('_MSGMsg', 'Nachricht'); -define('_MSGSysLogTag', 'SysLogTag'); -define('_MSGOccuren', 'Vorkommen'); -define('_MSGAccDen', 'Zugang nicht gestattet'); -define('_MSGFalLog', 'Sie sind kein registrierter Benutzer oder Sie haben ein falsches Passwort eingegeben'); -define('_MSGBac2Ind', 'Zurück zum Index'); -define('_MSGSesExp', 'Session abgelaufen'); -define('_MSGSesExpQue', 'Session abgelaufen. Haben Sie vielleicht das letzte mal vergessen sich auszuloggen'); -define('_MSGReLog', 'Zurück zum Index um sich neu neu einzuloggen'); -define('_MSGShwEvn', 'Zeige Events'); -define('_MSGShwSlt', 'Zeige SysLogTags'); -define('_MSGShwSLog', 'Zeige SysLog'); -define('_MSGNoDBCon', 'Verbindung zum Datenbank-Server fehlgeschlagen'); -define('_MSGChDB', 'Auswahl der Datenbank fehlgeschlagen'); -define('_MSGInvQur', 'Ungültige Abfrage'); -define('_MSGNoDBHan', 'Kein gültiger Datenbank-Verbindungs-Handle'); -define('_MSGLogout', 'LogOut'); -define('_MSGSrcExp', 'Nach Ausdruck suchen'); -define('_MSGSrc', 'Suche'); -define('_MSGColExp', 'Ausdruck färben'); -define('_MSGinCol', ' in dieser Farbe: '); -define('_MSGBrw', 'Durchsuchen'); -define('_MSGFilConf', 'Allgemeine Filter Konfiguration'); -define('_MSGSltFil', 'SysLogTag Filter Konfiguration'); -define('_MSGUsrConf', 'Benutzer Konfiguration'); -define('_MSGBscSet', 'Generelle Einstellungen'); -define('_MSGConSet', 'Verbindungs Einstellungen'); -define('_MSGConMod', 'Verbindungsmodus'); -define('_MSGFilCon', 'Filter Bedingungen'); -define('_MSGEvnDat', 'Event Datum'); -define('_MSGOrdBy', 'Sortieren nach'); -define('_MSGTagSort', 'Aufsteigend oder absteigend sortieren'); -define('_MSGRef', 'Aktualisierung'); -define('_MSGInfUI', 'InfoEinheit'); -define('_MSGOth', 'Andere'); -define('_MSGPri', 'Severity'); -define('_MSGFilSet', 'Filter Einstellungen'); -define('_MSGUsrSet', 'Benutzer Einstellungen'); -define('_MSGFilOpt', 'Quick Filter Optionen'); -define('_MSGSwiEvnMan', 'Event Datum manuell auswählen'); -define('_MSGSwiEvnPre', 'Event Datum vordefiniert auswählen'); -define('_MSGShwEvnDet', 'Zeige Event Details'); -define('_MSGBck', 'zurück'); -define('_MSGEvnID', 'EventID'); -define('_MSGClickBrw', ' (Klick um die MonitorWare Datenbank zu durchsuchen) :: (Oder durchsuche '); -define('_MSGEvnCat', 'EventKategorie'); -define('_MSGEvnUsr', 'EventBenutzer'); -define('_MSGFrmHos', 'VonHost'); -define('_MSGNTSev', 'NTSeverity'); -define('_MSGRecAt', 'EmpfangenAm'); -define('_MSGDevRep', 'VomGerätGemeldeteZeit'); -define('_MSGImp', 'Wichtigkeit'); -define('_MSGEvn', 'Event'); -define('_MSGTo', 'bis'); -define('_MSGFrm', 'von'); -define('_MSGLogPg', 'Logs pro Seite'); -define('_MSGHom', 'Startseite'); -define('_MSGHlp', 'Hilfe'); -define('_MSGFOpt', 'Filter Optionen'); -define('_MSGUOpt', 'Benutzer Optionen'); -define('_MSGEvnLogTyp', 'EventLogArt'); -define('_MSGEvnSrc', 'EventQuelle'); -define('_MSG2dy', 'heute'); -define('_MSGYester', 'nur gestern'); -define('_MSGThsH', 'aktuelle Stunde'); -define('_MSGLstH', 'letzte Stunde'); -define('_MSGL2stH', 'letzten 2 Stunden'); -define('_MSGL5stH', 'letzten 5 Stunden'); -define('_MSGL12stH', 'letzten 12 Stunden'); -define('_MSGL2d', 'letzten 2 Tage'); -define('_MSGL3d', 'letzten 3 Tage'); -define('_MSGLw', 'letzte Woche'); -define('_MSGFacDat', 'Facility und Datum'); -define('_MSGPriDat', 'Severity und Datum'); -define('_MSGNoRef', 'nicht aktualisieren'); -define('_MSGE10s', 'alle 10 sek'); -define('_MSGE30s', 'alle 30 sek'); -define('_MSGEm', 'jede min'); -define('_MSGE2m', 'alle 2 min'); -define('_MSGE15m', 'alle 15 min'); -define('_MSGEn', 'Englisch'); -define('_MSGDe', 'Deutsch'); -define('_MSGFav', 'Favoriten (Zum Aufrufen, auswählen):'); -define('_MSGDel', 'Löschen'); -define('_MSGNoFav', 'Keine Favoriten gefunden'); -define('_MSGNewFav', 'Neuer Favorit'); -define('_MSGSiten', 'Seitenname'); -define('_MSGAdd', 'Hinzufügen'); -define('_MSGChg', 'Ändern'); -define('_MSGEnv', 'Umgebung'); -define('_MSGUsrInt', 'Benutzer Maske'); -define('_MSGUEna', 'Aktiviert'); -define('_MSGUDsa', 'Deaktiviert'); -define('_MSGNamInvChr', 'Name und/oder Passwort enthielten ungültige Zeichen'); -define('_MSGSitInvChr', 'Seitenname und/oder Adresse enthielten ungültige Zeichen'); -define('_MSGESec', 'jede Sekunde'); -define('_MSGE5Sec', 'alle 5 Sek'); -define('_MSGE20Sec', 'alle 20 Sek'); -define('_MSGRed', 'Rot'); -define('_MSGBlue', 'Blau'); -define('_MSGGreen', 'Grün'); -define('_MSGYel', 'Gelb'); -define('_MSGOra', 'Orange'); -define('_MSGFilHost', 'Suchen nach IP/Computer'); -define('_MSGSearchMsg', 'Nachricht muss folgendes enthalten'); -define('_MSGDisIU', 'Zeige Info Einheiten'); -define('_MSGAscend', 'Aufsteigend'); -define('_MSGDescend', 'Absteigend'); -define('_MSGEnbQF', 'Quick-Filter auswählen'); -define('_MSGSty', 'Aussehen'); -define('_MSGHost', 'Computer'); -define('_MSGPRI0', 'EMERGENCY'); -define('_MSGPRI1', 'ALERT'); -define('_MSGPRI2', 'CRITICAL'); -define('_MSGPRI3', 'ERROR'); -define('_MSGPRI4', 'WARNING'); -define('_MSGPRI5', 'NOTICE'); -define('_MSGPRI6', 'INFO'); -define('_MSGPRI7', 'DEBUG'); -define('_MSGNumSLE', 'Anzahl der Syslog Events'); -define('_MSGNumERE', 'Anzahl der EventReporter Events'); -define('_MSGNoMsg', '[Keine Nachricht vorhanden]'); -define('_MSGMenInf1', '- Sie befinden sich zur Zeit im '); -define('_MSGMenInf2', ' Modus auf '); -define('_MSGMenInf3', '. Datenbank: '); -define('_MSGLang', 'Sprache:'); -define('_MSGStyle', 'Stylesheet:'); -define('_MSGAddInfo', 'Zusätzliche Informationen:'); -define('_MSGDebug1', 'Debug:'); -define('_MSGDebug2', 'Zeige Debug Ausgaben'); -define('_MSGSave', 'Speicher/- Ladeoptionen:'); -define('_MSGFilSave1', 'Filter Einstellungen:'); -define('_MSGFilSave2', 'Filter Einstellungen in Datenbank speichern und beim Einloggen auslesen'); -define('_MSGDBOpt', 'Datenbankoptionen:'); -define('_MSGUTC1', 'UTC-Zeit:'); -define('_MSGUTC2', 'Wenn Ihr Datenbank-Server keine UTC-Zeit verwendet, entfernen Sie das Häckchen!'); -define('_MSGSavCook', 'Login behalten (Cookie)?'); -define('_MSGAnd', 'und'); -define('_MSGApply', 'Filter anwenden'); -define('_MSGShow', 'Show'); -define('_MSGMethSlt', 'SysLogTags'); -define('_MSGMethHost', 'SysLogTags auf Hosts beziehend'); -define('_MSGInstDir', 'System Meldung: Sie haben den \'install/\' Ordner nicht gelöscht!! Dies verursacht ein hohes sicherheitsrisiko!!'); - -define('_InsWelc1', 'Willkommen zur Installation von phpLogCon, dem Logging-WebInterface.'); -define('_InsWelc2', 'Die folgenden Schritte werden Sie durch die Installation begleiten und Ihnen bei der korrekten Installation und Konfiguration von phpLogCon helfen.'); -define('_InsWelc3', 'Anmerkung: Felder mit einem '); -define('_InsWelc4', 'ROTEN *'); -define('_InsWelc5', ' müssen in jdem Fall ausgefüllt werden!'); -define('_InsDbIns1', 'Zuerst müssen wir Ihre Datenbank-Struktur überprüfen, da phpLogCon einige Tabellen benötigt. Wenn die Tabellen nicht existieren, wird phpLogCon sie anlegen.'); -define('_InsDbIns2', 'Hierfür benötigt die phpLogCon Installation ein paar Informationen zu Ihrem Datenbank-Server:'); -define('_InsDbIns3', 'Datenbank Einstellungen'); -define('_InsDbInsCon', 'Verbindungstyp'); -define('_InsDbInsConNa', 'Native'); -define('_InsDbInsApp', 'Datenbank-Applikation'); -define('_InsDbInsPort', 'Bei Standard, leer lassen'); -define('_InsDbInsUsr', 'Benutzer (Benutzer muss \'INSERT\' und \'CREATE\' Rechte haben!)'); -define('_InsPass', 'Passwort'); -define('_InsPassRe', 'Password wiederholen'); -define('_InsDbInsName', 'Datenbank/DSN Name'); -define('_InsDbInsTime', 'Datenbank Zeitformat'); -define('_InsPlcIns1', 'Nun müssen wir ein paar Einstellungen vornehmen, sauber und optimiert läuft.'); -define('_InsPlcIns2', 'Anmerkung: Wenn Sie gewählt haben, dass das User Interface nicht installiert werden soll, können Sie es durch SQL-Scripte nachträglich installieren! Für Hilfe schauen Sie ins Manual.'); -define('_InsPlcIns3', 'phpLogCon Allgemeine Einstellungen'); -define('_InsPlcInsLang', 'Standard Sprache'); -define('_InsLangEn', 'Englisch'); -define('_InsLangDe', 'Deutsch'); -define('_InsPlcInsUi', 'User Interface installieren'); -define('_InsPlcInsUiCrUsr', 'Einen Benutzer anlegen'); -define('_InsPlcIns4', 'Hier können Sie einen Benutzer für das User Interface anlegen. Wenn Sie bereits Benutzer in Ihrer Datenbank haben oder das User Interface nicht installieren möchten, lassen Sie diese Felder leer!'); -define('_InsPlcInsUiName', 'Benutzername'); -define('_InsPlcInsUiDisName', 'Anzeigename'); -define('_InsPlcInsUiLang', 'Gewünschte Sprache'); -define('_InsPer1', 'Überprüfe Benutzer Eingaben...'); -define('_InsPerDone', 'Erledigt!'); -define('_InsPer2', 'Erstelle benötigte Tabellen...'); -define('_InsPer3', 'Füge Daten in die Tabellen ein...'); -define('_InsPer4', 'Erstelle Ihre Konfigurationsdatei (config.php)...'); -define('_InsPer5', 'Alle Aufgaben wurden erfolgreich abgeschlossen!'); -define('_InsPer6', 'Herzlichen Glückwunsch! Sie haben erfolgreich phpLogCon installiert!'); -define('_InsPer7', 'Eine Dtei namens \'config.php\' liegt im Hauptverzeichnis von phpLogCon. In dieser Datei sind alle Informationen, die sie zuvor eingegeben haben, gespeichert! Sie können diese Datei jederzeit Ihren Bedürfnissen anpassen.'); -define('_InsPer8', 'Wechseln Sie zu \'index.php\' im root Verzeichnis um die Arbeit mit phpLogCon zu starten!'); -define('_InsPer9', 'Vergessen Sie nicht den kompletten Ordner \'install/\' zu löschen!'); -define('_InsPer10', 'Diese Datein können für einen DoS auf Ihr phpLogCon genutzt werden!'); -define('_InsPer11', 'Nach Löschen des Ordners können Sie zum '); -define('_InsPer12', 'Index wecheln!'); +. See AUTHORS to learn who helped make +it become a reality. + +*/#### #### #### #### #### #### #### #### #### #### + +/* +* German language file for phpLogCon +*/ + +define('_MSG001', 'Willkommen bei phpLogCon! Bittle loggen Sie sich zuerst mit Ihrem benutzernamen und Passwort ein'); +define('_MSGUsrnam', 'Benutzername'); +define('_MSGpas', 'Passwort'); +define('_MSGLogSuc', 'Login erfolgreich'); +define('_MSGWel', 'Willkommen bei phpLogCon'); +define('_MSGChoOpt', '! Wählen sie unter den Optionen aus dem obrigen Menü aus'); +define('_MSGQuiInf', 'Kurz-Info (Unter Berücksichtigung der Filtereinstellungen)'); +define('_MSGTop5', 'Top fünf Logs (Unter Berücksichtigung der Filtereinstellungen)'); +define('_MSGNoData', 'Keine Daten gefunden'); +define('_MSGDate', 'Datum'); +define('_MSGFac', 'Facility'); +define('_MSGMsg', 'Nachricht'); +define('_MSGSysLogTag', 'SysLogTag'); +define('_MSGOccuren', 'Vorkommen'); +define('_MSGAccDen', 'Zugang nicht gestattet'); +define('_MSGFalLog', 'Sie sind kein registrierter Benutzer oder Sie haben ein falsches Passwort eingegeben'); +define('_MSGBac2Ind', 'Zurück zum Index'); +define('_MSGSesExp', 'Session abgelaufen'); +define('_MSGSesExpQue', 'Session abgelaufen. Haben Sie vielleicht das letzte mal vergessen sich auszuloggen'); +define('_MSGReLog', 'Zurück zum Index um sich neu neu einzuloggen'); +define('_MSGShwEvn', 'Zeige Events'); +define('_MSGShwSlt', 'Zeige SysLogTags'); +define('_MSGShwSLog', 'Zeige SysLog'); +define('_MSGNoDBCon', 'Verbindung zum Datenbank-Server fehlgeschlagen'); +define('_MSGChDB', 'Auswahl der Datenbank fehlgeschlagen'); +define('_MSGInvQur', 'Ungültige Abfrage'); +define('_MSGNoDBHan', 'Kein gültiger Datenbank-Verbindungs-Handle'); +define('_MSGLogout', 'LogOut'); +define('_MSGSrcExp', 'Nach Ausdruck suchen'); +define('_MSGSrc', 'Suche'); +define('_MSGColExp', 'Ausdruck färben'); +define('_MSGinCol', ' in dieser Farbe: '); +define('_MSGBrw', 'Durchsuchen'); +define('_MSGFilConf', 'Allgemeine Filter Konfiguration'); +define('_MSGSltFil', 'SysLogTag Filter Konfiguration'); +define('_MSGUsrConf', 'Benutzer Konfiguration'); +define('_MSGBscSet', 'Generelle Einstellungen'); +define('_MSGConSet', 'Verbindungs Einstellungen'); +define('_MSGConMod', 'Verbindungsmodus'); +define('_MSGFilCon', 'Filter Bedingungen'); +define('_MSGEvnDat', 'Event Datum'); +define('_MSGOrdBy', 'Sortieren nach'); +define('_MSGTagSort', 'Aufsteigend oder absteigend sortieren'); +define('_MSGRef', 'Aktualisierung'); +define('_MSGInfUI', 'InfoEinheit'); +define('_MSGOth', 'Andere'); +define('_MSGPri', 'Severity'); +define('_MSGFilSet', 'Filter Einstellungen'); +define('_MSGUsrSet', 'Benutzer Einstellungen'); +define('_MSGFilOpt', 'Quick Filter Optionen'); +define('_MSGSwiEvnMan', 'Event Datum manuell auswählen'); +define('_MSGSwiEvnPre', 'Event Datum vordefiniert auswählen'); +define('_MSGShwEvnDet', 'Zeige Event Details'); +define('_MSGBck', 'zurück'); +define('_MSGEvnID', 'EventID'); +define('_MSGClickBrw', ' (Klick um die MonitorWare Datenbank zu durchsuchen) :: (Oder durchsuche '); +define('_MSGEvnCat', 'EventKategorie'); +define('_MSGEvnUsr', 'EventBenutzer'); +define('_MSGFrmHos', 'VonHost'); +define('_MSGNTSev', 'NTSeverity'); +define('_MSGRecAt', 'EmpfangenAm'); +define('_MSGDevRep', 'VomGerätGemeldeteZeit'); +define('_MSGImp', 'Wichtigkeit'); +define('_MSGEvn', 'Event'); +define('_MSGTo', 'bis'); +define('_MSGFrm', 'von'); +define('_MSGLogPg', 'Logs pro Seite'); +define('_MSGHom', 'Startseite'); +define('_MSGHlp', 'Hilfe'); +define('_MSGFOpt', 'Filter Optionen'); +define('_MSGUOpt', 'Benutzer Optionen'); +define('_MSGEvnLogTyp', 'EventLogArt'); +define('_MSGEvnSrc', 'EventQuelle'); +define('_MSG2dy', 'heute'); +define('_MSGYester', 'nur gestern'); +define('_MSGThsH', 'aktuelle Stunde'); +define('_MSGLstH', 'letzte Stunde'); +define('_MSGL2stH', 'letzten 2 Stunden'); +define('_MSGL5stH', 'letzten 5 Stunden'); +define('_MSGL12stH', 'letzten 12 Stunden'); +define('_MSGL2d', 'letzten 2 Tage'); +define('_MSGL3d', 'letzten 3 Tage'); +define('_MSGLw', 'letzte Woche'); +define('_MSGFacDat', 'Facility und Datum'); +define('_MSGPriDat', 'Severity und Datum'); +define('_MSGNoRef', 'nicht aktualisieren'); +define('_MSGE10s', 'alle 10 sek'); +define('_MSGE30s', 'alle 30 sek'); +define('_MSGEm', 'jede min'); +define('_MSGE2m', 'alle 2 min'); +define('_MSGE15m', 'alle 15 min'); +define('_MSGEn', 'Englisch'); +define('_MSGDe', 'Deutsch'); +define('_MSGFav', 'Favoriten (Zum Aufrufen, auswählen):'); +define('_MSGDel', 'Löschen'); +define('_MSGNoFav', 'Keine Favoriten gefunden'); +define('_MSGNewFav', 'Neuer Favorit'); +define('_MSGSiten', 'Seitenname'); +define('_MSGAdd', 'Hinzufügen'); +define('_MSGChg', 'Ändern'); +define('_MSGEnv', 'Umgebung'); +define('_MSGUsrInt', 'Benutzer Maske'); +define('_MSGUEna', 'Aktiviert'); +define('_MSGUDsa', 'Deaktiviert'); +define('_MSGNamInvChr', 'Name und/oder Passwort enthielten ungültige Zeichen'); +define('_MSGSitInvChr', 'Seitenname und/oder Adresse enthielten ungültige Zeichen'); +define('_MSGESec', 'jede Sekunde'); +define('_MSGE5Sec', 'alle 5 Sek'); +define('_MSGE20Sec', 'alle 20 Sek'); +define('_MSGRed', 'Rot'); +define('_MSGBlue', 'Blau'); +define('_MSGGreen', 'Grün'); +define('_MSGYel', 'Gelb'); +define('_MSGOra', 'Orange'); +define('_MSGFilHost', 'Suchen nach IP/Computer'); +define('_MSGSearchMsg', 'Nachricht muss folgendes enthalten'); +define('_MSGDisIU', 'Zeige Info Einheiten'); +define('_MSGAscend', 'Aufsteigend'); +define('_MSGDescend', 'Absteigend'); +define('_MSGEnbQF', 'Quick-Filter auswählen'); +define('_MSGSty', 'Aussehen'); +define('_MSGHost', 'Computer'); +define('_MSGPRI0', 'EMERGENCY'); +define('_MSGPRI1', 'ALERT'); +define('_MSGPRI2', 'CRITICAL'); +define('_MSGPRI3', 'ERROR'); +define('_MSGPRI4', 'WARNING'); +define('_MSGPRI5', 'NOTICE'); +define('_MSGPRI6', 'INFO'); +define('_MSGPRI7', 'DEBUG'); +define('_MSGNumSLE', 'Anzahl der Syslog Events'); +define('_MSGNumERE', 'Anzahl der EventReporter Events'); +define('_MSGNoMsg', '[Keine Nachricht vorhanden]'); +define('_MSGMenInf1', '- Sie befinden sich zur Zeit im '); +define('_MSGMenInf2', ' Modus auf '); +define('_MSGMenInf3', '. Datenbank: '); +define('_MSGLang', 'Sprache:'); +define('_MSGStyle', 'Stylesheet:'); +define('_MSGAddInfo', 'Zusätzliche Informationen:'); +define('_MSGDebug1', 'Debug:'); +define('_MSGDebug2', 'Zeige Debug Ausgaben'); +define('_MSGSave', 'Speicher/- Ladeoptionen:'); +define('_MSGFilSave1', 'Filter Einstellungen:'); +define('_MSGFilSave2', 'Filter Einstellungen in Datenbank speichern und beim Einloggen auslesen'); +define('_MSGDBOpt', 'Datenbankoptionen:'); +define('_MSGUTC1', 'UTC-Zeit:'); +define('_MSGUTC2', 'Wenn Ihr Datenbank-Server keine UTC-Zeit verwendet, entfernen Sie das Häckchen!'); +define('_MSGSavCook', 'Login behalten (Cookie)?'); +define('_MSGAnd', 'und'); +define('_MSGApply', 'Filter anwenden'); +define('_MSGShow', 'Show'); +define('_MSGMethSlt', 'SysLogTags'); +define('_MSGMethHost', 'SysLogTags auf Hosts beziehend'); +define('_MSGInstDir', 'Das \'install\' Verzeichnis existiert noch! Wenn Sie phplogcon schon komnfiguriert haben, löschen oder benennen Sie dieses Verzeichnis um. Dies verursacht sonst ein hohes sicherheitsrisiko! Anderfalls klicken Sie HIER um die Installation von PHPLogCon zu starten.'); + +define('_InsWelc1', 'Willkommen zur Installation von phpLogCon, dem Logging-WebInterface.'); +define('_InsWelc2', 'Die folgenden Schritte werden Sie durch die Installation begleiten und Ihnen bei der korrekten Installation und Konfiguration von phpLogCon helfen.'); +define('_InsWelc3', 'Anmerkung: Felder mit einem '); +define('_InsWelc4', 'ROTEN *'); +define('_InsWelc5', ' müssen in jdem Fall ausgefüllt werden!'); +define('_InsDbIns1', 'Zuerst müssen wir Ihre Datenbank-Struktur überprüfen, da phpLogCon einige Tabellen benötigt. Wenn die Tabellen nicht existieren, wird phpLogCon sie anlegen.'); +define('_InsDbIns2', 'Hierfür benötigt die phpLogCon Installation ein paar Informationen zu Ihrem Datenbank-Server:'); +define('_InsDbIns3', 'Datenbank Einstellungen'); +define('_InsDbInsCon', 'Verbindungstyp'); +define('_InsDbInsConNa', 'Native'); +define('_InsDbInsApp', 'Datenbank-Applikation'); +define('_InsDbInsPort', 'Bei Standard, leer lassen'); +define('_InsDbInsUsr', 'Benutzer (Benutzer muss \'INSERT\' und \'CREATE\' Rechte haben!)'); +define('_InsPass', 'Passwort'); +define('_InsPassRe', 'Password wiederholen'); +define('_InsDbInsName', 'Datenbank/DSN Name'); +define('_InsDbInsTime', 'Datenbank Zeitformat'); +define('_InsPlcIns1', 'Nun müssen wir ein paar Einstellungen vornehmen, sauber und optimiert läuft.'); +define('_InsPlcIns2', 'Anmerkung: Wenn Sie gewählt haben, dass das User Interface nicht installiert werden soll, können Sie es durch SQL-Scripte nachträglich installieren! Für Hilfe schauen Sie ins Manual.'); +define('_InsPlcIns3', 'phpLogCon Allgemeine Einstellungen'); +define('_InsPlcInsLang', 'Standard Sprache'); +define('_InsLangEn', 'Englisch'); +define('_InsLangDe', 'Deutsch'); +define('_InsPlcInsUi', 'User Interface installieren'); +define('_InsPlcInsUiCrUsr', 'Einen Benutzer anlegen'); +define('_InsPlcIns4', 'Hier können Sie einen Benutzer für das User Interface anlegen. Wenn Sie bereits Benutzer in Ihrer Datenbank haben oder das User Interface nicht installieren möchten, lassen Sie diese Felder leer!'); +define('_InsPlcInsUiName', 'Benutzername'); +define('_InsPlcInsUiDisName', 'Anzeigename'); +define('_InsPlcInsUiLang', 'Gewünschte Sprache'); +define('_InsPer1', 'Überprüfe Benutzer Eingaben...'); +define('_InsPerDone', 'Erledigt!'); +define('_InsPer2', 'Erstelle benötigte Tabellen...'); +define('_InsPer3', 'Füge Daten in die Tabellen ein...'); +define('_InsPer4', 'Erstelle Ihre Konfigurationsdatei (config.php)...'); +define('_InsPer5', 'Alle Aufgaben wurden erfolgreich abgeschlossen!'); +define('_InsPer6', 'Herzlichen Glückwunsch! Sie haben erfolgreich phpLogCon installiert!'); +define('_InsPer7', 'Eine Dtei namens \'config.php\' liegt im Hauptverzeichnis von phpLogCon. In dieser Datei sind alle Informationen, die sie zuvor eingegeben haben, gespeichert! Sie können diese Datei jederzeit Ihren Bedürfnissen anpassen.'); +define('_InsPer8', 'Wechseln Sie zu \'index.php\' im root Verzeichnis um die Arbeit mit phpLogCon zu starten!'); +define('_InsPer9', 'Vergessen Sie nicht den kompletten Ordner \'install/\' zu löschen!'); +define('_InsPer10', 'Diese Datein können für einen DoS auf Ihr phpLogCon genutzt werden!'); +define('_InsPer11', 'Nach Löschen des Ordners können Sie zum '); +define('_InsPer12', 'Index wecheln!'); diff --git a/lang/en.php b/lang/en.php index a3ab0f1..4969a84 100644 --- a/lang/en.php +++ b/lang/en.php @@ -1,222 +1,222 @@ -. See AUTHORS to learn who helped make -it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - -/* -* English language file for phpLogCon -*/ - -define('_MSG001', 'Welcome to phpLogCon! Please login with your username and password first'); -define('_MSGUsrnam', 'Username'); -define('_MSGpas', 'Password'); -define('_MSGLogSuc', 'Login successfully'); -define('_MSGWel', 'Welcome to phpLogCon'); -define('_MSGChoOpt', '! Choose an option from the menu above'); -define('_MSGQuiInf', 'Quick info (under respect of filter settings)'); -define('_MSGTop5', 'Top five logs (under respect of filter settings)'); -define('_MSGNoData', 'No data found'); -define('_MSGDate', 'Date'); -define('_MSGFac', 'Facility'); -define('_MSGPri', 'Severity'); -define('_MSGInfUI', 'InfoUnit'); -define('_MSGMsg', 'Message'); -define('_MSGSysLogTag', 'SysLogTag'); -define('_MSGOccuren', 'Occurences'); -define('_MSGAccDen', 'Access denied'); -define('_MSGFalLog', 'You are not a subscribed user or Invalid Password'); -define('_MSGBac2Ind', 'Back to Index'); -define('_MSGSesExp', 'Session Expired'); -define('_MSGSesExpQue', 'Session Expired. Maybe you forgot to log out'); -define('_MSGReLog', 'Back to Index to re-login'); -define('_MSGShwEvn', 'Show Events'); -define('_MSGShwSlt', 'Show SysLogTags'); -define('_MSGShwSLog', 'Show SysLog'); -define('_MSGNoDBCon', 'Cannot connect to database-server'); -define('_MSGChDB', 'Failed to changing database'); -define('_MSGInvQur', 'Invalid query'); -define('_MSGNoDBHan', 'No valid Database-Connection-Handle'); -define('_MSGLogout', 'Logout'); -define('_MSGSrcExp', 'Search for Expression'); -define('_MSGSrc', 'Search'); -define('_MSGinCol', ' in this color: '); -define('_MSGBrw', 'Browse'); -define('_MSGBscSet', 'Basic Settings'); -define('_MSGConSet', 'Connection Settings'); -define('_MSGConMod', 'Connection Mode'); -define('_MSGFilCon', 'Overall Filter conditions'); -define('_MSGSltFil', 'SysLogTag Filter conditions'); -define('_MSGEvnDat', 'Event´s Date'); -define('_MSGOrdBy', 'Order by'); -define('_MSGTagSort', 'Order Ascending or Descending'); -define('_MSGRef', 'Refresh'); -define('_MSGOth', 'Other'); -define('_MSGFilSet', 'Filter Settings'); -define('_MSGUsrSet', 'User Settings'); -define('_MSGFilOpt', 'Quick Filter Options'); -define('_MSGSwiEvnMan', 'Select events date manually'); -define('_MSGSwiEvnPre', 'Select events date predefined'); -define('_MSGShwEvnDet', 'Show Events Details'); -define('_MSGBck', 'back'); -define('_MSGEvnID', 'EventID'); -define('_MSGClickBrw', ' (Click for browsing MonitorWare database) :: (Or browse '); -define('_MSG2dy', 'today'); -define('_MSGYester', 'only yesterday'); -define('_MSGThsH', 'this hour'); -define('_MSGLstH', 'last 1 hour'); -define('_MSGL2stH', 'last 2 hours'); -define('_MSGL5stH', 'last 5 hours'); -define('_MSGL12stH', 'last 12 hours'); -define('_MSGL2d', 'last 2 days'); -define('_MSGL3d', 'last 3 days'); -define('_MSGLw', 'last week'); -define('_MSGFacDat', 'Facility and Date'); -define('_MSGPriDat', 'Severity and Date'); -define('_MSGNoRef', 'no refresh'); -define('_MSGE10s', 'every 10 sec'); -define('_MSGE30s', 'every 30 sec'); -define('_MSGEm', 'every min'); -define('_MSGE2m', 'every 2 min'); -define('_MSGE15m', 'every 15 min'); -define('_MSGEn', 'English'); -define('_MSGDe', 'German'); -define('_MSGFav', 'Favorites (Select to visit):'); -define('_MSGDel', 'Delete'); -define('_MSGNoFav', 'No favorites found'); -define('_MSGNewFav', 'New favorite'); -define('_MSGSiten', 'Sitename'); -define('_MSGAdd', 'Add'); -define('_MSGChg', 'Change'); -define('_MSGEnv', 'Environment'); -define('_MSGUsrInt', 'User Interface'); -define('_MSGUEna', 'Enabled'); -define('_MSGUDsa', '"Disabled'); -define('_MSGNamInvChr', 'Name and/or password contained invalid characters'); -define('_MSGSitInvChr', 'Sitename and/or address contained invalid characters'); -define('_MSGESec', 'every second'); -define('_MSGE5Sec', 'every 5 sec'); -define('_MSGE20Sec', 'every 20 sec'); -define('_MSGRed', 'Red'); -define('_MSGBlue', 'Blue'); -define('_MSGGreen', 'Green'); -define('_MSGYel', 'Yellow'); -define('_MSGOra', 'Orange'); -define('_MSGSty', 'Style'); -define('_MSGEnbQF', 'Choose Quick Filters:'); -define('_MSGDisIU', 'Display Info Unit'); -define('_MSGAscend', 'Ascending'); -define('_MSGDescend', 'Descending'); -define('_MSGColExp', 'Color an Expression'); -define('_MSGFilConf', 'Filter Configuration'); -define('_MSGUsrConf', 'User Configuration'); -define('_MSGHost', 'Host'); -define('_MSGEvnCat', 'EventCategory'); -define('_MSGEvnUsr', 'EventUser'); -define('_MSGFrmHos', 'FromHost'); -define('_MSGNTSev', 'NTSeverity'); -define('_MSGRecAt', 'ReceivedAt'); -define('_MSGDevRep', 'DeviceReportedTime'); -define('_MSGImp', 'Importance'); -define('_MSGEvn', 'Event'); -define('_MSGTo', 'to'); -define('_MSGFrm', 'from'); -define('_MSGLogPg', 'Logs per page'); -define('_MSGHom', 'Home'); -define('_MSGHlp', 'Help'); -define('_MSGFOpt', 'Filter Options'); -define('_MSGUOpt', 'User Options'); -define('_MSGEvnLogTyp', 'EventLogType'); -define('_MSGEvnSrc', 'EventSource'); -define('_MSGFilHost', 'Search only for IP/Host'); -define('_MSGSearchMsg', 'Message must contain'); -define('_MSGPRI0', 'EMERGENCY'); -define('_MSGPRI1', 'ALERT'); -define('_MSGPRI2', 'CRITICAL'); -define('_MSGPRI3', 'ERROR'); -define('_MSGPRI4', 'WARNING'); -define('_MSGPRI5', 'NOTICE'); -define('_MSGPRI6', 'INFO'); -define('_MSGPRI7', 'DEBUG'); -define('_MSGNumSLE', 'Number of Syslog Events'); -define('_MSGNumERE', 'Number of EventReporter Events'); -define('_MSGNoMsg', '[No message available]'); -define('_MSGMenInf1', '- You are currenty in '); -define('_MSGMenInf2', ' mode on '); -define('_MSGMenInf3', '. Database: '); -define('_MSGLang', 'Language:'); -define('_MSGStyle', 'Stylesheet:'); -define('_MSGAddInfo', 'Additional Informations:'); -define('_MSGDebug1', 'Debug:'); -define('_MSGDebug2', 'Show Debug Output'); -define('_MSGSave', 'Save/- Loadoptions:'); -define('_MSGFilSave1', 'Filter Settings:'); -define('_MSGFilSave2', 'Save filter settings in database and load them while logging in'); -define('_MSGDBOpt', 'Databaseoptions:'); -define('_MSGUTC1', 'UTC Time:'); -define('_MSGUTC2', 'When your database-server doesn\'t use UTC time, uncheck this!'); -define('_MSGSavCook', 'Keep you logged in (Cookie)?'); -define('_MSGAnd', 'and'); -define('_MSGApply', 'Apply Filters'); -define('_MSGDisSlt', 'Display'); -define('_MSGMethSlt', 'SysLogTags'); -define('_MSGMethHost', 'SysLogTags corresponding to hosts'); -define('_MSGInstDir', 'System Note: You haven\'t deleted the \'install/\' directory!! This causes a high security risk!!'); - -define('_InsWelc1', 'Welcome to the installation of phpLogCon, the WebInterface to log data.'); -define('_InsWelc2', 'The following steps will guide you through the installation and help you to install and configure phpLogCon correctly.'); -define('_InsWelc3', 'Note: Fields marked with a '); -define('_InsWelc4', 'RED *'); -define('_InsWelc5', ' MUST be filled out in very case!'); -define('_InsDbIns1', 'First we have to check your database structure, because phpLogCon needs some tables. If the tables don\'t exist, they will be created.'); -define('_InsDbIns2', 'For this, phpLogCon Installation needs some information about your database Server:'); -define('_InsDbIns3', 'Database Settings'); -define('_InsDbInsCon', 'Connection Type'); -define('_InsDbInsConNa', 'Native'); -define('_InsDbInsApp', 'Database application'); -define('_InsDbInsPort', 'If standard, leave blank'); -define('_InsDbInsUsr', 'User (User must have \'INSERT\' and \'CREATE\' rights!)'); -define('_InsPass', 'Password'); -define('_InsPassRe', 'Re-type password'); -define('_InsDbInsName', 'Database/DSN name'); -define('_InsDbInsTime', 'Database time format'); -define('_InsPlcIns1', 'Now we have to do some settings for phpLogCon to run clearly and user optimized.'); -define('_InsPlcIns2', 'Note: If you now select the UserInterface not to be installed, you can install it through a SQL-script file! See the manual for help.'); -define('_InsPlcIns3', 'phpLogCon General Settings'); -define('_InsPlcInsLang', 'Default language'); -define('_InsLangEn', 'English'); -define('_InsLangDe', 'German'); -define('_InsPlcInsUi', 'Install User Interface'); -define('_InsPlcInsUiCrUsr', 'Create a User'); -define('_InsPlcIns4', 'Here you can create a user for the User Interface. If you already have some users in your database or you have unselected the UserInterface, you can leave these fields!'); -define('_InsPlcInsUiName', 'Username'); -define('_InsPlcInsUiDisName', 'Display name'); -define('_InsPlcInsUiLang', 'Desired language'); -define('_InsPer1', 'Checking users input...'); -define('_InsPerDone', 'Done!'); -define('_InsPer2', 'Creating required tables...'); -define('_InsPer3', 'Inserting values into tables...'); -define('_InsPer4', 'Creating your config file (config.php)...'); -define('_InsPer5', 'All processes have been done clearly!'); -define('_InsPer6', 'Congratulations! You\'ve successfully installed phpLogCon!'); -define('_InsPer7', 'A file named \'config.php\' is stored in the root directory of phpLogCon. In this file there are the whole information you have entered before! You can edit it to your needs if you want to.'); -define('_InsPer8', 'Move to \'index.php\' in root directory to start working with phpLogCon!'); -define('_InsPer9', 'Don\'t forget to delete whole \'install/\' directory!'); -define('_InsPer10', 'These files could be user for a DoS on your phpLogCon!'); -define('_InsPer11', 'After deleting the directory, you can go to '); -define('_InsPer12', 'index'); +. See AUTHORS to learn who helped make +it become a reality. + +*/#### #### #### #### #### #### #### #### #### #### + +/* +* English language file for phpLogCon +*/ + +define('_MSG001', 'Welcome to phpLogCon! Please login with your username and password first'); +define('_MSGUsrnam', 'Username'); +define('_MSGpas', 'Password'); +define('_MSGLogSuc', 'Login successfully'); +define('_MSGWel', 'Welcome to phpLogCon'); +define('_MSGChoOpt', '! Choose an option from the menu above'); +define('_MSGQuiInf', 'Quick info (under respect of filter settings)'); +define('_MSGTop5', 'Top five logs (under respect of filter settings)'); +define('_MSGNoData', 'No data found'); +define('_MSGDate', 'Date'); +define('_MSGFac', 'Facility'); +define('_MSGPri', 'Severity'); +define('_MSGInfUI', 'InfoUnit'); +define('_MSGMsg', 'Message'); +define('_MSGSysLogTag', 'SysLogTag'); +define('_MSGOccuren', 'Occurences'); +define('_MSGAccDen', 'Access denied'); +define('_MSGFalLog', 'You are not a subscribed user or Invalid Password'); +define('_MSGBac2Ind', 'Back to Index'); +define('_MSGSesExp', 'Session Expired'); +define('_MSGSesExpQue', 'Session Expired. Maybe you forgot to log out'); +define('_MSGReLog', 'Back to Index to re-login'); +define('_MSGShwEvn', 'Show Events'); +define('_MSGShwSlt', 'Show SysLogTags'); +define('_MSGShwSLog', 'Show SysLog'); +define('_MSGNoDBCon', 'Cannot connect to database-server'); +define('_MSGChDB', 'Failed to changing database'); +define('_MSGInvQur', 'Invalid query'); +define('_MSGNoDBHan', 'No valid Database-Connection-Handle'); +define('_MSGLogout', 'Logout'); +define('_MSGSrcExp', 'Search for Expression'); +define('_MSGSrc', 'Search'); +define('_MSGinCol', ' in this color: '); +define('_MSGBrw', 'Browse'); +define('_MSGBscSet', 'Basic Settings'); +define('_MSGConSet', 'Connection Settings'); +define('_MSGConMod', 'Connection Mode'); +define('_MSGFilCon', 'Overall Filter conditions'); +define('_MSGSltFil', 'SysLogTag Filter conditions'); +define('_MSGEvnDat', 'Event´s Date'); +define('_MSGOrdBy', 'Order by'); +define('_MSGTagSort', 'Order Ascending or Descending'); +define('_MSGRef', 'Refresh'); +define('_MSGOth', 'Other'); +define('_MSGFilSet', 'Filter Settings'); +define('_MSGUsrSet', 'User Settings'); +define('_MSGFilOpt', 'Quick Filter Options'); +define('_MSGSwiEvnMan', 'Select events date manually'); +define('_MSGSwiEvnPre', 'Select events date predefined'); +define('_MSGShwEvnDet', 'Show Events Details'); +define('_MSGBck', 'back'); +define('_MSGEvnID', 'EventID'); +define('_MSGClickBrw', ' (Click for browsing MonitorWare database) :: (Or browse '); +define('_MSG2dy', 'today'); +define('_MSGYester', 'only yesterday'); +define('_MSGThsH', 'this hour'); +define('_MSGLstH', 'last 1 hour'); +define('_MSGL2stH', 'last 2 hours'); +define('_MSGL5stH', 'last 5 hours'); +define('_MSGL12stH', 'last 12 hours'); +define('_MSGL2d', 'last 2 days'); +define('_MSGL3d', 'last 3 days'); +define('_MSGLw', 'last week'); +define('_MSGFacDat', 'Facility and Date'); +define('_MSGPriDat', 'Severity and Date'); +define('_MSGNoRef', 'no refresh'); +define('_MSGE10s', 'every 10 sec'); +define('_MSGE30s', 'every 30 sec'); +define('_MSGEm', 'every min'); +define('_MSGE2m', 'every 2 min'); +define('_MSGE15m', 'every 15 min'); +define('_MSGEn', 'English'); +define('_MSGDe', 'German'); +define('_MSGFav', 'Favorites (Select to visit):'); +define('_MSGDel', 'Delete'); +define('_MSGNoFav', 'No favorites found'); +define('_MSGNewFav', 'New favorite'); +define('_MSGSiten', 'Sitename'); +define('_MSGAdd', 'Add'); +define('_MSGChg', 'Change'); +define('_MSGEnv', 'Environment'); +define('_MSGUsrInt', 'User Interface'); +define('_MSGUEna', 'Enabled'); +define('_MSGUDsa', '"Disabled'); +define('_MSGNamInvChr', 'Name and/or password contained invalid characters'); +define('_MSGSitInvChr', 'Sitename and/or address contained invalid characters'); +define('_MSGESec', 'every second'); +define('_MSGE5Sec', 'every 5 sec'); +define('_MSGE20Sec', 'every 20 sec'); +define('_MSGRed', 'Red'); +define('_MSGBlue', 'Blue'); +define('_MSGGreen', 'Green'); +define('_MSGYel', 'Yellow'); +define('_MSGOra', 'Orange'); +define('_MSGSty', 'Style'); +define('_MSGEnbQF', 'Choose Quick Filters:'); +define('_MSGDisIU', 'Display Info Unit'); +define('_MSGAscend', 'Ascending'); +define('_MSGDescend', 'Descending'); +define('_MSGColExp', 'Color an Expression'); +define('_MSGFilConf', 'Filter Configuration'); +define('_MSGUsrConf', 'User Configuration'); +define('_MSGHost', 'Host'); +define('_MSGEvnCat', 'EventCategory'); +define('_MSGEvnUsr', 'EventUser'); +define('_MSGFrmHos', 'FromHost'); +define('_MSGNTSev', 'NTSeverity'); +define('_MSGRecAt', 'ReceivedAt'); +define('_MSGDevRep', 'DeviceReportedTime'); +define('_MSGImp', 'Importance'); +define('_MSGEvn', 'Event'); +define('_MSGTo', 'to'); +define('_MSGFrm', 'from'); +define('_MSGLogPg', 'Logs per page'); +define('_MSGHom', 'Home'); +define('_MSGHlp', 'Help'); +define('_MSGFOpt', 'Filter Options'); +define('_MSGUOpt', 'User Options'); +define('_MSGEvnLogTyp', 'EventLogType'); +define('_MSGEvnSrc', 'EventSource'); +define('_MSGFilHost', 'Search only for IP/Host'); +define('_MSGSearchMsg', 'Message must contain'); +define('_MSGPRI0', 'EMERGENCY'); +define('_MSGPRI1', 'ALERT'); +define('_MSGPRI2', 'CRITICAL'); +define('_MSGPRI3', 'ERROR'); +define('_MSGPRI4', 'WARNING'); +define('_MSGPRI5', 'NOTICE'); +define('_MSGPRI6', 'INFO'); +define('_MSGPRI7', 'DEBUG'); +define('_MSGNumSLE', 'Number of Syslog Events'); +define('_MSGNumERE', 'Number of EventReporter Events'); +define('_MSGNoMsg', '[No message available]'); +define('_MSGMenInf1', '- You are currenty in '); +define('_MSGMenInf2', ' mode on '); +define('_MSGMenInf3', '. Database: '); +define('_MSGLang', 'Language:'); +define('_MSGStyle', 'Stylesheet:'); +define('_MSGAddInfo', 'Additional Informations:'); +define('_MSGDebug1', 'Debug:'); +define('_MSGDebug2', 'Show Debug Output'); +define('_MSGSave', 'Save/- Loadoptions:'); +define('_MSGFilSave1', 'Filter Settings:'); +define('_MSGFilSave2', 'Save filter settings in database and load them while logging in'); +define('_MSGDBOpt', 'Databaseoptions:'); +define('_MSGUTC1', 'UTC Time:'); +define('_MSGUTC2', 'When your database-server doesn\'t use UTC time, uncheck this!'); +define('_MSGSavCook', 'Keep you logged in (Cookie)?'); +define('_MSGAnd', 'and'); +define('_MSGApply', 'Apply Filters'); +define('_MSGDisSlt', 'Display'); +define('_MSGMethSlt', 'SysLogTags'); +define('_MSGMethHost', 'SysLogTags corresponding to hosts'); +define('_MSGInstDir', 'The \'install\' directory does still exist! If you configured phplogcon already, please delete or rename it. This causes a high security risk! Otherwise please click HERE to start the installation script.'); + +define('_InsWelc1', 'Welcome to the installation of phpLogCon, the WebInterface to log data.'); +define('_InsWelc2', 'The following steps will guide you through the installation and help you to install and configure phpLogCon correctly.'); +define('_InsWelc3', 'Note: Fields marked with a '); +define('_InsWelc4', 'RED *'); +define('_InsWelc5', ' MUST be filled out in very case!'); +define('_InsDbIns1', 'First we have to check your database structure, because phpLogCon needs some tables. If the tables don\'t exist, they will be created.'); +define('_InsDbIns2', 'For this, phpLogCon Installation needs some information about your database Server:'); +define('_InsDbIns3', 'Database Settings'); +define('_InsDbInsCon', 'Connection Type'); +define('_InsDbInsConNa', 'Native'); +define('_InsDbInsApp', 'Database application'); +define('_InsDbInsPort', 'If standard, leave blank'); +define('_InsDbInsUsr', 'User (User must have \'INSERT\' and \'CREATE\' rights!)'); +define('_InsPass', 'Password'); +define('_InsPassRe', 'Re-type password'); +define('_InsDbInsName', 'Database/DSN name'); +define('_InsDbInsTime', 'Database time format'); +define('_InsPlcIns1', 'Now we have to do some settings for phpLogCon to run clearly and user optimized.'); +define('_InsPlcIns2', 'Note: If you now select the UserInterface not to be installed, you can install it through a SQL-script file! See the manual for help.'); +define('_InsPlcIns3', 'phpLogCon General Settings'); +define('_InsPlcInsLang', 'Default language'); +define('_InsLangEn', 'English'); +define('_InsLangDe', 'German'); +define('_InsPlcInsUi', 'Install User Interface'); +define('_InsPlcInsUiCrUsr', 'Create a User'); +define('_InsPlcIns4', 'Here you can create a user for the User Interface. If you already have some users in your database or you have unselected the UserInterface, you can leave these fields!'); +define('_InsPlcInsUiName', 'Username'); +define('_InsPlcInsUiDisName', 'Display name'); +define('_InsPlcInsUiLang', 'Desired language'); +define('_InsPer1', 'Checking users input...'); +define('_InsPerDone', 'Done!'); +define('_InsPer2', 'Creating required tables...'); +define('_InsPer3', 'Inserting values into tables...'); +define('_InsPer4', 'Creating your config file (config.php)...'); +define('_InsPer5', 'All processes have been done clearly!'); +define('_InsPer6', 'Congratulations! You\'ve successfully installed phpLogCon!'); +define('_InsPer7', 'A file named \'config.php\' is stored in the root directory of phpLogCon. In this file there are the whole information you have entered before! You can edit it to your needs if you want to.'); +define('_InsPer8', 'Move to \'index.php\' in root directory to start working with phpLogCon!'); +define('_InsPer9', 'Don\'t forget to delete whole \'install/\' directory!'); +define('_InsPer10', 'These files could be user for a DoS on your phpLogCon!'); +define('_InsPer11', 'After deleting the directory, you can go to '); +define('_InsPer12', 'index'); diff --git a/layout/theme.php b/layout/theme.php index 1fa0807..3595fb6 100644 --- a/layout/theme.php +++ b/layout/theme.php @@ -1,183 +1,190 @@ -. See AUTHORS to learn who helped make -it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - - /*! \addtogroup Layout - * - * Here you find the basic structure of the page layout. Changes in the - * following function take affect in the hole phpLogCon projeckt. Note, - * the basic structure of each phpLogCon page must be generated by the - * use of the WriteHead() and WriteFood(). If you make a new phpLogCon - * page, first call WriteHead(). This function generate the hole header - * of the page. WriteHead() itself calls functions to generate the top - * menu bar (MenuTop()) and the menu on the left side (MenuLeft()). - * After this function call you are in the main work area. There you - * can provide your content information. To finialize the page, call - * WriteFood(). This generates the footer on the bottom of the page. - * @{ - */ - - /*! - * Include the stylesheeh - * - */ - - - /*! - * generate the url for pint version - * /return The Url refer to the pint version of the current page. - */ - function GetPrinterURL() - { - global $PHP_SELF, $QUERY_STRING; - - $szURL = $PHP_SELF . "?"; - if(strlen($QUERY_STRING) > 0) - $szURL .= $QUERY_STRING . "&"; - $szURL .= "PrinterVersion=1"; - - return($szURL); - } //end function GetPrintUrl() - - /*! - * Display logo and provide the link to change to print version. ... - * This things are displayed on the top of the page. - * - * Menu Top is called by WriteHead() - * - * \param SiteName This String is displayed on the top of the page (it is visible output!) - * \sa WriteHead() - */ - function MenuTop($SiteName) - { - global $strBasePath, $strBaseRealPath, $PrinterVersion; - -?> - - - - - - -
-

phpLogCon monitoring

-
- - - - - - - -
- | - | - | | | - | - " . strtoupper(_CON_MODE) . "" . _MSGMenInf2 . "" . strtoupper(_DB_APP) . "" . _MSGMenInf3 . "" . strtoupper(_DBNAME) . "";?> -   - -
- - - - - - <? echo $strTitle; ?> - - - - - - 0) - { - echo ""; - } - - // if refresh enabled, make a meta redirect - if ($_SESSION['refresh'] > 0) - echo ''; - -?> - - -'; ?> - - - - - - -
- - - - -
-

- phpLogCon, Copyright © 2003 - 2004 Adiscon GmbH -
-
- - - -. See AUTHORS to learn who helped make +it become a reality. + +*/#### #### #### #### #### #### #### #### #### #### + + + /*! \addtogroup Layout + * + * Here you find the basic structure of the page layout. Changes in the + * following function take affect in the hole phpLogCon projeckt. Note, + * the basic structure of each phpLogCon page must be generated by the + * use of the WriteHead() and WriteFood(). If you make a new phpLogCon + * page, first call WriteHead(). This function generate the hole header + * of the page. WriteHead() itself calls functions to generate the top + * menu bar (MenuTop()) and the menu on the left side (MenuLeft()). + * After this function call you are in the main work area. There you + * can provide your content information. To finialize the page, call + * WriteFood(). This generates the footer on the bottom of the page. + * @{ + */ + + /*! + * Include the stylesheeh + * + */ + + + /*! + * generate the url for pint version + * /return The Url refer to the pint version of the current page. + */ + function GetPrinterURL() + { + global $PHP_SELF, $QUERY_STRING; + + $szURL = $PHP_SELF . "?"; + if(strlen($QUERY_STRING) > 0) + $szURL .= $QUERY_STRING . "&"; + $szURL .= "PrinterVersion=1"; + + return($szURL); + } //end function GetPrintUrl() + + /*! + * Display logo and provide the link to change to print version. ... + * This things are displayed on the top of the page. + * + * Menu Top is called by WriteHead() + * + * \param SiteName This String is displayed on the top of the page (it is visible output!) + * \sa WriteHead() + */ + function MenuTop($SiteName) + { + global $strBasePath, $strBaseRealPath, $PrinterVersion; + +?> + + + + + + +
+

phpLogCon monitoring

+
+ + + + + + + +
+ | + | + | | | + + | + " . strtoupper(_CON_MODE) . "" . _MSGMenInf2 . "" . strtoupper(_DB_APP) . "" . _MSGMenInf3 . "" . strtoupper(_DBNAME) . "";?> +   + +
+ + + + + + <? echo $strTitle; ?> + + + + + + 0) + { + echo ""; + } + + // if refresh enabled, make a meta redirect + if ($_SESSION['refresh'] > 0) + echo ''; + +?> + + +'; ?> + + + + + + +
+ + + + +
+

+ phpLogCon, Copyright © 2003 - 2004 Adiscon GmbH +
+
+ + + + \ No newline at end of file diff --git a/quick-filter.php b/quick-filter.php index bf5d24e..9d75a9a 100644 --- a/quick-filter.php +++ b/quick-filter.php @@ -1,128 +1,125 @@ -. See AUTHORS to learn who helped make -it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - - -function ShowVarFilter() -{ - if ($_SESSION['change'] == 'Predefined') - { - echo ' ', _MSGEvnDat, ': '; - include _FORMS.'events-date.php'; - echo ' '; - } - else - { - echo ' ', _MSGEvnDat, ': '; - include _FORMS.'manually-date.php'; - echo ' '; - } - - echo '
', _MSGFilOpt, ': '; - - echo _MSGLogPg, ': '; - include _FORMS.'logs-per-page.php'; - - if ($_SESSION['FilterInfoUnit'] == 1 && stristr($_SERVER['PHP_SELF'], 'syslog') == FALSE) - { - echo " |"; - echo ' ', _MSGDisIU, ': '; - include _FORMS.'display-infounit.php'; - } - - if ($_SESSION['FilterOrderby'] == 1) - { - echo " |"; - echo ' ', _MSGOrdBy, ': '; - if(stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE) include _FORMS.'tag-order-by.php'; - else include _FORMS.'order-by.php'; - } - - if ($_SESSION['FilterOrderby'] == 1 && stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE) - { - echo ' '; - include _FORMS.'tag-sort.php'; - } - - if (stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE) - { - echo " |"; - echo ' ', _MSGDisSlt, ': '; - include _FORMS.'syslog-show.php'; - } - - if ($_SESSION['FilterRefresh'] == 1) - { - echo " |"; - echo ' ', _MSGRef, ': '; - include _FORMS.'refresh.php'; - } - - if ($_SESSION['FilterColExp'] == 1) - { - echo " |"; - echo ' ', _MSGColExp, ' '; - include _FORMS.'color-expression.php'; - } - - if ($_SESSION['FilterHost'] == 1) - { - echo " |"; - echo ' ', _MSGFilHost, ': '; - include _FORMS.'filter-host.php'; - } - - if ($_SESSION['FilterMsg'] == 1) - { - echo " |"; - echo ' ', _MSGSearchMsg, ': '; - include _FORMS.'search-msg.php'; - } -} - - echo "
"; - - // this switch is only a temporarry solution. Which forms are displayed should be configureable in the user profil in the future! - - if ($_SESSION['change'] == "Predefined") - { - echo ''; - echo ''; - } - else - { - echo ''; - echo ''; - } - -?> -
- -
- - - - -
+. See AUTHORS to learn who helped make +it become a reality. + +*/#### #### #### #### #### #### #### #### #### #### + + + +function ShowVarFilter() +{ + if ($_SESSION['change'] == 'Predefined') + { + echo ' ', _MSGEvnDat, ': '; + include _FORMS.'events-date.php'; + echo ' '; + } + else + { + echo ' ', _MSGEvnDat, ': '; + include _FORMS.'manually-date.php'; + echo ' '; + } + + echo '
', _MSGFilOpt, ': '; + + echo _MSGLogPg, ': '; + include _FORMS.'logs-per-page.php'; + + if ($_SESSION['FilterInfoUnit'] == 1 && stristr($_SERVER['PHP_SELF'], 'syslog') == FALSE) + { + echo " |"; + echo ' ', _MSGDisIU, ': '; + include _FORMS.'display-infounit.php'; + } + + if ($_SESSION['FilterOrderby'] == 1) + { + echo " |"; + echo ' ', _MSGOrdBy, ': '; + if(stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE) include _FORMS.'tag-order-by.php'; + else include _FORMS.'order-by.php'; + } + + if ($_SESSION['FilterOrderby'] == 1 && stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE) + { + echo ' '; + include _FORMS.'tag-sort.php'; + } + + if (stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE) + { + echo " |"; + echo ' ', _MSGDisSlt, ': '; + include _FORMS.'syslog-show.php'; + } + + if ($_SESSION['FilterRefresh'] == 1) + { + echo " |"; + echo ' ', _MSGRef, ': '; + include _FORMS.'refresh.php'; + } + + if ($_SESSION['FilterColExp'] == 1) + { + echo " |"; + echo ' ', _MSGColExp, ' '; + include _FORMS.'color-expression.php'; + } + + if ($_SESSION['FilterHost'] == 1) + { + echo " |"; + echo ' ', _MSGFilHost, ': '; + include _FORMS.'filter-host.php'; + } + + if ($_SESSION['FilterMsg'] == 1) + { + echo " |"; + echo ' ', _MSGSearchMsg, ': '; + include _FORMS.'search-msg.php'; + } +} + + echo "
"; + + // this switch is only a temporarry solution. Which forms are displayed should be configureable in the user profil in the future! + + if ($_SESSION['change'] == "Predefined") + { + echo ''; + echo ''; + } + else + { + echo ''; + echo ''; + } + +?> +
+
+ + + + +
\ No newline at end of file