mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
183 lines
6.6 KiB
PHP
183 lines
6.6 KiB
PHP
<?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"> </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 © 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()
|
|
|
|
?>
|