diff --git a/classes/eventfilter.php b/classes/eventfilter.php deleted file mode 100644 index 36827f0..0000000 --- a/classes/eventfilter.php +++ /dev/null @@ -1,633 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - if( !isset($_SESSION['change']) ) - $_SESSION['change'] = "Predefined"; - - /*! - * This is the filter for the events. - * - */ - - //error_reporting(E_ALL); - class EventFilter - { - var $TimeInterval; /*!< String coming from the URL describing the selected time interval. - * The variable from the url is "ti" - * Four scenarios are possible: - * Case 1: ti = the string "min" + the number of minutes of the selected - * time interval. - * Case 2: ti = the string "thishour" - * Case 3: ti = the string "today" - * Case 4: ti = the string "yesterday" - */ - var $BeginTime; //!< Timestamp when the interval begins - var $EndTime; //!< Timestamp when the interval ends - var $TimeInMinutes; //!< Actual time interval in minutes - var $UserDefaultTimeInterval; //!< The time interval set as default in the user's options menu - var $SQLWhereTime; //!< Contains the where part of the SQL statement - var $OrderBy; //!< Sorting argument - var $GroupBy; //!< Grouping Argument - var $Sort; //!< Ascending/Descending - var $SQLWherePart; //!< Contains the whole SQL where part - var $SQLWhereInfoUnit; //!< Restriction of InfoUnit type - var $SQLWherePriority; //!< Restriction of Priority - var $SQLWhereHost; //!< Restriction of ip/host - var $SQLWhereMsg; //!< Message must contain a certain string - - /*! Constructor - * - * Get filter settings form url or if not available, get the user's default filter settings - * from the database. - */ - function EventFilter() - { - // get the selected mode (time period) - $this->TimeInterval = $_SESSION['ti']; - - //Order argument - $this->OrderBy = $_SESSION['order']; - - if($_SESSION['change'] == 'Predefined') - { - $this->SelectTimeMode(); - } - else if ($_SESSION['change'] == 'Manually') - { - $this->ManuallyTime(); - } - } - - /*! - * Set $BeginTime and $EndTime if the user has selected manually events date - */ - function ManuallyTime() - { - $tmp_endtime = mktime(23, 59, 59, $_SESSION['m2'], $_SESSION['d2'], $_SESSION['y2']); - $tmp_endtime > 0 ? $this->EndTime = $tmp_endtime : 0; - $tmp_begintime = mktime(0, 0, 0, $_SESSION['m1'], $_SESSION['d1'], $_SESSION['y1']); - $tmp_begintime > 0 ? $this->BeginTime = $tmp_begintime : 0; - } - - /*! - * Get the default Time Interval from the user profil. This is stored in the database. - */ - function GetDefaultTimeInterval() - { - // instead of this read from session/database--> - $this->UserDefaultTimeInterval = "today"; - } - - /*! - * SelectMode decide on the TimeInterval variable which functions have to call to set the time interval. - * Possible modes are "thishour", "today" and an indication in minutes. This function also prove if - * TimeInterval valid. If invalid it used the default setting for TimeInterval from the user profil getting from - * the database. - * - */ - function SelectTimeMode() - { - // if TimeInterval is not transmitted by url, get the TimeInterval from the UserProfil - if (empty($this->TimeInterval)) - $this->GetDefaultTimeInterval(); - - switch ($this->TimeInterval) - { - case "thishour": - $this->SetTimeIntervalThisHour(); - break; - case "today": - $this->SetTimeIntervalToday(); - break; - case "yesterday": - $this->SetTimeIntervalYesterday(); - break; - default: - if (substr($this->TimeInterval, 0, 3) == "min") - { - //This is to convert the string after the "min"(from the URL) into an integer - $tmpTi = substr($this->TimeInterval, 3); - if (!is_numeric($tmpTi)) - die(" $tmpTi is no number"); - //string + int = int! this is required, because is numeric don't prove /-- etc. - $this->TimeInMinutes = $tmpTi+0; - $this->SetTimeIntervalMin($this->TimeInMinutes); - } - else - { - //this occurs only if an invalid value comes from the url - switch ($this->UserDefaultTimeInterval) - { - //if user has thishour set as default - case "thishour": - $this->SetTimeIntervalThisHour(); - break; - //if user has today set as default - case "today": - $this->SetTimeIntervalToday(); - break; - case "yesterday": - $this->SetTimeIntervalYesterday(); - break; - //if user has his own number of minutes(e.g. 60) set as default - default: - $this->SetTimeInterval($this->UserDefaultTimeInterval); - } - } - } - } - - /*! - * Calculate the time interval for this hour and set EndTime and EndTime. EndTime of the time interval is now, - * BeginTime is the start time of the current hour. You get the current unix timestamp - * with time(), wich is equel to EndTime. To get the BeginTime, easily take the current timestamp - * and set the minutes and seconds to 0.. - * - * \remarks An example: Current time is 2003-05-05 11:53:21. In this case EndTime = 2003-05-05 11:53:21 - * and BeginTime = 2003-05-05 11:00:00. - * - */ - function SetTimeIntervalThisHour() - { - $mytime = time(); - $y = date("Y", $mytime); - $m = date("m", $mytime); - $d = date("d", $mytime); - $h = date("H", $mytime); - - $this->EndTime = $mytime; - $this->BeginTime = mktime($h, 0, 0, $m, $d, $y); - - //$this->EndTime = date("Y-m-d H:i:s", time()); - //$this->BeginTime = date("Y-m-d H", time()) . ":00:00"; - } - - /*! - * Calculate the time interval for today and set BeginTime and EndTime. EndTime of the time interval is now, - * BeginTime is the date of today with hour 00:00:00. You get the current unix timestamp - * with time(), which is equal to EndTime. To get the BeginTime take the date of the current - * timestamp and set the hour to 00:00:00. - * - * \remarks An example: Current time is 2003-05-05 11:53:21. In this case EndTime = 2003-05-05 11:53:21 - * and BeginTime = 2003-05-05 00:00:00. - */ - function SetTimeIntervalToday() - { - $mytime = time(); - $y = date("Y", $mytime); - $m = date("m", $mytime); - $d = date("d", $mytime); - - $this->EndTime = $mytime; - $this->BeginTime = mktime(0, 0, 0, $m, $d, $y); - - //$this->EndTime = date("Y-m-d H:i:s", time()); - //$this->BeginTime = date("Y-m-d ", time()) . "00:00:00"; - } - - /*! - * Calculate the time interval for yesterday and set BeginTime and EndTime. EndTime of the time interval is now, - * BeginTime is the date of today with hour 00:00:00. You get the current unix timestamp - * with time(), which is equal to EndTime. To get the BeginTime take the date of the current - * timestamp and set the hour to 00:00:00. - * - * \remarks An example: Current time is 2003-05-05 11:53:21. In this case EndTime = 2003-05-04 23:59:59 - * and BeginTime = 2003-05-04 00:00:00. - */ - function SetTimeIntervalYesterday() - { - $mytime = time(); - $y = date("Y", $mytime); - $m = date("m", $mytime); - $d = date("d", $mytime); - - $d--; - - $this->EndTime = mktime(23, 59, 59, $m, $d, $y); - $this->BeginTime = mktime(0, 0, 1, $m, $d, $y); - - //$this->EndTime = date("Y-m-d H:i:s", time()); - //$this->BeginTime = date("Y-m-d ", time()) . "00:00:00"; - } - - - /*! - * Calculates the time in minutes from now to the beginning of the interval and set EndTime and EndTime. - * To do this, get the current timestamp with time(), which is equal to EndTime, and take from it TimeInMinutes off. - * - * \remarks An example: Current time is 2003-05-05 11:53:21 and TimeInMinutes are 60. In this case - * EndTime is 2003-05-05 11:53:21 and BeginTime = 2003-05-05 10:53:21. - * - * \param TimeInMinutes describe how many minutes are between the BeginTime and EndTime - */ - function SetTimeIntervalMin($TimeInMinutes) - { - $mytime = time(); - $this->BeginTime = $mytime - $TimeInMinutes*60; - $this->EndTime = $mytime; - } - - - // generate HTML to display in quick menu bar - // returns: string, html to be displayed - function GetHTMLQuickDisplay() - { - } - - /*! - * Use this to set SQLWhereTime which is part of the sql where clause. - * This is responsilbe for the limitation of the requested data by time. - */ - function SetSQLWhereTime() - { - $this->SQLWhereTime = _DATE . ' >= ' . dbc_sql_timeformat($this->BeginTime) . ' AND ' . _DATE . ' <= ' . dbc_sql_timeformat($this->EndTime); - } - - /*! - * Use this to get a part of the sql where clause. - * This is responsilbe for the limitation of the requested data by time. - * \return A string, part of the SQL where clause (time argument) - */ - function GetSQLWhereTime() - { - $this->SetSQLWhereTime(); - return $this->SQLWhereTime; - } - - /*! - * Use this to set SQLWhereInfoUnit which is part of the sql where clause. - * This set the InfoUnit restriction. - */ - function SetSQLWhereInfoUnit() - { - // sl = 1, er = 3, o - // sl-er-o (matrix) - // 0-0-0 -> all InfoUnit #0 - // 0-0-1 -> only o #1 - // 0-1-0 -> only er #2 - // 0-1-1 -> not sl #3 - // 1-0-0 -> only sl #4 - // 1-0-1 -> not er #5 - // 1-1-0 -> only sl and er#6 - // 1-1-1 -> all InfoUnit #7 - $tmpSQL[0][0][0]= ''; - $tmpSQL[0][0][1]= ' AND (InfoUnitID<>1 AND InfoUnitID<>3) '; - $tmpSQL[0][1][0]= ' AND InfoUnitID=3 '; - $tmpSQL[0][1][1]= ' AND InfoUnitID<>1 '; - $tmpSQL[1][0][0]= ' AND InfoUnitID=1 '; - $tmpSQL[1][0][1]= ' AND InfoUnitID<>3 '; - $tmpSQL[1][1][0]= ' AND (InfoUnitID=1 or InfoUnitID=3) '; - $tmpSQL[1][1][1]= ''; - $this->SQLWhereInfoUnit = $tmpSQL[$_SESSION['infounit_sl']][$_SESSION['infounit_er']][$_SESSION['infounit_o']]; - -/* - if ($_SESSION['infounit_sl'] == 1) - { - if ($_SESSION['infounit_er'] == 1) - { - if ($_SESSION['infounit_o'] == 1) { $tmpSQL = ''; } // #7 - else { $tmpSQL = ' AND (InfoUnitID=1 or InfoUnitID=3) '; } // #6 - } - else - { - if ($_SESSION['infounit_o'] == 1) - { $tmpSQL = ' AND InfoUnitID<>3 '; } // #5 - else - { $tmpSQL = ' AND InfoUnitID=1 '; } // #4 - } - } - else - { - if ($_SESSION['infounit_er'] == 1) - { - if ($_SESSION['infounit_o'] == 1) { $tmpSQL = ' AND InfoUnitID<>1 '; } // #3 - else { $tmpSQL = ' AND InfoUnitID=3 '; } // #2 - } - else - { - if ($_SESSION['infounit_o'] == 1) { $tmpSQL = ' AND (InfoUnitID<>1 AND InfoUnitID<>3) '; } // #1 - else { $tmpSQL = ''; } // #0 - } - } - */ - - } - - /*! - * Use this to get a part of the sql where clause. - * This sort out the InfoUnit type. - * \return A string, part of the SQL where clause (InfoUnit type restriction) - */ - function GetSQLWhereInfoUnit() - { - $this->SetSQLWhereInfoUnit(); - return $this->SQLWhereInfoUnit; - } - - function SetSQLWherePriority() - { - //Optimizing Query... - if ($_SESSION['priority_0'] == 1 and $_SESSION['priority_1'] == 1 and $_SESSION['priority_2'] == 1 and $_SESSION['priority_3'] == 1 and $_SESSION['priority_4'] == 1 and $_SESSION['priority_5'] == 1 and $_SESSION['priority_6'] == 1 and $_SESSION['priority_7'] == 1) - { - $this->SQLWherePriority = ""; - } - else - { - if ($_SESSION['priority_0'] == 1 or $_SESSION['priority_1'] == 1 or $_SESSION['priority_2'] == 1 or $_SESSION['priority_3'] == 1 or $_SESSION['priority_4'] == 1 or $_SESSION['priority_5'] == 1 or $_SESSION['priority_6'] == 1 or $_SESSION['priority_7'] == 1) - { - $tmpSQL = ' AND ('; - $orFlag = false; - if ($_SESSION['priority_0'] == 1) - { - $tmpSQL.='Priority=0'; - $orFlag=true; - } - if ($_SESSION['priority_1'] == 1) - { - if ($orFlag) - $tmpSQL.=' or '; - - $tmpSQL.='Priority=1'; - $orFlag=true; - } - if ($_SESSION['priority_2'] == 1) - { - if ($orFlag) - $tmpSQL.=' or '; - - $tmpSQL.='Priority=2'; - $orFlag=true; - } - if ($_SESSION['priority_3'] == 1) - { - if ($orFlag) - $tmpSQL.=' or '; - - $tmpSQL.='Priority=3'; - $orFlag=true; - } - if ($_SESSION['priority_4'] == 1) - { - if ($orFlag) - $tmpSQL.=' or '; - - $tmpSQL.='Priority=4'; - $orFlag=true; - } - if ($_SESSION['priority_5'] == 1) - { - if ($orFlag) - $tmpSQL.=' or '; - - $tmpSQL.='Priority=5'; - $orFlag=true; - } - if ($_SESSION['priority_6'] == 1) - { - if ($orFlag) - $tmpSQL.=' or '; - - $tmpSQL.='Priority=6'; - $orFlag=true; - } - if ($_SESSION['priority_7'] == 1) - { - if ($orFlag) - $tmpSQL.=' or '; - - $tmpSQL.='Priority=7'; - $orFlag=true; - } - - $tmpSQL.=')'; - } - else - { - $tmpSQL = ''; - } - $this->SQLWherePriority = $tmpSQL; - } - } - - /*! - * Use this to get a part of the sql where clause. - * This sort out the priority. - * \return A string, part of the SQL where clause (Priority restriction) - */ - function GetSQLWherePriority() - { - $this->SetSQLWherePriority(); - return $this->SQLWherePriority; - } - - - /*! - * Use this to get a part of the sql where clause. - * This search only for a single ip or host. - * \return A string, part of the SQL where clause (Host restriction) - */ - function GetSQLWhereHost() - { - $this->SetSQLWhereHost(); - return $this->SQLWhereHost; - } - - /*! - * Use this to get a part of the sql where clause. - * This is responsilbe for the limitation of the requested data by ip/host. - */ - function SetSQLWhereHost() - { - $tmpSQL=''; - // filhost must be validate in include! - if (isset($_SESSION['filhost'])) - { - if (!empty($_SESSION['filhost'])) - $tmpSQL.=" AND FromHost like '".db_get_wildcut().$_SESSION['filhost'].db_get_wildcut()."'"; - } - $this->SQLWhereHost = $tmpSQL; - - } - - /*! - * Use this to get a part of the sql where clause. - * This search only for a single ip or host. - * \return A string, part of the SQL where clause (Host restriction) - */ - function GetSQLWhereMsg() - { - $this->SetSQLWhereMsg(); - return $this->SQLWhereMsg; - } - - - /*! - * Use this to get a part of the sql where clause. - * This is responsilbe for the limitation of the requested data by ip/host. - */ - function SetSQLWhereMsg() - { - $tmpSQL=''; - // filhost must be validate in include! - if (isset($_SESSION['searchmsg'])) - { - if (!empty($_SESSION['searchmsg'])) - { - // 2005-12-01 by therget: - // expanded search function, allows to search more than one searchstring per query - // start ---> - $SearchMsgArray = explode(" ", $_SESSION['searchmsg']); - $SearchMsgCounter = 0; - foreach($SearchMsgArray as $SearchMsgValue) - { - $tmpSQL.=" AND Message LIKE '".db_get_wildcut().$SearchMsgValue.db_get_wildcut()."'"; - $SearchMsgCounter++; - } - // <--- end - } - } - $this->SQLWhereMsg = $tmpSQL; - - } - - /*! - * Use this to get a part of the sql where clause. - * This is responsilbe for the limitation of the requested data by time. - */ - function SetSQLWherePart($whereMode) - { - //Mode 0 => I.e for events-display - if($whereMode == 0) - { - $this->SQLWherePart = $this->GetSQLWhereTime().$this->GetSQLWhereInfoUnit().$this->GetSQLWherePriority().$this->GetSQLWhereHost().$this->GetSQLWhereMsg(); - } - elseif($whereMode == 1) - { - $this->SQLWherePart = $this->GetSQLWhereTime().$this->GetSQLWherePriority().$this->GetSQLWhereHost().$this->GetSQLWhereMsg(); - } - - } - - - /*! - * Use this to get a part of the sql where clause. - * This is responsilbe for the limitation of the requested data by time. - * \return A string, the SQL where part - */ - function GetSQLWherePart($time_only) - { - if($time_only == 1) - { - $this->SetSQLWherePart(1); - } - else - { - $this->SetSQLWherePart(0); - } - return $this->SQLWherePart; - } - - /*! - * Use this to get the part of the sql part, responsible for the sorting argument. - * \return A string, part of the SQL where clause (sorting argument) - */ - function GetSQLSort() - { - switch ($this->OrderBy) - { - case "Date": - $tmpSQL = ' ORDER BY '._DATE.' DESC'; - break; - case "Facility": - $tmpSQL = ' ORDER BY Facility'; - break; - case "Priority": - $tmpSQL = ' ORDER BY Priority'; - break; - case "FacilityDate": - $tmpSQL = ' ORDER BY Facility, '._DATE.' DESC'; - break; - case "PriorityDate": - $tmpSQL = ' ORDER BY Priority, '._DATE.' DESC'; - break; - case "Host": - $tmpSQL = ' ORDER BY FromHost'; - break; - default: - $tmpSQL = ' ORDER BY '._DATE.' DESC'; - break; - } - return $tmpSQL; - } - - function GetSysLogTagSQLSort() - { - $this->OrderBy = $_SESSION['tag_order']; - switch ($this->OrderBy) - { - case "SysLogTag": - $tmpSQL = ' ORDER BY SysLogTag ' . $_SESSION['tag_sort']; - break; - case "Occurences": - $tmpSQL = ' ORDER BY occurences ' . $_SESSION['tag_sort']; - break; - case "Host": - $tmpSQL = ' ORDER BY FromHost ' . $_SESSION['tag_sort']; - break; - default: - $tmpSQL = ' ORDER BY SysLogTag ' . $_SESSION['tag_sort']; - break; - } - return $tmpSQL; - } - - function SetSQLGroup($groupBy) - { - $this->GroupBy = $groupBy; - } - - function GetSQLGroup() - { - switch($this->GroupBy) - { - case "SysLogTag": - $tmpSQL = " GROUP BY SysLogTag"; - break; - case "SysLogTagHost": - $tmpSQL = " GROUP BY SysLogTag, FromHost"; - break; - default: - $tmpSQL = " GROUP BY SysLogTag"; - break; - } - return $tmpSQL; - } - } - -?> \ No newline at end of file diff --git a/classes/eventsnavigation.php b/classes/eventsnavigation.php deleted file mode 100644 index 7b9429e..0000000 --- a/classes/eventsnavigation.php +++ /dev/null @@ -1,174 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - - - /*! - * EventsNavigation Class gernerates a navigation menu to handle the - * result output. - * - * Tasks: - * - distribute the result output on several sides - * - generate navigation elements (menu) to walk through the sides - */ - - - class EventsNavigation - { - var $PageSize; //! number of lines to be displayed - var $PageNumber; //! number of current page - var $PageBegin; //! 1st recordset of page - var $PageEnd; //! last recordset of page - var $EventCount; //! total number of pages - var $NavigationLeftArrow; //! << link to the previous page - var $NavigationRightArrow; //! >> link to the next page - var $NavigationFirstPage; //! <<<< link to the start page - var $NavigationLastPage; //! >>>> link to the last page - - //! Constructor - function EventsNavigation($size) - { - $this->PageSize=$size; - $this->PageNumber = (!isset($_GET["pagenum"]) || $_GET["pagenum"] == 0 || empty($_GET["pagenum"])) ? 1 : $_GET["pagenum"]; - $this->EventCount = 0; - } - - //! Returns how many lines to be displayed per page - function GetPageSize() - { - return $this->PageSize; - } - - //! points to the first line, which is to be indicated on the current side - function GetLimitLower() - { - $limitlower = ($this->PageNumber-1) * $this->PageSize + 1; - $limitlower = ($limitlower > $this->EventCount) ? $this->EventCount - $this->PageSize : $limitlower; - $limitlower = ($limitlower <= 0) ? $limitlower = 1 : $limitlower; - return $limitlower; - } - - //! points to the last line, which is to be indicated on the current side - function GetLimitUpper() - { - $limitupper = $this->PageNumber * $this->PageSize; - $limitupper = ($limitupper > $this->EventCount) ? $this->EventCount : $limitupper; - return $limitupper; - } - - //! get the number of the current page - function GetPageNumber() - { - return $this->PageNumber; - } - - - //! genreate the html output to display the ne - function SetNavigation($url_query) - { - //for displaying purposes ( page list ) - $page = ($this->EventCount < $this->GetPageSize()) ? 1 : ceil($this->EventCount / $this->GetPageSize()); - if($this->GetPageNumber() > 1) - { - $this->NavigationLeftArrow = " « "; - $this->NavigationFirstPage = " «« "; - } - else - { - $this->NavigationLeftArrow = " « ";//unable - $this->NavigationFirstPage = " «« ";//enable - } - - if($this->GetPageNumber() < $page) - { - $this->NavigationRightArrow = " » "; - $this->NavigationLastPage = " »» "; - } - else - { - $this->NavigationRightArrow = " » "; - $this->NavigationLastPage = " »» "; - } - - return $page; - } - - //! genreate the navigation menu output - function ShowNavigation() - { - //query string without pagenum - $url_para = RemoveArgFromURL($_SERVER['QUERY_STRING'], "pagenum"); - if(isset($_GET['slt'])) - $url_para = "slt=" . $_GET['slt']; - - $page = $this->SetNavigation($url_para); - echo $this->NavigationFirstPage." ".$this->NavigationLeftArrow; - for($a=$this->GetPageNumber()-3;$a<=$this->GetPageNumber()+3;$a++) - { - if($a > 0 && $a <= $page) - { - if($a==$this->GetPageNumber()) - echo " $a"; - else - echo " ".$a.""; - } - } - echo $this->NavigationRightArrow." ".$this->NavigationLastPage; - } - - //! send a database query to get the total number of events which are available - //! save the result in $EventCount - function SetEventCount($db_con, $restriction) - { - //get the counter result without limitation - $result = db_exec($db_con, db_num_count($restriction)); - $row = db_fetch_array($result); - $num = db_num_rows($result); - // If you have a group clause in your query, the COUNT(*) clause doesn't - // calculates the grouped rows; you get the number of all affected rows! - // db_num_rows() gives the correct number in this case! - if($num <= 1) - $this->EventCount = $row['num']; //so many data records were foundy - else - $this->EventCount = $num; - } - - //! returns the total number of available events - function GetEventCount() - { - return $this->EventCount; - } - - function SetPageNumber($val) - { - $this->PageNumber = $val; - } - } - -?> diff --git a/config.php b/config.php deleted file mode 100644 index 32e5653..0000000 --- a/config.php +++ /dev/null @@ -1,163 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - - // Set some defaults - ini_set("register_globals", "1"); - - -/* -************************************************** -* Begin of config variables * -* * ** * * -* You can change these settings to your need * -* * ** * * -* Only change if you know what you are doing * -************************************************** -*/ -/* -***** BEGIN DATABASE SETTINGS ***** -*/ - - //Server name (only needed if you not use ODBC) - define('_DBSERVER', 'localhost'); - - // DSN (ODBC) or database name (Mysql) - define('_DBNAME', 'phplogcon'); - - // Userid for database connection *** - define('_DBUSERID', 'MonitorWareUser'); - - // Password for database connection *** - define('_DBPWD', 'UsersPassword'); - - // table name - define('_DBTABLENAME', 'SystemEvents'); - - // Switch for connection mode - // Currently only odbc and native works - define('_CON_MODE', 'native'); - - // Defines the Database Application you are using, - // because for example thx ODBC syntax of MySQL - // and Microsoft Access/SQL Server/etc are different - // Currently available are: - // with native: mysql - // with ODBC: mysql and mssql are available - define('_DB_APP', 'mysql'); - -/* -***** END DATABASE SETTINGS ***** -*/ -/* -***** BEGIN FOLDER SETTINGS ***** -*/ - - //The folder where the classes are stored - define('_CLASSES', 'classes/'); - - //The folder where the forms are stored - define('_FORMS', 'forms/'); - - //The folder where the database drivers are stored - define('_DB_DRV', 'db-drv/'); - - //The folder where the language files are stored - define('_LANG', 'lang/'); - - //your image folder - define('_ADLibPathImage', 'images/'); - - //folder for scripts i.g. extern javascript - define('_ADLibPathScript', 'layout/'); - -/* -***** END FOLDER SETTINGS ***** -*/ -/* -***** BEGIN VARIOUS SETTINGS ***** -*/ - //Set to 1 and the Header (image/introduce sentence) will be used! Set 0 to disable it. - define('_ENABLEHEADER', 1); - - //Set to 1 and User Interface will be used! Set 0 to disable it. - define('_ENABLEUI', 0); - - //This sets the default language that will be used. - define('_DEFLANG', 'en'); - - // Use UTC time, indicates if the records are stored in utc time - define('_UTCtime', 1); - // Show localtime, indicates if the records should be displayed in local time or utc time - define('_SHOWLocaltime', 1); - // Time format - define('_TIMEFormat', 'Y-m-d H:i:s'); - - // Get messages date by ReceivedAt or DeviceReportedTime - define('_DATE', 'ReceivedAt'); - - // Coloring priority - define('_COLPriority', 1); - - // Custom Admin Message (appears on the homepage) - define('_AdminMessage', ""); - - // Version Number - define('_VersionMajor', "1"); - define('_VersionMinor', "2"); - define('_VersionPatchLevel', "3"); - -/* -***** END VARIOUS SETTINGS ***** -*/ - -/* -****************************************************** -* * ** * * -* From this point you shouldn't change something * -* * ** * * -* Only change if it is really required * -****************************************************** -*/ - - // Show quick filter enabled = 1, disabled = 0: - define('_FilterInfoUnit', 1); - define('_FilterOrderby', 1); - define('_FilterRefresh', 1); - define('_FilterColExp', 1); - define('_FilterHost', 1); - define('_FilterMsg', 1); - - //Session expire time. Unix-Timestamp. To set this value: - //call time(), that returns the seconds from 1.1.1970 (begin Unix-epoch) and add the - //time in seconds when the cookie should expire. - $session_time = (time()+(60*10)); - - //Cookie expire time. Unix-Timestamp. How to set this value, see "session_time". - define('_COOKIE_EXPIRE', (time()+60*60*24*30)); - -?> \ No newline at end of file diff --git a/database-config-process.php b/database-config-process.php deleted file mode 100644 index 7e4f7a9..0000000 --- a/database-config-process.php +++ /dev/null @@ -1,77 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - -include 'include.php'; - - - -// General variables -$szRedirectLink = ""; -$szDescription = ""; - -if( !isset($_POST['databaseConfig']) ) - $_POST['databaseConfig'] = ""; - -if($_POST['databaseConfig'] == "DatabaseConfiguration") -{ - /*! - * Update database name setting - !*/ - if ($_POST['database'] != "") - $_SESSION['database'] = $_POST['database']; - else - $_SESSION['database'] = _DBNAME; -} - -$szRedirectLink = "database-config.php"; -$szDescription = "Your Personal user settings have been updated"; - -?> - - - - -"; -?> - -Redirecting - -



-
-".$szDescription."

"; -echo "You will be redirected to this page in 1 second."; - -?> -
- - \ No newline at end of file diff --git a/database-config.php b/database-config.php deleted file mode 100644 index 5d88d5c..0000000 --- a/database-config.php +++ /dev/null @@ -1,76 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - require("include.php"); - WriteStandardHeader(_MSGdatabaseConf); -?> - -
-
- - -

..:: ::..

- -
- - - - - - - -
- -
- "; - while ($row = db_fetch_array($db_list)) - { - $status_selected = ''; - if($_SESSION['database'] == $row['Database']) - { - $status_selected = ' selected'; - } - echo ""; - } - echo ""; - ?> -
-
- - -
- - - \ No newline at end of file diff --git a/db-drv/mysql.php b/db-drv/mysql.php deleted file mode 100644 index 56117fd..0000000 --- a/db-drv/mysql.php +++ /dev/null @@ -1,217 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - - - /* - * This file contains the function for database connection - * via mysql - */ - - /*! \addtogroup DB Converter - * - * All converter functions using to prepare things to work with database queries - * use the prefix "dbc_" - * @{ - */ - - /* - * Generate the tags for a time argument using in a sql statment - * \param timestamp which need tags - * \return timestamp_with_tags returns the timestamp with tags in the nesessary format - */ - function dbc_sql_timeformat($times) - { - if (defined('_UTCtime') && _UTCtime) - { - $times = GetUTCtime($times); - } - return "'".date("Y-m-d H:i:s", $times)."'"; - } - - /*! @} */ - - /* - * Database driver - */ - - /* - * Attempts to establish a connection to the database. - * /return the connection handle if the connection was successful, NULL if the connection was unsuccessful. - */ - function db_connection() - { - if (!isset($_SESSION['database'])) - { - $_SESSION['database'] = _DBNAME; - } - $db = mysql_connect(_DBSERVER, _DBUSERID, _DBPWD) or db_die_with_error(_MSGNoDBCon); - mysql_select_db($_SESSION['database']) or db_die_with_error(_MSGChDB); - return $db; - } - - function db_own_connection($host, $port, $user, $pass, $dbname) - { - if($port != 0) - $db = mysql_connect($host . ":" . $port, $user, $pass) or db_die_with_error(_MSGNoDBCon); - else - $db = mysql_connect($host, $user, $pass) or db_die_with_error(_MSGNoDBCon); - mysql_select_db($dbname) or db_die_with_error(_MSGChDB); - return $db; - } - - /* - * Executes the SQL. - * /param db Database connection handle - * /param cmdSQL SQL statement - * - * /return Resource handle - */ - function db_exec($db, $cmdSQL) - { - //echo "

" . $cmdSQL . "

"; - $result = mysql_query($cmdSQL, $db) or db_die_with_error(_MSGInvQur); - return $result; - } - - /* - * Executes the SQL. - * /param res Rescource hanndle - * - * /return The number of rows in the result set. - */ - function db_num_rows($res) - { - $result = mysql_num_rows($res); - return $result; - } - - /* - * Fetch a result row as an associative array, a numeric array, or both. - * /param res Rescource hanndle - * - * /return Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. - */ - function db_fetch_array($res) - { - $result = mysql_fetch_array($res); - return $result; - } - - /* - * db_fetch_singleresult is need in ODBC mode, so db_fetch_singleresult and db_fetch_array - * are the same in MySQL - */ - function db_fetch_singleresult($result) - { - $result = mysql_fetch_array($result); - return $result; - } - - /* - * Get the result data. - * /param res Rescource hanndle - * /param res_name either be an integer containing the column number of the field you want; - or it can be a string containing the name of the field. For example: - * - * /return the contents of one cell from the result set. - */ - function db_result($res, $res_name) - { - $result = mysql_result($res, 1, $res_name) or db_die_with_error(_MSGNoRes); - return $result; - } - - function db_close($db) - { - mysql_close($db) or db_die_with_error(_MSGNoDBHan); - } - - function db_num_count($cmdSQLwhere_part) - { - return 'SELECT COUNT(*) AS num FROM ' . _DBTABLENAME . $cmdSQLwhere_part; - } - - /* - * fetch a result row as an a numeric array - * the array points to the first data record you want to display - * at current page. You need it for paging. - */ - function db_exec_limit($db, $cmdSQLfirst_part, $cmdSQLmain_part, $cmdSQLwhere_part, $limitlower, $perpage, $order) - { - $cmdSQL = $cmdSQLfirst_part . $cmdSQLmain_part . $cmdSQLwhere_part . " limit ".($limitlower-1)."," . $perpage; - return db_exec($db, $cmdSQL); - } - - function db_free_result($result) - { - return mysql_free_result($result); - } - - function db_get_tables($dbCon, $dbName) - { - $query = "SHOW TABLES FROM " . $dbName; - return mysql_query($query); - } - - function db_errno() - { - return mysql_errno(); - } - - function db_error() - { - return mysql_error(); - } - - function db_die_with_error($MyErrorMsg) - { - $errdesc = mysql_error(); - $errno = mysql_errno(); - - $errormsg="
Database error: $MyErrorMsg
"; - $errormsg.="mysql error: $errdesc
"; - $errormsg.="mysql error number: $errno
"; - $errormsg.="Date: ".date("d.m.Y @ H:i")."
"; - $errormsg.="Script: ".getenv("REQUEST_URI")."
"; - $errormsg.="Referer: ".getenv("HTTP_REFERER")."

"; - - echo $errormsg; - exit; - } - - /* - * Returns what wildcut the database use (e.g. %, *, ...) - */ - function db_get_wildcut() - { - return '%'; - } - -?> \ No newline at end of file diff --git a/db-drv/odbc_mssql.php b/db-drv/odbc_mssql.php deleted file mode 100644 index a9974a3..0000000 --- a/db-drv/odbc_mssql.php +++ /dev/null @@ -1,209 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - -/* -SQL_CURSOR_TYPE (integer) -SQL_CURSOR_FORWARD_ONLY (integer) -SQL_CURSOR_KEYSET_DRIVEN (integer) -SQL_CURSOR_DYNAMIC (integer) -SQL_CURSOR_STATIC (integer) -*/ - - /* - * This file contains the function for database connection - * via odbc - */ - - // Converter - - function dbc_sql_timeformat($timestamp) - { - if (defined('_UTCtime') && _UTCtime) - { - $timestamp = GetUTCtime($timestamp); - } - //use '#' for MS Access - //return "#".date("Y-m-d H:i:s", $timestamp)."#"; - //return "#".date("m/d/Y H:i:s", $timestamp)."#"; - return "{ ts '".date("Y-m-d H:i:s", $timestamp)."' }"; - } - - // Driver - - function db_connection() - { - if (!isset($_SESSION['database'])) - { - $_SESSION['database'] = _DBNAME; - } - return odbc_connect($_SESSION['database'], _DBUSERID, _DBPWD, SQL_CUR_USE_ODBC); - } - - function db_own_connection($host, $port, $user, $pass, $dbname) - { - $db = odbc_connect($dbname, $user, $pass, SQL_CUR_USE_ODBC) or db_die_with_error(_MSGNoDBCon); - return $db; - } - - function db_exec($db, $cmdSQL) - { -// echo "

" . $cmdSQL . "

"; - return odbc_exec($db, $cmdSQL); - } - - function db_num_rows($res) - { - return odbc_num_rows($res); - } - - function db_fetch_row($res) - { - return odbc_fetch_row($res); - } - - function db_fetch_singleresult($res) - { - return odbc_fetch_array($res); - } - - function db_fetch_array($res) - { - return odbc_fetch_array($res); - } - - function db_result($res, $res_name) - { - return odbc_result($res, $res_name); - } - - function db_close($db) - { - odbc_close($db); - } - - function db_num_count($cmdSQLwhere_part) - { - if(stristr($cmdSQLwhere_part, "order by") != FALSE) - return 'SELECT DISTINCT COUNT(*) AS num FROM ' . _DBTABLENAME . substr($cmdSQLwhere_part, 0, strpos($cmdSQLwhere_part, 'ORDER BY')); - else - return 'SELECT DISTINCT COUNT(*) AS num FROM ' . _DBTABLENAME . $cmdSQLwhere_part; - } - - // This function is for getting the correct row count! db_num_rows is BUGGED! >_< - // THX to 'deejay_' from PHP.net for this function! - function odbc_record_count($odbcDbId, $query) - { - $countQueryString = "SELECT COUNT(*) as results FROM (" . $query . ")"; -// echo $countQueryString; - $count = odbc_exec ($odbcDbId, $countQueryString); - $numRecords = odbc_result ($count, "results"); - return $numRecords; - } - - /* - * fetch a result row as an a numeric array, - * the array points to the first data record you want to display - * at current page. You need it for paging. - */ - function db_exec_limit($db, $cmdSQLfirst_part, $cmdSQLmain_part, $cmdSQLwhere_part, $limitlower, $perpage, $order) - { - //Because ODBC doesn't know LIMIT we have to do it with subselects - - if(strtolower($order) == "date") - $order = _DATE; - elseif(strtolower($order) == "host") - $order = "[FromHost]"; - elseif(strtolower($order) == "facilitydate") - $order = "[Facility], [" . _DATE . "]"; - elseif(strtolower($order) == "prioritydate") - $order = "[Priority], [" . _DATE . "]"; - else - $order = "[" . $order . "]"; - //now we have to check in wich order the results will be listed. - //we have to fit our query to this. - if( stristr(strtolower($cmdSQLwhere_part), "desc") == FALSE) - { - $sort1 = "DESC"; - $sort2 = "ASC"; - } - else - { - $sort1 = "ASC"; - $sort2 = "DESC"; - } - //now the big statement will be created! Have fun! ;) - $tmp = $perpage + $limitlower - 1; - $cmdSQL = "SELECT * FROM ( SELECT TOP " . $perpage . " * FROM ( " . $cmdSQLfirst_part . "TOP " . $tmp . " " . $cmdSQLmain_part . $cmdSQLwhere_part . " ) AS blub ORDER BY " . $order . " " . $sort1 . " ) AS blubblub ORDER BY " . $order . " " . $sort2; -// echo $cmdSQL . "
"; - return db_exec($db, $cmdSQL); - } - - function db_free_result($result) - { - return odbc_free_result($result); - } - - function db_get_tables($dbCon, $dbName) - { - return odbc_tables($dbCon); - } - - function db_errno() - { - return odbc_error(); - } - - function db_error() - { - return odbc_errormsg(); - } - - function db_die_with_error($MyErrorMsg) - { - $errdesc = odbc_errormsg(); - $errno = odbc_error(); - - $errormsg="
Database error: $MyErrorMsg
"; - $errormsg.="mysql error: $errdesc
"; - $errormsg.="mysql error number: $errno
"; - $errormsg.="Date: ".date("d.m.Y @ H:i")."
"; - $errormsg.="Script: ".getenv("REQUEST_URI")."
"; - $errormsg.="Referer: ".getenv("HTTP_REFERER")."

"; - - echo $errormsg; - exit; - } - - function db_get_wildcut() - { - return '%'; - } - -?> \ No newline at end of file diff --git a/db-drv/odbc_mysql.php b/db-drv/odbc_mysql.php deleted file mode 100644 index a8c5fd8..0000000 --- a/db-drv/odbc_mysql.php +++ /dev/null @@ -1,205 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - - - /* - * This file contains the function for database connection - * via mysql - */ - - /*! \addtogroup DB Converter - * - * All converter functions using to prepare things to work with database queries - * use the prefix "dbc_" - * @{ - */ - - /* - * Generate the tags for a time argument using in a sql statment - * \param timestamp which need tags - * \return timestamp_with_tags returns the timestamp with tags in the nesessary format - */ - function dbc_sql_timeformat($times) - { - if (defined('_UTCtime') && _UTCtime) - { - $times = GetUTCtime($times); - } - return "'".date("Y-m-d H:i:s", $times)."'"; - } - - /*! @} */ - - /* - * Database driver - */ - - /* - * Attempts to establish a connection to the database. - * /return the connection handle if the connection was successful, NULL if the connection was unsuccessful. - */ - function db_connection() - { - if (!isset($_SESSION['database'])) - { - $_SESSION['database'] = _DBNAME; - } - return odbc_connect($_SESSION['database'], _DBUSERID, _DBPWD, SQL_CUR_USE_ODBC); - } - - function db_own_connection($host, $port, $user, $pass, $dbname) - { - $db = odbc_connect($dbname, $user, $pass, SQL_CUR_USE_ODBC) or db_die_with_error(_MSGNoDBCon); - return $db; - } - - /* - * Executes the SQL. - * /param db Database connection handle - * /param cmdSQL SQL statement - * - * /return Resource handle - */ - function db_exec($db, $cmdSQL) - { -// echo "

" . $cmdSQL . "

"; - return odbc_exec($db, $cmdSQL); - } - - /* - * Executes the SQL. - * /param res Rescource hanndle - * - * /return The number of rows in the result set. - */ - function db_num_rows($res) - { - return odbc_num_rows($res); - } - - /* - * Fetch a result row as an associative array, a numeric array, or both. - * /param res Rescource hanndle - * - * /return Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. - */ - function db_fetch_array($res) - { - return odbc_fetch_array($res); - } - - /* - * db_fetch_singleresult is need in ODBC mode, so db_fetch_singleresult and db_fetch_array - * are the same in MySQL - */ - function db_fetch_singleresult($result) - { - return odbc_fetch_array($result); - } - - /* - * Get the result data. - * /param res Rescource hanndle - * /param res_name either be an integer containing the column number of the field you want; - or it can be a string containing the name of the field. For example: - * - * /return the contents of one cell from the result set. - */ - function db_result($res, $res_name) - { - return odbc_result($res, 1, $res_name); - } - - function db_close($db) - { - odbc_close($db); - } - - function db_num_count($cmdSQLwhere_part) - { - return 'SELECT COUNT(*) AS num FROM ' . _DBTABLENAME . $cmdSQLwhere_part; - } - - /* - * fetch a result row as an a numeric array - * the array points to the first data record you want to display - * at current page. You need it for paging. - */ - function db_exec_limit($db, $cmdSQLfirst_part, $cmdSQLmain_part, $cmdSQLwhere_part, $limitlower, $perpage, $order) - { - $cmdSQL = $cmdSQLfirst_part . $cmdSQLmain_part . $cmdSQLwhere_part . " limit ".($limitlower-1)."," . $perpage; - return db_exec($db, $cmdSQL); - } - - function db_free_result($result) - { - return odbc_free_result($result); - } - - function db_get_tables($dbCon, $dbName) - { - return odbc_tables($dbCon); - } - - function db_errno() - { - return odbc_error(); - } - - function db_error() - { - return odbc_errormsg(); - } - - function db_die_with_error($MyErrorMsg) - { - $errdesc = odbc_error(); - $errno = odbc_errno(); - - $errormsg="
Database error: $MyErrorMsg
"; - $errormsg.="mysql error: $errdesc
"; - $errormsg.="mysql error number: $errno
"; - $errormsg.="Date: ".date("d.m.Y @ H:i")."
"; - $errormsg.="Script: ".getenv("REQUEST_URI")."
"; - $errormsg.="Referer: ".getenv("HTTP_REFERER")."

"; - - echo $errormsg; - exit; - } - - /* - * Returns what wildcut the database use (e.g. %, *, ...) - */ - function db_get_wildcut() - { - return '%'; - } - -?> \ No newline at end of file diff --git a/db-drv/odbc_mysql_.php b/db-drv/odbc_mysql_.php deleted file mode 100644 index bd0fcbf..0000000 --- a/db-drv/odbc_mysql_.php +++ /dev/null @@ -1,168 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - -/* -SQL_CURSOR_TYPE (integer) -SQL_CURSOR_FORWARD_ONLY (integer) -SQL_CURSOR_KEYSET_DRIVEN (integer) -SQL_CURSOR_DYNAMIC (integer) -SQL_CURSOR_STATIC (integer) -*/ - - /* - * This file contains the function for database connection - * via odbc - */ - - // Converter - - function dbc_sql_timeformat($timestamp) - { - if (isset(_UTCtime) && _UTCtime) - { - $timestamp = GetUTCtime($timestamp); - } - //use '#' for MS Access - //return "#".date("Y-m-d H:i:s", $timestamp)."#"; - //return "#".date("m/d/Y H:i:s", $timestamp)."#"; - return "{ ts '".date("Y-m-d H:i:s", $timestamp)."' }"; - } - - // Driver - - function db_connection() - { - if (!isset($_SESSION['database'])) - { - $_SESSION['database'] = _DBNAME; - } - return odbc_connect($_SESSION['database'], _DBUSERID, _DBPWD, SQL_CUR_USE_ODBC); - } - - function db_exec($db, $cmdSQL) - { - //echo "

" . $cmdSQL . "

"; - return odbc_exec($db, $cmdSQL); - } - - function db_num_rows($res) - { - return odbc_num_rows($res); - } - - function db_fetch_row($res) - { - return odbc_fetch_row($res); - } - - function db_fetch_singleresult($res) - { - return odbc_fetch_array($res); - } - - function db_fetch_array($res) - { - //odbc_fetch_into replaced odbc_fetch_array, because - //in various php version the fetch_array doesnt work - - odbc_fetch_into($res, $myarray); - return $myarray; - } - - function db_result($res, $res_name) - { - return odbc_result($res, $res_name); - } - - function db_close($db) - { - odbc_close($db); - } - - function db_num_count($cmdSQLwhere_part) - { - return 'SELECT DISTINCT COUNT(*) AS num FROM ' . _DBTABLENAME . substr($cmdSQLwhere_part, 0, strpos($cmdSQLwhere_part, 'ORDER BY')); - } - - /* - * fetch a result row as an a numeric array, - * the array points to the first data record you want to display - * at current page. You need it for paging. - */ - function db_exec_limit($db, $cmdSQLfirst_part, $cmdSQLmain_part, $cmdSQLwhere_part, $limitlower, $perpage) - { - //you must move through the recordset - //until you reach the data record you want - //***if you know a better and more efficent methode, please let us know, too! - $cmdSQL = $cmdSQLfirst_part . $cmdSQLmain_part . $cmdSQLwhere_part . " limit ".($limitlower-1)."," . $perpage; - - $result = db_exec($db, $cmdSQL); - for($i=1;$i<$limitlower;$i++) - $row = odbc_fetch_row($result); - - return $result; - } - - function db_free_result($result) - { - return odbc_free_result($result); - } - - function db_errno() - { - return odbc_error(); - } - - function db_error() - { - return odbc_errormsg(); - } - - function db_die_with_error($MyErrorMsg) - { - $errdesc = odbc_errormsg(); - $errno = odbc_error(); - - $errormsg="
Database error: $MyErrorMsg
"; - $errormsg.="mysql error: $errdesc
"; - $errormsg.="mysql error number: $errno
"; - $errormsg.="Date: ".date("d.m.Y @ H:i")."
"; - $errormsg.="Script: ".getenv("REQUEST_URI")."
"; - $errormsg.="Referer: ".getenv("HTTP_REFERER")."

"; - - echo $errormsg; - exit; - } - - function db_get_wildcut() - { - return '*'; - } -?> \ No newline at end of file diff --git a/details.php b/details.php deleted file mode 100644 index 9fab711..0000000 --- a/details.php +++ /dev/null @@ -1,283 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - - - require("include.php"); - - if( !isset($_GET['lid']) ) - { - header("Location: events-display.php"); - exit; - } - - WriteStandardHeader(_MSGShwEvnDet); - -?> - - -
<<
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -function SeverityText($severity) -{ - switch ($severity) //Severity - { - case 0: - $severity_txt = 'EMERGENCY'; - break; - case 1: - $severity_txt = 'ALERT'; - break; - case 2: - $severity_txt = 'CRITICAL'; - break; - case 3: - $severity_txt = 'ERROR'; - break; - case 4: - $severity_txt = 'WARNING'; - break; - case 5: - $severity_txt = 'NOTICE'; - break; - case 6: - $severity_txt = 'INFO'; - break; - case 7: - $severity_txt = 'DEBUG'; - break; - default: - die('Error Invalid Severity number!'); - } - return ($severity_txt); -} -// <---- end - -// backgroundcolor regarding severity state -$severity = SeverityText($row['Priority']); -if ($severity == "EMERGENCY") -{ - $class = "CLASS=PriorityEmergency"; -} -elseif ($severity == "ALERT") -{ - $class = "CLASS=PriorityAlert"; -} -elseif ($severity == "CRITICAL") -{ - $class = "CLASS=PriorityCritical"; -} -elseif ($severity == "ERROR") -{ - $class = "CLASS=PriorityError"; -} -elseif ($severity == "WARNING") -{ - $class = "CLASS=PriorityWarning"; -} -elseif ($severity == "NOTICE") -{ - $class = "CLASS=PriorityNotice"; -} -elseif ($severity == "INFO") -{ - $class = "CLASS=PriorityInfo"; -} -elseif ($severity == "DEBUG") -{ - $class = "CLASS=PriorityDebug"; -} - - -$importance = $row['Importance']; -?> - - - - - - -"; -} -?> -
" target="_blank">Google-Groups)
>
", _MSGImp," $importance
- -"; - WriteFooter(); -?> \ No newline at end of file diff --git a/doc/credits.htm b/doc/credits.htm deleted file mode 100644 index b126f34..0000000 --- a/doc/credits.htm +++ /dev/null @@ -1,44 +0,0 @@ - - - phpLogCon Manual :: Credits - - - - - - - - - - -
-

phpLogCon monitoring

-
- -

[Doc Home]

-

5. Credits

-

This project is funded by Adiscon and initiated by Rainer Gerhards.

-

The core development team is:

- -

Additional developers:

- - -

[Doc Home] [MonitorWare Web Site]

-
- - - - -
-

- phpLogCon, Copyright © 2003 - 2004 Adiscon GmbH -
-
- - diff --git a/doc/design.htm b/doc/design.htm deleted file mode 100644 index 5b4974e..0000000 --- a/doc/design.htm +++ /dev/null @@ -1,64 +0,0 @@ - - - phpLogCon Manual :: Design Goals - - - - - - - - - -
-

phpLogCon monitoring

-
- -

[Doc Home]

-

1. Design Goals

- -
-

PhpLogCon enables the system administrator to quickly and easily review his central log repository. It provides views typically used on log data. It integrates with web resources for easy analysis of data found in the logs.

-

1.1 Main Usage Points

-

phpLogCon is primarily being used for

- -

For in-depth analysis, we recommend using the MonitorWare Console. It provides advanced analysis capabilities not found inside phpLogCon.

- [Top] -

1.2 Portability

-

phpLogCon is being implemented as a set of PHP scripts to ensure - portability between different platforms. Target platforms for phpLogCon - are:

- -

The standard set of database systems is supported, that is

- -

Of course, other database systems can most likely be used with phpLogCon - we just can't guarantee that it will work (and we are also unable to reproduce any issues in our lab, thus the need for limitation).

- [Top] - -

[Doc Home] [MonitorWare Web Site]

-
- - - - -
-

- phpLogCon, Copyright © 2003 - 2004 Adiscon GmbH -
-
- - diff --git a/doc/developer-notes.htm b/doc/developer-notes.htm deleted file mode 100644 index 1bd22b2..0000000 --- a/doc/developer-notes.htm +++ /dev/null @@ -1,54 +0,0 @@ - - - phpLogCon Manual :: Developer Notes - - - - - - - - - -
-

phpLogCon monitoring

-
- -

[Doc Home]

-

6. Developer notes

- -
-

phpLogCon is an open source project. Feel free to change what you want. Here you will find some hints and background knowledge about phpLogCon.

-

6.1 General database connection functions

-

The database functions in phpLogCon are called similar to well-know commands from e.g. php mysql functions. All database functions start with "db_" and then a word that best describes the instruction. Sample: db_connect() - should open a connection to the database. This is according to mysql_connect(). So you know if you find db_fetch_array in phpLogCon for example, that this function should fetch a result row as an associative array, a numeric array, or both.

- [Top] -

6.2 ODBC functions

-

phpLogCon support also database connection via ODBC. You can find the functions in 'db-drv\odbc_mssql.php' and 'db-drv\odbc_mysql.php'. Like you can see, there are two different drivers for ODBC. That's because the syntax of MySql and MsSql are different. The most functions are in a very low basic level. The reason, a lot of the php ODBC functions don't work with all versions of php. Also the usability often depends on the ODBC driver.

-

Known Issues

-

At the moment you can only use ODBC for query Microsoft databases like MSSQL, etc and for MySql. A second database layer which can handle different sql formats should be implemented in the future!

- [Top] -

6.3 Include files

-

include.php

-

This file is very important. There, all other files to include are embedded (e. g. config files and so on). So if you include include.php you have always include automatically all genral "include files". Also you can find useful function in include.php. All functions which should reachable at the whole program, you find there (or there included).

-

Note: At each page of phpLogCon, include.php should be included!

-

config.php

-

Here are the whole config of phpLogCon saved. It is included already by include.php, so you don't have to include it separately. If you want to set a new config variable, do it here! But if you only want to set a default variable for a variable, anywhere in the script, so do it there or in include.php! Config.php is only for global configuration variables with it's default values.

- [Top] - -

[Doc Home] [MonitorWare Web Site]

-
- - - - -
-

- phpLogCon, Copyright © 2003 - 2004 Adiscon GmbH -
-
- - diff --git a/doc/getting-started.htm b/doc/getting-started.htm deleted file mode 100644 index 5b9103f..0000000 --- a/doc/getting-started.htm +++ /dev/null @@ -1,49 +0,0 @@ - - - phpLogCon Manual :: Getting Started - - - - - - - - - -
-

phpLogCon monitoring

-
- -

[Doc Home]

-

2. Getting Started

- -
-

Getting started with phpLogCon is just a few simple steps:

- -

2.1 Minimum Requirements

-

The minimum requirements of your hardware are given by your database server application. The software requirements for phpLogCon meet the following:

- - [Top] - -

[Doc Home] [MonitorWare Web Site]

-
- - - - -
-

- phpLogCon, Copyright © 2003 - 2004 Adiscon GmbH -
-
- - diff --git a/doc/history.htm b/doc/history.htm deleted file mode 100644 index dddcaee..0000000 --- a/doc/history.htm +++ /dev/null @@ -1,72 +0,0 @@ - - - phpLogCon Manual :: Release History - - - - - - - - - -
-

phpLogCon monitoring

-
- -

[Doc Home]

-

7. Release History

-

2007-03-26 -

  • Missing logout link while logged in without cookies fixed.
  • -

    -

    2006-04-12 -

  • Minor fixes in user module.
  • -
  • Database Options does not work correctly other databases than MySQL in native mode. This is fixed now.
  • -
  • Some modifications on the "Message in the future" check in order to fix some minor issues.
  • -
  • Displaying local time even if the data is stored in utc time is supported now.
  • -
  • Time format is configurable now. See config.php.
  • -
  • Manual updated.
  • -

    -

    2006-02-06 -

  • Improved "Search only for IP". Filtering for subnets is now possible. E.g. to show all 172.19.*.* addresses, simply enter "172.19." (without the quotes) into search field. -
  • -

    -

    2005-12-12 -

  • Fixed a security bug in user login validation. -
  • -

    -

    2005-12-05 -

  • "Message must contain" filter enhanced. Filtering for multiple words (seperated by spaces) is supported now. -
  • -
  • New page database options. Using the "Database Options" (see link in menu) changing the database to use is possible during runtime. -
  • -
  • Status info which database is in use was added on start page. -
  • -
  • The version number was not correctly took on from install script. This bug is fixed. -
  • -
  • Fixed a table style bug which caused an oddly look of some tables. -
  • -

    -

    2005-09-26 -

  • Removed semicolon at the end of the query, because this is not supported by mysql
    - file: scripts\mysql_ct*.sql -
  • -
  • Added version number variables
    - file: scripts\config.php.ex -
  • -

    -

    2003-03-05    Actual project was started

    - -

    [Doc Home] [MonitorWare Web Site]

    -
    - - - - -
    -

    - phpLogCon, Copyright © 2003 - 2004 Adiscon GmbH -
    -
    - - diff --git a/doc/index.htm b/doc/index.htm deleted file mode 100644 index 5a73978..0000000 --- a/doc/index.htm +++ /dev/null @@ -1,91 +0,0 @@ - - - phpLogCon Manual :: Index - - - - - - - - - - -
    -

    phpLogCon monitoring

    -
    - -

    phpLogCon 1.0

    -

    phpLogCon is an easy to use solution for browsing syslog messages, Windows event log data and other network - events over the web. While originally initiated to work in conjunction with - Adiscon's MonitorWare product line, it can easily be modified to work with - other solutions as well.

    - -

    See http://www.monitorware.com/en/ for further details about the MonitorWare solution.

    - -

    [MonitorWare Web Site]

    -
    - - - - -
    -

    - phpLogCon, Copyright © 2003 - 2004 Adiscon GmbH -
    -
    - - diff --git a/doc/license.htm b/doc/license.htm deleted file mode 100644 index f59d373..0000000 --- a/doc/license.htm +++ /dev/null @@ -1,37 +0,0 @@ - - - phpLogCon Manual :: License - - - - - - - - - - -
    -

    phpLogCon monitoring

    -
    - -

    [Doc Home]

    -

    8. License

    -

    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

    -

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    -

    You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

    -

    If you have questions about phpLogCon in general, please email info@adiscon.com. To learn more about phpLogCon, please visit www.phplogcon.com.

    - -

    [Doc Home] [MonitorWare Web Site]

    -
    - - - - -
    -

    - phpLogCon, Copyright © 2003 - 2004 Adiscon GmbH -
    -
    - - diff --git a/doc/logstream.jpg b/doc/logstream.jpg deleted file mode 100644 index 8dcc1f4..0000000 Binary files a/doc/logstream.jpg and /dev/null differ diff --git a/doc/setup.htm b/doc/setup.htm deleted file mode 100644 index 608d235..0000000 --- a/doc/setup.htm +++ /dev/null @@ -1,45 +0,0 @@ - - - phpLogCon Manual :: phpLogCon Setup - - - - - - - - - - -
    -

    phpLogCon monitoring

    -
    - -

    [Doc Home]

    -

    3. phpLogCon Setup

    - -
    -

    For an installing that runs on every operating system, we created a 'install.php', that you will find in phpLogCon/install. You only have to point to install/install.php in your browser! The Installation-Assistant will guide you through the installation.

    -

    Note: Don't forget to delete whole 'install/' directory! Also remember, that the user who runs the web server (i.e. www-data) must have 'write'-rights (chmod 666) on the 'config.php'! Remove these rights after installing (chmod 644)!

    -

    3.1 Configuration Settings

    -

    Config.php

    -

    The setup created a 'config.php' in the root directory. This file contains all info you have entered at the install process. Here you can alter the 'config.php' every time you want to your need.

    -

    phplogcon.ini

    -

    You will find a file named 'phplogcon.ini' in the root directory. Here you can set some external information. For now, there is only the 'wordsdontshow'-function available. Here you can enter some words, followed by a separator. These words will be hided in events display and details.

    - [Top] - -

    [Doc Home] [MonitorWare Web Site]

    -
    - - - - -
    -

    - phpLogCon, Copyright © 2003 - 2004 Adiscon GmbH -
    -
    - - diff --git a/doc/upc.jpg b/doc/upc.jpg deleted file mode 100644 index 27dcf4a..0000000 Binary files a/doc/upc.jpg and /dev/null differ diff --git a/doc/using.htm b/doc/using.htm deleted file mode 100644 index b80cea3..0000000 --- a/doc/using.htm +++ /dev/null @@ -1,205 +0,0 @@ - - - phpLogCon Manual :: Using The Web Interface - - - - - - - - - - -
    -

    phpLogCon monitoring

    -
    -

    [Doc Home]

    - - - -

    4. Using the Web Interface

    - -
    - - - -

    4.1 General concepts

    -

    phpLogCon is designed to give you fast access to your desired information with a high controllable output/filtering. The whole solution is build for good viewing, fast finding that, what you want and to give you full access to the information.

    - [Top] - - - -

    4.2 Overall Event Filter

    -

    All processing done by phpLogCon is relative to a user-selected filter. That is, only events that match the applicable filter condition will be shown.

    -

    There are two types of filters in phpLogCon:

    - - - -

    General Filters:

    -

    These filters can always be set on the Filer Options page. You can reach them through a link on top of each web page. These settings will be saved in the session. So when the session expired, however the filter settings will be default next time. In User Interface mode they will be saved in database for each user. That provides on each logon or opening phpLogCon gettin your personal filter settings.

    -

    General Filters are:

    - - - - -

    SysLogTag Filter Conditions:

    -

    -

    -

    SysLogTag Filters are:

    - - - - -

    Quick Filters:

    -

    Quick Filters provide the General Filters and can be set in Events Display. They will override the general filters while staying in Events Display. They provide you quick changes for temporally viewing different and little bit fine filtered events, without changing your general filter settings.

    -

    Quick Filters are:

    - - [Top] - - - -

    4.3 Page Layout

    -

    Every page will follow a standard layout. It has three areas -

    -

    The header holds the top menu items and the current date and time. It also holds:

    - -

    The main work area is the primary display/work space. Obviously its content is depending on the called function.

    -

    The footer holds some general information:

    - - [Top] - - - -

    4.4 Homepage/Index

    -

    The main work area of the home displays statistical information: -

    -

    Of course, all of this in respect to the current filter.

    - [Top] - - - -

    4.5 Show Events

    -

    Here you can see the events; listed in respect to the current filter settings. Also you can use the quick filter, that allows you to override (not overwrite!) temporally your current filter settings. This provides a quick view on different filtered events, without going to the filter options. You can also choose how much event's should be displayed per page, color and search for an expression and search for a Host or IP.

    - [Top] - - - -

    4.6 Show SysLogTags

    -

    This page is especially created for watching the different SysLogTags. Here you can see all different SysLogTags, those appear in database with occurrences in database and sample message.

    -

    It brings you two new quick filters to filter and order the SysLogTags for fine-tuning:

    - - - -

    Display SysLogTags

    -

    In this drop-down menu you can choose between 'Syslog', that will show you all Syslogs those appear in database with a sample message and 'SysLog corresponding to host', what will show you every SysLogTag that appeared on each Host.

    - - - -

    Order by

    -

    You can order the Events ascending or descending by SysLogTag, Occurrences or Hosts, who have send this SysLogTag.

    -

    When you click on the example message, you'll get listed all occurrences of this SysLogTag. They're listed under respect of overall filter settings!

    - [Top] - - - -

    4.7 Details

    -

    You can reach the details through clicking on an events message. This page will give you full information about the selected event. Also you have direct links to the MonitorWare event reference and google groups to get additional information.

    - [Top] - - - -

    4.8 Filter Options

    -

    The filter options allow the user to specify filters important for output of the events. Which overall filters are available is listed above under point 4.2. For optimizing the events display you can choose which quick filter should be displayed. Also there are filters for the SysLogTag page. You can choose how they should be order and corresponding to which field, for example occurrences of one Tag.

    -

    If User Interface is enabled and the option "Save filter settings in database and load them while logging in" is checked, all filter settings will be saved in database. Otherwise, they only will stay like this in current session!

    -

    If User Interface is disabled, the settings will only stay like this in the current session. Next time opening phpLogCon, they will be default.

    - [Top] - - - -

    4.9 User Options

    -

    User options can look in two different versions:

    - -

    When User Interface is enabled, there are more settings than in non User Interface mode. The basic settings that are available in both modes are:

    - -

    The following settings are only available in User Interface mode:

    - - [Top] - - - -

    4.10 Database Options

    -

    Here you can choose the database from a dropdown menu, which phpLogCon should use.

    - [Top] - - - -

    4.11 Refresh

    -

    Simply refreshes the page. It's the same as hitting F5 in the most of the browsers.

    - [Top] - - - -

    [Doc Home] [MonitorWare Web Site]

    -
    - - - - -
    -

    - phpLogCon, Copyright © 2003 - 2004 Adiscon GmbH -
    -
    - - diff --git a/events-display.php b/events-display.php deleted file mode 100644 index c89e768..0000000 --- a/events-display.php +++ /dev/null @@ -1,241 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - include 'include.php'; - - WriteStandardHeader(_MSGShwEvn); - - //classes - include _CLASSES . 'eventsnavigation.php'; - include _CLASSES . 'eventfilter.php'; - - //the splitted sql statement - $cmdSQLfirst_part = 'SELECT '; - $cmdSQLmain_part = 'ID, '._DATE.', Facility, Priority, FromHost, Message, InfoUnitID FROM '._DBTABLENAME; - $cmdSQLlast_part = ' WHERE '; - - //define the last part of the sql statment, e.g. the where part, ordery by, etc. - $myFilter = New EventFilter; - - $cmdSQLlast_part .= $myFilter->GetSQLWherePart(0); - - $cmdSQLlast_part .= $myFilter->GetSQLSort(); - - //Set Priority Filter if activated - /*if ($Priority!=0) { - $cmdSQLlast_part .= " where Priority = ".$Priority; - } - */ - //amount of data records displayed - - if($_SESSION['epp'] < 1 || $_SESSION['epp'] > 2000) - $myEventsNavigation = new EventsNavigation(20); - else - $myEventsNavigation = new EventsNavigation($_SESSION['epp']); - - $myEventsNavigation->SetEventCount($global_Con, $cmdSQLlast_part); - $num = $myEventsNavigation->GetEventCount(); - - include "quick-filter.php"; - -/* - echo "
    "; - echo _MSGSrcExp . ": \t"; - echo ""; - echo "\tTemporally UNAVAIBLE!!"; - echo "
    "; -*/ - echo '
    '; - - //SQL statement to get result with limitation - $res = db_exec_limit($global_Con, $cmdSQLfirst_part, $cmdSQLmain_part, $cmdSQLlast_part, $myEventsNavigation->GetLimitLower(), $myEventsNavigation->GetPageSize(), $myFilter->OrderBy); - - if($num == 0) - { - //output if no data exit for the search string - echo '
    ', _MSGNoData, ''; - } - else - { - echo ' - -
    '; - echo _MSGEvn, ' ', $myEventsNavigation->GetLimitLower(), ' ', _MSGTo, ' ', $myEventsNavigation->GetLimitUpper(), ' ', _MSGFrm, ' ', $myEventsNavigation->GetEventCount(); - echo ''; - - $myEventsNavigation->ShowNavigation(); - -?> - -
    - - - - - - - - - - - - Syslog ; 3 = ER => Eventreporter ; O = O => Other - switch ($row['InfoUnitID']) - { - case 1: - $infounit = 'SL'; - break; - case 3: - $infounit = 'ER'; - break; - default: - $infounit = 'O'; - } - - if($row['Message'] == "") - $message = _MSGNoMsg; - else - $message = $row['Message']; - - // If date is today, only show the time ---> - $current_date = FormatTime($row[_DATE], 'Y-m-d H:i:s'); - $now = date("Y-m-d 00:00:00"); - $tmp_format = _TIMEFormat; - if ($current_date > $now) - { - $tmp_format = 'H:i:s'; - } - // <--- - - echo ''; - echo ''; //date - echo ''; //facility - - // get the description of priority (and get the the right color, if enabled) - $pricol = 'TD' . $tc; - $priword = FormatPriority($row['Priority'], $pricol); - echo ''; - - echo ''; //InfoUnit - echo ''; //host - - $message = htmlspecialchars($message); - - if(isset($_SESSION['regexp']) && $_SESSION['regexp'] != '') - { - $_SESSION['regexp'] = trim($_SESSION['regexp']); - $messageUp = strtoupper($message); - $regexpUp = strtoupper($_SESSION['regexp']); - $search_pos = strpos($messageUp, $regexpUp); - if($search_pos !== FALSE) - { - $regexpLng = strlen($_SESSION['regexp']); - $strCount = substr_count($messageUp, $regexpUp); - $strTmp = $message; - - $message = ""; - for($i = 0; $i < $strCount; $i++) - { - $messageUp = strtoupper($strTmp); - $search_pos = strpos($messageUp, $regexpUp); - $subStrSt = substr($strTmp, 0 , $search_pos); - $subStrExp = substr($strTmp, $search_pos, $regexpLng); - $subStrEnd = substr($strTmp, ($search_pos + $regexpLng)); - $message .= $subStrSt . '' . $subStrExp . ''; - if($i == ($strCount - 1)) - $message .= $subStrEnd; - - $strTmp = $subStrEnd; - } - } - } - - //Replace the words that had been read out from the ini file - if($file != FALSE) - { - for($i = 0; $i < $numarraywords; $i++) - { - $repstr = ''; - $words[$i] = trim($words[$i]); - for($j = 0; $j < strlen($words[$i]); $j++) $repstr .= '*'; - if($words[$i] != '') - $message = eregi_replace($words[$i], $repstr, $message); - } - } - - echo ''; //message - - //for changing colors - if($tc == 1) $tc = 2; - else $tc = 1; - /* - echo ""; - */ - echo '', "\r\n"; - } - echo '
    '.FormatTime($row[_DATE], $tmp_format).''.$row['Facility'].'', $priword, ''.$infounit.''.$row['FromHost'].'', $message, '".$row['Priority']."
    '; - } - WriteFooter(); -?> \ No newline at end of file diff --git a/filter-config-process.php b/filter-config-process.php deleted file mode 100644 index 2638477..0000000 --- a/filter-config-process.php +++ /dev/null @@ -1,150 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - -include 'include.php'; - - - - /* - * Read all settings from cookie. If it not set, display a login screen. - * If the user authentified, read the settings from database. The user can - * also alter it's oven personal settings. For security reaseon the password - * is not store in the cookie. Therefore you must enter your password each time, - * if you want to change the settings. - */ - - -// General variables -$szRedirectLink = ""; -$szDescription = ""; - -global $global_Con; - -if( !isset($_POST['filConf']) ) - $_POST['filConf'] = ""; - -if($_POST['filConf'] == "FilterConfig") -{ - // configure filter settings - $_SESSION['ti'] = $_POST['ti']; - $_SESSION['order'] = $_POST['order']; - $_SESSION['tag_order'] = $_POST['tag_order']; - $_SESSION['tag_sort'] = $_POST['tag_sort']; - $_SESSION['refresh'] = $_POST['refresh']+0; // +0 make sure that is numeric - - // enable/disable quick filter options - $_SESSION['FilterInfoUnit'] = (isset($_POST['FilterInfoUnit'])) ? 1 : 0; - $_SESSION['FilterOrderby'] = (isset($_POST['FilterOrderby'])) ? 1 : 0; - $_SESSION['FilterRefresh'] = (isset($_POST['FilterRefresh'])) ? 1 : 0; - $_SESSION['FilterColExp'] = (isset($_POST['FilterColExp'])) ? 1 : 0; - $_SESSION['FilterHost'] = (isset($_POST['FilterHost'])) ? 1 : 0; - $_SESSION['FilterMsg'] = (isset($_POST['FilterMsg'])) ? 1 : 0; - - // Set new info unit filter options - if ($_SESSION['FilterInfoUnit'] == 1 or isset($_POST['fromConfig'])) - { - $_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; - } - - // Set new priority filter options - $_SESSION['priority_0'] = (isset($_POST['priority_0'])) ? 1 : 0; - $_SESSION['priority_1'] = (isset($_POST['priority_1'])) ? 1 : 0; - $_SESSION['priority_2'] = (isset($_POST['priority_2'])) ? 1 : 0; - $_SESSION['priority_3'] = (isset($_POST['priority_3'])) ? 1 : 0; - $_SESSION['priority_4'] = (isset($_POST['priority_4'])) ? 1 : 0; - $_SESSION['priority_5'] = (isset($_POST['priority_5'])) ? 1 : 0; - $_SESSION['priority_6'] = (isset($_POST['priority_6'])) ? 1 : 0; - $_SESSION['priority_7'] = (isset($_POST['priority_7'])) ? 1 : 0; - - // If all infounits are unchecked it makes no sense, - // because in this case, no messages were displayed. - // So, activate all infounit types - if($_SESSION['infounit_sl'] == 0 && $_SESSION['infounit_er'] == 0 && $_SESSION['infounit_o'] == 0) - { - $_SESSION['infounit_sl'] = 1; - $_SESSION['infounit_er'] = 1; - $_SESSION['infounit_o'] = 1; - } - - // If all priorities are unchecked it makes no sense, - // because in this case, no messages were displayed. - // So, activate all priority types - if($_SESSION['priority_0'] == 0 && $_SESSION['priority_1'] == 0 && $_SESSION['priority_2'] == 0 && $_SESSION['priority_3'] == 0 && $_SESSION['priority_4'] == 0 && $_SESSION['priority_5'] == 0 && $_SESSION['priority_6'] == 0 && $_SESSION['priority_7'] == 0) - { - $_SESSION['priority_0'] = 1; - $_SESSION['priority_1'] = 1; - $_SESSION['priority_2'] = 1; - $_SESSION['priority_3'] = 1; - $_SESSION['priority_4'] = 1; - $_SESSION['priority_5'] = 1; - $_SESSION['priority_6'] = 1; - $_SESSION['priority_7'] = 1; - } - - if(_ENABLEUI == 1) - { - //Save filter settings to database - if($_SESSION['savefiltersettings']) - { - $query = GetFilterConfigArray(); - for($i = 0; $i < count($query); $i++) - db_exec($global_Con, $query[$i]); - } - } -} - -$szRedirectLink = "filter-config.php"; -$szDescription = "Your Personal filter settings have been updated"; - - - -?> - - - -"; -?> - -Redirecting - -



    -
    -".$szDescription."

    "; -echo "You will be redirected to this page in 1 second."; - -?> -
    - - \ No newline at end of file diff --git a/filter-config.php b/filter-config.php deleted file mode 100644 index ed05d8f..0000000 --- a/filter-config.php +++ /dev/null @@ -1,197 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - - - include "include.php"; - WriteStandardHeader(_MSGFilConf); - - // If filter settings have been changed in quick filter, reload the old settings - if(isset($_SESSION['ti_old'])) - { - $_SESSION['ti'] = $_SESSION['ti_old']; - $_SESSION['infounit_sl'] = $_SESSION['infounit_sl_old']; - $_SESSION['infounit_er'] = $_SESSION['infounit_er_old']; - $_SESSION['infounit_o'] = $_SESSION['infounit_o_old']; - $_SESSION['order'] = $_SESSION['order_old']; - $_SESSION['tag_order'] = $_SESSION['tag_order_old']; - $_SESSION['tag_sort'] = $_SESSION['tag_sort_old']; - $_SESSION['refresh'] = $_SESSION['refresh_old']; - - session_unregister('ti_old'); - session_unregister('infounit_sl_old'); - session_unregister('infounit_er_old'); - session_unregister('infounit_o_old'); - session_unregister('order_old'); - session_unregister('tag_order_old'); - session_unregister('tag_sort_old'); - session_unregister('refresh_old'); - } - -?> - -
    - -
    - - -

    ..:: ::..

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -End this is not implemented yet! */ ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - : -
    : - -
    : - -
    : - -
    : - >SysLog
    - >EventReporter
    - > -
    : - - >Emergency (0)
    - >Alert (1)
    - >Critical (2)
    - >Error (3)
    - >Warning (4)
    - >Notice (5)
    - >Info (6)
    - >Debug (7)
    -
    - -
     
    - : -
    : - -
    : - -
    - : -
    : - > -
    : - > -
    : - > -
    : - > -
    : - > -
    : - > -
    - - - -
    - - \ No newline at end of file diff --git a/forms/color-expression.php b/forms/color-expression.php deleted file mode 100644 index 0005f14..0000000 --- a/forms/color-expression.php +++ /dev/null @@ -1,38 +0,0 @@ -', _MSGinCol, ''; - -?> \ No newline at end of file diff --git a/forms/display-infounit.php b/forms/display-infounit.php deleted file mode 100644 index 15bac4a..0000000 --- a/forms/display-infounit.php +++ /dev/null @@ -1,3 +0,0 @@ -SL> -ER> -O> \ No newline at end of file diff --git a/forms/events-date.php b/forms/events-date.php deleted file mode 100644 index 9fb0aca..0000000 --- a/forms/events-date.php +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/forms/filter-host.php b/forms/filter-host.php deleted file mode 100644 index 53df0d9..0000000 --- a/forms/filter-host.php +++ /dev/null @@ -1,5 +0,0 @@ -'; -?> \ No newline at end of file diff --git a/forms/logs-per-page.php b/forms/logs-per-page.php deleted file mode 100644 index 52dff4a..0000000 --- a/forms/logs-per-page.php +++ /dev/null @@ -1,43 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - -?> - - diff --git a/forms/manually-date.php b/forms/manually-date.php deleted file mode 100644 index e14b9f4..0000000 --- a/forms/manually-date.php +++ /dev/null @@ -1,124 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - -?> - - - -All Events between: - - - - -    - - - - - \ No newline at end of file diff --git a/forms/order-by.php b/forms/order-by.php deleted file mode 100644 index 6762ecd..0000000 --- a/forms/order-by.php +++ /dev/null @@ -1,8 +0,0 @@ - \ No newline at end of file diff --git a/forms/refresh.php b/forms/refresh.php deleted file mode 100644 index 941662a..0000000 --- a/forms/refresh.php +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file diff --git a/forms/search-msg.php b/forms/search-msg.php deleted file mode 100644 index 23ec82c..0000000 --- a/forms/search-msg.php +++ /dev/null @@ -1,6 +0,0 @@ -'; -?> \ No newline at end of file diff --git a/forms/syslog-show.php b/forms/syslog-show.php deleted file mode 100644 index d51b6b1..0000000 --- a/forms/syslog-show.php +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/forms/tag-order-by.php b/forms/tag-order-by.php deleted file mode 100644 index d1855a3..0000000 --- a/forms/tag-order-by.php +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/forms/tag-sort.php b/forms/tag-sort.php deleted file mode 100644 index 3eabcb5..0000000 --- a/forms/tag-sort.php +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/images/Head-Line.gif b/images/Head-Line.gif deleted file mode 100644 index 2c28f33..0000000 Binary files a/images/Head-Line.gif and /dev/null differ diff --git a/images/phplogcon.gif b/images/phplogcon.gif deleted file mode 100644 index a5daf03..0000000 Binary files a/images/phplogcon.gif and /dev/null differ diff --git a/include.php b/include.php deleted file mode 100644 index bbe90f8..0000000 --- a/include.php +++ /dev/null @@ -1,836 +0,0 @@ -. -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']); -} -else -{ - if (!isset($_SESSION['filhost'])) - $_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']); -} -else -{ - if (!isset($_SESSION['searchmsg'])) - $_SESSION['searchmsg'] = ''; -} - -/* -* Color an Expression -*/ -if (isset($_POST['regexp'])) -{ - $_SESSION['regexp'] = $_POST['regexp']; - $_SESSION['color'] = $_POST['color']; -} -else -{ - if (!isset($_SESSION['regexp'])) - $_SESSION['regexp'] = ''; - if (!isset($_SESSION['color'])) - $_SESSION['color'] = 'red'; -} - -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']; -} - - -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"] != "|") || isset($_SESSION["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; -} - -/*! - * To calculate the the UTC Timestamp - * \param timestamp of the local system - * \return timestamp, UTC time - */ -function GetUTCtime($iTime) -{ - if ( $iTime == 0 ) $iTime = time(); - $ar = localtime ( $iTime ); - - $ar[5] += 1900; $ar[4]++; - $iTztime = gmmktime ( $ar[2], $ar[1], $ar[0], - $ar[4], $ar[3], $ar[5], $ar[8] ); - return ( $iTime - ($iTztime - $iTime) ); -} - -// Calculate the differenz between local and UTC time -function GetTimeDifferenzInHours ( $iTime = 0 ) -{ - if ( 0 == $iTime ) { $iTime = time(); } - $ar = localtime ( $iTime ); - $ar[5] += 1900; $ar[4]++; - $iTztime = gmmktime ( $ar[2], $ar[1], $ar[0], - $ar[4], $ar[3], $ar[5], $ar[8] ); - return ( ($iTztime - $iTime) / 3600 ); -} - -// Call this function each time you want to display a date/time. -// /param $timestamp A date timestamp in ISO format (2006-04-12 12:51:24) containing date + time. -function FormatTime($datetimestamp, $format = _TIMEFormat) -{ - // get the unix timestamp of the given date timestamp - $u_ts = strtotime($datetimestamp); - - if (_UTCtime) - { - // ok, utc is used, now determine if we have to convert to local time - if (_SHOWLocaltime) - { - $u_ts = strtotime(GetTimeDifferenzInHours() . " hours", $u_ts); - } - // no else needed, because it is already in utc time - } - else - { - // ok, local time is used, determine if we have to convert to utc - if (!_SHOWLocaltime) - { - // note you have to add the hours if is -GMT or subtract if +GMT - // therefore * -1 - $u_ts = strtotime((GetTimeDifferenzInHours() * -1) . " hours", $u_ts); - } - // no else needed, because is already in localtime - } - - // format - return date($format, $u_ts); -} -?> diff --git a/index.php b/index.php deleted file mode 100644 index f0765ab..0000000 --- a/index.php +++ /dev/null @@ -1,247 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - - include 'include.php'; - include _CLASSES . 'eventsnavigation.php'; - - - if(_ENABLEUI == 1) - { - // *** WHEN TRUE, LOGOUT USER *** - if (isset($_GET['do'])) - { - if ($_GET['do'] == 'logout') - { - setcookie("usr", "|", _COOKIE_EXPIRE, "/"); - setcookie("usrdis", "|", _COOKIE_EXPIRE, "/"); - setcookie("valid", "0", _COOKIE_EXPIRE, "/"); - session_unset(); - header("Location: index.php"); - exit; - } - } - // **************************************** - } - - // 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 => the login screen will be displayed - if( _ENABLEUI && !isset($_SESSION['usr']) ) - { - if(!isset($_COOKIE['valid']) || $_COOKIE['valid'] == "0") - { - WriteHead("phpLogCon :: Index", "", "", "phpLogCon"); - echo "
    "; - CheckInstallDir(); - echo "
    "; - - echo '', _MSG001, '.'; - echo '
    '; - echo _MSGUsrnam, ':
    '; - echo _MSGpas, ':
    '; - echo _MSGSavCook, '
    '; - echo ''; - echo '
    '; - exit; - } - else - { - // reload - session_register('usr'); - session_register('usrdis'); - $_SESSION['usr'] = $_COOKIE['usr']; - $_SESSION['usrdis'] = $_COOKIE['usrdis']; - LoadUserConfig(); - header("Location: index.php"); - exit; - } - - if($_SESSION['save_cookies']) - { - setcookie("valid", $_COOKIE["valid"], _COOKIE_EXPIRE, "/"); - setcookie("usr", $_COOKIE["usr"], _COOKIE_EXPIRE, "/"); - } - } - - WriteStandardHeader('Index'); - - // Show current Version Number (configurable in config.php): - echo "
    phpLogCon version "._VersionMajor."."._VersionMinor."."._VersionPatchLevel."
    "; - - - echo '
    '; - include _CLASSES . 'eventfilter.php'; - - //the splitted sql statement - $cmdSQLfirst_part = "SELECT "; - //$cmdSQLmain_part = "* FROM "._DBTABLENAME; - $cmdSQLmain_part = 'ID, '._DATE.', Facility, Priority, FromHost, Message, InfoUnitID FROM '._DBTABLENAME; - $cmdSQLlast_part = " WHERE "; - - //define the last part of the sql statment, e.g. the where part, ordery by, etc. - $myFilter = New EventFilter; - $cmdSQLlast_part .= $myFilter->GetSQLWherePart(0); - $cmdSQLlast_part .= $myFilter->GetSQLSort(); - - $myEventsNavigation = new EventsNavigation(5); - $myEventsNavigation->SetPageNumber(1); - - $myEventsNavigation->SetEventCount($global_Con, $cmdSQLlast_part); - - $num = $myEventsNavigation->GetEventCount(); - - if(_ENABLEUI) - { - echo _MSGWel . ", " . $_SESSION["usrdis"] . "" . _MSGChoOpt; - echo "
    "._MSGwhichdb." ".$_SESSION['database'].""; - } - else - echo _MSGWel . _MSGChoOpt; - - $SQLcmdfirst_part = "SELECT DISTINCT "; - $SQLcmdmain_part = "(*) FROM "._DBTABLENAME; - $SQLcmdlast_part = " WHERE "; - $myFilter = New EventFilter; - $SQLcmdlast_part .= $myFilter->GetSQLWherePart(1); - - $result_sl = db_exec($global_Con, "SELECT DISTINCT COUNT(*) as num" . " FROM "._DBTABLENAME . $SQLcmdlast_part . " AND InfoUnitID=1"); - $row_sl = db_fetch_array($result_sl); - db_free_result($result_sl); - - $result_er = db_exec($global_Con, "SELECT DISTINCT COUNT(*) as num" . " FROM "._DBTABLENAME . $SQLcmdlast_part . " AND InfoUnitID=3"); - $row_er = db_fetch_array($result_er); - db_free_result($result_er); - - if(strtolower(_DB_APP) == "mssql") - $rowIndex = 'num'; - else - $rowIndex = 0; - - if (_AdminMessage != "") - { - echo "

    "._AdminMessage."
    "; - } - - echo "

    " . _MSGQuiInf . ":"; - echo "
    "; - echo ""; - echo ""; - echo "
    " . _MSGNumSLE . "" . $row_sl['num'] . "
    " . _MSGNumERE . "" . $row_er['num'] . "
    "; - echo "
    " . _MSGTop5 . ":

    "; - if($num == 0) - { - //output if no data exists for the search string - echo "
    " . _MSGNoData . "!"; - } - else - { - echo ''; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - - $res = db_exec_limit($global_Con, $cmdSQLfirst_part, $cmdSQLmain_part, $cmdSQLlast_part, 1, 5, $myFilter->OrderBy); - $i = 0; - while($row = db_fetch_array($res)) - { - if (db_errno() != 0) - { - echo db_errno() . ": " . db_error(). "\n"; - } - - //choose InfoUnitdType 1 = SL = Syslog, 3 = Eventreport, O = Other - switch ($row['InfoUnitID']) - { - case 1: - $infounit = "SL"; - break; - case 3: - $infounit = "ER"; - break; - default: - $infounit = "O"; - } - static $tc = 1; - echo ''; - echo ''; //date - echo ''; //facility - - // get the description of priority (and get the the right color, if enabled) - $pricol = 'TD' . $tc; - $priword = FormatPriority($row['Priority'], $pricol); - echo ''; - - echo ""; //InfoUnit - echo ""; //host - $message = $row['Message']; - $message = str_replace("<", "<", $message); - $message = str_replace(">", ">", $message); - - echo ''; //message - - //for changing colors - if($tc == 1) $tc = 2; - else $tc = 1; - echo ""; - } - echo "
    " . _MSGDate . "" . _MSGFac . "" . _MSGPri . "" . _MSGInfUI . "" . _MSGHost . "" . _MSGMsg . "
    ',FormatTime($row[_DATE]),'',$row['Facility'],'', $priword, '".$infounit."".$row['FromHost']."', $message, '
    "; - echo "[more...]"; - } - - // 2005-08-17 by therget ---> - // If any date is in the future, show a message on the homepage. - - /* 2005-09-19 by mm - * $now = date("Y-m-d g:i:s"); // <-- this is a bug use H for 0 - 23 hours. - * Furthermore, use the database driver for date/time stuff! - */ - - /* 2006-04-12 by mm - * - * Moved this code out of the above if/else condition, because it is also of interest even - * if no data was found for the current filter conditions. - * - */ - - $sqlstatement = "SELECT COUNT(*) AS datecount FROM "._DBTABLENAME ." WHERE "._DATE." > ".dbc_sql_timeformat(time()); - - $result = db_exec($global_Con,$sqlstatement); - $db_datecount = db_fetch_array($result); - - if ($db_datecount['datecount'] > 0) - { - echo _NoteMsgInFuture1, $db_datecount['datecount'], _NoteMsgInFuture2; - } - // <--- End 2005-08-17 by therget - - WriteFooter(); -?> diff --git a/install/include.php b/install/include.php deleted file mode 100644 index 7a78b6f..0000000 --- a/install/include.php +++ /dev/null @@ -1,116 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - -function WriteHead($title) -{ - -?> - - - - - <?php echo $title; ?> - - - - - - - - - - -
    -

    phpLogCon monitoring

    -
    - - - - -
    .: phpLogCon Installation :.
    -

    - - - -
    - - - - -
    -

    - phpLogCon, - Copyright © 2003 - 2005 Adiscon GmbH. Part of the MonitorWare line of Products. -
    -
    - - - -. -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 deleted file mode 100644 index a81318c..0000000 --- a/install/perform.php +++ /dev/null @@ -1,375 +0,0 @@ -. -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 deleted file mode 100644 index 5bb09f6..0000000 --- a/lang/de.php +++ /dev/null @@ -1,238 +0,0 @@ -. -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', 'Letzte 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!'); -define('_NoteMsgInFuture1', '

    Hinweis: Es sind '); -define('_NoteMsgInFuture2', ' Events in der Datenbank, die ein Datum haben, das in der Zukunft liegt!'); - -define('_MSGdatabaseConf', 'Datenbank Konfiguration'); -define('_MSGdatabaseSet', 'Datenbank Einstellungen'); -define('_MSGdatabaseChoose', 'Datenbank auswählen:'); -define('_MSGDbOpt', 'Datenbank Optionen'); -define('_MSGwhichdb', 'Sie arbeiten zur Zeit mit folgender Datenbank:'); \ No newline at end of file diff --git a/lang/en.php b/lang/en.php deleted file mode 100644 index 47d1e5e..0000000 --- a/lang/en.php +++ /dev/null @@ -1,238 +0,0 @@ -. -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 (filter settings apply)'); -define('_MSGTop5', '5 most recent logs (filter settings apply)'); -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'); -define('_NoteMsgInFuture1', '

    Note: There are '); -define('_NoteMsgInFuture2', ' events in the database, which are in the future!'); - -define('_MSGdatabaseConf', 'Database Configuration'); -define('_MSGdatabaseSet', 'Database Settings'); -define('_MSGdatabaseChoose', 'Choose Database:'); -define('_MSGDbOpt', 'Database Options'); -define('_MSGwhichdb', 'You are currently working with the following database:'); \ No newline at end of file diff --git a/layout/common.js b/layout/common.js deleted file mode 100644 index 0696f27..0000000 --- a/layout/common.js +++ /dev/null @@ -1,19 +0,0 @@ -function NewWindow(WindowName,X_width,Y_height,Option) -{ - var Addressbar = "location=NO"; //Default - var OptAddressBar = "AddressBar"; //Default adress bar - if (Option == OptAddressBar) - { - Addressbar = "location=YES"; - } - window.open('',WindowName, - 'toolbar=no,' + Addressbar + ',directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=' + X_width + - ',height=' + Y_height); -} - -function GotoSite() -{ - var szUrl = ""; - szUrl = document.BookmarkConfiguration.favorites.options.selectedIndex; - window.open(szUrl,"",""); -} \ No newline at end of file diff --git a/layout/matrix.css b/layout/matrix.css deleted file mode 100644 index 98449ba..0000000 --- a/layout/matrix.css +++ /dev/null @@ -1,228 +0,0 @@ -P -{ - font-family: Tahoma, Arial; - font-size: 10pt -} -TD -{ - border-width:0; - border-right: black 0px solid; - border-left: black 0px solid; - border-style:solid; - border-color:#000055; -} -H1 -{ - font-weight: bold; - color: #0AAD79; - font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; - letter-spacing: 3px; -} -a:link,a:active,a:visited -{ - text-decoration: underline; - color : #78DBF7; -} -a:hover -{ - text-decoration: underline; - color : #5B4CF5; -} -body -{ - background-color: #000000; - - margin: 0px; - padding: 0px; - - scrollbar-face-color: #DEE3E7; - scrollbar-highlight-color: #FFFFFF; - scrollbar-shadow-color: #DEE3E7; - scrollbar-3dlight-color: #D1D7DC; - scrollbar-arrow-color: #006699; - scrollbar-track-color: #EFEFEF; - scrollbar-darkshadow-color: #98AAB1; - - font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; - font-size: 10pt; - color: #FFFFFF; -} - -table -{ - font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; - font-size: 10pt; - color: #FFFFFF; -} -/* - padding-right: 0px; - padding-left: 0px; - padding-bottom: 0px; - padding-top: 0px; - border-collapse: collapse; -*/ - -.ConfigTable -{ - border: 1px solid; - border-color:#00FF00; - - margin: 1px; - padding-left: 5px; -} - -.EventTable -{ - border: black 0px solid; - padding: 5px; - border-spacing: 2px; -} - -.TDHEADER -{ - background-color: #1D3D33; - - border-right: black 0px solid; - border-left: black 0px solid; - border-top: black 0px solid; - border-bottom: black 0px solid; - - font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; - font-size: 10pt; - font-weight : bold; - color: #FFFFFF; - text-decoration: none; -} -.TD1 -{ - background-color: #0D7B5A; - - font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; - font-size: 8pt; - font-weight : bold; - color: #FFFFFF; - text-decoration: none; -} -.TD1:link,.TD1:active,.TD1:visited -{ - color : #FFFFFF ; -} -.TD1:hover -{ - background-color: #DCEEE8; - color: #000000; -} -.TD2 -{ - background-color: #2BBA8E; - - font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; - font-size: 8pt; - font-weight : bold; - color: #FFFFFF; - text-decoration: none; -} -.TD2:link,.TD2:active,.TD2:visited -{ - color : #000000 ; -} -.TD2:hover -{ - background-color: #DCEEE8; - color: #000000; -} - -.Header1 -{ - background-color: #BCC1C5; - - font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; - font-size: 10pt; - font-weight : bold; -} -.PriorityEmergency -{ - color: #FFFFFF; - background-color: #ff4444; - border-top: black 1px solid; - border-bottom: black 1px solid; - border-right: gray 1px solid; -} -.PriorityAlert -{ - color: #FFFFFF; - background-color: #dd00dd; - border-top: black 1px solid; - border-bottom: black 1px solid; - border-right: gray 1px solid; -} -.PriorityCrit -{ - color: #FFFFFF; - background-color: #dd9900; - border-top: black 1px solid; - border-bottom: black 1px solid; - border-right: gray 1px solid; -} -.PriorityError -{ - color: #FFFFFF; - background-color: #CC0000; - border-top: black 1px solid; - border-bottom: black 1px solid; - border-right: gray 1px solid; -} -.PriorityWarning -{ - color: #FFFFFF; - background-color: #FFAA00; - border-top: black 1px solid; - border-bottom: black 1px solid; - border-right: gray 1px solid; -} -.PriorityNotice -{ - color: #FFFFFF; - background-color: #66CC33; - border-top: black 1px solid; - border-bottom: black 1px solid; - border-right: gray 1px solid; -} -.PriorityInfo -{ - color: #000000; - background-color: #ABF1FF; - border-top: black 1px solid; - border-bottom: black 1px solid; - border-right: gray 1px solid; -} -.PriorityDebug -{ - color: #FFFFFF; - background-color: #3333ff; - border-top: black 1px solid; - border-bottom: black 1px solid; - border-right: gray 1px solid; -} - -.Msg -{ - -} -.Msg:link,.Msg:active,.Msg:visited -{ - -} -.Msg:hover -{ - -} - -.butto - - background-color: #787878 - border-color: #343434 - color : #000000 - font-size: 11px - font-family: Verdana, Arial, Helvetica, sans-serif - diff --git a/layout/matrix.js b/layout/matrix.js deleted file mode 100644 index 906c556..0000000 --- a/layout/matrix.js +++ /dev/null @@ -1,48 +0,0 @@ -//Matrix Script -var density=0.2; -var colors=new Array('#030','#060','#393','#6C6','#fff'); -var minL=5; var maxL=30; -var minS=30; var maxS=80; -var cW=11; var cH=11; -var ascSt=33; var ascEnd=126; -var DOM=(document.getElementById)?true:false; -var scrW,scrH; -var cl=new Array; - -function init() -{ - scrW=document.body.clientWidth-25-cW; - scrH=document.body.clientHeight; - if (!scrW) - { - scrW = 750; - scrH = 550; - } - for (var clN=0;clN'); - for (var cN=0;cN<=cl[clN][2];cN++) document.write(''+String.fromCharCode(Math.round(Math.random()*(ascEnd-ascSt)+ascSt))+'
    '); - document.write(''); - cl[clN][5]=document.getElementById('c'+clN).style; - cl[clN][4]=setI(clN); - } -} - -function move(n) { -cl[n][1]++; -if (Math.round(scrH/cH)+cl[n][2]. -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 WriteFooter(). 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 - * WriteFooter(). This generates the footer on the bottom of the page. - * @{ - */ - - /*! - * - */ - - - /*! - * generate the url for pint version - * /return The Url refer to the pint version of the current page. - */ - - // very important to include config settings at beginning! (enable header setting) - // include 'config.php'; - - 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) . "";?> -   - -
    - - - - - - <?php echo $strTitle; ?> - - - - - - 0) - { - echo ""; - } - - // if refresh enabled, make a meta redirect - if ($_SESSION['refresh'] > 0) - echo ''; - -?> - - -'; ?> - - - - - - -
    - - - - -
    -

    - phpLogCon, Copyright © 2003 - 2005 Adiscon GmbH -
    -
    - - - - \ No newline at end of file diff --git a/phplogcon.ini b/phplogcon.ini deleted file mode 100644 index e100396..0000000 --- a/phplogcon.ini +++ /dev/null @@ -1,9 +0,0 @@ -# ********************************************* -# This is the external config file of phpLogCon. -# ********************************************* - -# wordsdontshow: Here you can enter some words that shouldn't be displayed in the events-display. -# case-INsensitive!! -# e.g.: wordsdontshow=Agent, Service, User -[phplogcon] -wordsdontshow= \ No newline at end of file diff --git a/quick-filter.php b/quick-filter.php deleted file mode 100644 index 1c3484a..0000000 --- a/quick-filter.php +++ /dev/null @@ -1,134 +0,0 @@ -. -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 diff --git a/scripts/UserInserts.sql b/scripts/UserInserts.sql deleted file mode 100644 index b94fdea..0000000 --- a/scripts/UserInserts.sql +++ /dev/null @@ -1,34 +0,0 @@ -# phpLogCon - A Web Interface to Log Data. -# Copyright (C) 2003 - 2004 Adiscon GmbH -# -# This SQL file inserts values into 'Users' and 'UserPrefs' tables - -INSERT INTO Users (UserIDText, Password, DisplayName, LastLogon, UserType, PrefCulture) VALUES ('', '', '', , 1, ''); - -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_infounit_sl', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_infounit_er', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_infounit_o', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_priority_0', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_priority_1', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_priority_2', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_priority_3', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_priority_4', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_priority_5', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_priority_6', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_priority_7', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_ti', 'today'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_order', 'Date'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_refresh', '0'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_FilterInfoUnit', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_FilterOrderby', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_FilterRefresh', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_FilterColExp', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_FilterHost', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_FilterMsg', '1'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_favorites', 'www.adiscon.com|Adiscon,www.monitorware.com|MonitorWare,www.winsyslog.com|WinSysLog'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_tag_order', 'Occurences'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_tag_sort', 'Asc'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_uStylesheet', 'phplogcon'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_uLanguage', ''); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_uSaveFilterSettings', '0'); -INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('', 'PHPLOGCON_uDebug', '0'); diff --git a/scripts/config.php.ex b/scripts/config.php.ex deleted file mode 100644 index f3e9ac9..0000000 --- a/scripts/config.php.ex +++ /dev/null @@ -1,166 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - - // Set some defaults - ini_set("register_globals", "1"); - - -/* -************************************************** -* Begin of config variables * -* * ** * * -* You can change these settings to your need * -* * ** * * -* Only change if you know what you are doing * -************************************************** -*/ -/* -***** BEGIN DATABASE SETTINGS ***** -*/ - - //Server name (only needed if you not use ODBC) - define('_DBSERVER', 'localhost'); - - // DSN (ODBC) or database name (Mysql) - define('_DBNAME', 'monitorware'); - - // Userid for database connection *** - define('_DBUSERID', 'root'); - - // Password for database connection *** - define('_DBPWD', ''); - - // table name - define('_DBTABLENAME', 'SystemEvents'); - - // Switch for connection mode - // Currently only odbc and native works - define('_CON_MODE', 'native'); - - // Defines the Database Application you are using, - // because for example thx ODBC syntax of MySQL - // and Microsoft Access/SQL Server/etc are different - // Currently available are: - // with native: mysql - // with ODBC: mysql and mssql are available - define('_DB_APP', 'mysql'); - -/* -***** END DATABASE SETTINGS ***** -*/ -/* -***** BEGIN FOLDER SETTINGS ***** -*/ - - //The folder where the classes are stored - define('_CLASSES', 'classes/'); - - //The folder where the forms are stored - define('_FORMS', 'forms/'); - - //The folder where the database drivers are stored - define('_DB_DRV', 'db-drv/'); - - //The folder where the language files are stored - define('_LANG', 'lang/'); - - //your image folder - define('_ADLibPathImage', 'images/'); - - //folder for scripts i.g. extern javascript - define('_ADLibPathScript', 'layout/'); - -/* -***** END FOLDER SETTINGS ***** -*/ -/* -***** BEGIN VARIOUS SETTINGS ***** -*/ - //Set to 1 and the Header (image/introduce sentence) will be used! Set 0 to disable it. - define('_ENABLEHEADER', 1); - - //Set to 1 and User Interface will be used! Set 0 to disable it. - define('_ENABLEUI', 0); - - //This sets the default language that will be used. - define('_DEFLANG', 'en'); - - // Use UTC time, indicates if the records are stored in utc time - define('_UTCtime', 1); - // Show localtime, indicates if the records should be displayed in local time or utc time - define('_SHOWLocaltime', 1); - // Time format - define('_TIMEFormat', 'Y-m-d H:i:s'); - - // Get messages date by ReceivedAt or DeviceReportedTime - define('_DATE', 'ReceivedAt'); - - // Coloring priority - define('_COLPriority', 1); - - // Custom Admin Message (appears on the homepage) - define('_AdminMessage', ""); - - // Version Number - define('_VersionMajor', "1"); - define('_VersionMinor', "2"); - define('_VersionPatchLevel', "3"); - - -/* -***** END VARIOUS SETTINGS ***** -*/ - -/* -****************************************************** -* * ** * * -* From this point you shouldn't change something * -* * ** * * -* Only change if it is really required * -****************************************************** -*/ - - // Show quick filter enabled = 1, disabled = 0: - define('_FilterInfoUnit', 1); - define('_FilterOrderby', 1); - define('_FilterRefresh', 1); - define('_FilterColExp', 1); - define('_FilterHost', 1); - define('_FilterMsg', 1); - - //Session expire time. Unix-Timestamp. To set this value: - //call time(), that returns the seconds from 1.1.1970 (begin Unix-epoch) and add the - //time in seconds when the cookie should expire. - $session_time = (time()+(60*10)); - - //Cookie expire time. Unix-Timestamp. How to set this value, see "session_time". - define('_COOKIE_EXPIRE', (time()+60*60*24*30)); - -?> \ No newline at end of file diff --git a/scripts/mssql_ctSystemEvents.sql b/scripts/mssql_ctSystemEvents.sql deleted file mode 100644 index 75d412b..0000000 --- a/scripts/mssql_ctSystemEvents.sql +++ /dev/null @@ -1,33 +0,0 @@ -# phpLogCon - A Web Interface to Log Data. -# Copyright (C) 2003 - 2004 Adiscon GmbH -# -# This SQL file creates the SystemEvents table for MSsql - -CREATE TABLE [SystemEvents] ( - [ID] [int] IDENTITY (1, 1) NOT NULL , - [CustomerID] [int] NOT NULL , - [ReceivedAt] [datetime] NOT NULL , - [DeviceReportedTime] [datetime] NOT NULL , - [Facility] [int] NOT NULL , - [Priority] [int] NOT NULL , - [FromHost] [varchar] (60) COLLATE Latin1_General_CI_AS NOT NULL , - [Message] [text] COLLATE Latin1_General_CI_AS NOT NULL , - [NTSeverity] [char] (3) COLLATE Latin1_General_CI_AS NOT NULL , - [Importance] [char] (3) COLLATE Latin1_General_CI_AS NOT NULL , - [EventSource] [varchar] (60) COLLATE Latin1_General_CI_AS NULL , - [EventUser] [varchar] (60) COLLATE Latin1_General_CI_AS NOT NULL , - [EventCategory] [int] NOT NULL , - [EventID] [int] NOT NULL , - [EventBinaryData] [text] COLLATE Latin1_General_CI_AS NOT NULL , - [MaxAvailable] [int] NOT NULL , - [CurrUsage] [int] NOT NULL , - [MinUsage] [int] NOT NULL , - [MaxUsage] [int] NOT NULL , - [InfoUnitID] [int] NOT NULL , - [SysLogTag] [varchar] (60) COLLATE Latin1_General_CI_AS NULL , - [EventLogType] [varchar] (60) COLLATE Latin1_General_CI_AS NULL , - [GenericFileName] [varchar] (60) COLLATE Latin1_General_CI_AS NULL , - [SystemID] [int] NOT NULL , - [Checksum] [int] NOT NULL , - PRIMARY KEY (ID) -); diff --git a/scripts/mssql_ctSystemEventsProperties.sql b/scripts/mssql_ctSystemEventsProperties.sql deleted file mode 100644 index b5d55d2..0000000 --- a/scripts/mssql_ctSystemEventsProperties.sql +++ /dev/null @@ -1,12 +0,0 @@ -# phpLogCon - A Web Interface to Log Data. -# Copyright (C) 2003 - 2004 Adiscon GmbH -# -# This SQL file creates the SystemEventsProperties table for MSsql - -CREATE TABLE [SystemEventsProperties] ( - [ID] [int] IDENTITY (1, 1) NOT NULL , - [SystemEventID] [int] NULL , - [ParamName] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL , - [ParamValue] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL , - PRIMARY KEY (ID) -); diff --git a/scripts/mssql_ctUserPrefs.sql b/scripts/mssql_ctUserPrefs.sql deleted file mode 100644 index 52373cd..0000000 --- a/scripts/mssql_ctUserPrefs.sql +++ /dev/null @@ -1,12 +0,0 @@ -# phpLogCon - A Web Interface to Log Data. -# Copyright (C) 2003 - 2004 Adiscon GmbH -# -# This SQL file creates the UserPrefs table for MSsql - -CREATE TABLE [UserPrefs] ( - [ID] [int] IDENTITY (1, 1) NOT NULL , - [UserLogin] [nvarchar] (50) COLLATE Latin1_General_CI_AS NULL , - [Name] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL , - [PropValue] [nvarchar] (200) COLLATE Latin1_General_CI_AS NULL , - PRIMARY KEY (ID) -); diff --git a/scripts/mssql_ctUsers.sql b/scripts/mssql_ctUsers.sql deleted file mode 100644 index b57f6ae..0000000 --- a/scripts/mssql_ctUsers.sql +++ /dev/null @@ -1,16 +0,0 @@ -# phpLogCon - A Web Interface to Log Data. -# Copyright (C) 2003 - 2004 Adiscon GmbH -# -# This SQL file creates the Users table for MSsql - -CREATE TABLE [Users] ( - [UserID] [int] IDENTITY (1, 1) NOT NULL , - [UserIDText] [nvarchar] (20) COLLATE Latin1_General_CI_AS NULL , - [Password] [nvarchar] (50) COLLATE Latin1_General_CI_AS NULL , - [DisplayName] [nvarchar] (50) COLLATE Latin1_General_CI_AS NULL , - [LastLogon] [smalldatetime] NULL , - [UserType] [int] NULL , - [HomeTZ] [int] NULL , - [PrefCulture] [nvarchar] (5) COLLATE Latin1_General_CI_AS NULL , - PRIMARY KEY (UserID) -); diff --git a/scripts/mysql_ctSystemEvents.sql b/scripts/mysql_ctSystemEvents.sql deleted file mode 100644 index ef6a5e1..0000000 --- a/scripts/mysql_ctSystemEvents.sql +++ /dev/null @@ -1,33 +0,0 @@ -# phpLogCon - A Web Interface to Log Data. -# Copyright (C) 2003 - 2004 Adiscon GmbH -# -# This SQL file creates the SystemEvents table for Mysql - -CREATE TABLE IF NOT EXISTS SystemEvents ( - ID int(10) unsigned NOT NULL auto_increment, - CustomerID int(11) NOT NULL default '0', - ReceivedAt datetime NOT NULL default '0000-00-00 00:00:00', - DeviceReportedTime datetime NOT NULL default '0000-00-00 00:00:00', - Facility int(11) NOT NULL default '0', - Priority int(11) NOT NULL default '0', - FromHost varchar(60) NOT NULL default '', - Message text NOT NULL, - NTSeverity char(3) NOT NULL default '', - Importance char(3) NOT NULL default '', - EventSource varchar(60) default NULL, - EventUser varchar(60) NOT NULL default '', - EventCategory int(11) NOT NULL default '0', - EventID int(11) NOT NULL default '0', - EventBinaryData text NOT NULL, - MaxAvailable int(11) NOT NULL default '0', - CurrUsage int(11) NOT NULL default '0', - MinUsage int(11) NOT NULL default '0', - MaxUsage int(11) NOT NULL default '0', - InfoUnitID int(11) NOT NULL default '0', - SysLogTag varchar(60) default NULL, - EventLogType varchar(60) default NULL, - GenericFileName varchar(60) default NULL, - SystemID int(11) NOT NULL default '0', - Checksum int(11) NOT NULL default '0', - PRIMARY KEY (ID) -) TYPE=MyISAM AUTO_INCREMENT=1 diff --git a/scripts/mysql_ctSystemEventsProperties.sql b/scripts/mysql_ctSystemEventsProperties.sql deleted file mode 100644 index d0a3218..0000000 --- a/scripts/mysql_ctSystemEventsProperties.sql +++ /dev/null @@ -1,11 +0,0 @@ -# phpLogCon - A Web Interface to Log Data. -# Copyright (C) 2003 - 2004 Adiscon GmbH -# -# This SQL file creates the SystemEventsProperties table for Mysql - -CREATE TABLE IF NOT EXISTS SystemEventsProperties ( - ID int unsigned not null auto_increment primary key, - SystemEventID int NULL , - ParamName varchar (255) NULL , - ParamValue varchar (255) NULL -) diff --git a/scripts/mysql_ctUserPrefs.sql b/scripts/mysql_ctUserPrefs.sql deleted file mode 100644 index dba87ca..0000000 --- a/scripts/mysql_ctUserPrefs.sql +++ /dev/null @@ -1,12 +0,0 @@ -# phpLogCon - A Web Interface to Log Data. -# Copyright (C) 2003 - 2004 Adiscon GmbH -# -# This SQL file creates the UserPrefs table for Mysql - -CREATE TABLE IF NOT EXISTS UserPrefs ( - ID int(10) unsigned NOT NULL auto_increment, - UserLogin varchar(50) NOT NULL default '', - Name varchar(255) NOT NULL default '', - PropValue varchar(200) NOT NULL default '0', - PRIMARY KEY (ID) -) TYPE=MyISAM AUTO_INCREMENT=1 diff --git a/scripts/mysql_ctUsers.sql b/scripts/mysql_ctUsers.sql deleted file mode 100644 index 1b01eed..0000000 --- a/scripts/mysql_ctUsers.sql +++ /dev/null @@ -1,16 +0,0 @@ -# phpLogCon - A Web Interface to Log Data. -# Copyright (C) 2003 - 2004 Adiscon GmbH -# -# This SQL file creates the 'Users' and 'UserPrefs' tables - -CREATE TABLE IF NOT EXISTS Users ( - UserID int(10) unsigned NOT NULL auto_increment, - UserIDText varchar(20) NOT NULL default '', - Password varchar(50) NOT NULL default '', - DisplayName varchar(50) NOT NULL default '', - LastLogon datetime NOT NULL default '0000-00-00 00:00:00', - UserType int(11) NOT NULL default '0', - HomeTZ int(11) NOT NULL default '0', - PrefCulture varchar(5) NOT NULL default '', - PRIMARY KEY (UserID) -) TYPE=MyISAM AUTO_INCREMENT=1 diff --git a/submit.php b/submit.php deleted file mode 100644 index 42c562b..0000000 --- a/submit.php +++ /dev/null @@ -1,111 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - -// Check for speical ysql characters -function invalid_chars( $string ) -{ - $bad_list = array("'",'"',"%"); - - foreach( $bad_list as $needle ) - { - if( strpos( $string, $needle ) !== FALSE ) - { - return TRUE; - } - } - return FALSE; -} - -// global _DBNAME, _DBUSERID, _DBPWD, _DBSERVER, $session_time; - include 'include.php'; - - if( !isset($_POST['save_cookies'])) - $_POST['save_cookies'] = 0; - - if( invalid_chars( $_POST['usr'] ) || invalid_chars( $_POST['pass'] ) ) - { - WriteHead('phpLogCon :: ' , _MSGAccDen, '', '', _MSGAccDen, 0); - print '
    ..:: ' . _MSGNamInvChr . ' ::..
    '; - echo '
    ..:: ', _MSGBac2Ind, ' ::..'; - db_close($global_Con); - - exit; - } - else - { - $query = "SELECT UserIDText, Password, DisplayName FROM Users WHERE UserIDText LIKE '" . $_POST['usr'] . "' AND Password LIKE '" . $_POST['pass'] . "'"; - $result = db_exec($global_Con, $query);// or die(db_die_with_error(_MSGInvQur . " :" . $query)); - $num = db_num_rows($result); - $result = db_fetch_singleresult($result); - /* - echo $num . "
    "; - echo $result["UserIDText"] . "
    "; - echo $result["phplogcon_lastlogin"] . "
    "; - exit; - */ - - if ($num == 0) - { - WriteHead("phpLogCon :: " . _MSGAccDen, "", "", _MSGAccDen, 0); - print "
    ..:: " . _MSGFalLog . " ::..
    "; - echo "
    ..:: " . _MSGBac2Ind . " ::.."; - db_close($global_Con); - exit; - } - else - { - // $dat = now(); - // db_exec($global_Con, "UPDATE Users SET phplogcon_lastlogin = ".dbc_sql_timeformat($dat)." WHERE UserIDText LIKE '".$_POST["usr"]."'"); - session_register('save_cookies'); - if($_POST['save_cookies'] == 1) - { - $_SESSION['save_cookies'] = $_POST['save_cookies']; - setcookie("valid", 1, _COOKIE_EXPIRE, "/"); - setcookie("usr", $result["UserIDText"], _COOKIE_EXPIRE, "/"); - setcookie("usrdis", $result["DisplayName"], _COOKIE_EXPIRE, "/"); - } - else - $_SESSION['save_cookies'] = 0; - - session_register("usr"); - session_register("usrdis"); - $_SESSION["usr"] = $result["UserIDText"]; - $_SESSION["usrdis"] = $result["DisplayName"]; - - LoadUserConfig(); - // Loading Users Filter Config when enabled - if($_SESSION['savefiltersettings']) - LoadFilterConfig(); - - db_close($global_Con); - header("Location: index.php"); - - } - } -?> diff --git a/syslog-display.php b/syslog-display.php deleted file mode 100644 index 8046fdf..0000000 --- a/syslog-display.php +++ /dev/null @@ -1,206 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - include 'include.php'; - - - - if( !isset($_GET['slt']) ) - { - header("Location: syslog-index.php"); - exit; - } - - WriteStandardHeader(_MSGShwSLog); - - //classes - include _CLASSES . 'eventsnavigation.php'; - include _CLASSES . 'eventfilter.php'; - - //the splitted sql statement - $cmdSQLfirst_part = 'SELECT '; - $cmdSQLmain_part = 'ID, '._DATE.', Facility, Priority, FromHost, Message FROM '._DBTABLENAME; - $cmdSQLlast_part = " WHERE InfoUnitID=1 AND SysLogTag LIKE '" . $_GET['slt'] . "' AND "; - - // define the last part of the sql statment, e.g. the where part, ordery by, etc. - $myFilter = New EventFilter; - $cmdSQLlast_part .= $myFilter->GetSQLWherePart(1); - $cmdSQLlast_part .= $myFilter->GetSQLSort(); - - // how much data records should be displayed on one page - if($_SESSION['epp'] < 1 || $_SESSION['epp'] > 100) - $myEventsNavigation = new EventsNavigation(20); - else - $myEventsNavigation = new EventsNavigation($_SESSION['epp']); - - $myEventsNavigation->SetEventCount($global_Con, $cmdSQLlast_part); - $num = $myEventsNavigation->GetEventCount(); - - // show (include) quick filters - include "quick-filter.php"; - -?> - - -
    <<
    - -
    '; - - //SQL statement to get result with limitation - $res = db_exec_limit($global_Con, $cmdSQLfirst_part, $cmdSQLmain_part, $cmdSQLlast_part, $myEventsNavigation->GetLimitLower(), $myEventsNavigation->GetPageSize(), $myFilter->OrderBy); - - echo ' - -
    '; - echo _MSGEvn, ' ', $myEventsNavigation->GetLimitLower(), ' ', _MSGTo, ' ', $myEventsNavigation->GetLimitUpper(), ' ', _MSGFrm, ' ', $myEventsNavigation->GetEventCount(); - echo ''; - - $myEventsNavigation->ShowNavigation(); - -?> - -
    - - - - - - - - - - - -'; - echo ''; //date - echo ''; //date - echo ''; //host - echo ''; //facility - - // get the description of priority (and get the the right color, if enabled) - $pricol = 'TD' . $tc; - $priword = FormatPriority($row['Priority'], $pricol); - echo ''; - - $message = htmlspecialchars($message); - - if(isset($_SESSION['regexp']) && $_SESSION['regexp'] != "") - { - $_SESSION['regexp'] = trim($_SESSION['regexp']); - $messageUp = strtoupper($message); - $regexpUp = strtoupper($_SESSION['regexp']); - $search_pos = strpos($messageUp, $regexpUp); - if($search_pos !== FALSE) - { - $regexpLng = strlen($_SESSION['regexp']); - $strCount = substr_count($messageUp, $regexpUp); - $strTmp = $message; - - $message = ""; - for($i = 0; $i < $strCount; $i++) - { - $messageUp = strtoupper($strTmp); - $search_pos = strpos($messageUp, $regexpUp); - $subStrSt = substr($strTmp, 0 , $search_pos); - $subStrExp = substr($strTmp, $search_pos, $regexpLng); - $subStrEnd = substr($strTmp, ($search_pos + $regexpLng)); - $message .= $subStrSt . '' . $subStrExp . ''; - if($i == ($strCount - 1)) - $message .= $subStrEnd; - - $strTmp = $subStrEnd; - } - } - } - - //Replace the words that had been read out from the ini file - if($file != FALSE) - { - for($i = 0; $i < $numarraywords; $i++) - { - $repstr = ''; - $words[$i] = trim($words[$i]); - for($j = 0; $j < strlen($words[$i]); $j++) $repstr .= '*'; - if($words[$i] != '') - $message = eregi_replace($words[$i], $repstr, $message); - } - } - - echo ''; //message - - //for changing colors - if($tc == 1) $tc = 2; - else $tc = 1; - /* - echo ""; - */ - echo ''; - } - echo "
    SysLogTag
    ' . $_GET['slt'] . '' . $row[_DATE] . '' . $row['FromHost'] . '' . $row['Facility'] . '', $priword, '', $message, '".$row['Priority']."
    "; - WriteFooter(); -?> \ No newline at end of file diff --git a/syslog-index.php b/syslog-index.php deleted file mode 100644 index 13c70d2..0000000 --- a/syslog-index.php +++ /dev/null @@ -1,243 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - include 'include.php'; - - WriteStandardHeader(_MSGShwSlt); - - //classes - include _CLASSES . 'eventsnavigation.php'; - include _CLASSES . 'eventfilter.php'; - - -// SELECT COUNT(ID) AS occurences, ID, FromHost, Message, SysLogTag FROM SystemEvents WHERE InfoUnitID=1 AND ReceivedAt >= '2004-01-01 00:00:00' AND ReceivedAt <= '2004-10-26 23:59:59' GROUP BY SysLogTag ORDER BY occurences DESC limit 0,20 - -// SELECT COUNT(ID) AS occurences, SysLogTag FROM SystemEvents WHERE (InfoUnitID = 1) AND (ReceivedAt >= '2004-01-01 00:00:00') AND (ReceivedAt <= '2004-10-26 23:59:59') GROUP BY SysLogTag - - -// TO-DO: Change "ExampleHost" to "Most Host" - - //the splitted sql statement - // Cause MSSQL has proplems with GROUP BY clauses we need to do 2 DataBase-Queries - // the first one gets the occurences on one syslogtag, the syslogtag itself and the host. - // the second one only gets the message! - // Don't try to combine these two queries! MSSQL will give you a headnut! :D - $cmdSQLfirst_part = 'SELECT '; - $cmdSQLmain_part_1 = "COUNT(ID) AS occurences, SysLogTag"; - $cmdSQLmain_part_2 = "ID, Message FROM "._DBTABLENAME; - $cmdSQLlast_part_1 = ' WHERE InfoUnitID=1 AND '; - $cmdSQLlast_part_2 = ' WHERE InfoUnitID=1 AND '; - - // define the last part of the sql statment, e.g. the where part, ordery by, etc. - $myFilter = New EventFilter; - // Which methode is choosed? - if($_SESSION['show_methode'] == "Host") - { - $myFilter->SetSQLGroup("SysLogTagHost"); - $cmdSQLmain_part_1 .= ", FromHost FROM "._DBTABLENAME; - } - else - { - if($_SESSION['tag_order'] == "Host") - $_SESSION['tag_order'] = "SysLogTag"; - $myFilter->SetSQLGroup("SysLogTag"); - $cmdSQLmain_part_1 .= " FROM "._DBTABLENAME; - } - $cmdSQLlast_part_1 .= $myFilter->GetSQLWherePart(1); - $cmdSQLlast_part_2 .= $myFilter->GetSQLWherePart(1); - - // how much data records should be displayed on one page - if($_SESSION['epp'] < 1 || $_SESSION['epp'] > 100) - $myEventsNavigation = new EventsNavigation(20); - else - $myEventsNavigation = new EventsNavigation($_SESSION['epp']); - - // show (include) quick filters - include "quick-filter.php"; - - echo "
    "; - - // how much data records match with the filter settings -// if(strtolower(_CON_MODE) == "odbc" && strtolower(_DB_APP) == "mssql") -// $myEventsNavigation->EventCount = odbc_record_count($global_Con, $cmdSQLfirst_part . $cmdSQLmain_part_1 . $cmdSQLlast_part_1); -// else - $myEventsNavigation->SetEventCount($global_Con, $cmdSQLlast_part_1); - $num = $myEventsNavigation->GetEventCount(); - $cmdSQLlast_part_1 .= $myFilter->GetSQLGroup(); - $cmdSQLlast_part_1 .= $myFilter->GetSysLogTagSQLSort(); - - // SQL statement to get result with limitation - $res1 = db_exec_limit($global_Con, $cmdSQLfirst_part, $cmdSQLmain_part_1, $cmdSQLlast_part_1, $myEventsNavigation->GetLimitLower(), $myEventsNavigation->GetPageSize(), $myFilter->OrderBy); - - if($num == 0) - { - // output if no data exit for the search string - echo '
    ', _MSGNoData, ''; - } - else - { - echo ''; - echo ' - -
    '; - echo _MSGEvn, ' ', $myEventsNavigation->GetLimitLower(), ' ', _MSGTo, ' ', $myEventsNavigation->GetLimitUpper(), ' ', _MSGFrm, ' ', $myEventsNavigation->GetEventCount(); - echo ''; - - $myEventsNavigation->ShowNavigation(); - -?> - -
    - - - - Example Host";?> - - - - - -'; - if($_SESSION['show_methode'] == "Host") - echo ''; - echo ''; - echo ''; - - $message = htmlspecialchars($message); - - if(isset($_SESSION['regexp']) && $_SESSION['regexp'] != "") - { - $_SESSION['regexp'] = trim($_SESSION['regexp']); - $messageUp = strtoupper($message); - $regexpUp = strtoupper($_SESSION['regexp']); - $search_pos = strpos($messageUp, $regexpUp); - if($search_pos !== FALSE) - { - $regexpLng = strlen($_SESSION['regexp']); - $strCount = substr_count($messageUp, $regexpUp); - $strTmp = $message; - - $message = ''; - for($i = 0; $i < $strCount; $i++) - { - $messageUp = strtoupper($strTmp); - $search_pos = strpos($messageUp, $regexpUp); - $subStrSt = substr($strTmp, 0 , $search_pos); - $subStrExp = substr($strTmp, $search_pos, $regexpLng); - $subStrEnd = substr($strTmp, ($search_pos + $regexpLng)); - $message .= $subStrSt . '' . $subStrExp . ''; - if($i == ($strCount - 1)) - $message .= $subStrEnd; - - $strTmp = $subStrEnd; - } - } - } - - //Replace the words that had been read out from the ini file - if($file != FALSE) - { - for($i = 0; $i < $numarraywords; $i++) - { - $repstr = ''; - $words[$i] = trim($words[$i]); - for($j = 0; $j < strlen($words[$i]); $j++) $repstr .= '*'; - if($words[$i] != '') - $message = eregi_replace($words[$i], $repstr, $message); - } - } - - echo ''; //message - - //for changing colors - if($tc == 1) $tc = 2; - else $tc = 1; - /* - echo ""; - */ - echo ''; - } - echo "
    SysLogTagOccurencesExample Message - Click for full list
    ' . $row1['FromHost'] . '' . $row1['SysLogTag'] . '' . $row1['occurences'] . '', $message, '".$row['Priority']."
    "; - - - } - - WriteFooter(); -?> \ No newline at end of file diff --git a/user-config-process.php b/user-config-process.php deleted file mode 100644 index e6a7e1e..0000000 --- a/user-config-process.php +++ /dev/null @@ -1,152 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - -include 'include.php'; - - - -// General variables -$szRedirectLink = ""; -$szDescription = ""; - -if( !isset($_POST['userConfig']) ) - $_POST['userConfig'] = ""; - -if($_POST['userConfig'] == "UserConfiguration") -{ - /*! - * Update language setting - !*/ - if ((eregi("^[a-z]+$", $_POST['language'])) and (strlen($_POST['language']) == 2)) - $_SESSION['language'] = $_POST['language']; - else - $_SESSION['language'] = 'en'; // default - - /*! - * Update style setting - !*/ - if ((eregi("^[a-z]+$", $_POST['stylesheet']))) - $_SESSION['stylesheet'] = $_POST['stylesheet']; - else - $_SESSION['stylesheet'] = 'phplogcon'; // default - - /*! - * Update debug setting - !*/ - $_SESSION['debug'] = (isset($_POST['debug'])) ? 1 : 0; - - /*! - * Update filter save setting - !*/ - $_SESSION['savefiltersettings'] = (isset($_POST['savefiltersettings'])) ? 1 : 0; - - if(_ENABLEUI == 1) - { - //Save filter settings to database - $query = GetUserConfigArray(); - - for($i = 0; $i < count($query); $i++) - db_exec($global_Con, $query[$i]); - } -} -elseif($_POST['bookmarkConfig'] == "BookmarkDelete") -{ - $delstr = explode("//", $_POST["favorites"]); - - $result = db_exec($global_Con, "SELECT UserLogin, PropValue FROM UserPrefs WHERE UserLogin LIKE '" . $_SESSION["usr"] . "' AND Name LIKE 'PHPLOGCON_favorites'"); - $result = db_fetch_singleresult($result); - $result = explode(",", $result["PropValue"]); - $rowcntr = count($result); - for($i = 0; $i < $rowcntr ; $i++) - { - if(stristr($result[$i], $delstr[1])) - $delval = $i; - } - $delstr = ""; - for($j = 0; $j < $rowcntr ; $j++) - { - if($j == $delval) - continue; - else - { - if($rowcntr == 2 || $j == ($rowcntr - 1)) - $delstr .= $result[$j]; - else - $delstr .= $result[$j] . ","; - } - } - db_exec($global_Con, "UPDATE UserPrefs SET PropValue='" . $delstr . "' WHERE UserLogin LIKE '" . $_SESSION["usr"] . "' AND Name LIKE 'PHPLOGCON_favorites'"); - db_close($global_Con); -} -elseif($_POST['bookmarkConfig'] == "BookmarkAdd") -{ - if( stristr($_POST["sitename"], "'") || stristr($_POST["sitename"], """) || stristr($_POST["url"], "'") || stristr($_POST["url"], """)) - $szDescription = _MSGSitInvChr; - else - { - $addstr = explode("http://", $_POST["url"]); - if(isset($addstr[1])) - $addstr[0] = $addstr[1]; - - $result = db_exec($global_Con, "SELECT UserLogin, PropValue FROM UserPrefs WHERE UserLogin LIKE '" . $_SESSION["usr"] . "' AND Name LIKE 'PHPLOGCON_favorites'"); - $result = db_fetch_singleresult($result); - if($result["PropValue"] == "") - $addstr[0] = $result["PropValue"] . $addstr[0] . "|" . $_POST["sitename"]; - else - $addstr[0] = $result["PropValue"] . "," . $addstr[0] . "|" . $_POST["sitename"]; - db_exec($global_Con, "UPDATE UserPrefs SET PropValue='" . $addstr[0] . "' WHERE UserLogin LIKE '" . $_SESSION["usr"] . "' AND Name LIKE 'PHPLOGCON_favorites'"); - db_close($global_Con); - } -} - -$szRedirectLink = "user-config.php"; -$szDescription = "Your Personal user settings have been updated"; - -?> - - - -"; -?> - -Redirecting - -



    -
    -".$szDescription."

    "; -echo "You will be redirected to this page in 1 second."; - -?> -
    - - \ No newline at end of file diff --git a/user-config.php b/user-config.php deleted file mode 100644 index 577de3b..0000000 --- a/user-config.php +++ /dev/null @@ -1,184 +0,0 @@ -. -See AUTHORS to learn who helped make it become a reality. - -*/#### #### #### #### #### #### #### #### #### #### - - - - require("include.php"); - WriteStandardHeader(_MSGUsrConf); - -?> - -
    -
    - - -

    ..:: ::..

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - : -
    - -
    - -
    - -
    - >
    -
    - -
    - >
    -
    - - -
    - - -
    - -
    - - - - - - - - - - - - - - - - - -
    - Bookmarks: -
    -'; - echo ''; - $sites = explode(",", $result["PropValue"]); - $sitecntr = count($sites); - for($i = 0; $i < $sitecntr; $i++) - { - $site = explode("|", $sites[$i]); - echo ""; - } - echo ''; - echo "\t\t"; - } - else - echo _MSGNoFav - -?> - -
    - -
    : - :
    - URL: - -
    - -
    - - \ No newline at end of file