updating to 1.0 beta version

This commit is contained in:
Rainer Gerhards 2005-07-21 12:25:42 +00:00
parent 3ba2be96cb
commit 28303608c7
49 changed files with 2023 additions and 644 deletions

View File

@ -44,11 +44,13 @@ it become a reality.
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
var $SQLWhereHost; //!< Restriction of ip/host
var $SQLWhereMsg; //!< Message must contain a certain string
/*! Constructor
*
@ -57,12 +59,11 @@ it become a reality.
*/
function EventFilter()
{
// get the selected mode (time period)
// get the selected mode (time period)
$this->TimeInterval = $_SESSION['ti'];
//Order argument
$this->OrderBy = $_SESSION['order'];
//Order argument
$this->OrderBy = $_SESSION['order'];
if($_SESSION['change'] == 'Predefined')
{
@ -295,25 +296,25 @@ it become a reality.
*/
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']];
// 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)
@ -517,16 +518,18 @@ it become a reality.
* 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($time_only)
function SetSQLWherePart($whereMode)
{
if($time_only == 1)
{
$this->SQLWherePart = $this->GetSQLWhereTime();
}
else
//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();
}
}
@ -554,7 +557,6 @@ it become a reality.
*/
function GetSQLSort()
{
switch ($this->OrderBy)
{
case "Date":
@ -581,6 +583,49 @@ it become a reality.
}
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;
}
}
?>

View File

@ -88,8 +88,8 @@ it become a reality.
$page = ($this->EventCount < $this->GetPageSize()) ? 1 : ceil($this->EventCount / $this->GetPageSize());
if($this->GetPageNumber() > 1)
{
$this->NavigationLeftArrow = "<a href=\"" .$_SERVER['PHP_SELF']."?".$url_query."&pagenum=".($this->GetPageNumber()-1)."\" class=\"searchlink\"> &laquo; </a>";
$this->NavigationFirstPage = "<a href=\"" .$_SERVER['PHP_SELF']."?".$url_query."&pagenum=1\" class=\"searchlink\"> &laquo;&laquo; </a>";
$this->NavigationLeftArrow = "<a href=\"" .$_SERVER['PHP_SELF']."?pagenum=".($this->GetPageNumber()-1)."&" . $url_query . "\" class=\"searchlink\"> &laquo; </a>";
$this->NavigationFirstPage = "<a href=\"" .$_SERVER['PHP_SELF']."?pagenum=1&" . $url_query . "\" class=\"searchlink\"> &laquo;&laquo; </a>";
}
else
{
@ -99,8 +99,8 @@ it become a reality.
if($this->GetPageNumber() < $page)
{
$this->NavigationRightArrow = "<a href=\"" .$_SERVER['PHP_SELF']."?".$url_query."&pagenum=".($this->GetPageNumber()+1)."\" class=\"searchlink\"> &raquo; </a>";
$this->NavigationLastPage = "<a href=\"" .$_SERVER['PHP_SELF']."?".$url_query."&pagenum=".$page."\" class=\"searchlink\"> &raquo;&raquo; </a>";
$this->NavigationRightArrow = "<a href=\"" .$_SERVER['PHP_SELF']."?pagenum=".($this->GetPageNumber()+1)."&" . $url_query . "\" class=\"searchlink\"> &raquo; </a>";
$this->NavigationLastPage = "<a href=\"" .$_SERVER['PHP_SELF']."?pagenum=".$page. "&" . $url_query . "\" class=\"searchlink\"> &raquo;&raquo; </a>";
}
else
{
@ -116,6 +116,8 @@ it become a reality.
{
//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;
@ -126,7 +128,7 @@ it become a reality.
if($a==$this->GetPageNumber())
echo "&nbsp;<span class=\"thissite\">$a</span>";
else
echo "&nbsp;<a href=\"" .$_SERVER['PHP_SELF']."?".$url_para."&pagenum=".$a."\" class=\"searchlink\">".$a."</a>";
echo "&nbsp;<a href=\"" .$_SERVER['PHP_SELF']."?pagenum=".$a."&" . $url_para . "\" class=\"searchlink\">".$a."</a>";
}
}
echo $this->NavigationRightArrow." ".$this->NavigationLastPage;
@ -138,8 +140,15 @@ it become a reality.
{
//get the counter result without limitation
$result = db_exec($db_con, db_num_count($restriction));
$result = db_fetch_array($result);
$this->EventCount = $result[0]; //so many data records were found
$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

View File

@ -3,7 +3,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -41,16 +41,16 @@ it become a reality.
define('_DBSERVER', 'localhost');
// DSN (ODBC) or database name (Mysql)
define('_DBNAME', 'phplogcon');
define('_DBNAME', 'monitorware');
// Userid for database connection ***
define('_DBUSERID', 'root');
define('_DBUSERID', 'user');
// Password for database connection ***
define('_DBPWD', '');
define('_DBPWD', 'pass');
// table name
define('_DBTABLENAME', 'systemevents');
define('_DBTABLENAME', 'SystemEvents');
// Switch for connection mode
// Currently only odbc and native works

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -91,7 +91,7 @@ it become a reality.
*/
function db_num_rows($res)
{
$result = mysql_num_rows($res) or db_die_with_error(_MSGNoRes);
$result = mysql_num_rows($res);
return $result;
}
@ -103,7 +103,7 @@ it become a reality.
*/
function db_fetch_array($res)
{
$result = mysql_fetch_array($res);// or db_die_with_error(_MSGNoRes);
$result = mysql_fetch_array($res);
return $result;
}
@ -113,7 +113,7 @@ it become a reality.
*/
function db_fetch_singleresult($result)
{
$result = mysql_fetch_array($result) or db_die_with_error(_MSGNoRes);
$result = mysql_fetch_array($result);
return $result;
}
@ -146,10 +146,10 @@ it become a reality.
* 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)
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);
return db_exec($db, $cmdSQL);
}
function db_free_result($result)
@ -157,6 +157,12 @@ it become a reality.
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();

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -78,12 +78,7 @@ SQL_CURSOR_STATIC (integer)
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);
odbc_fetch_into($res, $myarray);
return $myarray;
return odbc_fetch_array($res);
}
function db_result($res, $res_name)
@ -98,7 +93,21 @@ SQL_CURSOR_STATIC (integer)
function db_num_count($cmdSQLwhere_part)
{
return 'SELECT DISTINCT COUNT(*) AS num FROM ' . _DBTABLENAME . substr($cmdSQLwhere_part, 0, strpos($cmdSQLwhere_part, 'ORDER BY'));
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;
}
/*
@ -106,21 +115,37 @@ SQL_CURSOR_STATIC (integer)
* 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)
function db_exec_limit($db, $cmdSQLfirst_part, $cmdSQLmain_part, $cmdSQLwhere_part, $limitlower, $perpage, $order)
{
//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!
//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 = $cmdSQLfirst_part . "TOP " . $tmp . " " . $cmdSQLmain_part . $cmdSQLwhere_part;
$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 . "<br>";
return db_exec($db, $cmdSQL);
/*
for($i = 1; $i < $limitlower; $i++)
$row = odbc_fetch_row($result);
return $result;
*/
}
function db_free_result($result)
@ -128,6 +153,11 @@ SQL_CURSOR_STATIC (integer)
return odbc_free_result($result);
}
function db_get_tables($dbCon, $dbName)
{
return odbc_tables($dbCon);
}
function db_errno()
{
return odbc_error();
@ -158,4 +188,5 @@ SQL_CURSOR_STATIC (integer)
{
return '%';
}
?>

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -95,8 +95,7 @@ it become a reality.
*/
function db_fetch_array($res)
{
odbc_fetch_into($res, $myarray);
return $myarray;
return odbc_fetch_array($res);
}
/*
@ -136,7 +135,7 @@ it become a reality.
* 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)
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);
@ -147,6 +146,11 @@ it become a reality.
return odbc_free_result($result);
}
function db_get_tables($dbCon, $dbName)
{
return odbc_tables($dbCon);
}
function db_errno()
{
return odbc_error();

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -22,6 +22,12 @@ it become a reality.
require("include.php");
if( !isset($_GET['lid']) )
{
header("Location: events-display.php");
exit;
}
WriteStandardHeader(_MSGShwEvnDet);
?>

View File

@ -1,18 +1,46 @@
<html>
<head>
<title>Credits</title>
<body>
<h1>Credits</h1>
<p>This project is funded by <a href="http://www.adiscon.com/en/">Adiscon</a>
and initiated by <a href="mailto:rgerhards@adiscon.com">Rainer Gerhards</a>.</p>
<p>The core development team is:</p>
<ul>
<li>Andre Lorbach <a href="mailto:(alorbach@adiscon.com">(alorbach@adiscon.com</a>)</li>
<li>Michael Meckelein <a href="mailto:(mmeckelein@adiscon.com">(mmeckelein@adiscon.com</a>)</li>
<li>Rainer Gerhards <a href="mailto:(rgerhards@adiscon.com">(rgerhards@adiscon.com</a>)</li>
</ul>
<p><small><a href="index.htm">[Doc Home]</a> <a href="http://www.monitorware.com">[MonitorWare Web Site]</a></small></p>
<p>Copyright &copy; 2003 by <a href="http://www.adiscon.com">Adiscon</a>.
Initiated by <a href="rgerhards@adiscon.com">Rainer Gerhards</a>. See <a href="license.htm">license</a> for details.</p>
</body>
<head>
<title>phpLogCon Manual :: Credits</title>
<META NAME="robots" CONTENT="INDEX,FOLLOW">
<META NAME="copyright" CONTENT="Copyright (C) 2003 Adiscon GmbH, Erftstadt - www.adiscon.com">
<META name="Keywords" content="<? echo $strKeywords ?> sql server win NT windows 7 2000 replication merge nt transactional date time resolver">
<META http-equiv="pragma" CONTENT="no-cache">
<link rel="stylesheet" href="../layout/phplogcon.css" type="text/css">
</head>
<body>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<tr>
<td width="220" align="left"><img src="../images/phplogcon.gif" border="0"></td>
<td align="left">
<h1>phpLogCon monitoring</h1>
</td>
</tr>
</table>
<p><small><a href="index.htm">[Doc Home]</a></small></p>
<h2><a name="top">5. Credits</a></h2>
<p>This project is funded by <a href="http://www.adiscon.com/en/">Adiscon</a> and initiated by <a href="mailto:rgerhards@adiscon.com">Rainer Gerhards</a>.</p>
<p>The core development team is:</p>
<ul>
<li>Andre Lorbach <a href="mailto:(alorbach@adiscon.com">(alorbach@adiscon.com</a>)</li>
<li>Michael Meckelein <a href="mailto:(mmeckelein@adiscon.com">(mmeckelein@adiscon.com</a>)</li>
<li>Rainer Gerhards <a href="mailto:(rgerhards@adiscon.com">(rgerhards@adiscon.com</a>)</li>
</ul>
<p>Additional developers:</p>
<ul>
<li>Andreas Hofmann <a href="mailto:(utg-man@gmx.de">(utg-man@gmx.de</a>)</li>
</ul>
<p><small><a href="index.htm">[Doc Home]</a>&nbsp;<a href="http://www.monitorware.com" target="_blank">[MonitorWare Web Site]</a></small></p>
<center>
<table>
<tr>
<td>
<br /><br />
<small><i><a href="http://www.phplogcon.com/" target="phplogcon">phpLogCon</a>, Copyright &copy; 2003 - 2004 <a href="http://www.adiscon.com" target="_blank">Adiscon GmbH</a></i></small>
</td>
</tr>
</table>
</center>
</body>
</html>

View File

@ -1,52 +1,67 @@
<html>
<head>
<title>phpLogCon Design Goals</title></head>
<title>phpLogCon Manual :: Design Goals</title>
<META NAME="robots" CONTENT="INDEX,FOLLOW">
<META NAME="copyright" CONTENT="Copyright (C) 2003 Adiscon GmbH, Erftstadt - www.adiscon.com">
<META name="Keywords" content="<? echo $strKeywords ?> sql server win NT windows 7 2000 replication merge nt transactional date time resolver">
<META http-equiv="pragma" CONTENT="no-cache">
<link rel="stylesheet" href="../layout/phplogcon.css" type="text/css">
</head>
<body>
<h1>Design Goals</h1>
<p>phpLogCon&nbsp;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.</p>
<h2>Main Usage Points</h2>
<p>phpLogCon&nbsp;is primarily being used for</p>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<tr>
<td width="220" align="left"><img src="../images/phplogcon.gif" border="0"></td>
<td align="left">
<h1>phpLogCon monitoring</h1>
</td>
</tr>
</table>
<p><small><a href="index.htm">[Doc Home]</a></small></p>
<h2><a name="top">1. Design Goals</a></h2>
<ul>
<li>
quick overview over current system activity
<li>
accessing the log data while not being able to access the admin workstation
(e.g. being on the road or roaming through the enterprise)</li>
<li><a href="#1_1">1.1 Main Usage Points</a></li>
<li><a href="#1_2">1.2 Portability</a></li>
</ul>
<p>For in-depth analysis, we recommend using the MonitorWare Console. It provides
advanced analysis capabilities not found inside phpLogCon.</p>
<h2>Portability</h2>
<p>phpLogCon&nbsp;is being implemented as a set of PHP scripts to ensure
portability between different platforms. Target platforms for&nbsp;phpLogCon
<br>
<p>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.</p>
<h3><a name="1_1">1.1 Main Usage Points</a></h3>
<p>phpLogCon is primarily being used for</p>
<ul>
<li>quick overview over current system activity</li>
<li>accessing the log data while not being able to access the admin workstation (e.g. being on the road or roaming through the enterprise)</li>
</ul>
<p>For in-depth analysis, we recommend using the MonitorWare Console. It provides advanced analysis capabilities not found inside phpLogCon.</p>
<small><a href="#top">[Top]</a></small>
<h3><a name="1_2">1.2 Portability</a></h3>
<p>phpLogCon is being implemented as a set of PHP scripts to ensure
portability between different platforms. Target platforms for phpLogCon
are:</p>
<ul>
<li>
Windows with IIS
<li>
Windows with Apache
<li>
Linux / *nix with Apache</li>
<li>Windows with IIS</li>
<li>Windows with Apache</li>
<li>Linux / *nix with Apache</li>
</ul>
<p>The standard set of database systems is supported, that is</p>
<ul>
<li>
Microsoft SQL Server (via ODBC)
<li>
Microsoft Jet (aka Access, via ODBC)
<li>
MySQL (via ODBC and via native classes)
<span style="BACKGROUND-COLOR: #ffff00">to be determined! Native
mysql is recommended for the
best performance!</span></li>
<li>Microsoft SQL Server (via ODBC)</li>
<li>Microsoft Jet (aka Access, via ODBC)</li>
<li>MySQL (via ODBC and via native classes)<br>
<b>Note: Native mysql is recommended for the best performance!</b></li>
</ul>
<p>Of course, other database systems can most likely be used with&nbsp;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).&nbsp;</p>
<p><small><a href="index.htm">[Doc Home]</a> <a href="http://www.monitorware.com">[MonitorWare
Web Site]</a></small></p>
<p>Copyright &copy; 2003 by <a href="http://www.adiscon.com">Adiscon</a>. Initiated by <a href="mailto:rgerhards@adiscon.com">
Rainer Gerhards</a>. See <a href="license.htm">license</a> for details.</p>
<p>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).</p>
<small><a href="#top">[Top]</a></small>
<p><small><a href="index.htm">[Doc Home]</a>&nbsp;<a href="http://www.monitorware.com" target="_blank">[MonitorWare Web Site]</a></small></p>
<center>
<table>
<tr>
<td>
<br /><br />
<small><i><a href="http://www.phplogcon.com/" target="phplogcon">phpLogCon</a>, Copyright &copy; 2003 - 2004 <a href="http://www.adiscon.com" target="_blank">Adiscon GmbH</a></i></small>
</td>
</tr>
</table>
</center>
</body>
</html>

View File

@ -1,39 +1,57 @@
<html>
<head>
<title>phpLogCon - Developer notes</title></head>
<title>phpLogCon Manual :: Developer Notes</title>
<META NAME="robots" CONTENT="INDEX,FOLLOW">
<META NAME="copyright" CONTENT="Copyright (C) 2003 Adiscon GmbH, Erftstadt - www.adiscon.com">
<META name="Keywords" content="<? echo $strKeywords ?> sql server win NT windows 7 2000 replication merge nt transactional date time resolver">
<META http-equiv="pragma" CONTENT="no-cache">
<link rel="stylesheet" href="../layout/phplogcon.css" type="text/css">
</head>
<body>
<h1>Developer notes</h1>
<p>
phpLogCon is an open source project. Feel free to change what you want. Here
you will find some hints and background knowledge about phpLogCon.</p>
<h2>Gernarel database connection functions</h2>
<p>The database function in phpLogCon are called similar to well-know commands from
e.g. php mysql functions. All database functions beginn 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.</p>
<H2>ODBC functions</H2>
<P>phpLogCon support also database connection via ODBC. You can find the functions in
db-drv\odbc.php. 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.</P>
<p><b>Known Issues</b><br />At the moment you can only use ODBC for query Microsoft databases like MSSQL,
Jet, ... A second database layer which can handle different sql formats should be implement in the future!</p>
<H2>Include files</H2>
<H2>include.php</H2>
<P>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).</P>
<P>Note: At each page of phpLogCon, include.php should be included!</P>
<P>&nbsp;</P>
<P><small><a href="index.htm">[Doc Home]</a> <a href="http://www.monitorware.com">[MonitorWare
Web Site]</a></small></P>
<p>Copyright &copy; 2003 by <a href="http://www.adiscon.com">Adiscon</a>. Initiated by <a href="mailto:rgerhards@adiscon.com">
Rainer Gerhards</a>. See <a href="license.htm">license</a> for details.</p>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<tr>
<td width="220" align="left"><img src="../images/phplogcon.gif" border="0"></td>
<td align="left">
<h1>phpLogCon monitoring</h1>
</td>
</tr>
</table>
<p><small><a href="index.htm">[Doc Home]</a></small></p>
<h2><a name="top">6. Developer notes</a></h2>
<ul>
<li><a href="#6_1">6.1 General Database Connection Functions</a></li>
<li><a href="#6_2">6.2 ODBC Connection functions</a></li>
<li><a href="#6_3">6.3 Include Files</a></li>
</ul>
<br>
<p>phpLogCon is an open source project. Feel free to change what you want. Here you will find some hints and background knowledge about phpLogCon.</p>
<h3><a name="6_1">6.1 Gernarel database connection functions</a></h3>
<p>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.</p>
<small><a href="#top">[Top]</a></small>
<h3><a name="6_2">6.2 ODBC functions</a></h3>
<p>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.</p>
<h4>Known Issues</h4>
<p>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!</p>
<small><a href="#top">[Top]</a></small>
<h3><a name="6_3">6.3 Include files</a></h3>
<h4>include.php</h4>
<p>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).</p>
<p>Note: At each page of phpLogCon, include.php should be included!</p>
<h4>config.php</h4>
<p>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.</p>
<small><a href="#top">[Top]</a></small>
<p><small><a href="index.htm">[Doc Home]</a>&nbsp;<a href="http://www.monitorware.com" target="_blank">[MonitorWare Web Site]</a></small></p>
<center>
<table>
<tr>
<td>
<br /><br />
<small><i><a href="http://www.phplogcon.com/" target="phplogcon">phpLogCon</a>, Copyright &copy; 2003 - 2004 <a href="http://www.adiscon.com" target="_blank">Adiscon GmbH</a></i></small>
</td>
</tr>
</table>
</center>
</body>
</html>

View File

@ -1,24 +1,52 @@
<html>
<head>
<title>MonitorWare Web Interface - Getting Started</title></head>
<title>phpLogCon Manual :: Getting Started</title>
<META NAME="robots" CONTENT="INDEX,FOLLOW">
<META NAME="copyright" CONTENT="Copyright (C) 2003 Adiscon GmbH, Erftstadt - www.adiscon.com">
<META name="Keywords" content="<? echo $strKeywords ?> sql server win NT windows 7 2000 replication merge nt transactional date time resolver">
<META http-equiv="pragma" CONTENT="no-cache">
<link rel="stylesheet" href="../layout/phplogcon.css" type="text/css">
</head>
<body>
<h1>
phpLogCon&nbsp;- Getting Started</h1>
<p>Getting started with&nbsp;phpLogCon is just a few simple steps:</p>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<tr>
<td width="220" align="left"><img src="../images/phplogcon.gif" border="0"></td>
<td align="left">
<h1>phpLogCon monitoring</h1>
</td>
</tr>
</table>
<p><small><a href="index.htm">[Doc Home]</a></small></p>
<h2><a name="top">2. Getting Started</a></h2>
<ul>
<li>
make sure your system meets the minimum requirements
<li>
under windows, run the supplied setup program - under other environments,
extract the archive to a proper location
<li>
point your browser to the root of the phpLogCon
<li>
configure&nbsp;phpLogCon via the browser-based dialog that pops up</li>
<li><a href="#2_1">2.1 Minimum Requirements</a></li>
</ul>
<p><small><a href="index.htm">[Doc Home]</a> <a href="http://www.monitorware.com">[MonitorWare
Web Site]</a></small></p>
<p>Copyright &copy; 2003 by <a href="http://www.adiscon.com">Adiscon</a>. Initiated by <a href="mailto:rgerhards@adiscon.com">
Rainer Gerhards</a>. See <a href="license.htm">license</a> for details.</p>
<br>
<p>Getting started with phpLogCon is just a few simple steps:</p>
<ul>
<li>make sure your system meets the minimum requirements</li>
<li>extract the archive to a proper location</li>
<li>" after setup, point your browser to the root of the phpLogCon (If that doesn't work, point to 'index.php' in the root directory)</li>
</ul>
<h3><a name="2_1">2.1 Minimum Requirements</a></h3>
<p>The minimum requirements of your hardware are given by your database server application. The software requirements for phpLogCon meet the following:</p>
<ul>
<li>A running database server, at best one of the with phpLogCon has been tested (see 1.2 for more information)</li>
<li>A database, i.e. created by MonitorWare Agent, for logging information</li>
</ul>
<small><a href="#top">[Top]</a></small>
<p><small><a href="index.htm">[Doc Home]</a>&nbsp;<a href="http://www.monitorware.com" target="_blank">[MonitorWare Web Site]</a></small></p>
<center>
<table>
<tr>
<td>
<br /><br />
<small><i><a href="http://www.phplogcon.com/" target="phplogcon">phpLogCon</a>, Copyright &copy; 2003 - 2004 <a href="http://www.adiscon.com" target="_blank">Adiscon GmbH</a></i></small>
</td>
</tr>
</table>
</center>
</body>
</html>

View File

@ -1,11 +1,36 @@
<html>
<head>
<title>phpLogCon - History</title>
<body>
<h1>MonitorWare Web Interface - Release History</h1>
<p>2003-03-05&nbsp;&nbsp;&nbsp; Actual project was started</p>
<p><small><a href="index.htm">[Doc Home]</a> <a href="http://www.monitorware.com">[MonitorWare Web Site]</a></small></p>
<p>Copyright &copy; 2003 by <a href="http://www.adiscon.com">Adiscon</a>.
Initiated by <a href="mailto:rgerhards@adiscon.com">Rainer Gerhards</a>. See <a href="license.htm">license</a> for details.</p>
</body>
<head>
<title>phpLogCon Manual :: Release History</title>
<META NAME="robots" CONTENT="INDEX,FOLLOW">
<META NAME="copyright" CONTENT="Copyright (C) 2003 Adiscon GmbH, Erftstadt - www.adiscon.com">
<META name="Keywords" content="<? echo $strKeywords ?> sql server win NT windows 7 2000 replication merge nt transactional date time resolver">
<META http-equiv="pragma" CONTENT="no-cache">
<link rel="stylesheet" href="../layout/phplogcon.css" type="text/css">
</head>
<body>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<tr>
<td width="220" align="left"><img src="../images/phplogcon.gif" border="0"></td>
<td align="left">
<h1>phpLogCon monitoring</h1>
</td>
</tr>
</table>
<p><small><a href="index.htm">[Doc Home]</a></small></p>
<h2><a name="top">7. Release History</a></h2>
<p>2003-03-05&nbsp;&nbsp;&nbsp; Actual project was started</p>
<p><small><a href="index.htm">[Doc Home]</a>&nbsp;<a href="http://www.monitorware.com" target="_blank">[MonitorWare Web Site]</a></small></p>
<center>
<table>
<tr>
<td>
<br /><br />
<small><i><a href="http://www.phplogcon.com/" target="phplogcon">phpLogCon</a>, Copyright &copy; 2003 - 2004 <a href="http://www.adiscon.com" target="_blank">Adiscon GmbH</a></i></small>
</td>
</tr>
</table>
</center>
</body>
</html>

View File

@ -1,7 +1,22 @@
<html>
<head>
<title>phpLogCon 1.0</title></head>
<title>phpLogCon Manual :: Index</title>
<META NAME="robots" CONTENT="INDEX,FOLLOW">
<META NAME="copyright" CONTENT="Copyright (C) 2003 Adiscon GmbH, Erftstadt - www.adiscon.com">
<META name="Keywords" content="<? echo $strKeywords ?> sql server win NT windows 7 2000 replication merge nt transactional date time resolver">
<META http-equiv="pragma" CONTENT="no-cache">
<link rel="stylesheet" href="../layout/phplogcon.css" type="text/css">
</head>
<body>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<tr>
<td width="220" align="left"><img src="../images/phplogcon.gif" border="0"></td>
<td align="left">
<h1>phpLogCon monitoring</h1>
</td>
</tr>
</table>
<h1>phpLogCon 1.0</h1>
<p>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
@ -9,25 +24,69 @@
other solutions as well.</p>
<ul>
<li>
<a href="design.htm">Design</a>
<a href="design.htm">1. Design Goals</a>
<ul>
<li><a href="design.htm#1_1">1.1 Main Usage Points</a></li>
<li><a href="design.htm#1_2">1.2 Portability</a></li>
</ul>
</li>
<li>
<a href="getting-started.htm">Getting Started</a>
<a href="getting-started.htm">2. Getting Started</a>
<ul>
<li><a href="getting-started.htm#2_1">2.1 Minimum Requirements</a></li>
</ul>
</li>
<li>
<a href="using.htm">Using the Interface</a>
<a href="setup.htm">3. phpLogCon Setup</a>
<ul>
<li><a href="setup.htm#3_1">3.1 Configuration Settings</a></li>
</ul>
</li>
<li>
<a href="setup.htm">Setup</a>
<a href="using.htm">4. Using The Web Interface</a>
<ul>
<li><a href="using.htm#4_1">4.1 General Concepts</a></li>
<li><a href="using.htm#4_2">4.2 Overall Event Filter</a></li>
<li><a href="using.htm#4_3">4.3 Page Layout</a></li>
<li><a href="using.htm#4_4">4.4 HomePage/Index</a></li>
<li><a href="using.htm#4_5">4.5 Show Events</a></li>
<li><a href="using.htm#4_6">4.6 Show SysLogTags</a></li>
<li><a href="using.htm#4_7">4.7 Details</a></li>
<li><a href="using.htm#4_8">4.8 Filter Options</a></li>
<li><a href="using.htm#4_9">4.9 User Options</a></li>
<li><a href="using.htm#4_10">4.10 Refresh</a></li>
</ul>
</li>
<li>
<a href="credits.htm">Credits</a>
<a href="credits.htm">5. Credits</a>
</li>
<li>
<a href="history.htm">release history</a>
<LI>
<A href="developer-notes.htm">developer notes</A></LI>
<a href="developer-notes.htm">6. Developer notes</a>
<ul>
<li><a href="developer-notes.htm#6_1">6.1 General Database Connection Functions</a></li>
<li><a href="developer-notes.htm#6_2">6.2 ODBC Connection functions</a></li>
<li><a href="developer-notes.htm#6_3">6.3 Include Files</a></li>
</ul>
</li>
<li>
<a href="history.htm">7. Release history</a>
</li>
<li>
<a href="license.htm">8. License</a>
</li>
</ul>
<p>See <a href="http://www.monitorware.com/en/">http://www.monitorware.com/en/</a> for
further details about the MonitorWare solution.</p>
<p><small><a href="index.htm">[Doc Home]</a> <a href="http://www.monitorware.com">[MonitorWare
Web Site]</a></small></p>
<p>Copyright &copy; 2003 by <a href="http://www.adiscon.com">Adiscon</a>. Initiated by <a href="mailto:rgerhards@adiscon.com">
Rainer Gerhards</a>. See <a href="license.htm">license</a> for details.</p>
<p>See <a href="http://www.monitorware.com/en/">http://www.monitorware.com/en/</a> for further details about the MonitorWare solution.</p>
<p><small><a href="http://www.monitorware.com" target="_blank">[MonitorWare Web Site]</a></small></p>
<center>
<table>
<tr>
<td>
<br /><br />
<small><i><a href="http://www.phplogcon.com/" target="phplogcon">phpLogCon</a>, Copyright &copy; 2003 - 2004 <a href="http://www.adiscon.com" target="_blank">Adiscon GmbH</a></i></small>
</td>
</tr>
</table>
</center>
</body>
</html>

View File

@ -1,12 +1,39 @@
<html>
<head>
<title>MonitorWare Web Interface - License</title>
<body>
<h1>MonitorWare Web Interface - License</h1>
<p>MWWeb is currently under development. No license has yet been selected. Use
at your sole risk.</p>
<p><small><a href="index.htm">[Doc Home]</a> <a href="http://www.monitorware.com">[MonitorWare Web Site]</a></small></p>
<p>Copyright &copy; 2003 by <a href="http://www.adiscon.com">Adiscon</a>.
Initiated by <a href="mailto:rgerhards@adiscon.com">Rainer Gerhards</a>. See <a href="license.htm">license</a> for details.</p>
</body>
<head>
<title>phpLogCon Manual :: License</title>
<META NAME="robots" CONTENT="INDEX,FOLLOW">
<META NAME="copyright" CONTENT="Copyright (C) 2003 Adiscon GmbH, Erftstadt - www.adiscon.com">
<META name="Keywords" content="<? echo $strKeywords ?> sql server win NT windows 7 2000 replication merge nt transactional date time resolver">
<META http-equiv="pragma" CONTENT="no-cache">
<link rel="stylesheet" href="../layout/phplogcon.css" type="text/css">
</head>
<body>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<tr>
<td width="220" align="left"><img src="../images/phplogcon.gif" border="0"></td>
<td align="left">
<h1>phpLogCon monitoring</h1>
</td>
</tr>
</table>
<p><small><a href="index.htm">[Doc Home]</a></small></p>
<h2><a name="top">8. License</a></h2>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>If you have questions about phpLogCon in general, please email info@adiscon.com. To learn more about phpLogCon, please visit <a href="http://www.phplogcon.com" target="_blank">www.phplogcon.com</a>.</p>
<p><small><a href="index.htm">[Doc Home]</a>&nbsp;<a href="http://www.monitorware.com" target="_blank">[MonitorWare Web Site]</a></small></p>
<center>
<table>
<tr>
<td>
<br /><br />
<small><i><a href="http://www.phplogcon.com/" target="phplogcon">phpLogCon</a>, Copyright &copy; 2003 - 2004 <a href="http://www.adiscon.com" target="_blank">Adiscon GmbH</a></i></small>
</td>
</tr>
</table>
</center>
</body>
</html>

View File

@ -1,34 +1,47 @@
<html>
<head>
<title>phpLogCon - Setup</title></head>
<title>phpLogCon Manual :: phpLogCon Setup</title>
<META NAME="robots" CONTENT="INDEX,FOLLOW">
<META NAME="copyright" CONTENT="Copyright (C) 2003 Adiscon GmbH, Erftstadt - www.adiscon.com">
<META name="Keywords" content="<? echo $strKeywords ?> sql server win NT windows 7 2000 replication merge nt transactional date time resolver">
<META http-equiv="pragma" CONTENT="no-cache">
<link rel="stylesheet" href="../layout/phplogcon.css" type="text/css">
</head>
<body>
<h1>
phpLogCon&nbsp;Setup</h1>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<tr>
<td width="220" align="left"><img src="../images/phplogcon.gif" border="0"></td>
<td align="left">
<h1>phpLogCon monitoring</h1>
</td>
</tr>
</table>
<p><small><a href="index.htm">[Doc Home]</a></small></p>
<h2><a name="top">3. phpLogCon Setup</a></h2>
<ul>
<li>
For Windows installations, a setup program is included. Please note that the
product is also being installed by running either the WinSyslog or MonitorWare
Agent Setup programs.
<li>
For other environments, there is a zip file containing the full project
(including all pages and full documentation)
<li>
It is assumed that the MonitorWare database is already existing
-&nbsp;phpLogCon will NOT create it</li>
<li><a href="#3_1">3.1 Configuration Settings</a></li>
</ul>
<p>If you intend to use phpLogCon with a non-MonitorWare generated database, you
can easily do so. The key point is to make sure that the database contains all
necessary data at the right locations. You might want to look up the
MonitorWare schema to see what is needed. For syslog events, this should be
fairly simple to acomplish as only a limited set of fields is to be provided.
If you purchase our low-priced support contract, we will gladly assist you in
getting this going ;). Currently, the link to the schema is missing. This is
not by intention. If it is missing by the time you read us, contact <a href="mailto:support@adiscon.com">
support@adiscon.com</a>. The schema is of course provided freely, was just
not at hand while writing this...</p>
<p><small><a href="index.htm">[Doc Home]</a> <a href="http://www.monitorware.com">[MonitorWare
Web Site]</a></small></p>
<p>Copyright &copy; 2003 by <a href="http://www.adiscon.com">Adiscon</a>. Initiated by <a href="mailto:rgerhards@adiscon.com">
Rainer Gerhards</a>. See <a href="license.htm">license</a> for details.</p>
<br>
<p>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.</p>
<p>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)!</p>
<h3><a name="3_1">3.1 Configuration Settings</a></h3>
<h4>Config.php</h4>
<p>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.</p>
<h4>phplogcon.ini</h4>
<p>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.</p>
<small><a href="#top">[Top]</a></small>
<p><small><a href="index.htm">[Doc Home]</a>&nbsp;<a href="http://www.monitorware.com" target="_blank">[MonitorWare Web Site]</a></small></p>
<center>
<table>
<tr>
<td>
<br /><br />
<small><i><a href="http://www.phplogcon.com/" target="phplogcon">phpLogCon</a>, Copyright &copy; 2003 - 2004 <a href="http://www.adiscon.com" target="_blank">Adiscon GmbH</a></i></small>
</td>
</tr>
</table>
</center>
</body>
</html>

View File

@ -1,76 +1,142 @@
<html>
<head>
<title>phpLogCon - Using</title></head>
<title>phpLogCon Manual :: Using The Web Interface</title>
<META NAME="robots" CONTENT="INDEX,FOLLOW">
<META NAME="copyright" CONTENT="Copyright (C) 2003 Adiscon GmbH, Erftstadt - www.adiscon.com">
<META name="Keywords" content="<? echo $strKeywords ?> sql server win NT windows 7 2000 replication merge nt transactional date time resolver">
<META http-equiv="pragma" CONTENT="no-cache">
<link rel="stylesheet" href="../layout/phplogcon.css" type="text/css">
</head>
<body>
<h1>Using the Web Interface</h1>
<h2>General concepts</h2>
<h3>Overall Event Filter</h3>
<p>
All processing done by&nbsp;phpLogCon is relative to a user-selected filter.
That is, only events that match the applicable filter condition will be show.
In the initial release, the filter condition will be solely time-based. The
default filter is "today". Other filters are "the last nn minutes",
"the last nn hours", "today", "this week" and "from date ... to date ...".
The filter can always be set by following a link on top
of each web page.<h3>Page Layout</h3>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<tr>
<td width="220" align="left"><img src="../images/phplogcon.gif" border="0"></td>
<td align="left">
<h1>phpLogCon monitoring</h1>
</td>
</tr>
</table>
<p><small><a href="index.htm">[Doc Home]</a></small></p>
<h2><a name="top">4. Using the Web Interface</a></h2>
<ul>
<li><a href="#4_1">4.1 General Concepts</a></li>
<li><a href="#4_2">4.2 Overall Event Filter</a></li>
<li><a href="#4_3">4.3 Page Layout</a></li>
<li><a href="#4_4">4.4 HomePage/Index</a></li>
<li><a href="#4_5">4.5 Show Events</a></li>
<li><a href="#4_6">4.6 Show SysLogTags</a></li>
<li><a href="#4_7">4.7 Details</a></li>
<li><a href="#4_8">4.8 Filter Options</a></li>
<li><a href="#4_9">4.9 User Options</a></li>
<li><a href="#4_10">4.10 Refresh</a></li>
</ul>
<br>
<h3><a name="4_1">4.1 General concepts</a></h3>
<p>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.</p>
<small><a href="#top">[Top]</a></small>
<h3><a name="4_2">4.2 Overall Event Filter</a></h3>
<p>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.</p>
<p>There are two types of filters in phpLogCon:</p>
<h4>General Filters:</h4>
<p>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.</p>
<p>General Filters are:</p>
<ul>
<li>Date - The time when the event occurred</li>
<li>InfoUnits - The Units, where the event had been logged (i.e. EventReporter or SysLog)</li>
<li>Priority - Filtered by Priority of an event</li>
<li>Order by - Also you can order the events, in which order they should appear in Events Display</li>
<li>Refresh - Not that a filter setting, but it can be set in which distance a page should be refreshed. Note that it has effect on all pages!</li>
</ul>
<h4>Quick Filters:</h4>
<p>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.</p>
<p>Quick Filters are:</p>
<ul>
<li>Logs per page - How many logs should be displayed per page</li>
<li>Search for IP/Host - You can filter out one Host or IP</li>
<li>Message must contain - Searching for an regular expression and color it in specified color</li>
</ul>
<small><a href="#top">[Top]</a></small>
<h3><a name="4_3">4.3 Page Layout</a></h3>
<p>Every page will follow a standard layout. It has three areas
<ul>
<li>
header
<li>
main work area
<li>
footer</li>
<li>header</li>
<li>main work area</li>
<li>footer</li>
</ul>
<p>The <b>header</b> holds the top menu items and the current date and time. It
also has quick links to:</p>
<p>The <b>header</b> holds the top menu items and the current date and time. It also holds:</p>
<ul>
<li>
MonitorWare's Event Repository
<li>
MonitorWare's Event Discussion Groups
<li>
a text box with buttons to search Google and Google Groups
<li>
... other things may come up during developmen ...
<li>
a short description of the current filter as well as a way to change it (in the
initial release, a drop down list will do)</li>
<li>On enabled user interface, the currently logged in user</li>
<li>On enabled user interface, a link to logout the user</li>
<li>When enabled, some debug information about the current database settings</li>
</ul>
<p>When we have the notation of a user inside phpLogCon, this should probably come
out of the user profile. Over time, we may also provide dynamic links based on
what the user did last.</p>
<p>The <b>main work area </b>is the primary display/work space. Obviously its
content is depending on the called function.</p>
<p>The <b>main work area</b> is the primary display/work space. Obviously its content is depending on the called function.</p>
<p>The <b>footer</b> holds some general information:</p>
<ul>
<li>
copyright notice, credits to authors &amp; links to license</li>
<li>copyright notice, credits to authors & links to homepage of phpLogCon and Adiscon</li>
</ul>
<h2>Homepage</h2>
<small><a href="#top">[Top]</a></small>
<h3><a name="4_4">4.4 Homepage/Index</a></h3>
<p>The main work area of the home displays statistical information:
<ul>
<li>
number of syslog events
<li>
number of event log events
<li>
top 5 devices reporting</li>
<li>Number of syslog events</li>
<li>Number of event log events</li>
<li>Top 5 devices reporting</li>
</ul>
<p>Of course, all of this in respect to the current filter.</p>
<h2>Utility functions</h2>
<h3>Configuration Page</h3>
<p>The configuration page allows the user to specify settings important for the
overall operation of phpLogCon. So far, it will allow to configure:
<UL>
<li>
connection string for the database (please note that passwords will be stored
unencrypted as of now)
<span style="BACKGROUND-COLOR: #ffff00">Question:
any easy way to avoid this?&nbsp;</span></li></UL>
<p><small><a href="index.htm">[Doc Home]</a> <a href="http://www.monitorware.com">[MonitorWare
Web Site]</a></small></p>
<p>Copyright &copy; 2003 by <a href="http://www.adiscon.com">Adiscon</a>. Initiated by <a href="mailto:rgerhards@adiscon.com">
Rainer Gerhards</a>. See <a href="license.htm">license</a> for details.</p>
<small><a href="#top">[Top]</a></small>
<h3><a name="4_5">4.5 Show Events</a></h3>
<p>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.</p>
<small><a href="#top">[Top]</a></small>
<h3><a name="4_6">4.6 Show SysLogTags</a></h3>
<p>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.</p>
<p>It brings you two new quick filters to filter and order the SysLogTags for fine-tuning:</p>
<h4>Display SysLogTags</h4>
<p>In this drop-down menu you can choose between <b>'Syslog'</b>, that will show you all Syslogs those appear in database with a sample message and <b>'SysLog corresponding to host'</b>, what will show you every SysLogTag that appeared on each Host.</p>
<h4>Order by</h4>
<p>You can order the Events ascending or descending by SysLogTag, Occurrences or Hosts, who have send this SysLogTag.</p>
<p>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!</p>
<small><a href="#top">[Top]</a></small>
<h3><a name="4_7">4.7 Details</a></h3>
<p>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.</p>
<small><a href="#top">[Top]</a></small>
<h3><a name="4_8">4.8 Filter Options</a></h3>
<p>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.</p>
<p>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!</p>
<p>If User Interface is disabled, the settings will only stay like this in the current session. Next time opening phpLogCon, they will be default.</p>
<small><a href="#top">[Top]</a></small>
<h3><a name="4_9">4.9 User Options</a></h3>
<p>User options can look in two different versions:</p>
<ul>
<li>User Interface is enabled</li>
<li>User Interface is disabled</li>
</ul>
<p>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:</p>
<ul>
<li>Style sheet - You can choose a style sheet you like an gives you best viewing</li>
<li>Language - Choose your desired language. Currently English and German is available</li>
<li>Debug - User can switch on/off Debug outputs in the whole script</li>
</ul>
<p>The following settings are only available in User Interface mode:</p>
<ul>
<li>Save filter settings to database - Save filter settings in database and load them on login</li>
<li>Bookmarks - User can add, delete and visit his favorite/usefully homepages</li>
</ul>
<small><a href="#top">[Top]</a></small>
<h3><a name="4_10">4.10 Refresh</a></h3>
<p>Simply refresh the page. It's the same as hitting F5 in the most of the browsers.</p>
<small><a href="#top">[Top]</a></small>
<p><small><a href="index.htm">[Doc Home]</a>&nbsp;<a href="http://www.monitorware.com" target="_blank">[MonitorWare Web Site]</a></small></p>
<center>
<table>
<tr>
<td>
<br /><br />
<small><i><a href="http://www.phplogcon.com/" target="phplogcon">phpLogCon</a>, Copyright &copy; 2003 - 2004 <a href="http://www.adiscon.com" target="_blank">Adiscon GmbH</a></i></small>
</td>
</tr>
</table>
</center>
</body>
</html>

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -18,7 +18,7 @@ it become a reality.
*/#### #### #### #### #### #### #### #### #### ####
require('include.php');
include 'include.php';
WriteStandardHeader(_MSGShwEvn);
@ -36,7 +36,6 @@ it become a reality.
$cmdSQLlast_part .= $myFilter->GetSQLWherePart(0);
$cmdSQLlast_part .= $myFilter->GetSQLSort();
//Set Priority Filter if activated
/*if ($Priority!=0) {
$cmdSQLlast_part .= " where Priority = ".$Priority;
@ -61,11 +60,10 @@ it become a reality.
echo "\t<font color=red>Temporally UNAVAIBLE!!</font>";
echo "</form>";
*/
echo '<br><table>';
//SQL statement to get result with limitation
$res = db_exec_limit($global_Con, $cmdSQLfirst_part, $cmdSQLmain_part, $cmdSQLlast_part, $myEventsNavigation->GetLimitLower(), $myEventsNavigation->GetPageSize());
$res = db_exec_limit($global_Con, $cmdSQLfirst_part, $cmdSQLmain_part, $cmdSQLlast_part, $myEventsNavigation->GetLimitLower(), $myEventsNavigation->GetPageSize(), $myFilter->OrderBy);
if($num == 0)
{
@ -125,6 +123,7 @@ it become a reality.
$numarraywords = count($words);
}
$tc = 1;
while($row = db_fetch_array($res))
{
if (db_errno() != 0)
@ -132,8 +131,8 @@ it become a reality.
echo db_errno() . ': ' . db_error(). '\n';
}
//choose InfoUnitdType 1 = SL = Syslog, 3 = Eventreporter, O = Other
switch ($row[6])
//choose InfoUnitdType 1 = SL => Syslog ; 3 = ER => Eventreporter ; O = O => Other
switch ($row['InfoUnitID'])
{
case 1:
$infounit = 'SL';
@ -144,24 +143,23 @@ it become a reality.
default:
$infounit = 'O';
}
static $tc = 1;
if($row[5] == "")
if($row['Message'] == "")
$message = _MSGNoMsg;
else
$message = $row[5];
$message = $row['Message'];
echo '<tr>';
echo '<td CLASS=TD' . $tc . '><nobr>'.$row[1].'</nobr></td>'; //date
echo '<td CLASS=TD' . $tc . '>'.$row[2].'</td>'; //facility
echo '<td CLASS=TD' . $tc . '><nobr>'.$row[_DATE].'</nobr></td>'; //date
echo '<td CLASS=TD' . $tc . '>'.$row['Facility'].'</td>'; //facility
// get the description of priority (and get the the right color, if enabled)
$pricol = 'TD' . $tc;
$priword = FormatPriority($row[3], $pricol);
$priword = FormatPriority($row['Priority'], $pricol);
echo '<td CLASS=', $pricol, '>', $priword, '</td>';
echo '<td CLASS=TD' . $tc . '>'.$infounit.'</td>'; //InfoUnit
echo '<td CLASS=TD' . $tc . '>'.$row[4].'</td>'; //host
echo '<td CLASS=TD' . $tc . '>'.$row['FromHost'].'</td>'; //host
$message = htmlspecialchars($message);
@ -207,7 +205,7 @@ it become a reality.
}
}
echo '<td CLASS=TD', $tc, '><a CLASS="Msg" href="details.php?lid=', $row[0] , '">', $message, '</a></td>'; //message
echo '<td CLASS=TD', $tc, '><a CLASS="Msg" href="details.php?lid=', $row['ID'] , '">', $message, '</a></td>'; //message
//for changing colors
if($tc == 1) $tc = 2;
@ -217,8 +215,7 @@ it become a reality.
*/
echo '</tr>';
}
echo '</table>';
}
echo '</table>';
WriteFood();
?>

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -38,41 +38,6 @@ $szDescription = "";
global $global_Con;
/*
// Get Action
if ( !isset($_POST['action'] ) )
$_POST['action'] = "";
if ($_POST['action'] == "ChangeGeneralConfig")
{
if ( !isset($_POST["enableui"]) )
$_POST["enableui"] = 0;
setcookie("connection_mode", $_POST['connection_mode'], time()+(60*60*24*365*10), "/");
*/
/* if( strcmp($_POST["enableui"], $_COOKIE["enable_ui"]) != 0)
{
if($_POST["enableui"] == "0")
{
setcookie("usr", "standard", _COOKIE_EXPIRE, "/");
setcookie("sesid", "0", _COOKIE_EXPIRE, "/");
}
else
{
setcookie("usr", "|", _COOKIE_EXPIRE, "/");
setcookie("sesid", "|", _COOKIE_EXPIRE, "/");
}
setcookie("enable_ui", $_POST['enableui'], time()+(60*60*24*365*10), "/");
}
$szRedirectLink = "index.php";
$szDescription = "General settings have been updated";
*/
if( !isset($_POST['filConf']) )
$_POST['filConf'] = "";
@ -81,6 +46,8 @@ 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
@ -112,7 +79,7 @@ if($_POST['filConf'] == "FilterConfig")
// 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)
if($_SESSION['infounit_sl'] == 0 && $_SESSION['infounit_er'] == 0 && $_SESSION['infounit_o'] == 0)
{
$_SESSION['infounit_sl'] = 1;
$_SESSION['infounit_er'] = 1;
@ -122,7 +89,7 @@ if($_POST['filConf'] == "FilterConfig")
// 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 and $_SESSION['priority_1'] == 0 and $_SESSION['priority_2'] == 0 and $_SESSION['priority_3'] == 0 and $_SESSION['priority_4'] == 0 and $_SESSION['priority_5'] == 0 and $_SESSION['priority_6'] == 0 and $_SESSION['priority_7'] == 0)
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;

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -20,11 +20,10 @@ it become a reality.
require("include.php");
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'];
@ -32,6 +31,8 @@ it become a reality.
$_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');
@ -39,44 +40,13 @@ it become a reality.
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');
}
?>
<?php /* Disabled!?>
<br>
<form method="POST" action="configuration-page-process.php" name="ConnectionConfig">
<input type="hidden" name="conConf" value="ConnectionConfig">
<center><h3>..:: <?php echo _MSGBscSet; ?> ::..</h3></center>
<center>
<table border="0" cellpadding="2" cellspacing="0" width="700" align="center" Class="ConfigTable">
<tr>
<td Class="Header1" colspan="2"><b><?php echo _MSGConSet; ?>:</b></td>
</tr>
<tr>
<td width="200" nowrap"><?php echo _MSGConMod; ?>:</td>
<td width="100%" align="right">
<?php
ComboBoxWithFilenames(_DB_DRV, "connection_mode");
?>
</td>
</tr>
<tr>
<td colspan="2"><font color="red">This function has been turned off! Set this in config.php!</font></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="<?php echo _MSGChg; ?>">
</td>
<td></td>
</tr>
</table>
</form>
</center>
<?php End Disabled*/ ?>
<br>
<form method="POST" action="filter-config-process.php" name="FilterConfig">
@ -130,9 +100,10 @@ it become a reality.
<input type=checkbox name="priority_6" value="1" <?php if ($_SESSION['priority_6'] == 1) echo 'checked'; ?>>Info (6)<br>
<input type=checkbox name="priority_7" value="1" <?php if ($_SESSION['priority_7'] == 1) echo 'checked'; ?>>Debug (7)<br>
</td>
</tr>
<?php /* This is not implemented yet!
<tr>
<td>
<?php /* This is not implemented yet!
<select name='color'>
<option value='red' style="background-color:red"<?php if ($_GET["color"] == "red") echo " selected";?>><?php echo $msg105;?></option>
<option value='blue' style="background-color:blue"<?php if ($_GET["color"] == "blue") echo " selected";?>><?php echo $msg106;?></option>
@ -140,16 +111,31 @@ it become a reality.
<option value='yellow' style="background-color:yellow"<?php if ($_GET["color"] == "yellow") echo " selected";?>><?php echo $msg108;?></option>
<option value='orange' style="background-color:orange"<?php if ($_GET["color"] == "orange") echo " selected";?>><?php echo $msg109;?></option>
</select>
End this is not implemented yet! */ ?>
</td>
</tr>
End this is not implemented yet! */ ?>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3" Class="Header1">
<?php echo _MSGSltFil; ?>:
</td>
</tr>
<tr>
<td><?php echo _MSGOrdBy; ?>:</td>
<td>
<?php include _FORMS.'tag-order-by.php'; ?>
</td>
</tr>
<tr>
<td><?php echo _MSGTagSort; ?>:</td>
<td>
<?php include _FORMS.'tag-sort.php'; ?>
</td>
</tr>
<tr>
<td colspan="2" Class="Header1">
<?php echo _MSGEnbQF; ?>:
</td>

View File

@ -37,7 +37,7 @@ All Events between:
?>
</select>&nbsp;
</select>&nbsp;-
<Select name="m1">
<?php
@ -52,7 +52,7 @@ All Events between:
?>
</select>&nbsp;
</select>&nbsp;-
<Select name="d1">
<?php
@ -67,7 +67,7 @@ All Events between:
?>
</select>&nbsp;and &nbsp;
</select>&nbsp;&nbsp;<?php echo _MSGAnd;?>&nbsp;
<Select name="y2">
<?php
@ -82,7 +82,7 @@ All Events between:
?>
</select>&nbsp;
</select>&nbsp;-
<Select name="m2">
<?php
@ -97,7 +97,7 @@ All Events between:
?>
<% FOR P = 1 TO 12 %>
</select>&nbsp;
</select>&nbsp;-
<Select name="d2">
<?php

4
forms/syslog-show.php Normal file
View File

@ -0,0 +1,4 @@
<Select name="show_methode">
<option value="SysLogTag" <?php if ($_SESSION['show_methode'] == 'SysLogTag') echo 'selected'; ?>><?php echo _MSGMethSlt; ?></option>
<option value="Host" <?php if ($_SESSION['show_methode'] == 'Host') echo 'selected'; ?>><?php echo _MSGMethHost; ?></option>
</Select>

12
forms/tag-order-by.php Normal file
View File

@ -0,0 +1,12 @@
<Select name="tag_order">
<option value="Occurences" <?php if ($_SESSION['tag_order'] == "Occurences") echo 'selected'; ?>><?php echo _MSGOccuren; ?></option>
<option value="SysLogTag" <?php if ($_SESSION['tag_order'] == "SysLogTag") echo 'selected'; ?>><?php echo _MSGSysLogTag; ?></option>
<?php
if($_SESSION['show_methode'] == "Host")
{
?>
<option value="Host" <?php if ($_SESSION['tag_order'] == "Host") echo 'selected'; ?>><?php echo _MSGHost; ?></option>
<?php
}
?>
</Select>

4
forms/tag-sort.php Normal file
View File

@ -0,0 +1,4 @@
<Select name="tag_sort">
<option value="Asc" <?php if ($_SESSION['tag_sort'] == "Asc") echo 'selected'; ?>><?php echo _MSGAscend; ?></Option>
<option value="Desc" <?php if ($_SESSION['tag_sort'] == "Desc") echo 'selected'; ?>><?php echo _MSGDescend; ?></option>
</Select>

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -25,7 +25,7 @@ it become a reality.
* and provide some usefull functions
*/
// disable error reporting
// enable it only for testing purposes
error_reporting(E_ALL);
header("Pragma: no-cache");
@ -204,14 +204,30 @@ it become a reality.
$_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'];
$_SESSION['ti'] = $_POST['ti'];
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;
$_SESSION['order'] = $_POST['order'];
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'];
}
@ -259,15 +275,26 @@ it become a reality.
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
*/
// forms/logs-per-page.php
// number of lines to be displayed, only numbers are allowed
if (isset($_POST['epp']))
{
if (is_numeric($_POST['epp']))
@ -386,15 +413,15 @@ it become a reality.
{
if( !isset($_COOKIE['valid']) || $_COOKIE['valid'] == "0" )
{
WriteHead("phpLogCon :: " . _MSGAccDen, "", "", _MSGAccDen, 0);
echo "<br><b>..:: " . _MSGAccDen . " ::..</b>";
echo "<br><br>..:: <a href='index.php'>" . _MSGBac2Ind . "</a> ::..";
header("Location: index.php");
exit;
}
else
{
session_register('usr');
session_register('usrdis');
$_SESSION['usr'] = $_COOKIE['usr'];
$_SESSION['usrdis'] = $_COOKIE['usrdis'];
LoadUserConfig();
}
}
@ -522,6 +549,7 @@ it become a reality.
*/
WriteHead("phpLogCon :: " . $myMsg , "", "", $myMsg);
}
CheckInstallDir();
}
/*!
@ -586,26 +614,41 @@ it become a reality.
/*!
Gets Args from the active URL and returns them.
!*/
function GetSortedArgs()
function GetSortedArgs($mode)
{
$arCount = count($_SERVER["argv"]);
$sArgs = "?";
if($arCount == 0)
if($arCount == 0 || $mode != 1)
$sArgs = "";
else
{
$sArgs = "";
for($i = 0; $i < $arCount; $i++)
{
if($i > 0)
$sArgs .= "&" . $_SERVER["argv"][$i];
{
if( stristr($_SERVER["argv"][$i], "pagenum=") == FALSE)
$sArgs .= "&" . $_SERVER["argv"][$i];
}
else
$sArgs .= $_SERVER["argv"][$i];
{
if( stristr($_SERVER["argv"][$i], "pagenum=") == FALSE)
$sArgs .= $_SERVER["argv"][$i];
}
}
}
return $sArgs;
}
function CheckInstallDir()
{
if(file_exists("install/"))
{
echo "<h3><font color=\"red\">" . _MSGInstDir . "</font></h3>";
}
clearstatcache();
}
/*!
Loads the Users Filter Configuration from database
!*/
@ -627,7 +670,7 @@ it become a reality.
{
global $global_Con;
$query = "SELECT Name, PropValue FROM userprefs WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_u%'";
$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))
{
@ -687,35 +730,36 @@ it become a reality.
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['refresh'] . "' WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_refresh'";
$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[14] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterInfoUnit'";
$query[16] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterInfoUnit'";
else
$query[14] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterInfoUnit'";
$query[16] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterInfoUnit'";
if( !isset($_POST['FilterOrderby']) )
$query[15] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterOrderby'";
$query[17] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterOrderby'";
else
$query[15] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterOrderby'";
$query[17] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterOrderby'";
if( !isset($_POST['FilterRefresh']) )
$query[16] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterRefresh'";
$query[18] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterRefresh'";
else
$query[16] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterRefresh'";
$query[18] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterRefresh'";
if( !isset($_POST['FilterColExp']) )
$query[17] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterColExp'";
$query[19] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterColExp'";
else
$query[17] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterColExp'";
$query[19] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterColExp'";
if( !isset($_POST['FilterHost']) )
$query[18] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterHost'";
$query[20] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterHost'";
else
$query[18] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterHost'";
$query[20] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterHost'";
if( !isset($_POST['FilterMsg']) )
$query[19] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterMsg'";
$query[21] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterMsg'";
else
$query[19] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterMsg'";
$query[21] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_FilterMsg'";
return $query;
}
@ -730,9 +774,9 @@ it become a reality.
else
$query[2] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uSaveFilterSettings'";
if( !isset($_POST['debug']) )
$query[2] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uDebug'";
$query[3] = "UPDATE UserPrefs SET PropValue=0 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uDebug'";
else
$query[2] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uDebug'";
$query[3] = "UPDATE UserPrefs SET PropValue=1 WHERE UserLogin LIKE '" . $_SESSION['usr'] . "' AND Name LIKE 'PHPLOGCON_uDebug'";
return $query;
}

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -33,6 +33,7 @@ it become a reality.
if ($_GET['do'] == 'logout')
{
setcookie("usr", "|", _COOKIE_EXPIRE, "/");
setcookie("usrdis", "|", _COOKIE_EXPIRE, "/");
setcookie("valid", "0", _COOKIE_EXPIRE, "/");
session_unset();
header("Location: index.php");
@ -50,6 +51,8 @@ it become a reality.
{
WriteHead("phpLogCon :: Index", "", "", "phpLogCon");
echo "<br>";
CheckInstallDir();
echo "<br>";
echo '<font><b>', _MSG001, '.</b></font>';
echo '<form action="submit.php" method="POST">';
@ -64,7 +67,9 @@ it become a reality.
{
// reload
session_register('usr');
session_register('usrdis');
$_SESSION['usr'] = $_COOKIE['usr'];
$_SESSION['usrdis'] = $_COOKIE['usrdis'];
LoadUserConfig();
header("Location: index.php");
exit;
@ -77,9 +82,8 @@ it become a reality.
}
}
WriteHead("phpLogCon :: Index", "", "", "phpLogCon");
echo "<br>";
WriteStandardHeader('Index');
echo '<br>';
include _CLASSES . 'eventfilter.php';
//the splitted sql statement
@ -90,7 +94,7 @@ it become a reality.
//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->GetSQLWherePart(0);
$cmdSQLlast_part .= $myFilter->GetSQLSort();
$myEventsNavigation = new EventsNavigation(5);
@ -101,18 +105,10 @@ it become a reality.
$num = $myEventsNavigation->GetEventCount();
if(_ENABLEUI)
{
echo '<table align="right">';
echo '<tr>';
echo '<td><a href="index.php?do=logout">' . _MSGLogout . '</a></td>';
echo '</tr>';
echo '</table>';
echo '..:: ', _MSGLogSuc , ' ::..<br><br>';
}
if(_ENABLEUI)
echo _MSGWel . ", <font color=\"blue\">" . $_SESSION["usr"] . "</font>" . _MSGChoOpt;
echo _MSGWel . ", <font color=\"blue\">" . $_SESSION["usrdis"] . "</font>" . _MSGChoOpt;
else
echo _MSGWel . _MSGChoOpt;
$SQLcmdfirst_part = "SELECT DISTINCT ";
$SQLcmdmain_part = "(*) FROM "._DBTABLENAME;
$SQLcmdlast_part = " WHERE ";
@ -127,10 +123,15 @@ it become a reality.
$row_er = db_fetch_array($result_er);
db_free_result($result_er);
if(strtolower(_DB_APP) == "mssql")
$rowIndex = 'num';
else
$rowIndex = 0;
echo "<br><br><b>" . _MSGQuiInf . "</b>:";
echo "<table border='0' cellspacing='0' class=\"EventTable\"><br>";
echo "<tr><td CLASS=TDHEADER>" . _MSGNumSLE . "</td><td CLASS=TD1>" . $row_sl[0] . "</td></tr>";
echo "<tr><td CLASS=TDHEADER>" . _MSGNumERE . "</td><td CLASS=TD2>" . $row_er[0] . "</td></tr>";
echo "<tr><td CLASS=TDHEADER>" . _MSGNumSLE . "</td><td CLASS=TD1>" . $row_sl['num'] . "</td></tr>";
echo "<tr><td CLASS=TDHEADER>" . _MSGNumERE . "</td><td CLASS=TD2>" . $row_er['num'] . "</td></tr>";
echo "</table>";
echo "<br><b>" . _MSGTop5 . ":</b><br><br>";
if($num == 0)
@ -150,8 +151,8 @@ it become a reality.
echo "<td>" . _MSGMsg . "</td>";
echo "</tr>";
$res = db_exec_limit($global_Con, $cmdSQLfirst_part, $cmdSQLmain_part, $cmdSQLlast_part, 1, 5);
$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)
@ -160,7 +161,7 @@ it become a reality.
}
//choose InfoUnitdType 1 = SL = Syslog, 3 = Eventreport, O = Other
switch ($row[6])
switch ($row['InfoUnitID'])
{
case 1:
$infounit = "SL";
@ -173,32 +174,25 @@ it become a reality.
}
static $tc = 1;
echo '<tr>';
echo '<td CLASS=TD', $tc, '><nobr>',$row[1],'</nobr></td>'; //date
echo '<td CLASS=TD', $tc, '>',$row[2],'</td>'; //facility
echo '<td CLASS=TD', $tc, '><nobr>',$row[_DATE],'</nobr></td>'; //date
echo '<td CLASS=TD', $tc, '>',$row['Facility'],'</td>'; //facility
// get the description of priority (and get the the right color, if enabled)
$pricol = 'TD' . $tc;
$priword = FormatPriority($row[3], $pricol);
$priword = FormatPriority($row['Priority'], $pricol);
echo '<td CLASS=', $pricol, '>', $priword, '</td>';
echo "<td CLASS=TD" . $tc . ">".$infounit."</td>"; //InfoUnit
echo "<td CLASS=TD" . $tc . ">".$row[4]."</td>"; //host
$message = $row[5];
echo "<td CLASS=TD" . $tc . ">".$row['FromHost']."</td>"; //host
$message = $row['Message'];
$message = str_replace("<", "&lt;", $message);
$message = str_replace(">", "&gt;", $message);
echo '<td CLASS=TD', $tc, '><a CLASS="Msg" href="details.php?lid=', $row[0], '">', $message, '</a></td>'; //message
echo '<td CLASS=TD', $tc, '><a CLASS="Msg" href="details.php?lid=', $row['ID'], '">', $message, '</a></td>'; //message
//for changing colors
if($tc == 1) $tc = 2;
else $tc = 1;
/*
echo "<tr bgcolor=\"#ffffcc\"><td>".$row['ReceivedAt']."</td>";
echo "<td>".$row['Facility']."</td>";
echo "<td>".$row['Priority']."</td>";
echo "<td>".$row['FromHost']."</td>";
echo "<td>".$row['Message']."</td>";
*/
echo "</tr>";
}
echo "</table>";

View File

@ -61,7 +61,7 @@ function WriteFoot()
function GetSQLQueries($strFilePath)
{
// Get SQL queries from file
$arQueryFile = file("scripts/" . $strFilePath);
$arQueryFile = file("../scripts/" . $strFilePath);
for($i = 0, $j = 0; $i < count($arQueryFile); $i++)
{

View File

@ -24,35 +24,45 @@ include "include.php";
WriteHead("phpLogCon :: Installation");
if(!isset($_POST['instLang']))
{
echo "<center><b>Welcome to the installation of phpLogCon, the WebInterface to log data.</b><br>";
echo "<form method=\"POST\" action=\"install.php\" name=\"Language\">";
echo "<input type=\"hidden\" name=\"instLang\" value=\"Language\">";
echo "Please select your language for Installation progress: ";
echo "<Select name=\"language\">";
echo "<option value=\"en\">English</Option>";
echo "<option value=\"de\">German</Option>";
echo "</Select>";
echo "<br><input type=\"submit\" value=\"Submit\">";
echo "</center>";
}
else
{
include "../lang/" . $_POST['language'] . ".php";
?>
<!-- Body creation -->
<center><b>Welcome to the installation of phpLogCon, the WebInterface to log data.<br>The following steps will guide you through the installation and help you to install and configure phpLogCon correctly.<br><i><font color="red">Note: Fields marked with a * MUST be filled out! 'Host/IP' can be leaved blank in ODBC mode.</font></i></b></center>
<center><b><?php echo _InsWelc1; ?><br><?php echo _InsWelc2; ?><br><i><?php echo _InsWelc3; ?><font color="red"><?php echo _InsWelc4; ?></font><?php echo _InsWelc5; ?></i></b></center>
<br><br>
<center>First we have to check your database structure, because phpLogCon needs some tables. If the tables don't exist, they will be created.<br>For this, phpLogCon Installation needs some information about your database Server:</center>
<center><?php echo _InsDbIns1; ?><br><?php echo _InsDbIns2; ?></center>
<br>
<form method="POST" action="perform.php" name="Installation">
<input type="hidden" name="install" value="Installation">
<table border="" cellpadding="2" cellspacing="0" width="600" align="center" Class="ConfigTable">
<tr>
<td colspan="2" align="center" Class="Header1">.: Database Settings :.</td>
<td colspan="2" align="center" Class="Header1">.: <?php echo _InsDbIns3; ?> :.</td>
<td Class="Header1">&nbsp;</td>
</tr>
<tr>
<td>Connection Type: <font color="red">*</font></td>
<td><?php echo _InsDbInsCon; ?>: <font color="red">*</font></td>
<td>
<select name="dbcon">
<option value="native" selected>Native</Option>
<option value="odbc">ODBC</Option>
</select>
</td>
</tr>
<tr>
<td>Database application: <font color="red">*</font></td>
<td>
<select name="dbapp">
<option value="mysql" selected>MySql</Option>
<option value="mssql">MSSql</Option>
<option value="nativemysql" selected>MySQL</Option>
<option value="odbcmysql">MySQL via ODBC</Option>
<option value="odbcmssql">MSSQL via ODBC</Option>
</select>
</td>
</tr>
@ -61,27 +71,27 @@ WriteHead("phpLogCon :: Installation");
<td><input type="text" name="dbhost" size="25"></td>
</tr>
<tr>
<td>Port (If standard, leave blank):</td>
<td>Port (<?php echo _InsDbInsPort; ?>):</td>
<td><input type="text" name="dbport" size="25"></td>
</tr>
<tr>
<td>User (User must have "INSERT" and "CREATE" rights!): <font color="red">*</font></td>
<td><?php echo _InsDbInsUsr; ?>:</td>
<td><input type="text" name="dbuser" size="25"></td>
</tr>
<tr>
<td>Password: <font color="red">*</font></td>
<td><?php echo _InsPass; ?>:</td>
<td><input type="password" name="dbpass" size="25"></td>
</tr>
<tr>
<td>Re-type password: <font color="red">*</font></td>
<td><?php echo _InsPassRe; ?>:</td>
<td><input type="password" name="dbpassre" size="25"></td>
</tr>
<tr>
<td>Database/DSN name: <font color="red">*</font></td>
<td><?php echo _InsDbInsName; ?>: <font color="red">*</font></td>
<td><input type="text" name="dbname" size="25"></td>
</tr>
<tr>
<td>Database time format: <font color="red">*</font></td>
<td><?php echo _InsDbInsTime; ?>: <font color="red">*</font></td>
<td>
<select name="dbtime">
<option value="utc" selected>UTC</Option>
@ -92,34 +102,34 @@ WriteHead("phpLogCon :: Installation");
</table>
<br><br>
<center>Now we have to do some settings for phpLogCon to run clearly and user optimized.<br><i>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.</center>
<center><?php echo _InsPlcIns1; ?><br><i><?php echo _InsPlcIns2; ?></center>
<br>
<table border="" cellpadding="2" cellspacing="0" width="600" align="center" Class="ConfigTable">
<tr>
<td colspan="2" align="center" Class="Header1">.: phpLogCon General Settings :.</td>
<td colspan="2" align="center" Class="Header1">.: <?php echo _InsPlcIns3; ?> :.</td>
<td Class="Header1">&nbsp;</td>
</tr>
<tr>
<td>Default language:</td>
<td><?php echo _InsPlcInsLang; ?>:</td>
<td>
<select name="lang">
<option value="en" selected>English</Option>
<option value="de">German</Option>
<option value="en" <?php if($_POST['instLang'] == "en") echo 'selected'; ?>><?php echo _InsLangEn; ?></Option>
<option value="de" <?php if($_POST['instLang'] == "de") echo 'selected'; ?>><?php echo _InsLangDe; ?></Option>
</select>
</td>
</tr>
<tr>
<td>User Interface:</td>
<td><?php echo _InsPlcInsUi; ?>:</td>
<td>
<input type="checkbox" name="ui" value="1"> Configure?
<input type="checkbox" name="ui" value="1">
</td>
</tr>
<tr>
<td colspan="2" align="left" Class="Header1">Create a User:</td>
<td colspan="2" align="left" Class="Header1"><?php echo _InsPlcInsUiCrUsr; ?>:</td>
<td Class="Header1">&nbsp;</td>
</tr>
<tr>
<td colspan="2">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!<br><i>Note: You only have to fill out the fields marked with a <font color="red">*</font> if you have entered a username!</td>
<td colspan="2"><?php echo _InsPlcIns4; ?></td>
<td>&nbsp;</td>
</tr>
<tr>
@ -127,27 +137,27 @@ WriteHead("phpLogCon :: Installation");
<td>&nbsp;</td>
</tr>
<tr>
<td>Username:</td>
<td><?php echo _InsPlcInsUiName; ?>:</td>
<td><input type="text" name="uiuser" size="25"></td>
</tr>
<tr>
<td>Display name: <font color="red">*</font></td>
<td><?php echo _InsPlcInsUiDisName; ?>:</td>
<td><input type="text" name="uidisname" size="25"></td>
</tr>
<tr>
<td>Password: <font color="red">*</font></td>
<td><?php echo _InsPass; ?>:</td>
<td><input type="password" name="uipass" size="25"></td>
</tr>
<tr>
<td>Re-type password: <font color="red">*</font></td>
<td><?php echo _InsPassRe; ?>:</td>
<td><input type="password" name="uipassre" size="25"></td>
</tr>
<tr>
<td>Desired language:</td>
<td><?php echo _InsPlcInsUiLang; ?>:</td>
<td>
<select name="uilang">
<option value="en" selected>English</Option>
<option value="de">German</Option>
<option value="en" <?php if($_POST['instLang'] == "en") echo 'selected'; ?>><?php echo _InsLangEn; ?></Option>
<option value="de" <?php if($_POST['instLang'] == "de") echo 'selected'; ?>><?php echo _InsLangDe; ?></Option>
</select>
</td>
</tr>
@ -164,6 +174,8 @@ WriteHead("phpLogCon :: Installation");
<?php
}
WriteFoot();
?>

View File

@ -27,41 +27,76 @@ WriteHead("phpLogCon :: Installation Progress");
?>
<center>Checking users input...
<center><?php echo _InsPer1; ?>
<?php
// if there are fields missing, create an error message
$strErrorMsg = "";
if($_POST["dbhost"] == "" && $_POST['dbcon'] != "odbc")
/*
* 2004-12-13 by mm
* Check if we use odbc, this is the case if the dbcon starts with
* the string "odbc".
*
* Using ODBC we need also the database type.
*/
if(substr($_POST['dbcon'], 0, 4) == 'odbc')
{
$bIsODBC = true;
$dbcon = 'odbc';
if (substr($_POST['dbcon'], 4)=='mysql')
$dbapp = 'mysql';
elseif(substr($_POST['dbcon'], 4)=='mssql')
$dbapp = 'mssql';
else
die('connection type unspecified');
}
else
{
$bIsODBC = false;
// currently only mysql is supported in non-odbc mode
$dbcon = 'native';
$dbapp = 'mysql';
}
if($_POST["dbhost"] == "" && !$bIsODBC)
$strErrorMsg .= "Host/IP";
if($_POST["dbport"] == "")
$_POST["dbport"] = 0;
if($_POST["dbuser"] == "")
if($_POST["dbuser"] == "" && !$bIsODBC)
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "User";
}
if($_POST["dbpass"] == "")
/*
* 2004-12-13 by mm
* Also with an mysql connection you can use a
* user without password. In fact, this is not
* really a good idea, but that's not our choise.
*
if($_POST["dbpass"] == "" && !$bIsODBC)
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "Password";
}
if($_POST["dbpassre"] == "")
if($_POST["dbpassre"] == "" && !$bIsODBC)
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "Re-type Password";
}
*/
if($_POST["dbname"] == "")
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "Database/DSN name";
}
if($_POST["dbpass"] != "" && $_POST["dbpassre"] != "")
if($_POST["dbpass"] != "" && $_POST["dbpassre"] != "" && !$bIsODBC)
{
if(strcmp($_POST["dbpass"], $_POST["dbpassre"]) != 0)
{
@ -82,7 +117,7 @@ else
$_POST["ui"] = 0;
$strErrorMsg = "";
if($_POST["ui"] == 1 )
if($_POST["ui"] == 1)
{
if($_POST["uiuser"] != "")
{
@ -110,30 +145,40 @@ if($_POST["ui"] == 1 )
else
$strUiErrMsg = "";
}
else
$strUiErrMsg = "";
}
else
$strUiErrMsg = "";
if($strDbErrMsg != "" || $strUiErrMsg != "")
{
echo "</center>";
echo "While installing phpLogCon, there caused an error (Date: ".date("d.m.Y @ H:i")."):<br><br>";
echo "<u><b>Operation:</b></u> Check user's input!<br>";
echo "<u><b>Error:</b></u> <font color=red>You have to fill out following fields: <b>" . $strDbErrMsg . "<br>" . $strUiErrMsg . "</b></font><br><br>Go back and correct this!<br>..:: <a href='install.php'>Go back to installation</a> ::..<br>";
echo "<u><b>Error:</b></u> <font color=red>You have to fill out following fields: <b>" . $strDbErrMsg . "<br>" . $strUiErrMsg . "</b></font><br><br>Go back and correct this!<br>..:: <a href=\"javascript:history.back()\">Go back to installation</a> ::..<br>";
echo "<br><br>";
exit;
}
?>
<b><font color="red">Done!</font></b></center>
<center>Creating required tables...
<b><font color="red"><?php echo _InsPerDone; ?></font></b></center>
<center><?php echo _InsPer2; ?>
<?php
// include database driver
if($_POST['dbcon'] == "odbc")
include "../db-drv/odbc_" . $_POST["dbapp"] . ".php";
if($bIsODBC)
{
include '../db-drv/odbc_' . $dbapp . '.php';
$tableIndex = 'TABLE_NAME';
}
else
{
include "../db-drv/mysql.php";
$tableIndex = 0;
}
// connect to database
$installCon = db_own_connection($_POST["dbhost"], $_POST["dbport"], $_POST["dbuser"], $_POST["dbpass"], $_POST["dbname"]);
@ -143,28 +188,50 @@ $installCon = db_own_connection($_POST["dbhost"], $_POST["dbport"], $_POST["dbus
// BEGIN CREATING TABLES
// ***********************
// Get SQL Queries from File
$strQueryFile = "EventTables.sql";
$arQueries = GetSQLQueries($strQueryFile);
//Create an Array with all tablenames. If there are a new table assigned to phplogcon, add it here, too.
$arTables[0] = "SystemEvents";
$arTables[1] = "SystemEventsProperties";
$arTables[2] = "Users";
$arTables[3] = "UserPrefs";
// Execute Queries
for($i = 0; $i < count($arQueries); $i++)
db_exec($installCon, $arQueries[$i]);
// Check which tables are currently existing
$tableRes = db_get_tables($installCon, $_POST["dbname"]);
for($i = 0; $res = db_fetch_array($tableRes); $i++)
$arCurTables[$i] = $res[$tableIndex];
// If user interface is enabled, create tables
if($_POST["ui"] == 1 )
if(!isset($arCurTables))
$arCurTables = array();
for($i = 0; $i < count($arTables); $i++)
{
$strQueryFile = "UserTables.sql";
$arQueries = GetSQLQueries($strQueryFile);
if( array_search($arTables[$i], $arCurTables) == FALSE )
{
if( !isset($arNewTables) )
$arNewTables[0] = $arTables[$i];
else
$arNewTables[count($arNewTables)] = $arTables[$i];
}
}
for($i = 0; $i < count($arQueries); $i++)
db_exec($installCon, $arQueries[$i]);
//Create not existing tables
if(isset($arNewTables))
{
for($i = 0; $i < count($arNewTables); $i++)
{
//Get queries from file
$strQueryFile = $dbapp . '_ct' . $arNewTables[$i] . '.sql';
$arQueries = GetSQLQueries($strQueryFile);
// Execute Queries
for($j = 0; $j < count($arQueries); $j++)
db_exec($installCon, $arQueries[$j]);
}
}
?>
<b><font color="red">Done!</font></b></center>
<center>Inserting values into tables...
<b><font color="red"><?php echo _InsPerDone; ?></font></b></center>
<center><?php echo _InsPer3; ?>
<?php
@ -199,8 +266,11 @@ if($_POST["ui"] == 1 && $_POST["uiuser"] != "")
elseif( stristr($arQueries[$i], "INSERT INTO UserPrefs") )
{
$arQueries[$i] = ereg_replace("<username>", $_POST['uiuser'], $arQueries[$i]);
$arQueries[$i] = ereg_replace("<lang>", $_POST['uilang'], $arQueries[$i]);
db_exec($installCon, $arQueries[$i]);
}
elseif( stristr($arQueries[$i], "SET IDENTITY_INSERT UserPrefs") )
db_exec($installCon, $arQueries[$i]);
}
}
@ -209,8 +279,8 @@ db_close($installCon);
?>
<b><font color="red">Done!</font></b></center>
<center>Creating your config file (config.php)...
<b><font color="red"><?php echo _InsPerDone; ?></font></b></center>
<center><?php echo _InsPer4; ?>
<?php
@ -219,7 +289,7 @@ db_close($installCon);
// ***************************
//open file handle
$hConfigSrc = fopen("scripts/config.php.ex", "r");
$hConfigSrc = fopen("../scripts/config.php.ex", "r");
$hConfigDes = fopen("../config.php", "w");
while (!feof($hConfigSrc))
@ -240,9 +310,9 @@ while (!feof($hConfigSrc))
elseif(stristr($strLine, "define('_DBPWD'"))
fwrite($hConfigDes, " define('_DBPWD', '" . $_POST["dbpass"] . "');\r\n");
elseif(stristr($strLine, "define('_CON_MODE'"))
fwrite($hConfigDes, " define('_CON_MODE', '" . $_POST["dbcon"] . "');\r\n");
fwrite($hConfigDes, " define('_CON_MODE', '" . $dbcon . "');\r\n");
elseif(stristr($strLine, "define('_DB_APP'"))
fwrite($hConfigDes, " define('_DB_APP', '" . $_POST["dbapp"] . "');\r\n");
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'"))
@ -264,10 +334,10 @@ fclose($hConfigDes);
?>
<b><font color="red">Done!</font></b></center>
<b><font color="red"><?php echo _InsPerDone; ?></font></b></center>
<br>
<center><b>All processes have been done clearly!<br>Congratulations! You've successfully installed phpLogCon!<br>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.<br><br>Move to 'index.php' in root directory to start working with phpLogCon!<br><br><font color="red">Don't forget to delete 'install.php', 'progress.php' and 'include.php' (NOT from root directory) from the 'install'-directory!<br>These files could be user for a DoS on your phpLogCon!</font></b></center>
<center><b><?php echo _InsPer5; ?><br><?php echo _InsPer6; ?><br><?php echo _InsPer7; ?><br><br><?php echo _InsPer8; ?><br><br><font color="red"><?php echo _InsPer9; ?><br><?php echo _InsPer10; ?></font><br><br><?php echo _InsPer11; ?><a href="../index.php"><?php echo _InsPer12; ?></a>.</b></center>
<br><br>
<?php

View File

@ -3,7 +3,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -35,6 +35,8 @@ 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');
@ -42,10 +44,11 @@ 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('_MSGNoRes', 'Kein gültiges Datenbank-Ergebnis');
define('_MSGNoDBHan', 'Kein gültiger Datenbank-Verbindungs-Handle');
define('_MSGLogout', 'LogOut');
define('_MSGSrcExp', 'Nach Ausdruck suchen');
@ -53,7 +56,8 @@ define('_MSGSrc', 'Suche');
define('_MSGColExp', 'Ausdruck färben');
define('_MSGinCol', ' in dieser Farbe: ');
define('_MSGBrw', 'Durchsuchen');
define('_MSGFilConf', 'Filter Konfiguration');
define('_MSGFilConf', 'Allgemeine Filter Konfiguration');
define('_MSGSltFil', 'SysLogTag Filter Konfiguration');
define('_MSGUsrConf', 'Benutzer Konfiguration');
define('_MSGBscSet', 'Generelle Einstellungen');
define('_MSGConSet', 'Verbindungs Einstellungen');
@ -61,13 +65,14 @@ 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', 'Priorität');
define('_MSGPri', 'Severity');
define('_MSGFilSet', 'Filter Einstellungen');
define('_MSGUsrSet', 'Benutzer Einstellungen');
define('_MSGFilOpt', 'Filter Optionen');
define('_MSGFilOpt', 'Quick Filter Optionen');
define('_MSGSwiEvnMan', 'Event Datum manuell auswählen');
define('_MSGSwiEvnPre', 'Event Datum vordefiniert auswählen');
define('_MSGShwEvnDet', 'Zeige Event Details');
@ -102,7 +107,7 @@ define('_MSGL2d', 'letzten 2 Tage');
define('_MSGL3d', 'letzten 3 Tage');
define('_MSGLw', 'letzte Woche');
define('_MSGFacDat', 'Facility und Datum');
define('_MSGPriDat', 'Priorität und Datum');
define('_MSGPriDat', 'Severity und Datum');
define('_MSGNoRef', 'nicht aktualisieren');
define('_MSGE10s', 'alle 10 sek');
define('_MSGE30s', 'alle 30 sek');
@ -111,7 +116,7 @@ define('_MSGE2m', 'alle 2 min');
define('_MSGE15m', 'alle 15 min');
define('_MSGEn', 'Englisch');
define('_MSGDe', 'Deutsch');
define('_MSGFav', 'Favoriten');
define('_MSGFav', 'Favoriten (Zum Aufrufen, auswählen):');
define('_MSGDel', 'Löschen');
define('_MSGNoFav', 'Keine Favoriten gefunden');
define('_MSGNewFav', 'Neuer Favorit');
@ -135,7 +140,9 @@ define('_MSGOra', 'Orange');
define('_MSGFilHost', 'Suchen nach IP/Computer');
define('_MSGSearchMsg', 'Nachricht muss folgendes enthalten');
define('_MSGDisIU', 'Zeige Info Einheiten');
define('_MSGEnbQF', 'Anzeigen von Quick-Filtern');
define('_MSGAscend', 'Aufsteigend');
define('_MSGDescend', 'Absteigend');
define('_MSGEnbQF', 'Quick-Filter auswählen');
define('_MSGSty', 'Aussehen');
define('_MSGHost', 'Computer');
define('_MSGPRI0', 'EMERGENCY');
@ -164,3 +171,52 @@ define('_MSGDBOpt', 'Datenbankoptionen:');
define('_MSGUTC1', 'UTC-Zeit:');
define('_MSGUTC2', 'Wenn Ihr Datenbank-Server keine UTC-Zeit verwendet, entfernen Sie das Häckchen!');
define('_MSGSavCook', 'Login behalten (Cookie)?');
define('_MSGAnd', 'und');
define('_MSGApply', 'Filter anwenden');
define('_MSGShow', 'Show');
define('_MSGMethSlt', 'SysLogTags');
define('_MSGMethHost', 'SysLogTags auf Hosts beziehend');
define('_MSGInstDir', 'System Meldung: Sie haben den \'install/\' Ordner nicht gelöscht!! Dies verursacht ein hohes sicherheitsrisiko!!');
define('_InsWelc1', 'Willkommen zur Installation von phpLogCon, dem Logging-WebInterface.');
define('_InsWelc2', 'Die folgenden Schritte werden Sie durch die Installation begleiten und Ihnen bei der korrekten Installation und Konfiguration von phpLogCon helfen.');
define('_InsWelc3', 'Anmerkung: Felder mit einem ');
define('_InsWelc4', 'ROTEN *');
define('_InsWelc5', ' müssen in jdem Fall ausgefüllt werden!');
define('_InsDbIns1', 'Zuerst müssen wir Ihre Datenbank-Struktur überprüfen, da phpLogCon einige Tabellen benötigt. Wenn die Tabellen nicht existieren, wird phpLogCon sie anlegen.');
define('_InsDbIns2', 'Hierfür benötigt die phpLogCon Installation ein paar Informationen zu Ihrem Datenbank-Server:');
define('_InsDbIns3', 'Datenbank Einstellungen');
define('_InsDbInsCon', 'Verbindungstyp');
define('_InsDbInsConNa', 'Native');
define('_InsDbInsApp', 'Datenbank-Applikation');
define('_InsDbInsPort', 'Bei Standard, leer lassen');
define('_InsDbInsUsr', 'Benutzer (Benutzer muss \'INSERT\' und \'CREATE\' Rechte haben!)');
define('_InsPass', 'Passwort');
define('_InsPassRe', 'Password wiederholen');
define('_InsDbInsName', 'Datenbank/DSN Name');
define('_InsDbInsTime', 'Datenbank Zeitformat');
define('_InsPlcIns1', 'Nun müssen wir ein paar Einstellungen vornehmen, sauber und optimiert läuft.');
define('_InsPlcIns2', 'Anmerkung: Wenn Sie gewählt haben, dass das User Interface nicht installiert werden soll, können Sie es durch SQL-Scripte nachträglich installieren! Für Hilfe schauen Sie ins Manual.');
define('_InsPlcIns3', 'phpLogCon Allgemeine Einstellungen');
define('_InsPlcInsLang', 'Standard Sprache');
define('_InsLangEn', 'Englisch');
define('_InsLangDe', 'Deutsch');
define('_InsPlcInsUi', 'User Interface installieren');
define('_InsPlcInsUiCrUsr', 'Einen Benutzer anlegen');
define('_InsPlcIns4', 'Hier können Sie einen Benutzer für das User Interface anlegen. Wenn Sie bereits Benutzer in Ihrer Datenbank haben oder das User Interface nicht installieren möchten, lassen Sie diese Felder leer!');
define('_InsPlcInsUiName', 'Benutzername');
define('_InsPlcInsUiDisName', 'Anzeigename');
define('_InsPlcInsUiLang', 'Gewünschte Sprache');
define('_InsPer1', 'Überprüfe Benutzer Eingaben...');
define('_InsPerDone', 'Erledigt!');
define('_InsPer2', 'Erstelle benötigte Tabellen...');
define('_InsPer3', 'Füge Daten in die Tabellen ein...');
define('_InsPer4', 'Erstelle Ihre Konfigurationsdatei (config.php)...');
define('_InsPer5', 'Alle Aufgaben wurden erfolgreich abgeschlossen!');
define('_InsPer6', 'Herzlichen Glückwunsch! Sie haben erfolgreich phpLogCon installiert!');
define('_InsPer7', 'Eine Dtei namens \'config.php\' liegt im Hauptverzeichnis von phpLogCon. In dieser Datei sind alle Informationen, die sie zuvor eingegeben haben, gespeichert! Sie können diese Datei jederzeit Ihren Bedürfnissen anpassen.');
define('_InsPer8', 'Wechseln Sie zu \'index.php\' im root Verzeichnis um die Arbeit mit phpLogCon zu starten!');
define('_InsPer9', 'Vergessen Sie nicht den kompletten Ordner \'install/\' zu löschen!');
define('_InsPer10', 'Diese Datein können für einen DoS auf Ihr phpLogCon genutzt werden!');
define('_InsPer11', 'Nach Löschen des Ordners können Sie zum ');
define('_InsPer12', 'Index wecheln!');

View File

@ -3,7 +3,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -34,9 +34,11 @@ define('_MSGTop5', 'Top five logs (under respect of filter settings)');
define('_MSGNoData', 'No data found');
define('_MSGDate', 'Date');
define('_MSGFac', 'Facility');
define('_MSGPri', 'Priority');
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');
@ -44,10 +46,11 @@ 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('_MSGNoRes', 'No valid Database-Result');
define('_MSGNoDBHan', 'No valid Database-Connection-Handle');
define('_MSGLogout', 'Logout');
define('_MSGSrcExp', 'Search for Expression');
@ -57,16 +60,18 @@ define('_MSGBrw', 'Browse');
define('_MSGBscSet', 'Basic Settings');
define('_MSGConSet', 'Connection Settings');
define('_MSGConMod', 'Connection Mode');
define('_MSGFilCon', 'Filter conditions');
define('_MSGFilCon', 'Overall Filter conditions');
define('_MSGSltFil', 'SysLogTag Filter conditions');
define('_MSGEvnDat', 'Event&acute;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', 'Filter Options');
define('_MSGSwiEvnMan', 'Switch to select events date manually');
define('_MSGSwiEvnPre', 'Switch to select events date predefined');
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');
@ -82,7 +87,7 @@ define('_MSGL2d', 'last 2 days');
define('_MSGL3d', 'last 3 days');
define('_MSGLw', 'last week');
define('_MSGFacDat', 'Facility and Date');
define('_MSGPriDat', 'Priority and Date');
define('_MSGPriDat', 'Severity and Date');
define('_MSGNoRef', 'no refresh');
define('_MSGE10s', 'every 10 sec');
define('_MSGE30s', 'every 30 sec');
@ -91,7 +96,7 @@ define('_MSGE2m', 'every 2 min');
define('_MSGE15m', 'every 15 min');
define('_MSGEn', 'English');
define('_MSGDe', 'German');
define('_MSGFav', 'Favorites');
define('_MSGFav', 'Favorites (Select to visit):');
define('_MSGDel', 'Delete');
define('_MSGNoFav', 'No favorites found');
define('_MSGNewFav', 'New favorite');
@ -113,8 +118,10 @@ define('_MSGGreen', 'Green');
define('_MSGYel', 'Yellow');
define('_MSGOra', 'Orange');
define('_MSGSty', 'Style');
define('_MSGEnbQF', 'Enable Quick Filters:');
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');
@ -164,3 +171,52 @@ define('_MSGDBOpt', 'Databaseoptions:');
define('_MSGUTC1', 'UTC Time:');
define('_MSGUTC2', 'When your database-server doesn\'t use UTC time, uncheck this!');
define('_MSGSavCook', 'Keep you logged in (Cookie)?');
define('_MSGAnd', 'and');
define('_MSGApply', 'Apply Filters');
define('_MSGDisSlt', 'Display');
define('_MSGMethSlt', 'SysLogTags');
define('_MSGMethHost', 'SysLogTags corresponding to hosts');
define('_MSGInstDir', 'System Note: You haven\'t deleted the \'install/\' directory!! This causes a high security risk!!');
define('_InsWelc1', 'Welcome to the installation of phpLogCon, the WebInterface to log data.');
define('_InsWelc2', 'The following steps will guide you through the installation and help you to install and configure phpLogCon correctly.');
define('_InsWelc3', 'Note: Fields marked with a ');
define('_InsWelc4', 'RED *');
define('_InsWelc5', ' MUST be filled out in very case!');
define('_InsDbIns1', 'First we have to check your database structure, because phpLogCon needs some tables. If the tables don\'t exist, they will be created.');
define('_InsDbIns2', 'For this, phpLogCon Installation needs some information about your database Server:');
define('_InsDbIns3', 'Database Settings');
define('_InsDbInsCon', 'Connection Type');
define('_InsDbInsConNa', 'Native');
define('_InsDbInsApp', 'Database application');
define('_InsDbInsPort', 'If standard, leave blank');
define('_InsDbInsUsr', 'User (User must have \'INSERT\' and \'CREATE\' rights!)');
define('_InsPass', 'Password');
define('_InsPassRe', 'Re-type password');
define('_InsDbInsName', 'Database/DSN name');
define('_InsDbInsTime', 'Database time format');
define('_InsPlcIns1', 'Now we have to do some settings for phpLogCon to run clearly and user optimized.');
define('_InsPlcIns2', 'Note: If you now select the UserInterface not to be installed, you can install it through a SQL-script file! See the manual for help.');
define('_InsPlcIns3', 'phpLogCon General Settings');
define('_InsPlcInsLang', 'Default language');
define('_InsLangEn', 'English');
define('_InsLangDe', 'German');
define('_InsPlcInsUi', 'Install User Interface');
define('_InsPlcInsUiCrUsr', 'Create a User');
define('_InsPlcIns4', 'Here you can create a user for the User Interface. If you already have some users in your database or you have unselected the UserInterface, you can leave these fields!');
define('_InsPlcInsUiName', 'Username');
define('_InsPlcInsUiDisName', 'Display name');
define('_InsPlcInsUiLang', 'Desired language');
define('_InsPer1', 'Checking users input...');
define('_InsPerDone', 'Done!');
define('_InsPer2', 'Creating required tables...');
define('_InsPer3', 'Inserting values into tables...');
define('_InsPer4', 'Creating your config file (config.php)...');
define('_InsPer5', 'All processes have been done clearly!');
define('_InsPer6', 'Congratulations! You\'ve successfully installed phpLogCon!');
define('_InsPer7', 'A file named \'config.php\' is stored in the root directory of phpLogCon. In this file there are the whole information you have entered before! You can edit it to your needs if you want to.');
define('_InsPer8', 'Move to \'index.php\' in root directory to start working with phpLogCon!');
define('_InsPer9', 'Don\'t forget to delete whole \'install/\' directory!');
define('_InsPer10', 'These files could be user for a DoS on your phpLogCon!');
define('_InsPer11', 'After deleting the directory, you can go to ');
define('_InsPer12', 'index');

View File

@ -217,3 +217,12 @@ table
{
}
.button
{
background-color: #787878;
border-color: #343434;
color : #000000;
font-size: 11px;
font-family: Verdana, Arial, Helvetica, sans-serif;
}

View File

@ -185,3 +185,12 @@ H1
{
color : #FF0000;
}
.button
{
background-color: #E5E5E5;
border-color: #343434;
color : #000000;
font-size: 11px;
font-family: Verdana, Arial, Helvetica, sans-serif;
}

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -84,8 +84,9 @@ it become a reality.
<tr>
<td align="left">
<a href="index.php"><?php echo _MSGHom; ?></a> | <a href="events-display.php"><?php echo _MSGShwEvn; ?></a>
| <a href="syslog-index.php"><?php echo _MSGShwSlt; ?></a>
| <a href="filter-config.php"><?php echo _MSGFOpt; ?></a> | <a href="user-config.php"><?php echo _MSGUOpt; ?></a> |
<a href="<? echo $_SERVER['PHP_SELF'] . GetSortedArgs(); ?>"><?php echo _MSGRef; ?></a> | <a href="doc/index.htm"><?php echo _MSGHlp; ?></a>
<a href="<? echo $_SERVER['PHP_SELF'] . GetSortedArgs(0); ?>"><?php echo _MSGRef; ?></a> | <a href="doc/index.htm" target="_blank"><?php echo _MSGHlp; ?></a>
<?php if($_SESSION['debug'] == 1)echo _MSGMenInf1 . "<font color=\"red\">" . strtoupper(_CON_MODE) . "</font>" . _MSGMenInf2 . "<font color=\"red\">" . strtoupper(_DB_APP) . "</font>" . _MSGMenInf3 . "<font color=\"red\">" . strtoupper(_DBNAME) . "</font>";?>
</td>
<td align="left">&nbsp;</td>
@ -164,7 +165,7 @@ it become a reality.
<tr>
<td>
<br /><br />
<small><i><a href="http://www.phplogcon.com/" target="phplogcon">phpLogCon</a>, Copyright &copy; 2003 - 2004 <a href="http://www.adiscon.com" target="Adiscon">Adiscon GmbH</a></i></small>
<small><i><a href="http://www.phplogcon.com/" target="_blank">phpLogCon</a>, Copyright &copy; 2003 - 2004 <a href="http://www.adiscon.com" target="_blank">Adiscon GmbH</a></i></small>
</td>
</tr>
</table>

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -20,94 +20,109 @@ it become a reality.
?>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="hidden" name="quickFilter" value="change">
<?php
function ShowVarFilter()
{
if ($_SESSION['FilterInfoUnit']==1)
if ($_SESSION['change'] == 'Predefined')
{
echo '&nbsp;', _MSGEvnDat, ':&nbsp;';
include _FORMS.'events-date.php';
echo '&nbsp;';
}
else
{
echo '&nbsp;', _MSGEvnDat, ':&nbsp;';
include _FORMS.'manually-date.php';
echo '&nbsp;';
}
echo '<br><b>', _MSGFilOpt, ': </b>';
echo _MSGLogPg, ': ';
include _FORMS.'logs-per-page.php';
if ($_SESSION['FilterInfoUnit'] == 1 && stristr($_SERVER['PHP_SELF'], 'syslog') == FALSE)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGDisIU, ': ';
include _FORMS.'display-infounit.php';
}
if ($_SESSION['FilterOrderby']==1)
if ($_SESSION['FilterOrderby'] == 1)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGOrdBy, ': ';
include _FORMS.'order-by.php';
if(stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE) include _FORMS.'tag-order-by.php';
else include _FORMS.'order-by.php';
}
if ($_SESSION['FilterRefresh']==1)
if ($_SESSION['FilterOrderby'] == 1 && stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE)
{
echo '&nbsp;';
include _FORMS.'tag-sort.php';
}
if (stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGDisSlt, ': ';
include _FORMS.'syslog-show.php';
}
if ($_SESSION['FilterRefresh'] == 1)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGRef, ': ';
include _FORMS.'refresh.php';
}
if ($_SESSION['FilterColExp']==1)
if ($_SESSION['FilterColExp'] == 1)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGColExp, '&nbsp;';
include _FORMS.'color-expression.php';
}
if ($_SESSION['FilterHost']==1)
if ($_SESSION['FilterHost'] == 1)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGFilHost, ': ';
include _FORMS.'filter-host.php';
}
if ($_SESSION['FilterMsg']==1)
if ($_SESSION['FilterMsg'] == 1)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGSearchMsg, ': ';
include _FORMS.'search-msg.php';
}
}
echo '<b>', _MSGFilOpt, '</b>';
echo "<form method=\"POST\" action=" . $_SERVER['PHP_SELF'] . ">";
// 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 '&nbsp;', _MSGEvnDat, '&nbsp;';
include _FORMS.'events-date.php';
echo '&nbsp;', _MSGLogPg, ': ';
include _FORMS.'logs-per-page.php';
ShowVarFilter();
echo '<input type="hidden" name="change" value="Predefined">';
}
else
{
echo '&nbsp;';
include _FORMS.'manually-date.php';
echo '&nbsp;';
include _FORMS.'logs-per-page.php';
ShowVarFilter();
echo '<input type="hidden" name="change" value="Manually">';
}
?>
<table><tr><td>
<input type="submit" name="form" value="Submit"></form></td><td>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<?php
if ($_SESSION['change'] == "Predefined")
echo '<input type="submit" name="change" value="Manually">';
//echo "<a href='events-display.php?change=Manually'>" . _MSGSwiEvnMan . "</a>";
{
echo '<input type="hidden" name="change" value="Manually">';
echo '<input type="submit" name="button" value="' . _MSGSwiEvnMan . '">';
}
else
echo '<input type="submit" name="change" value="Predefined">';
//echo "<a href='events-display.php?change=Predefined'>" . _MSGSwiEvnPre . '</a>';
{
echo '<input type="hidden" name="change" value="Predefined">';
echo '<input type="submit" name="button" value="' . _MSGSwiEvnPre . '">';
}
?>
</form></td></tr></table>
</form>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF'] . GetSortedArgs(1); ?>">
<input type="hidden" name="quickFilter" value="change">
<?php
ShowVarFilter();
?>
<input type="submit" name="form" value="Submit">
</form>
<center><img src="<?php echo _ADLibPathImage;?>Head-Line.gif" width="100%" height="2" align="center"></center>

34
scripts/UserInserts.sql Normal file
View File

@ -0,0 +1,34 @@
# 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 ('<username>', '<password>', '<realname>', <date>, 1, '<lang>');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_infounit_sl', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_infounit_er', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_infounit_o', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_priority_0', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_priority_1', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_priority_2', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_priority_3', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_priority_4', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_priority_5', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_priority_6', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_priority_7', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_ti', 'today');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_order', 'Date');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_refresh', '0');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_FilterInfoUnit', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_FilterOrderby', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_FilterRefresh', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_FilterColExp', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_FilterHost', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_FilterMsg', '1');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_favorites', 'www.adiscon.com|Adiscon,www.monitorware.com|MonitorWare,www.winsyslog.com|WinSysLog');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_tag_order', 'Occurences');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_tag_sort', 'Asc');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_uStylesheet', 'phplogcon');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_uLanguage', '<lang>');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_uSaveFilterSettings', '0');
INSERT INTO UserPrefs (UserLogin, Name, PropValue) VALUES ('<username>', 'PHPLOGCON_uDebug', '0');

143
scripts/config.php.ex Normal file
View File

@ -0,0 +1,143 @@
<?php
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
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
http://www.phplogcon.com.
This Project was intiated and is maintened by Rainer Gerhards <rgerhards@hq.adiscon.com>. 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 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
define('_UTCtime', 0);
// Get messages date by ReceivedAt or DeviceReportedTime
define('_DATE', 'ReceivedAt');
// Coloring priority
define('_COLPriority', 1);
/*
***** 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));
?>

View File

@ -0,0 +1,33 @@
# 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)
);

View File

@ -0,0 +1,12 @@
# 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)
);

View File

@ -0,0 +1,12 @@
# 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)
);

16
scripts/mssql_ctUsers.sql Normal file
View File

@ -0,0 +1,16 @@
# 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)
);

View File

@ -0,0 +1,33 @@
# 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 ;

View File

@ -0,0 +1,11 @@
# 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
);

View File

@ -0,0 +1,12 @@
# 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 ;

16
scripts/mysql_ctUsers.sql Normal file
View File

@ -0,0 +1,16 @@
# 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 ;

View File

@ -3,7 +3,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -39,7 +39,7 @@ it become a reality.
}
else
{
$query = "SELECT UserIDText, Password FROM Users WHERE UserIDText LIKE '" . $_POST['usr'] . "' AND Password LIKE '" . $_POST['pass'] . "'";
$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);
@ -61,22 +61,25 @@ it become a reality.
else
{
// $dat = now();
// db_exec($global_Con, "UPDATE users SET phplogcon_lastlogin = ".dbc_sql_timeformat($dat)." WHERE UserIDText LIKE '".$_POST["usr"]."'");
// 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 Config when enabled
// Loading Users Filter Config when enabled
if($_SESSION['savefiltersettings'])
LoadFilterConfig();

197
syslog-display.php Normal file
View File

@ -0,0 +1,197 @@
<?php
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2004 Adiscon GmbH
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
http://www.phplogcon.com.
This Project was intiated and is maintened by Rainer Gerhards <rgerhards@hq.adiscon.com>. 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";
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<br /><a href="<? echo $_SERVER['HTTP_REFERER']; ?>">&lt;&lt; <?php echo _MSGBck; ?></a><br />
<?php
echo '<br><table>';
//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 '<tr><td align="left">';
echo _MSGEvn, ' ', $myEventsNavigation->GetLimitLower(), ' ', _MSGTo, ' ', $myEventsNavigation->GetLimitUpper(), ' ', _MSGFrm, ' ', $myEventsNavigation->GetEventCount();
echo '</td><td align="right">';
$myEventsNavigation->ShowNavigation();
?>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" CLASS="EventTable">
<tr CLASS=TDHEADER>
<td>SysLogTag</td>
<td><?php echo _MSGDate; ?></td>
<td><?php echo _MSGHost; ?></td>
<td><?php echo _MSGFac; ?></td>
<td><?php echo _MSGPri; ?></td>
<td><?php echo _MSGMsg; ?></td>
</tr>
<?php
//Read out words from phplogcon.ini which shouldn't
//be displayed and replaced by '*'
$file = file('phplogcon.ini');
if($file != FALSE)
{
$numarrayfile = count($file);
for($i = 0; $i < $numarrayfile; $i++)
{
$file[$i] = trim($file[$i]);
if($file[$i] != '#')
{
if($file[$i] == '[phplogcon]')
{
for($j = $i+1; $j < $numarrayfile; $j++)
{
if( stristr($file[$j], 'wordsdontshow=') != FALSE )
{
$words = explode("=", $file[$j]);
$words = explode(",", $words[1]);
}
}
}
}
}
$numarraywords = count($words);
}
$tc = 1;
while($row = db_fetch_array($res))
{
if($row['Message'] == "")
$message = _MSGNoMsg;
else
$message = $row['Message'];
echo '<tr>';
echo '<td CLASS=TD' . $tc . '>' . $_GET['slt'] . '</nobr></td>'; //date
echo '<td CLASS=TD' . $tc . '><nobr>' . $row[_DATE] . '</nobr></td>'; //date
echo '<td CLASS=TD' . $tc . '>' . $row['FromHost'] . '</td>'; //host
echo '<td CLASS=TD' . $tc . '>' . $row['Facility'] . '</td>'; //facility
// get the description of priority (and get the the right color, if enabled)
$pricol = 'TD' . $tc;
$priword = FormatPriority($row['Priority'], $pricol);
echo '<td CLASS=', $pricol, '>', $priword, '</td>';
$message = htmlspecialchars($message);
if(isset($_POST['regexp']) && $_POST['regexp'] != "")
{
$_POST['regexp'] = trim($_POST['regexp']);
$messageUp = strtoupper($message);
$regexpUp = strtoupper($_POST['regexp']);
$search_pos = strpos($messageUp, $regexpUp);
if($search_pos !== FALSE)
{
$regexpLng = strlen($_POST['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 . '<font color="' . $_POST['color'] . '">' . $subStrExp . '</font>';
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 '<td CLASS=TD', $tc, '><a CLASS="Msg" href="details.php?lid=', $row['ID'] , '">', $message, '</a></td>'; //message
//for changing colors
if($tc == 1) $tc = 2;
else $tc = 1;
/*
echo "<td>".$row['Priority']."</td>";
*/
echo '</tr>';
}
echo "</table>";
WriteFood();
?>

239
syslog-index.php Normal file
View File

@ -0,0 +1,239 @@
<?php
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2004 Adiscon GmbH
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
http://www.phplogcon.com.
This Project was intiated and is maintened by Rainer Gerhards <rgerhards@hq.adiscon.com>. See AUTHORS to learn who helped make
it become a reality.
*/#### #### #### #### #### #### #### #### #### ####
include 'include.php';
if( !isset($_POST['sortMethode']) )
$_POST['sortMethode'] = "ASC";
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 "<br>";
// 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 '<br><b>', _MSGNoData, '</b>';
}
else
{
echo '<table>';
echo '<tr><td align="left">';
echo _MSGEvn, ' ', $myEventsNavigation->GetLimitLower(), ' ', _MSGTo, ' ', $myEventsNavigation->GetLimitUpper(), ' ', _MSGFrm, ' ', $myEventsNavigation->GetEventCount();
echo '</td><td align="right">';
$myEventsNavigation->ShowNavigation();
?>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" CLASS="EventTable">
<tr CLASS=TDHEADER>
<?php if($_SESSION['show_methode'] == "Host") echo "<td>Example Host</td>";?>
<td>SysLogTag</td>
<td>Occurences</td>
<td>Example Message - Click for full list</td>
</tr>
<?php
//Read out words from phplogcon.ini which shouldn't
//be displayed and replaced by '*'
$file = file('phplogcon.ini');
if($file != FALSE)
{
$numarrayfile = count($file);
for($i = 0; $i < $numarrayfile; $i++)
{
$file[$i] = trim($file[$i]);
if($file[$i] != '#')
{
if($file[$i] == '[phplogcon]')
{
for($j = $i+1; $j < $numarrayfile; $j++)
{
if( stristr($file[$j], 'wordsdontshow=') != FALSE )
{
$words = explode("=", $file[$j]);
$words = explode(",", $words[1]);
}
}
}
}
}
$numarraywords = count($words);
}
$tc = 1;
while($row1 = db_fetch_array($res1))
{
// here we get the message corresponding to a syslogtag!
// for better performance we optimize the query with a TOP(Mssql) or LIMIT(MySql)
$cmdTmpFirst = $cmdSQLfirst_part;
$cmdTmpLast = $cmdSQLlast_part_2;
$cmdSQLlast_part_2 .= " AND SysLogTag LIKE '" . $row1['SysLogTag'] . "'";
if(strtolower(_CON_MODE) == "odbc" && strtolower(_DB_APP) == "mssql")
$cmdSQLfirst_part .= "TOP 1 ";
else
$cmdSQLlast_part_2 .= " LIMIT 0,1";
$res2 = db_exec($global_Con, $cmdSQLfirst_part . $cmdSQLmain_part_2 . $cmdSQLlast_part_2);
$cmdSQLlast_part_2 = $cmdTmpLast;
$cmdSQLfirst_part = $cmdTmpFirst;
$row2 = db_fetch_array($res2);
if($row2['Message'] == "")
$message = _MSGNoMsg;
else
$message = $row2['Message'];
echo '<tr>';
if($_SESSION['show_methode'] == "Host")
echo '<td CLASS=TD' . $tc . '>' . $row1['FromHost'] . '</td>';
echo '<td CLASS=TD' . $tc . '>' . $row1['SysLogTag'] . '</td>';
echo '<td CLASS=TD' . $tc . '>' . $row1['occurences'] . '</td>';
$message = htmlspecialchars($message);
if(isset($_POST['regexp']) && $_POST['regexp'] != "")
{
$_POST['regexp'] = trim($_POST['regexp']);
$messageUp = strtoupper($message);
$regexpUp = strtoupper($_POST['regexp']);
$search_pos = strpos($messageUp, $regexpUp);
if($search_pos !== FALSE)
{
$regexpLng = strlen($_POST['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 . '<font color="' . $_POST['color'] . '">' . $subStrExp . '</font>';
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 '<td CLASS=TD', $tc, '><a CLASS="Msg" href="syslog-display.php?slt=' . $row1['SysLogTag'] . '">', $message, '</a></td>'; //message
//for changing colors
if($tc == 1) $tc = 2;
else $tc = 1;
/*
echo "<td>".$row['Priority']."</td>";
*/
echo '</tr>';
}
echo "</table>";
}
WriteFood();
?>

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.

View File

@ -2,7 +2,7 @@
/*#### #### #### #### #### #### #### #### #### ####
phpLogCon - A Web Interface to Log Data.
Copyright (C) 2003 Adiscon GmbH
Copyright (C) 2004 Adiscon GmbH
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.
@ -29,7 +29,7 @@ it become a reality.
<form method="POST" action="user-config-process.php" name="UserConfiguration">
<input type="hidden" name="userConfig" value="UserConfiguration">
<center><h3>..:: <?php echo _MSGUsrSet; ?> ::..</h3></td></center>
<table align="center"><tr><td><h3>..:: <?php echo _MSGUsrSet; ?> ::..</h3></td></tr></table>
<center>
<table border="" cellpadding="2" cellspacing="0" width="700" align="center" Class="ConfigTable">
@ -101,6 +101,9 @@ it become a reality.
</form>
</center>
<?php
/*
?>
<form method="POST" action="user-config-process.php" name="BookmarkConfiguration">
<input type="hidden" name="bookmarkConfig" value="BookmarkDelete">
<center>
@ -129,7 +132,8 @@ it become a reality.
$result = db_fetch_singleresult($result);
if($num != 0)
{
echo '<select name="favorites">';
echo '<select name="favorites" onchange="window.open(this.options[this.selectedIndex].value, \'\'); return true;">';
echo '<option value="" selected>Select your Bookmark</option>';
$sites = explode(",", $result["PropValue"]);
$sitecntr = count($sites);
for($i = 0; $i < $sitecntr; $i++)
@ -138,9 +142,7 @@ it become a reality.
echo "<option value='http://" . $site[0] . "'>" . $site[1] . "</option>";
}
echo '</select>';
echo "\t<input type=\"button\" value=\"Go to\">\t";
echo "\t<input type=\"submit\" value=\"" . _MSGDel . "\">\t";
echo "Sorry, GoTo Site is disabled at the moment!";
}
else
echo _MSGNoFav
@ -171,7 +173,7 @@ it become a reality.
</center>
<?php
*/
WriteFood();
?>