Chancing filter does not work, because the header was already sent due to

some spaces before the leading <?php tag. I have also removed GetSortedArgs
function. It does not perform useful work in my opinion. Maybe it was a
legacy one which was overseen by introducing session vars.
This commit is contained in:
Michael Meckelein 2005-08-09 15:02:05 +00:00
parent 28303608c7
commit 95870c94b7
7 changed files with 2060 additions and 2063 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,181 +1,181 @@
<?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.
*/#### #### #### #### #### #### #### #### #### ####
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><?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><?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">.: <?php echo _InsDbIns3; ?> :.</td>
<td Class="Header1">&nbsp;</td>
</tr>
<tr>
<td><?php echo _InsDbInsCon; ?>: <font color="red">*</font></td>
<td>
<select name="dbcon">
<option value="nativemysql" selected>MySQL</Option>
<option value="odbcmysql">MySQL via ODBC</Option>
<option value="odbcmssql">MSSQL via ODBC</Option>
</select>
</td>
</tr>
<tr>
<td>Host/IP: <font color="red">*</font></td>
<td><input type="text" name="dbhost" size="25"></td>
</tr>
<tr>
<td>Port (<?php echo _InsDbInsPort; ?>):</td>
<td><input type="text" name="dbport" size="25"></td>
</tr>
<tr>
<td><?php echo _InsDbInsUsr; ?>:</td>
<td><input type="text" name="dbuser" size="25"></td>
</tr>
<tr>
<td><?php echo _InsPass; ?>:</td>
<td><input type="password" name="dbpass" size="25"></td>
</tr>
<tr>
<td><?php echo _InsPassRe; ?>:</td>
<td><input type="password" name="dbpassre" size="25"></td>
</tr>
<tr>
<td><?php echo _InsDbInsName; ?>: <font color="red">*</font></td>
<td><input type="text" name="dbname" size="25"></td>
</tr>
<tr>
<td><?php echo _InsDbInsTime; ?>: <font color="red">*</font></td>
<td>
<select name="dbtime">
<option value="utc" selected>UTC</Option>
<option value="local">Localtime</Option>
</select>
</td>
</tr>
</table>
<br><br>
<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">.: <?php echo _InsPlcIns3; ?> :.</td>
<td Class="Header1">&nbsp;</td>
</tr>
<tr>
<td><?php echo _InsPlcInsLang; ?>:</td>
<td>
<select name="lang">
<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><?php echo _InsPlcInsUi; ?>:</td>
<td>
<input type="checkbox" name="ui" value="1">
</td>
</tr>
<tr>
<td colspan="2" align="left" Class="Header1"><?php echo _InsPlcInsUiCrUsr; ?>:</td>
<td Class="Header1">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><?php echo _InsPlcIns4; ?></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><?php echo _InsPlcInsUiName; ?>:</td>
<td><input type="text" name="uiuser" size="25"></td>
</tr>
<tr>
<td><?php echo _InsPlcInsUiDisName; ?>:</td>
<td><input type="text" name="uidisname" size="25"></td>
</tr>
<tr>
<td><?php echo _InsPass; ?>:</td>
<td><input type="password" name="uipass" size="25"></td>
</tr>
<tr>
<td><?php echo _InsPassRe; ?>:</td>
<td><input type="password" name="uipassre" size="25"></td>
</tr>
<tr>
<td><?php echo _InsPlcInsUiLang; ?>:</td>
<td>
<select name="uilang">
<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>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="right"><input type="submit" value="Install phpLogCon"></td>
</tr>
</table>
</form>
<?php
}
WriteFoot();
<?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.
*/#### #### #### #### #### #### #### #### #### ####
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><?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><?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">.: <?php echo _InsDbIns3; ?> :.</td>
<td Class="Header1">&nbsp;</td>
</tr>
<tr>
<td><?php echo _InsDbInsCon; ?>: <font color="red">*</font></td>
<td>
<select name="dbcon">
<option value="nativemysql" selected>MySQL</Option>
<option value="odbcmysql">MySQL via ODBC</Option>
<option value="odbcmssql">MSSQL/MSAccess via ODBC</Option>
</select>
</td>
</tr>
<tr>
<td>Host/IP: <font color="red">*</font></td>
<td><input type="text" name="dbhost" size="25"></td>
</tr>
<tr>
<td>Port (<?php echo _InsDbInsPort; ?>):</td>
<td><input type="text" name="dbport" size="25"></td>
</tr>
<tr>
<td><?php echo _InsDbInsUsr; ?>:</td>
<td><input type="text" name="dbuser" size="25"></td>
</tr>
<tr>
<td><?php echo _InsPass; ?>:</td>
<td><input type="password" name="dbpass" size="25"></td>
</tr>
<tr>
<td><?php echo _InsPassRe; ?>:</td>
<td><input type="password" name="dbpassre" size="25"></td>
</tr>
<tr>
<td><?php echo _InsDbInsName; ?>: <font color="red">*</font></td>
<td><input type="text" name="dbname" size="25"></td>
</tr>
<tr>
<td><?php echo _InsDbInsTime; ?>: <font color="red">*</font></td>
<td>
<select name="dbtime">
<option value="utc" selected>UTC</Option>
<option value="local">Localtime</Option>
</select>
</td>
</tr>
</table>
<br><br>
<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">.: <?php echo _InsPlcIns3; ?> :.</td>
<td Class="Header1">&nbsp;</td>
</tr>
<tr>
<td><?php echo _InsPlcInsLang; ?>:</td>
<td>
<select name="lang">
<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><?php echo _InsPlcInsUi; ?>:</td>
<td>
<input type="checkbox" name="ui" value="1">
</td>
</tr>
<tr>
<td colspan="2" align="left" Class="Header1"><?php echo _InsPlcInsUiCrUsr; ?>:</td>
<td Class="Header1">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><?php echo _InsPlcIns4; ?></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><?php echo _InsPlcInsUiName; ?>:</td>
<td><input type="text" name="uiuser" size="25"></td>
</tr>
<tr>
<td><?php echo _InsPlcInsUiDisName; ?>:</td>
<td><input type="text" name="uidisname" size="25"></td>
</tr>
<tr>
<td><?php echo _InsPass; ?>:</td>
<td><input type="password" name="uipass" size="25"></td>
</tr>
<tr>
<td><?php echo _InsPassRe; ?>:</td>
<td><input type="password" name="uipassre" size="25"></td>
</tr>
<tr>
<td><?php echo _InsPlcInsUiLang; ?>:</td>
<td>
<select name="uilang">
<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>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="right"><input type="submit" value="Install phpLogCon"></td>
</tr>
</table>
</form>
<?php
}
WriteFoot();
?>

View File

@ -1,347 +1,366 @@
<?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.
*/#### #### #### #### #### #### #### #### #### ####
include "include.php";
include "../lang/" . $_POST['lang'] . ".php";
WriteHead("phpLogCon :: Installation Progress");
?>
<center><?php echo _InsPer1; ?>
<?php
// if there are fields missing, create an error message
$strErrorMsg = "";
/*
* 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"] == "" && !$bIsODBC)
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "User";
}
/*
* 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"] == "" && !$bIsODBC)
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "Re-type Password";
}
*/
if($_POST["dbname"] == "")
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "Database/DSN name";
}
if($_POST["dbpass"] != "" && $_POST["dbpassre"] != "" && !$bIsODBC)
{
if(strcmp($_POST["dbpass"], $_POST["dbpassre"]) != 0)
{
if($strErrorMsg != "")
$strErrorMsg .= "! Also the ";
$strErrorMsg .= "Password and Re-typed Password aren't the same";
}
}
if($strErrorMsg != "")
$strDbErrMsg = "Database Settings: <i>" . $strErrorMsg . "</i>";
else
$strDbErrMsg = "";
if( isset($_POST["ui"]) )
$_POST["ui"] = 1;
else
$_POST["ui"] = 0;
$strErrorMsg = "";
if($_POST["ui"] == 1)
{
if($_POST["uiuser"] != "")
{
if($_POST["uidisname"] == "")
$strErrorMsg .= "Display name";
if($_POST["uipass"] == "")
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "Password";
}
if($_POST["uipassre"] == "")
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "Re-type Password";
}
if($_POST["uipass"] != "" && $_POST["uipassre"] != "")
{
if(strcmp($_POST["uipass"], $_POST["uipassre"]) != 0)
$strErrorMsg .= "Password and Re-typed Password aren't the same";
}
if($strErrorMsg != "")
$strUiErrMsg = "User Interface Settings: <i>" . $strErrorMsg . "</i>";
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=\"javascript:history.back()\">Go back to installation</a> ::..<br>";
echo "<br><br>";
exit;
}
?>
<b><font color="red"><?php echo _InsPerDone; ?></font></b></center>
<center><?php echo _InsPer2; ?>
<?php
// include database driver
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"]);
// ***********************
// BEGIN CREATING TABLES
// ***********************
//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";
// 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(!isset($arCurTables))
$arCurTables = array();
for($i = 0; $i < count($arTables); $i++)
{
if( array_search($arTables[$i], $arCurTables) == FALSE )
{
if( !isset($arNewTables) )
$arNewTables[0] = $arTables[$i];
else
$arNewTables[count($arNewTables)] = $arTables[$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"><?php echo _InsPerDone; ?></font></b></center>
<center><?php echo _InsPer3; ?>
<?php
// ***************************
// BEGIN INSERTS INTO TABLES
// ***************************
//If User Interface should be installed and a user should be created:
if($_POST["ui"] == 1 && $_POST["uiuser"] != "")
{
$strQueryFile = "UserInserts.sql";
$arQueries = GetSQLQueries($strQueryFile);
// Find line which inserts a user into 'Users'-table and replace placeholders with values
for($i = 0; $i < count($arQueries); $i++)
{
if( stristr($arQueries[$i], "INSERT INTO Users") )
{
if($_POST['dbtime'] == "utc")
$now = dbc_sql_timeformat(GetUTCtime(time()));
else
$now = dbc_sql_timeformat(time());
// Edit SQL User-Query - Replace placeholders in query with values from the code
$arQueries[$i] = ereg_replace("<username>", $_POST['uiuser'], $arQueries[$i]);
$arQueries[$i] = ereg_replace("<password>", $_POST['uipass'], $arQueries[$i]);
$arQueries[$i] = ereg_replace("<realname>", $_POST['uidisname'], $arQueries[$i]);
$arQueries[$i] = ereg_replace("<date>", $now, $arQueries[$i]);
$arQueries[$i] = ereg_replace("<lang>", $_POST['uilang'], $arQueries[$i]);
db_exec($installCon, $arQueries[$i]);
}
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]);
}
}
//close database connection
db_close($installCon);
?>
<b><font color="red"><?php echo _InsPerDone; ?></font></b></center>
<center><?php echo _InsPer4; ?>
<?php
// ***************************
// BEGIN EDITING CONFIG.PHP
// ***************************
//open file handle
$hConfigSrc = fopen("../scripts/config.php.ex", "r");
$hConfigDes = fopen("../config.php", "w");
while (!feof($hConfigSrc))
{
$strLine = fgets($hConfigSrc);
//if the current line contains the searchstring, insert values and write line
if(stristr($strLine, "define('_DBSERVER'"))
{
if($_POST['dbport'] != "")
fwrite($hConfigDes, " define('_DBSERVER', '" . $_POST["dbhost"] . ":" . $_POST['dbport'] . "');\r\n");
else
fwrite($hConfigDes, " define('_DBSERVER', '" . $_POST["dbhost"] . "');\r\n");
}
elseif(stristr($strLine, "define('_DBNAME'"))
fwrite($hConfigDes, " define('_DBNAME', '" . $_POST["dbname"] . "');\r\n");
elseif(stristr($strLine, "define('_DBUSERID'"))
fwrite($hConfigDes, " define('_DBUSERID', '" . $_POST["dbuser"] . "');\r\n");
elseif(stristr($strLine, "define('_DBPWD'"))
fwrite($hConfigDes, " define('_DBPWD', '" . $_POST["dbpass"] . "');\r\n");
elseif(stristr($strLine, "define('_CON_MODE'"))
fwrite($hConfigDes, " define('_CON_MODE', '" . $dbcon . "');\r\n");
elseif(stristr($strLine, "define('_DB_APP'"))
fwrite($hConfigDes, " define('_DB_APP', '" . $dbapp . "');\r\n");
elseif(stristr($strLine, "define('_ENABLEUI'"))
fwrite($hConfigDes, " define('_ENABLEUI', " . $_POST["ui"] . ");\r\n");
elseif(stristr($strLine, "define('_DEFLANG'"))
fwrite($hConfigDes, " define('_DEFLANG', '" . $_POST["lang"] . "');\r\n");
elseif(stristr($strLine, "define('_UTCtime'"))
{
if($_POST["dbtime"] == "utc")
$dbTime = 1;
else
$dbTime = 0;
fwrite($hConfigDes, " define('_UTCtime', " . $dbTime . ");\r\n");
}
else
fwrite($hConfigDes, $strLine);
}
fclose($hConfigSrc);
fclose($hConfigDes);
?>
<b><font color="red"><?php echo _InsPerDone; ?></font></b></center>
<br>
<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
WriteFoot();
<?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.
*/#### #### #### #### #### #### #### #### #### ####
include "include.php";
include "../lang/" . $_POST['lang'] . ".php";
WriteHead("phpLogCon :: Installation Progress");
?>
<center><?php echo _InsPer1; ?>
<?php
// if there are fields missing, create an error message
$strErrorMsg = "";
/*
* 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"] == "" && !$bIsODBC)
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "User";
}
/*
* 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"] == "" && !$bIsODBC)
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "Re-type Password";
}
*/
if($_POST["dbname"] == "")
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "Database/DSN name";
}
if($_POST["dbpass"] != "" && $_POST["dbpassre"] != "" && !$bIsODBC)
{
if(strcmp($_POST["dbpass"], $_POST["dbpassre"]) != 0)
{
if($strErrorMsg != "")
$strErrorMsg .= "! Also the ";
$strErrorMsg .= "Password and Re-typed Password aren't the same";
}
}
if($strErrorMsg != "")
$strDbErrMsg = "Database Settings: <i>" . $strErrorMsg . "</i>";
else
$strDbErrMsg = "";
if( isset($_POST["ui"]) )
$_POST["ui"] = 1;
else
$_POST["ui"] = 0;
$strErrorMsg = "";
if($_POST["ui"] == 1)
{
if($_POST["uiuser"] != "")
{
if($_POST["uidisname"] == "")
$strErrorMsg .= "Display name";
if($_POST["uipass"] == "")
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "Password";
}
if($_POST["uipassre"] == "")
{
if($strErrorMsg != "")
$strErrorMsg .= " - ";
$strErrorMsg .= "Re-type Password";
}
if($_POST["uipass"] != "" && $_POST["uipassre"] != "")
{
if(strcmp($_POST["uipass"], $_POST["uipassre"]) != 0)
$strErrorMsg .= "Password and Re-typed Password aren't the same";
}
if($strErrorMsg != "")
$strUiErrMsg = "User Interface Settings: <i>" . $strErrorMsg . "</i>";
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=\"javascript:history.back()\">Go back to installation</a> ::..<br>";
echo "<br><br>";
exit;
}
?>
<b><font color="red"><?php echo _InsPerDone; ?></font></b></center>
<center><?php echo _InsPer2; ?>
<?php
// include database driver
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"]);
// ***********************
// BEGIN CREATING TABLES
// ***********************
//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";
// 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(!isset($arCurTables))
$arCurTables = array();
for($i = 0; $i < count($arTables); $i++)
{
if( array_search($arTables[$i], $arCurTables) == FALSE )
{
if( !isset($arNewTables) )
$arNewTables[0] = $arTables[$i];
else
$arNewTables[count($arNewTables)] = $arTables[$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"><?php echo _InsPerDone; ?></font></b></center>
<center><?php echo _InsPer3; ?>
<?php
// ***************************
// BEGIN INSERTS INTO TABLES
// ***************************
//If User Interface should be installed and a user should be created:
if($_POST["ui"] == 1 && $_POST["uiuser"] != "")
{
$strQueryFile = "UserInserts.sql";
$arQueries = GetSQLQueries($strQueryFile);
// Find line which inserts a user into 'Users'-table and replace placeholders with values
for($i = 0; $i < count($arQueries); $i++)
{
if( stristr($arQueries[$i], "INSERT INTO Users") )
{
if($_POST['dbtime'] == "utc")
$now = dbc_sql_timeformat(GetUTCtime(time()));
else
$now = dbc_sql_timeformat(time());
// Edit SQL User-Query - Replace placeholders in query with values from the code
$arQueries[$i] = ereg_replace("<username>", $_POST['uiuser'], $arQueries[$i]);
$arQueries[$i] = ereg_replace("<password>", $_POST['uipass'], $arQueries[$i]);
$arQueries[$i] = ereg_replace("<realname>", $_POST['uidisname'], $arQueries[$i]);
$arQueries[$i] = ereg_replace("<date>", $now, $arQueries[$i]);
$arQueries[$i] = ereg_replace("<lang>", $_POST['uilang'], $arQueries[$i]);
db_exec($installCon, $arQueries[$i]);
}
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]);
}
}
//close database connection
db_close($installCon);
?>
<b><font color="red"><?php echo _InsPerDone; ?></font></b></center>
<center><?php echo _InsPer4; ?>
<?php
// ***************************
// BEGIN EDITING CONFIG.PHP
// ***************************
// First check if the File is writeable!
if (is_writable("../config.php") == FALSE)
{
$strDbErrMsg = "Database Settings: ";
echo "<BR><u><b>Error:</b></u> <font color=red>The file '../config.php' is not writeable. Please check the permissions</b></font><br><br>Go back and correct this!<br>..:: <a href=\"javascript:history.back()\">Go back to installation</a> ::..<br>";
echo "<br><br></body></html>";
exit;
}
//open file handle
$hConfigSrc = fopen("../scripts/config.php.ex", "r");
$hConfigDes = @fopen("../config.php", "w");
if ($hConfigDes == FALSE)
{
$strDbErrMsg = "Database Settings: ";
echo "<BR><u><b>Error:</b></u> <font color=red>The file '../config.php' is not writeable. Please check the permissions</b></font><br><br>Go back and correct this!<br>..:: <a href=\"javascript:history.back()\">Go back to installation</a> ::..<br>";
echo "<br><br></body></html>";
exit;
}
while (!feof($hConfigSrc))
{
$strLine = fgets($hConfigSrc);
//if the current line contains the searchstring, insert values and write line
if(stristr($strLine, "define('_DBSERVER'"))
{
if($_POST['dbport'] != "")
fwrite($hConfigDes, " define('_DBSERVER', '" . $_POST["dbhost"] . ":" . $_POST['dbport'] . "');\r\n");
else
fwrite($hConfigDes, " define('_DBSERVER', '" . $_POST["dbhost"] . "');\r\n");
}
elseif(stristr($strLine, "define('_DBNAME'"))
fwrite($hConfigDes, " define('_DBNAME', '" . $_POST["dbname"] . "');\r\n");
elseif(stristr($strLine, "define('_DBUSERID'"))
fwrite($hConfigDes, " define('_DBUSERID', '" . $_POST["dbuser"] . "');\r\n");
elseif(stristr($strLine, "define('_DBPWD'"))
fwrite($hConfigDes, " define('_DBPWD', '" . $_POST["dbpass"] . "');\r\n");
elseif(stristr($strLine, "define('_CON_MODE'"))
fwrite($hConfigDes, " define('_CON_MODE', '" . $dbcon . "');\r\n");
elseif(stristr($strLine, "define('_DB_APP'"))
fwrite($hConfigDes, " define('_DB_APP', '" . $dbapp . "');\r\n");
elseif(stristr($strLine, "define('_ENABLEUI'"))
fwrite($hConfigDes, " define('_ENABLEUI', " . $_POST["ui"] . ");\r\n");
elseif(stristr($strLine, "define('_DEFLANG'"))
fwrite($hConfigDes, " define('_DEFLANG', '" . $_POST["lang"] . "');\r\n");
elseif(stristr($strLine, "define('_UTCtime'"))
{
if($_POST["dbtime"] == "utc")
$dbTime = 1;
else
$dbTime = 0;
fwrite($hConfigDes, " define('_UTCtime', " . $dbTime . ");\r\n");
}
else
fwrite($hConfigDes, $strLine);
}
fclose($hConfigSrc);
fclose($hConfigDes);
?>
<b><font color="red"><?php echo _InsPerDone; ?></font></b></center>
<br>
<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
WriteFoot();
?>

View File

@ -1,222 +1,222 @@
<?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.
*/#### #### #### #### #### #### #### #### #### ####
/*
* German language file for phpLogCon
*/
define('_MSG001', 'Willkommen bei phpLogCon! Bittle loggen Sie sich zuerst mit Ihrem benutzernamen und Passwort ein');
define('_MSGUsrnam', 'Benutzername');
define('_MSGpas', 'Passwort');
define('_MSGLogSuc', 'Login erfolgreich');
define('_MSGWel', 'Willkommen bei phpLogCon');
define('_MSGChoOpt', '! Wählen sie unter den Optionen aus dem obrigen Menü aus');
define('_MSGQuiInf', 'Kurz-Info (Unter Berücksichtigung der Filtereinstellungen)');
define('_MSGTop5', 'Top fünf Logs (Unter Berücksichtigung der Filtereinstellungen)');
define('_MSGNoData', 'Keine Daten gefunden');
define('_MSGDate', 'Datum');
define('_MSGFac', 'Facility');
define('_MSGMsg', 'Nachricht');
define('_MSGSysLogTag', 'SysLogTag');
define('_MSGOccuren', 'Vorkommen');
define('_MSGAccDen', 'Zugang nicht gestattet');
define('_MSGFalLog', 'Sie sind kein registrierter Benutzer oder Sie haben ein falsches Passwort eingegeben');
define('_MSGBac2Ind', 'Zurück zum Index');
define('_MSGSesExp', 'Session abgelaufen');
define('_MSGSesExpQue', 'Session abgelaufen. Haben Sie vielleicht das letzte mal vergessen sich auszuloggen');
define('_MSGReLog', 'Zurück zum Index um sich neu neu einzuloggen');
define('_MSGShwEvn', 'Zeige Events');
define('_MSGShwSlt', 'Zeige SysLogTags');
define('_MSGShwSLog', 'Zeige SysLog');
define('_MSGNoDBCon', 'Verbindung zum Datenbank-Server fehlgeschlagen');
define('_MSGChDB', 'Auswahl der Datenbank fehlgeschlagen');
define('_MSGInvQur', 'Ungültige Abfrage');
define('_MSGNoDBHan', 'Kein gültiger Datenbank-Verbindungs-Handle');
define('_MSGLogout', 'LogOut');
define('_MSGSrcExp', 'Nach Ausdruck suchen');
define('_MSGSrc', 'Suche');
define('_MSGColExp', 'Ausdruck färben');
define('_MSGinCol', ' in dieser Farbe: ');
define('_MSGBrw', 'Durchsuchen');
define('_MSGFilConf', 'Allgemeine Filter Konfiguration');
define('_MSGSltFil', 'SysLogTag Filter Konfiguration');
define('_MSGUsrConf', 'Benutzer Konfiguration');
define('_MSGBscSet', 'Generelle Einstellungen');
define('_MSGConSet', 'Verbindungs Einstellungen');
define('_MSGConMod', 'Verbindungsmodus');
define('_MSGFilCon', 'Filter Bedingungen');
define('_MSGEvnDat', 'Event Datum');
define('_MSGOrdBy', 'Sortieren nach');
define('_MSGTagSort', 'Aufsteigend oder absteigend sortieren');
define('_MSGRef', 'Aktualisierung');
define('_MSGInfUI', 'InfoEinheit');
define('_MSGOth', 'Andere');
define('_MSGPri', 'Severity');
define('_MSGFilSet', 'Filter Einstellungen');
define('_MSGUsrSet', 'Benutzer Einstellungen');
define('_MSGFilOpt', 'Quick Filter Optionen');
define('_MSGSwiEvnMan', 'Event Datum manuell auswählen');
define('_MSGSwiEvnPre', 'Event Datum vordefiniert auswählen');
define('_MSGShwEvnDet', 'Zeige Event Details');
define('_MSGBck', 'zurück');
define('_MSGEvnID', 'EventID');
define('_MSGClickBrw', ' (Klick um die MonitorWare Datenbank zu durchsuchen) :: (Oder durchsuche ');
define('_MSGEvnCat', 'EventKategorie');
define('_MSGEvnUsr', 'EventBenutzer');
define('_MSGFrmHos', 'VonHost');
define('_MSGNTSev', 'NTSeverity');
define('_MSGRecAt', 'EmpfangenAm');
define('_MSGDevRep', 'VomGerätGemeldeteZeit');
define('_MSGImp', 'Wichtigkeit');
define('_MSGEvn', 'Event');
define('_MSGTo', 'bis');
define('_MSGFrm', 'von');
define('_MSGLogPg', 'Logs pro Seite');
define('_MSGHom', 'Startseite');
define('_MSGHlp', 'Hilfe');
define('_MSGFOpt', 'Filter Optionen');
define('_MSGUOpt', 'Benutzer Optionen');
define('_MSGEvnLogTyp', 'EventLogArt');
define('_MSGEvnSrc', 'EventQuelle');
define('_MSG2dy', 'heute');
define('_MSGYester', 'nur gestern');
define('_MSGThsH', 'aktuelle Stunde');
define('_MSGLstH', 'letzte Stunde');
define('_MSGL2stH', 'letzten 2 Stunden');
define('_MSGL5stH', 'letzten 5 Stunden');
define('_MSGL12stH', 'letzten 12 Stunden');
define('_MSGL2d', 'letzten 2 Tage');
define('_MSGL3d', 'letzten 3 Tage');
define('_MSGLw', 'letzte Woche');
define('_MSGFacDat', 'Facility und Datum');
define('_MSGPriDat', 'Severity und Datum');
define('_MSGNoRef', 'nicht aktualisieren');
define('_MSGE10s', 'alle 10 sek');
define('_MSGE30s', 'alle 30 sek');
define('_MSGEm', 'jede min');
define('_MSGE2m', 'alle 2 min');
define('_MSGE15m', 'alle 15 min');
define('_MSGEn', 'Englisch');
define('_MSGDe', 'Deutsch');
define('_MSGFav', 'Favoriten (Zum Aufrufen, auswählen):');
define('_MSGDel', 'Löschen');
define('_MSGNoFav', 'Keine Favoriten gefunden');
define('_MSGNewFav', 'Neuer Favorit');
define('_MSGSiten', 'Seitenname');
define('_MSGAdd', 'Hinzufügen');
define('_MSGChg', 'Ändern');
define('_MSGEnv', 'Umgebung');
define('_MSGUsrInt', 'Benutzer Maske');
define('_MSGUEna', 'Aktiviert');
define('_MSGUDsa', 'Deaktiviert');
define('_MSGNamInvChr', 'Name und/oder Passwort enthielten ungültige Zeichen');
define('_MSGSitInvChr', 'Seitenname und/oder Adresse enthielten ungültige Zeichen');
define('_MSGESec', 'jede Sekunde');
define('_MSGE5Sec', 'alle 5 Sek');
define('_MSGE20Sec', 'alle 20 Sek');
define('_MSGRed', 'Rot');
define('_MSGBlue', 'Blau');
define('_MSGGreen', 'Grün');
define('_MSGYel', 'Gelb');
define('_MSGOra', 'Orange');
define('_MSGFilHost', 'Suchen nach IP/Computer');
define('_MSGSearchMsg', 'Nachricht muss folgendes enthalten');
define('_MSGDisIU', 'Zeige Info Einheiten');
define('_MSGAscend', 'Aufsteigend');
define('_MSGDescend', 'Absteigend');
define('_MSGEnbQF', 'Quick-Filter auswählen');
define('_MSGSty', 'Aussehen');
define('_MSGHost', 'Computer');
define('_MSGPRI0', 'EMERGENCY');
define('_MSGPRI1', 'ALERT');
define('_MSGPRI2', 'CRITICAL');
define('_MSGPRI3', 'ERROR');
define('_MSGPRI4', 'WARNING');
define('_MSGPRI5', 'NOTICE');
define('_MSGPRI6', 'INFO');
define('_MSGPRI7', 'DEBUG');
define('_MSGNumSLE', 'Anzahl der Syslog Events');
define('_MSGNumERE', 'Anzahl der EventReporter Events');
define('_MSGNoMsg', '[Keine Nachricht vorhanden]');
define('_MSGMenInf1', '- Sie befinden sich zur Zeit im ');
define('_MSGMenInf2', ' Modus auf ');
define('_MSGMenInf3', '. Datenbank: ');
define('_MSGLang', 'Sprache:');
define('_MSGStyle', 'Stylesheet:');
define('_MSGAddInfo', 'Zusätzliche Informationen:');
define('_MSGDebug1', 'Debug:');
define('_MSGDebug2', 'Zeige Debug Ausgaben');
define('_MSGSave', 'Speicher/- Ladeoptionen:');
define('_MSGFilSave1', 'Filter Einstellungen:');
define('_MSGFilSave2', 'Filter Einstellungen in Datenbank speichern und beim Einloggen auslesen');
define('_MSGDBOpt', 'Datenbankoptionen:');
define('_MSGUTC1', 'UTC-Zeit:');
define('_MSGUTC2', 'Wenn Ihr Datenbank-Server keine UTC-Zeit verwendet, entfernen Sie das Häckchen!');
define('_MSGSavCook', 'Login behalten (Cookie)?');
define('_MSGAnd', 'und');
define('_MSGApply', 'Filter anwenden');
define('_MSGShow', 'Show');
define('_MSGMethSlt', 'SysLogTags');
define('_MSGMethHost', 'SysLogTags auf Hosts beziehend');
define('_MSGInstDir', 'System Meldung: Sie haben den \'install/\' Ordner nicht gelöscht!! Dies verursacht ein hohes sicherheitsrisiko!!');
define('_InsWelc1', 'Willkommen zur Installation von phpLogCon, dem Logging-WebInterface.');
define('_InsWelc2', 'Die folgenden Schritte werden Sie durch die Installation begleiten und Ihnen bei der korrekten Installation und Konfiguration von phpLogCon helfen.');
define('_InsWelc3', 'Anmerkung: Felder mit einem ');
define('_InsWelc4', 'ROTEN *');
define('_InsWelc5', ' müssen in jdem Fall ausgefüllt werden!');
define('_InsDbIns1', 'Zuerst müssen wir Ihre Datenbank-Struktur überprüfen, da phpLogCon einige Tabellen benötigt. Wenn die Tabellen nicht existieren, wird phpLogCon sie anlegen.');
define('_InsDbIns2', 'Hierfür benötigt die phpLogCon Installation ein paar Informationen zu Ihrem Datenbank-Server:');
define('_InsDbIns3', 'Datenbank Einstellungen');
define('_InsDbInsCon', 'Verbindungstyp');
define('_InsDbInsConNa', 'Native');
define('_InsDbInsApp', 'Datenbank-Applikation');
define('_InsDbInsPort', 'Bei Standard, leer lassen');
define('_InsDbInsUsr', 'Benutzer (Benutzer muss \'INSERT\' und \'CREATE\' Rechte haben!)');
define('_InsPass', 'Passwort');
define('_InsPassRe', 'Password wiederholen');
define('_InsDbInsName', 'Datenbank/DSN Name');
define('_InsDbInsTime', 'Datenbank Zeitformat');
define('_InsPlcIns1', 'Nun müssen wir ein paar Einstellungen vornehmen, sauber und optimiert läuft.');
define('_InsPlcIns2', 'Anmerkung: Wenn Sie gewählt haben, dass das User Interface nicht installiert werden soll, können Sie es durch SQL-Scripte nachträglich installieren! Für Hilfe schauen Sie ins Manual.');
define('_InsPlcIns3', 'phpLogCon Allgemeine Einstellungen');
define('_InsPlcInsLang', 'Standard Sprache');
define('_InsLangEn', 'Englisch');
define('_InsLangDe', 'Deutsch');
define('_InsPlcInsUi', 'User Interface installieren');
define('_InsPlcInsUiCrUsr', 'Einen Benutzer anlegen');
define('_InsPlcIns4', 'Hier können Sie einen Benutzer für das User Interface anlegen. Wenn Sie bereits Benutzer in Ihrer Datenbank haben oder das User Interface nicht installieren möchten, lassen Sie diese Felder leer!');
define('_InsPlcInsUiName', 'Benutzername');
define('_InsPlcInsUiDisName', 'Anzeigename');
define('_InsPlcInsUiLang', 'Gewünschte Sprache');
define('_InsPer1', 'Überprüfe Benutzer Eingaben...');
define('_InsPerDone', 'Erledigt!');
define('_InsPer2', 'Erstelle benötigte Tabellen...');
define('_InsPer3', 'Füge Daten in die Tabellen ein...');
define('_InsPer4', 'Erstelle Ihre Konfigurationsdatei (config.php)...');
define('_InsPer5', 'Alle Aufgaben wurden erfolgreich abgeschlossen!');
define('_InsPer6', 'Herzlichen Glückwunsch! Sie haben erfolgreich phpLogCon installiert!');
define('_InsPer7', 'Eine Dtei namens \'config.php\' liegt im Hauptverzeichnis von phpLogCon. In dieser Datei sind alle Informationen, die sie zuvor eingegeben haben, gespeichert! Sie können diese Datei jederzeit Ihren Bedürfnissen anpassen.');
define('_InsPer8', 'Wechseln Sie zu \'index.php\' im root Verzeichnis um die Arbeit mit phpLogCon zu starten!');
define('_InsPer9', 'Vergessen Sie nicht den kompletten Ordner \'install/\' zu löschen!');
define('_InsPer10', 'Diese Datein können für einen DoS auf Ihr phpLogCon genutzt werden!');
define('_InsPer11', 'Nach Löschen des Ordners können Sie zum ');
define('_InsPer12', 'Index wecheln!');
<?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.
*/#### #### #### #### #### #### #### #### #### ####
/*
* German language file for phpLogCon
*/
define('_MSG001', 'Willkommen bei phpLogCon! Bittle loggen Sie sich zuerst mit Ihrem benutzernamen und Passwort ein');
define('_MSGUsrnam', 'Benutzername');
define('_MSGpas', 'Passwort');
define('_MSGLogSuc', 'Login erfolgreich');
define('_MSGWel', 'Willkommen bei phpLogCon');
define('_MSGChoOpt', '! Wählen sie unter den Optionen aus dem obrigen Menü aus');
define('_MSGQuiInf', 'Kurz-Info (Unter Berücksichtigung der Filtereinstellungen)');
define('_MSGTop5', 'Top fünf Logs (Unter Berücksichtigung der Filtereinstellungen)');
define('_MSGNoData', 'Keine Daten gefunden');
define('_MSGDate', 'Datum');
define('_MSGFac', 'Facility');
define('_MSGMsg', 'Nachricht');
define('_MSGSysLogTag', 'SysLogTag');
define('_MSGOccuren', 'Vorkommen');
define('_MSGAccDen', 'Zugang nicht gestattet');
define('_MSGFalLog', 'Sie sind kein registrierter Benutzer oder Sie haben ein falsches Passwort eingegeben');
define('_MSGBac2Ind', 'Zurück zum Index');
define('_MSGSesExp', 'Session abgelaufen');
define('_MSGSesExpQue', 'Session abgelaufen. Haben Sie vielleicht das letzte mal vergessen sich auszuloggen');
define('_MSGReLog', 'Zurück zum Index um sich neu neu einzuloggen');
define('_MSGShwEvn', 'Zeige Events');
define('_MSGShwSlt', 'Zeige SysLogTags');
define('_MSGShwSLog', 'Zeige SysLog');
define('_MSGNoDBCon', 'Verbindung zum Datenbank-Server fehlgeschlagen');
define('_MSGChDB', 'Auswahl der Datenbank fehlgeschlagen');
define('_MSGInvQur', 'Ungültige Abfrage');
define('_MSGNoDBHan', 'Kein gültiger Datenbank-Verbindungs-Handle');
define('_MSGLogout', 'LogOut');
define('_MSGSrcExp', 'Nach Ausdruck suchen');
define('_MSGSrc', 'Suche');
define('_MSGColExp', 'Ausdruck färben');
define('_MSGinCol', ' in dieser Farbe: ');
define('_MSGBrw', 'Durchsuchen');
define('_MSGFilConf', 'Allgemeine Filter Konfiguration');
define('_MSGSltFil', 'SysLogTag Filter Konfiguration');
define('_MSGUsrConf', 'Benutzer Konfiguration');
define('_MSGBscSet', 'Generelle Einstellungen');
define('_MSGConSet', 'Verbindungs Einstellungen');
define('_MSGConMod', 'Verbindungsmodus');
define('_MSGFilCon', 'Filter Bedingungen');
define('_MSGEvnDat', 'Event Datum');
define('_MSGOrdBy', 'Sortieren nach');
define('_MSGTagSort', 'Aufsteigend oder absteigend sortieren');
define('_MSGRef', 'Aktualisierung');
define('_MSGInfUI', 'InfoEinheit');
define('_MSGOth', 'Andere');
define('_MSGPri', 'Severity');
define('_MSGFilSet', 'Filter Einstellungen');
define('_MSGUsrSet', 'Benutzer Einstellungen');
define('_MSGFilOpt', 'Quick Filter Optionen');
define('_MSGSwiEvnMan', 'Event Datum manuell auswählen');
define('_MSGSwiEvnPre', 'Event Datum vordefiniert auswählen');
define('_MSGShwEvnDet', 'Zeige Event Details');
define('_MSGBck', 'zurück');
define('_MSGEvnID', 'EventID');
define('_MSGClickBrw', ' (Klick um die MonitorWare Datenbank zu durchsuchen) :: (Oder durchsuche ');
define('_MSGEvnCat', 'EventKategorie');
define('_MSGEvnUsr', 'EventBenutzer');
define('_MSGFrmHos', 'VonHost');
define('_MSGNTSev', 'NTSeverity');
define('_MSGRecAt', 'EmpfangenAm');
define('_MSGDevRep', 'VomGerätGemeldeteZeit');
define('_MSGImp', 'Wichtigkeit');
define('_MSGEvn', 'Event');
define('_MSGTo', 'bis');
define('_MSGFrm', 'von');
define('_MSGLogPg', 'Logs pro Seite');
define('_MSGHom', 'Startseite');
define('_MSGHlp', 'Hilfe');
define('_MSGFOpt', 'Filter Optionen');
define('_MSGUOpt', 'Benutzer Optionen');
define('_MSGEvnLogTyp', 'EventLogArt');
define('_MSGEvnSrc', 'EventQuelle');
define('_MSG2dy', 'heute');
define('_MSGYester', 'nur gestern');
define('_MSGThsH', 'aktuelle Stunde');
define('_MSGLstH', 'letzte Stunde');
define('_MSGL2stH', 'letzten 2 Stunden');
define('_MSGL5stH', 'letzten 5 Stunden');
define('_MSGL12stH', 'letzten 12 Stunden');
define('_MSGL2d', 'letzten 2 Tage');
define('_MSGL3d', 'letzten 3 Tage');
define('_MSGLw', 'letzte Woche');
define('_MSGFacDat', 'Facility und Datum');
define('_MSGPriDat', 'Severity und Datum');
define('_MSGNoRef', 'nicht aktualisieren');
define('_MSGE10s', 'alle 10 sek');
define('_MSGE30s', 'alle 30 sek');
define('_MSGEm', 'jede min');
define('_MSGE2m', 'alle 2 min');
define('_MSGE15m', 'alle 15 min');
define('_MSGEn', 'Englisch');
define('_MSGDe', 'Deutsch');
define('_MSGFav', 'Favoriten (Zum Aufrufen, auswählen):');
define('_MSGDel', 'Löschen');
define('_MSGNoFav', 'Keine Favoriten gefunden');
define('_MSGNewFav', 'Neuer Favorit');
define('_MSGSiten', 'Seitenname');
define('_MSGAdd', 'Hinzufügen');
define('_MSGChg', 'Ändern');
define('_MSGEnv', 'Umgebung');
define('_MSGUsrInt', 'Benutzer Maske');
define('_MSGUEna', 'Aktiviert');
define('_MSGUDsa', 'Deaktiviert');
define('_MSGNamInvChr', 'Name und/oder Passwort enthielten ungültige Zeichen');
define('_MSGSitInvChr', 'Seitenname und/oder Adresse enthielten ungültige Zeichen');
define('_MSGESec', 'jede Sekunde');
define('_MSGE5Sec', 'alle 5 Sek');
define('_MSGE20Sec', 'alle 20 Sek');
define('_MSGRed', 'Rot');
define('_MSGBlue', 'Blau');
define('_MSGGreen', 'Grün');
define('_MSGYel', 'Gelb');
define('_MSGOra', 'Orange');
define('_MSGFilHost', 'Suchen nach IP/Computer');
define('_MSGSearchMsg', 'Nachricht muss folgendes enthalten');
define('_MSGDisIU', 'Zeige Info Einheiten');
define('_MSGAscend', 'Aufsteigend');
define('_MSGDescend', 'Absteigend');
define('_MSGEnbQF', 'Quick-Filter auswählen');
define('_MSGSty', 'Aussehen');
define('_MSGHost', 'Computer');
define('_MSGPRI0', 'EMERGENCY');
define('_MSGPRI1', 'ALERT');
define('_MSGPRI2', 'CRITICAL');
define('_MSGPRI3', 'ERROR');
define('_MSGPRI4', 'WARNING');
define('_MSGPRI5', 'NOTICE');
define('_MSGPRI6', 'INFO');
define('_MSGPRI7', 'DEBUG');
define('_MSGNumSLE', 'Anzahl der Syslog Events');
define('_MSGNumERE', 'Anzahl der EventReporter Events');
define('_MSGNoMsg', '[Keine Nachricht vorhanden]');
define('_MSGMenInf1', '- Sie befinden sich zur Zeit im ');
define('_MSGMenInf2', ' Modus auf ');
define('_MSGMenInf3', '. Datenbank: ');
define('_MSGLang', 'Sprache:');
define('_MSGStyle', 'Stylesheet:');
define('_MSGAddInfo', 'Zusätzliche Informationen:');
define('_MSGDebug1', 'Debug:');
define('_MSGDebug2', 'Zeige Debug Ausgaben');
define('_MSGSave', 'Speicher/- Ladeoptionen:');
define('_MSGFilSave1', 'Filter Einstellungen:');
define('_MSGFilSave2', 'Filter Einstellungen in Datenbank speichern und beim Einloggen auslesen');
define('_MSGDBOpt', 'Datenbankoptionen:');
define('_MSGUTC1', 'UTC-Zeit:');
define('_MSGUTC2', 'Wenn Ihr Datenbank-Server keine UTC-Zeit verwendet, entfernen Sie das Häckchen!');
define('_MSGSavCook', 'Login behalten (Cookie)?');
define('_MSGAnd', 'und');
define('_MSGApply', 'Filter anwenden');
define('_MSGShow', 'Show');
define('_MSGMethSlt', 'SysLogTags');
define('_MSGMethHost', 'SysLogTags auf Hosts beziehend');
define('_MSGInstDir', 'Das \'install\' Verzeichnis existiert noch! Wenn Sie phplogcon schon komnfiguriert haben, löschen oder benennen Sie dieses Verzeichnis um. Dies verursacht sonst ein hohes sicherheitsrisiko! Anderfalls klicken Sie <a href="install/install.php">HIER</A> um die Installation von PHPLogCon zu starten.');
define('_InsWelc1', 'Willkommen zur Installation von phpLogCon, dem Logging-WebInterface.');
define('_InsWelc2', 'Die folgenden Schritte werden Sie durch die Installation begleiten und Ihnen bei der korrekten Installation und Konfiguration von phpLogCon helfen.');
define('_InsWelc3', 'Anmerkung: Felder mit einem ');
define('_InsWelc4', 'ROTEN *');
define('_InsWelc5', ' müssen in jdem Fall ausgefüllt werden!');
define('_InsDbIns1', 'Zuerst müssen wir Ihre Datenbank-Struktur überprüfen, da phpLogCon einige Tabellen benötigt. Wenn die Tabellen nicht existieren, wird phpLogCon sie anlegen.');
define('_InsDbIns2', 'Hierfür benötigt die phpLogCon Installation ein paar Informationen zu Ihrem Datenbank-Server:');
define('_InsDbIns3', 'Datenbank Einstellungen');
define('_InsDbInsCon', 'Verbindungstyp');
define('_InsDbInsConNa', 'Native');
define('_InsDbInsApp', 'Datenbank-Applikation');
define('_InsDbInsPort', 'Bei Standard, leer lassen');
define('_InsDbInsUsr', 'Benutzer (Benutzer muss \'INSERT\' und \'CREATE\' Rechte haben!)');
define('_InsPass', 'Passwort');
define('_InsPassRe', 'Password wiederholen');
define('_InsDbInsName', 'Datenbank/DSN Name');
define('_InsDbInsTime', 'Datenbank Zeitformat');
define('_InsPlcIns1', 'Nun müssen wir ein paar Einstellungen vornehmen, sauber und optimiert läuft.');
define('_InsPlcIns2', 'Anmerkung: Wenn Sie gewählt haben, dass das User Interface nicht installiert werden soll, können Sie es durch SQL-Scripte nachträglich installieren! Für Hilfe schauen Sie ins Manual.');
define('_InsPlcIns3', 'phpLogCon Allgemeine Einstellungen');
define('_InsPlcInsLang', 'Standard Sprache');
define('_InsLangEn', 'Englisch');
define('_InsLangDe', 'Deutsch');
define('_InsPlcInsUi', 'User Interface installieren');
define('_InsPlcInsUiCrUsr', 'Einen Benutzer anlegen');
define('_InsPlcIns4', 'Hier können Sie einen Benutzer für das User Interface anlegen. Wenn Sie bereits Benutzer in Ihrer Datenbank haben oder das User Interface nicht installieren möchten, lassen Sie diese Felder leer!');
define('_InsPlcInsUiName', 'Benutzername');
define('_InsPlcInsUiDisName', 'Anzeigename');
define('_InsPlcInsUiLang', 'Gewünschte Sprache');
define('_InsPer1', 'Überprüfe Benutzer Eingaben...');
define('_InsPerDone', 'Erledigt!');
define('_InsPer2', 'Erstelle benötigte Tabellen...');
define('_InsPer3', 'Füge Daten in die Tabellen ein...');
define('_InsPer4', 'Erstelle Ihre Konfigurationsdatei (config.php)...');
define('_InsPer5', 'Alle Aufgaben wurden erfolgreich abgeschlossen!');
define('_InsPer6', 'Herzlichen Glückwunsch! Sie haben erfolgreich phpLogCon installiert!');
define('_InsPer7', 'Eine Dtei namens \'config.php\' liegt im Hauptverzeichnis von phpLogCon. In dieser Datei sind alle Informationen, die sie zuvor eingegeben haben, gespeichert! Sie können diese Datei jederzeit Ihren Bedürfnissen anpassen.');
define('_InsPer8', 'Wechseln Sie zu \'index.php\' im root Verzeichnis um die Arbeit mit phpLogCon zu starten!');
define('_InsPer9', 'Vergessen Sie nicht den kompletten Ordner \'install/\' zu löschen!');
define('_InsPer10', 'Diese Datein können für einen DoS auf Ihr phpLogCon genutzt werden!');
define('_InsPer11', 'Nach Löschen des Ordners können Sie zum ');
define('_InsPer12', 'Index wecheln!');

View File

@ -1,222 +1,222 @@
<?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.
*/#### #### #### #### #### #### #### #### #### ####
/*
* English language file for phpLogCon
*/
define('_MSG001', 'Welcome to phpLogCon! Please login with your username and password first');
define('_MSGUsrnam', 'Username');
define('_MSGpas', 'Password');
define('_MSGLogSuc', 'Login successfully');
define('_MSGWel', 'Welcome to phpLogCon');
define('_MSGChoOpt', '! Choose an option from the menu above');
define('_MSGQuiInf', 'Quick info (under respect of filter settings)');
define('_MSGTop5', 'Top five logs (under respect of filter settings)');
define('_MSGNoData', 'No data found');
define('_MSGDate', 'Date');
define('_MSGFac', 'Facility');
define('_MSGPri', 'Severity');
define('_MSGInfUI', 'InfoUnit');
define('_MSGMsg', 'Message');
define('_MSGSysLogTag', 'SysLogTag');
define('_MSGOccuren', 'Occurences');
define('_MSGAccDen', 'Access denied');
define('_MSGFalLog', 'You are not a subscribed user or Invalid Password');
define('_MSGBac2Ind', 'Back to Index');
define('_MSGSesExp', 'Session Expired');
define('_MSGSesExpQue', 'Session Expired. Maybe you forgot to log out');
define('_MSGReLog', 'Back to Index to re-login');
define('_MSGShwEvn', 'Show Events');
define('_MSGShwSlt', 'Show SysLogTags');
define('_MSGShwSLog', 'Show SysLog');
define('_MSGNoDBCon', 'Cannot connect to database-server');
define('_MSGChDB', 'Failed to changing database');
define('_MSGInvQur', 'Invalid query');
define('_MSGNoDBHan', 'No valid Database-Connection-Handle');
define('_MSGLogout', 'Logout');
define('_MSGSrcExp', 'Search for Expression');
define('_MSGSrc', 'Search');
define('_MSGinCol', ' in this color: ');
define('_MSGBrw', 'Browse');
define('_MSGBscSet', 'Basic Settings');
define('_MSGConSet', 'Connection Settings');
define('_MSGConMod', 'Connection Mode');
define('_MSGFilCon', 'Overall Filter conditions');
define('_MSGSltFil', 'SysLogTag Filter conditions');
define('_MSGEvnDat', 'Event&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', 'Quick Filter Options');
define('_MSGSwiEvnMan', 'Select events date manually');
define('_MSGSwiEvnPre', 'Select events date predefined');
define('_MSGShwEvnDet', 'Show Events Details');
define('_MSGBck', 'back');
define('_MSGEvnID', 'EventID');
define('_MSGClickBrw', ' (Click for browsing MonitorWare database) :: (Or browse ');
define('_MSG2dy', 'today');
define('_MSGYester', 'only yesterday');
define('_MSGThsH', 'this hour');
define('_MSGLstH', 'last 1 hour');
define('_MSGL2stH', 'last 2 hours');
define('_MSGL5stH', 'last 5 hours');
define('_MSGL12stH', 'last 12 hours');
define('_MSGL2d', 'last 2 days');
define('_MSGL3d', 'last 3 days');
define('_MSGLw', 'last week');
define('_MSGFacDat', 'Facility and Date');
define('_MSGPriDat', 'Severity and Date');
define('_MSGNoRef', 'no refresh');
define('_MSGE10s', 'every 10 sec');
define('_MSGE30s', 'every 30 sec');
define('_MSGEm', 'every min');
define('_MSGE2m', 'every 2 min');
define('_MSGE15m', 'every 15 min');
define('_MSGEn', 'English');
define('_MSGDe', 'German');
define('_MSGFav', 'Favorites (Select to visit):');
define('_MSGDel', 'Delete');
define('_MSGNoFav', 'No favorites found');
define('_MSGNewFav', 'New favorite');
define('_MSGSiten', 'Sitename');
define('_MSGAdd', 'Add');
define('_MSGChg', 'Change');
define('_MSGEnv', 'Environment');
define('_MSGUsrInt', 'User Interface');
define('_MSGUEna', 'Enabled');
define('_MSGUDsa', '"Disabled');
define('_MSGNamInvChr', 'Name and/or password contained invalid characters');
define('_MSGSitInvChr', 'Sitename and/or address contained invalid characters');
define('_MSGESec', 'every second');
define('_MSGE5Sec', 'every 5 sec');
define('_MSGE20Sec', 'every 20 sec');
define('_MSGRed', 'Red');
define('_MSGBlue', 'Blue');
define('_MSGGreen', 'Green');
define('_MSGYel', 'Yellow');
define('_MSGOra', 'Orange');
define('_MSGSty', 'Style');
define('_MSGEnbQF', 'Choose Quick Filters:');
define('_MSGDisIU', 'Display Info Unit');
define('_MSGAscend', 'Ascending');
define('_MSGDescend', 'Descending');
define('_MSGColExp', 'Color an Expression');
define('_MSGFilConf', 'Filter Configuration');
define('_MSGUsrConf', 'User Configuration');
define('_MSGHost', 'Host');
define('_MSGEvnCat', 'EventCategory');
define('_MSGEvnUsr', 'EventUser');
define('_MSGFrmHos', 'FromHost');
define('_MSGNTSev', 'NTSeverity');
define('_MSGRecAt', 'ReceivedAt');
define('_MSGDevRep', 'DeviceReportedTime');
define('_MSGImp', 'Importance');
define('_MSGEvn', 'Event');
define('_MSGTo', 'to');
define('_MSGFrm', 'from');
define('_MSGLogPg', 'Logs per page');
define('_MSGHom', 'Home');
define('_MSGHlp', 'Help');
define('_MSGFOpt', 'Filter Options');
define('_MSGUOpt', 'User Options');
define('_MSGEvnLogTyp', 'EventLogType');
define('_MSGEvnSrc', 'EventSource');
define('_MSGFilHost', 'Search only for IP/Host');
define('_MSGSearchMsg', 'Message must contain');
define('_MSGPRI0', 'EMERGENCY');
define('_MSGPRI1', 'ALERT');
define('_MSGPRI2', 'CRITICAL');
define('_MSGPRI3', 'ERROR');
define('_MSGPRI4', 'WARNING');
define('_MSGPRI5', 'NOTICE');
define('_MSGPRI6', 'INFO');
define('_MSGPRI7', 'DEBUG');
define('_MSGNumSLE', 'Number of Syslog Events');
define('_MSGNumERE', 'Number of EventReporter Events');
define('_MSGNoMsg', '[No message available]');
define('_MSGMenInf1', '- You are currenty in ');
define('_MSGMenInf2', ' mode on ');
define('_MSGMenInf3', '. Database: ');
define('_MSGLang', 'Language:');
define('_MSGStyle', 'Stylesheet:');
define('_MSGAddInfo', 'Additional Informations:');
define('_MSGDebug1', 'Debug:');
define('_MSGDebug2', 'Show Debug Output');
define('_MSGSave', 'Save/- Loadoptions:');
define('_MSGFilSave1', 'Filter Settings:');
define('_MSGFilSave2', 'Save filter settings in database and load them while logging in');
define('_MSGDBOpt', 'Databaseoptions:');
define('_MSGUTC1', 'UTC Time:');
define('_MSGUTC2', 'When your database-server doesn\'t use UTC time, uncheck this!');
define('_MSGSavCook', 'Keep you logged in (Cookie)?');
define('_MSGAnd', 'and');
define('_MSGApply', 'Apply Filters');
define('_MSGDisSlt', 'Display');
define('_MSGMethSlt', 'SysLogTags');
define('_MSGMethHost', 'SysLogTags corresponding to hosts');
define('_MSGInstDir', 'System Note: You haven\'t deleted the \'install/\' directory!! This causes a high security risk!!');
define('_InsWelc1', 'Welcome to the installation of phpLogCon, the WebInterface to log data.');
define('_InsWelc2', 'The following steps will guide you through the installation and help you to install and configure phpLogCon correctly.');
define('_InsWelc3', 'Note: Fields marked with a ');
define('_InsWelc4', 'RED *');
define('_InsWelc5', ' MUST be filled out in very case!');
define('_InsDbIns1', 'First we have to check your database structure, because phpLogCon needs some tables. If the tables don\'t exist, they will be created.');
define('_InsDbIns2', 'For this, phpLogCon Installation needs some information about your database Server:');
define('_InsDbIns3', 'Database Settings');
define('_InsDbInsCon', 'Connection Type');
define('_InsDbInsConNa', 'Native');
define('_InsDbInsApp', 'Database application');
define('_InsDbInsPort', 'If standard, leave blank');
define('_InsDbInsUsr', 'User (User must have \'INSERT\' and \'CREATE\' rights!)');
define('_InsPass', 'Password');
define('_InsPassRe', 'Re-type password');
define('_InsDbInsName', 'Database/DSN name');
define('_InsDbInsTime', 'Database time format');
define('_InsPlcIns1', 'Now we have to do some settings for phpLogCon to run clearly and user optimized.');
define('_InsPlcIns2', 'Note: If you now select the UserInterface not to be installed, you can install it through a SQL-script file! See the manual for help.');
define('_InsPlcIns3', 'phpLogCon General Settings');
define('_InsPlcInsLang', 'Default language');
define('_InsLangEn', 'English');
define('_InsLangDe', 'German');
define('_InsPlcInsUi', 'Install User Interface');
define('_InsPlcInsUiCrUsr', 'Create a User');
define('_InsPlcIns4', 'Here you can create a user for the User Interface. If you already have some users in your database or you have unselected the UserInterface, you can leave these fields!');
define('_InsPlcInsUiName', 'Username');
define('_InsPlcInsUiDisName', 'Display name');
define('_InsPlcInsUiLang', 'Desired language');
define('_InsPer1', 'Checking users input...');
define('_InsPerDone', 'Done!');
define('_InsPer2', 'Creating required tables...');
define('_InsPer3', 'Inserting values into tables...');
define('_InsPer4', 'Creating your config file (config.php)...');
define('_InsPer5', 'All processes have been done clearly!');
define('_InsPer6', 'Congratulations! You\'ve successfully installed phpLogCon!');
define('_InsPer7', 'A file named \'config.php\' is stored in the root directory of phpLogCon. In this file there are the whole information you have entered before! You can edit it to your needs if you want to.');
define('_InsPer8', 'Move to \'index.php\' in root directory to start working with phpLogCon!');
define('_InsPer9', 'Don\'t forget to delete whole \'install/\' directory!');
define('_InsPer10', 'These files could be user for a DoS on your phpLogCon!');
define('_InsPer11', 'After deleting the directory, you can go to ');
define('_InsPer12', 'index');
<?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.
*/#### #### #### #### #### #### #### #### #### ####
/*
* English language file for phpLogCon
*/
define('_MSG001', 'Welcome to phpLogCon! Please login with your username and password first');
define('_MSGUsrnam', 'Username');
define('_MSGpas', 'Password');
define('_MSGLogSuc', 'Login successfully');
define('_MSGWel', 'Welcome to phpLogCon');
define('_MSGChoOpt', '! Choose an option from the menu above');
define('_MSGQuiInf', 'Quick info (under respect of filter settings)');
define('_MSGTop5', 'Top five logs (under respect of filter settings)');
define('_MSGNoData', 'No data found');
define('_MSGDate', 'Date');
define('_MSGFac', 'Facility');
define('_MSGPri', 'Severity');
define('_MSGInfUI', 'InfoUnit');
define('_MSGMsg', 'Message');
define('_MSGSysLogTag', 'SysLogTag');
define('_MSGOccuren', 'Occurences');
define('_MSGAccDen', 'Access denied');
define('_MSGFalLog', 'You are not a subscribed user or Invalid Password');
define('_MSGBac2Ind', 'Back to Index');
define('_MSGSesExp', 'Session Expired');
define('_MSGSesExpQue', 'Session Expired. Maybe you forgot to log out');
define('_MSGReLog', 'Back to Index to re-login');
define('_MSGShwEvn', 'Show Events');
define('_MSGShwSlt', 'Show SysLogTags');
define('_MSGShwSLog', 'Show SysLog');
define('_MSGNoDBCon', 'Cannot connect to database-server');
define('_MSGChDB', 'Failed to changing database');
define('_MSGInvQur', 'Invalid query');
define('_MSGNoDBHan', 'No valid Database-Connection-Handle');
define('_MSGLogout', 'Logout');
define('_MSGSrcExp', 'Search for Expression');
define('_MSGSrc', 'Search');
define('_MSGinCol', ' in this color: ');
define('_MSGBrw', 'Browse');
define('_MSGBscSet', 'Basic Settings');
define('_MSGConSet', 'Connection Settings');
define('_MSGConMod', 'Connection Mode');
define('_MSGFilCon', 'Overall Filter conditions');
define('_MSGSltFil', 'SysLogTag Filter conditions');
define('_MSGEvnDat', 'Event&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', 'Quick Filter Options');
define('_MSGSwiEvnMan', 'Select events date manually');
define('_MSGSwiEvnPre', 'Select events date predefined');
define('_MSGShwEvnDet', 'Show Events Details');
define('_MSGBck', 'back');
define('_MSGEvnID', 'EventID');
define('_MSGClickBrw', ' (Click for browsing MonitorWare database) :: (Or browse ');
define('_MSG2dy', 'today');
define('_MSGYester', 'only yesterday');
define('_MSGThsH', 'this hour');
define('_MSGLstH', 'last 1 hour');
define('_MSGL2stH', 'last 2 hours');
define('_MSGL5stH', 'last 5 hours');
define('_MSGL12stH', 'last 12 hours');
define('_MSGL2d', 'last 2 days');
define('_MSGL3d', 'last 3 days');
define('_MSGLw', 'last week');
define('_MSGFacDat', 'Facility and Date');
define('_MSGPriDat', 'Severity and Date');
define('_MSGNoRef', 'no refresh');
define('_MSGE10s', 'every 10 sec');
define('_MSGE30s', 'every 30 sec');
define('_MSGEm', 'every min');
define('_MSGE2m', 'every 2 min');
define('_MSGE15m', 'every 15 min');
define('_MSGEn', 'English');
define('_MSGDe', 'German');
define('_MSGFav', 'Favorites (Select to visit):');
define('_MSGDel', 'Delete');
define('_MSGNoFav', 'No favorites found');
define('_MSGNewFav', 'New favorite');
define('_MSGSiten', 'Sitename');
define('_MSGAdd', 'Add');
define('_MSGChg', 'Change');
define('_MSGEnv', 'Environment');
define('_MSGUsrInt', 'User Interface');
define('_MSGUEna', 'Enabled');
define('_MSGUDsa', '"Disabled');
define('_MSGNamInvChr', 'Name and/or password contained invalid characters');
define('_MSGSitInvChr', 'Sitename and/or address contained invalid characters');
define('_MSGESec', 'every second');
define('_MSGE5Sec', 'every 5 sec');
define('_MSGE20Sec', 'every 20 sec');
define('_MSGRed', 'Red');
define('_MSGBlue', 'Blue');
define('_MSGGreen', 'Green');
define('_MSGYel', 'Yellow');
define('_MSGOra', 'Orange');
define('_MSGSty', 'Style');
define('_MSGEnbQF', 'Choose Quick Filters:');
define('_MSGDisIU', 'Display Info Unit');
define('_MSGAscend', 'Ascending');
define('_MSGDescend', 'Descending');
define('_MSGColExp', 'Color an Expression');
define('_MSGFilConf', 'Filter Configuration');
define('_MSGUsrConf', 'User Configuration');
define('_MSGHost', 'Host');
define('_MSGEvnCat', 'EventCategory');
define('_MSGEvnUsr', 'EventUser');
define('_MSGFrmHos', 'FromHost');
define('_MSGNTSev', 'NTSeverity');
define('_MSGRecAt', 'ReceivedAt');
define('_MSGDevRep', 'DeviceReportedTime');
define('_MSGImp', 'Importance');
define('_MSGEvn', 'Event');
define('_MSGTo', 'to');
define('_MSGFrm', 'from');
define('_MSGLogPg', 'Logs per page');
define('_MSGHom', 'Home');
define('_MSGHlp', 'Help');
define('_MSGFOpt', 'Filter Options');
define('_MSGUOpt', 'User Options');
define('_MSGEvnLogTyp', 'EventLogType');
define('_MSGEvnSrc', 'EventSource');
define('_MSGFilHost', 'Search only for IP/Host');
define('_MSGSearchMsg', 'Message must contain');
define('_MSGPRI0', 'EMERGENCY');
define('_MSGPRI1', 'ALERT');
define('_MSGPRI2', 'CRITICAL');
define('_MSGPRI3', 'ERROR');
define('_MSGPRI4', 'WARNING');
define('_MSGPRI5', 'NOTICE');
define('_MSGPRI6', 'INFO');
define('_MSGPRI7', 'DEBUG');
define('_MSGNumSLE', 'Number of Syslog Events');
define('_MSGNumERE', 'Number of EventReporter Events');
define('_MSGNoMsg', '[No message available]');
define('_MSGMenInf1', '- You are currenty in ');
define('_MSGMenInf2', ' mode on ');
define('_MSGMenInf3', '. Database: ');
define('_MSGLang', 'Language:');
define('_MSGStyle', 'Stylesheet:');
define('_MSGAddInfo', 'Additional Informations:');
define('_MSGDebug1', 'Debug:');
define('_MSGDebug2', 'Show Debug Output');
define('_MSGSave', 'Save/- Loadoptions:');
define('_MSGFilSave1', 'Filter Settings:');
define('_MSGFilSave2', 'Save filter settings in database and load them while logging in');
define('_MSGDBOpt', 'Databaseoptions:');
define('_MSGUTC1', 'UTC Time:');
define('_MSGUTC2', 'When your database-server doesn\'t use UTC time, uncheck this!');
define('_MSGSavCook', 'Keep you logged in (Cookie)?');
define('_MSGAnd', 'and');
define('_MSGApply', 'Apply Filters');
define('_MSGDisSlt', 'Display');
define('_MSGMethSlt', 'SysLogTags');
define('_MSGMethHost', 'SysLogTags corresponding to hosts');
define('_MSGInstDir', 'The \'install\' directory does still exist! If you configured phplogcon already, please delete or rename it. This causes a high security risk! Otherwise please click <a href="install/install.php">HERE</A> to start the installation script.');
define('_InsWelc1', 'Welcome to the installation of phpLogCon, the WebInterface to log data.');
define('_InsWelc2', 'The following steps will guide you through the installation and help you to install and configure phpLogCon correctly.');
define('_InsWelc3', 'Note: Fields marked with a ');
define('_InsWelc4', 'RED *');
define('_InsWelc5', ' MUST be filled out in very case!');
define('_InsDbIns1', 'First we have to check your database structure, because phpLogCon needs some tables. If the tables don\'t exist, they will be created.');
define('_InsDbIns2', 'For this, phpLogCon Installation needs some information about your database Server:');
define('_InsDbIns3', 'Database Settings');
define('_InsDbInsCon', 'Connection Type');
define('_InsDbInsConNa', 'Native');
define('_InsDbInsApp', 'Database application');
define('_InsDbInsPort', 'If standard, leave blank');
define('_InsDbInsUsr', 'User (User must have \'INSERT\' and \'CREATE\' rights!)');
define('_InsPass', 'Password');
define('_InsPassRe', 'Re-type password');
define('_InsDbInsName', 'Database/DSN name');
define('_InsDbInsTime', 'Database time format');
define('_InsPlcIns1', 'Now we have to do some settings for phpLogCon to run clearly and user optimized.');
define('_InsPlcIns2', 'Note: If you now select the UserInterface not to be installed, you can install it through a SQL-script file! See the manual for help.');
define('_InsPlcIns3', 'phpLogCon General Settings');
define('_InsPlcInsLang', 'Default language');
define('_InsLangEn', 'English');
define('_InsLangDe', 'German');
define('_InsPlcInsUi', 'Install User Interface');
define('_InsPlcInsUiCrUsr', 'Create a User');
define('_InsPlcIns4', 'Here you can create a user for the User Interface. If you already have some users in your database or you have unselected the UserInterface, you can leave these fields!');
define('_InsPlcInsUiName', 'Username');
define('_InsPlcInsUiDisName', 'Display name');
define('_InsPlcInsUiLang', 'Desired language');
define('_InsPer1', 'Checking users input...');
define('_InsPerDone', 'Done!');
define('_InsPer2', 'Creating required tables...');
define('_InsPer3', 'Inserting values into tables...');
define('_InsPer4', 'Creating your config file (config.php)...');
define('_InsPer5', 'All processes have been done clearly!');
define('_InsPer6', 'Congratulations! You\'ve successfully installed phpLogCon!');
define('_InsPer7', 'A file named \'config.php\' is stored in the root directory of phpLogCon. In this file there are the whole information you have entered before! You can edit it to your needs if you want to.');
define('_InsPer8', 'Move to \'index.php\' in root directory to start working with phpLogCon!');
define('_InsPer9', 'Don\'t forget to delete whole \'install/\' directory!');
define('_InsPer10', 'These files could be user for a DoS on your phpLogCon!');
define('_InsPer11', 'After deleting the directory, you can go to ');
define('_InsPer12', 'index');

View File

@ -1,183 +1,190 @@
<?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.
*/#### #### #### #### #### #### #### #### #### ####
/*! \addtogroup Layout
*
* Here you find the basic structure of the page layout. Changes in the
* following function take affect in the hole phpLogCon projeckt. Note,
* the basic structure of each phpLogCon page must be generated by the
* use of the WriteHead() and WriteFood(). If you make a new phpLogCon
* page, first call WriteHead(). This function generate the hole header
* of the page. WriteHead() itself calls functions to generate the top
* menu bar (MenuTop()) and the menu on the left side (MenuLeft()).
* After this function call you are in the main work area. There you
* can provide your content information. To finialize the page, call
* WriteFood(). This generates the footer on the bottom of the page.
* @{
*/
/*!
* Include the stylesheeh
*
*/
/*!
* generate the url for pint version
* /return The Url refer to the pint version of the current page.
*/
function GetPrinterURL()
{
global $PHP_SELF, $QUERY_STRING;
$szURL = $PHP_SELF . "?";
if(strlen($QUERY_STRING) > 0)
$szURL .= $QUERY_STRING . "&";
$szURL .= "PrinterVersion=1";
return($szURL);
} //end function GetPrintUrl()
/*!
* Display logo and provide the link to change to print version. ...
* This things are displayed on the top of the page.
*
* Menu Top is called by WriteHead()
*
* \param SiteName This String is displayed on the top of the page (it is visible output!)
* \sa WriteHead()
*/
function MenuTop($SiteName)
{
global $strBasePath, $strBaseRealPath, $PrinterVersion;
?>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<tr>
<td width="220" align="left"><img src="<? echo _ADLibPathImage; ?>phplogcon.gif" border="0"></td>
<td align="left">
<h1>phpLogCon monitoring</h1>
</td>
</tr>
</table>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<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(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>
<td align="right">
<b><font ID="HeadTitle" class="HeadTitle"><?php echo $SiteName; ?></font></b>
</td>
</tr>
</table>
<?php
} // END MenuTop()
/*!
* It generates the head of the document. All things between the introducing html - Tag and body - Tag
* is generated by this function, e. g. Meta Description, ...
*
* WriteHead call the the functions: MenuTop($SiteName) and MenuLeft()
*
* \param strTitle Title of the current page (used for the title - Tag)
* \param strKeywords Additional keywords, especially for the current page (used for Meta Tag)
* \param strDescr A description of the current page (used for Meta Tag)
* \param SiteName This String is displayed on the top of the page (it is visible output!)
* \sa MenuTop($SiteName), MenuLeft()
*/
function WriteHead($strTitle, $strKeywords, $strDescr, $SiteName)
{
global $stylesheet;
?>
<html>
<head>
<title><? echo $strTitle; ?></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">
<?php
if(strlen($strDescr) > 0)
{
echo "<meta name=\"Description\" content=\"".$strDescr."\">";
}
// if refresh enabled, make a meta redirect
if ($_SESSION['refresh'] > 0)
echo '<meta HTTP-EQUIV="REFRESH" CONTENT="', $_SESSION['refresh'], '; URL=', $_SERVER['PHP_SELF'], '?', $_SERVER['QUERY_STRING'], '">';
?>
<link rel="stylesheet" href="<?php echo _ADLibPathScript . $_SESSION['stylesheet']; ?>.css" type="text/css">
<?php echo '<script language="JavaScript" src="' . _ADLibPathScript . 'common.js"></script>'; ?>
</head>
<body>
<script src="<?php echo _ADLibPathScript . $_SESSION['stylesheet']; ?>.js"></script>
<?php
MenuTop($SiteName);
} // END of WriteHead() function
/*!
* The footer holds some general information.
*/
function WriteFood()
{
global $strBasePath, $strBaseRealPath, $PrinterVersion, $global_Con;
?>
<center>
<table>
<tr>
<td>
<br /><br />
<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>
</center>
</body>
</html>
<?php
// Close Database connection ONCE
db_close($global_Con);
} // END function WriteFood()
<?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.
*/#### #### #### #### #### #### #### #### #### ####
/*! \addtogroup Layout
*
* Here you find the basic structure of the page layout. Changes in the
* following function take affect in the hole phpLogCon projeckt. Note,
* the basic structure of each phpLogCon page must be generated by the
* use of the WriteHead() and WriteFood(). If you make a new phpLogCon
* page, first call WriteHead(). This function generate the hole header
* of the page. WriteHead() itself calls functions to generate the top
* menu bar (MenuTop()) and the menu on the left side (MenuLeft()).
* After this function call you are in the main work area. There you
* can provide your content information. To finialize the page, call
* WriteFood(). This generates the footer on the bottom of the page.
* @{
*/
/*!
* Include the stylesheeh
*
*/
/*!
* generate the url for pint version
* /return The Url refer to the pint version of the current page.
*/
function GetPrinterURL()
{
global $PHP_SELF, $QUERY_STRING;
$szURL = $PHP_SELF . "?";
if(strlen($QUERY_STRING) > 0)
$szURL .= $QUERY_STRING . "&";
$szURL .= "PrinterVersion=1";
return($szURL);
} //end function GetPrintUrl()
/*!
* Display logo and provide the link to change to print version. ...
* This things are displayed on the top of the page.
*
* Menu Top is called by WriteHead()
*
* \param SiteName This String is displayed on the top of the page (it is visible output!)
* \sa WriteHead()
*/
function MenuTop($SiteName)
{
global $strBasePath, $strBaseRealPath, $PrinterVersion;
?>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<tr>
<td width="220" align="left"><img src="<? echo _ADLibPathImage; ?>phplogcon.gif" border="0"></td>
<td align="left">
<h1>phpLogCon monitoring</h1>
</td>
</tr>
</table>
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0" CLASS="EventTable">
<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'];
$i = strpos($_SERVER['REQUEST_URI'], '?');
if ($i>0)
echo substr($_SERVER['REQUEST_URI'], $i);
?>
">
<?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>
<td align="right">
<b><font ID="HeadTitle" class="HeadTitle"><?php echo $SiteName; ?></font></b>
</td>
</tr>
</table>
<?php
} // END MenuTop()
/*!
* It generates the head of the document. All things between the introducing html - Tag and body - Tag
* is generated by this function, e. g. Meta Description, ...
*
* WriteHead call the the functions: MenuTop($SiteName) and MenuLeft()
*
* \param strTitle Title of the current page (used for the title - Tag)
* \param strKeywords Additional keywords, especially for the current page (used for Meta Tag)
* \param strDescr A description of the current page (used for Meta Tag)
* \param SiteName This String is displayed on the top of the page (it is visible output!)
* \sa MenuTop($SiteName), MenuLeft()
*/
function WriteHead($strTitle, $strKeywords, $strDescr, $SiteName)
{
global $stylesheet;
?>
<html>
<head>
<title><? echo $strTitle; ?></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">
<?php
if(strlen($strDescr) > 0)
{
echo "<meta name=\"Description\" content=\"".$strDescr."\">";
}
// if refresh enabled, make a meta redirect
if ($_SESSION['refresh'] > 0)
echo '<meta HTTP-EQUIV="REFRESH" CONTENT="', $_SESSION['refresh'], '; URL=', $_SERVER['PHP_SELF'], '?', $_SERVER['QUERY_STRING'], '">';
?>
<link rel="stylesheet" href="<?php echo _ADLibPathScript . $_SESSION['stylesheet']; ?>.css" type="text/css">
<?php echo '<script language="JavaScript" src="' . _ADLibPathScript . 'common.js"></script>'; ?>
</head>
<body>
<script src="<?php echo _ADLibPathScript . $_SESSION['stylesheet']; ?>.js"></script>
<?php
MenuTop($SiteName);
} // END of WriteHead() function
/*!
* The footer holds some general information.
*/
function WriteFood()
{
global $strBasePath, $strBaseRealPath, $PrinterVersion, $global_Con;
?>
<center>
<table>
<tr>
<td>
<br /><br />
<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>
</center>
</body>
</html>
<?php
// Close Database connection ONCE
db_close($global_Con);
} // END function WriteFood()
?>

View File

@ -1,128 +1,125 @@
<?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.
*/#### #### #### #### #### #### #### #### #### ####
function ShowVarFilter()
{
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)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGOrdBy, ': ';
if(stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE) include _FORMS.'tag-order-by.php';
else include _FORMS.'order-by.php';
}
if ($_SESSION['FilterOrderby'] == 1 && stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE)
{
echo '&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)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGColExp, '&nbsp;';
include _FORMS.'color-expression.php';
}
if ($_SESSION['FilterHost'] == 1)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGFilHost, ': ';
include _FORMS.'filter-host.php';
}
if ($_SESSION['FilterMsg'] == 1)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGSearchMsg, ': ';
include _FORMS.'search-msg.php';
}
}
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 '<input type="hidden" name="change" value="Manually">';
echo '<input type="submit" name="button" value="' . _MSGSwiEvnMan . '">';
}
else
{
echo '<input type="hidden" name="change" value="Predefined">';
echo '<input type="submit" name="button" value="' . _MSGSwiEvnPre . '">';
}
?>
</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>
<?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.
*/#### #### #### #### #### #### #### #### #### ####
function ShowVarFilter()
{
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)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGOrdBy, ': ';
if(stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE) include _FORMS.'tag-order-by.php';
else include _FORMS.'order-by.php';
}
if ($_SESSION['FilterOrderby'] == 1 && stristr($_SERVER['PHP_SELF'], 'syslog-index') != FALSE)
{
echo '&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)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGColExp, '&nbsp;';
include _FORMS.'color-expression.php';
}
if ($_SESSION['FilterHost'] == 1)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGFilHost, ': ';
include _FORMS.'filter-host.php';
}
if ($_SESSION['FilterMsg'] == 1)
{
echo "&nbsp;<b>|</b>";
echo '&nbsp;', _MSGSearchMsg, ': ';
include _FORMS.'search-msg.php';
}
}
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 '<input type="hidden" name="change" value="Manually">';
echo '<input type="submit" name="button" value="' . _MSGSwiEvnMan . '">';
}
else
{
echo '<input type="hidden" name="change" value="Predefined">';
echo '<input type="submit" name="button" value="' . _MSGSwiEvnPre . '">';
}
?>
</form>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF'] ; ?>">
<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>