This repository has been archived on 2025-02-12. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
CLF/html/template.php
2004-09-10 11:31:11 +00:00

65 lines
2.2 KiB
PHP

<?php
/*=============================================================================
* $Id$
*
* Copyright 2004 Jeremy Guthrie smt@dangermen.com
*
* This is free software; you can redistribute it and/or modify
* it under the terms of version 2 only of the GNU General Public License as
* published by the Free Software Foundation.
*
* It 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
*
=============================================================================*/
$begintime=time();
require_once('config.php');
$sec_dbsocket=sec_dbconnect();
$REMOTE_ID=sec_usernametoid($sec_dbsocket,$REMOTE_USER);
$APP_ID=sec_appnametoid($sec_dbsocket,'SyslogOp');
if ( ! sec_accessallowed($sec_dbsocket,$REMOTE_ID,$APP_ID) ) {
dbdisconnect($sec_dbsocket);
exit;
}
$group=0;
$GROUP_ID=sec_groupnametoid($sec_dbsocket,'Syslog Customer');
if ( sec_groupmember($sec_dbsocket,$REMOTE_ID,$GROUP_ID) ) { $group=1; }
$GROUP_ID=sec_groupnametoid($sec_dbsocket,'Syslog Analyst');
if ( sec_groupmember($sec_dbsocket,$REMOTE_ID,$GROUP_ID) ) { $group=2; }
$GROUP_ID=sec_groupnametoid($sec_dbsocket,'Syslog Administrators');
if ( sec_groupmember($sec_dbsocket,$REMOTE_ID,$GROUP_ID) ) { $group=3; }
$dbsocket= dbconnect(SMACDB,"msyslog",SMACPASS);
$HeaderText="<font size=+1><B>XXX Administration</B></font><BR><BR>\n";
$FooterText="<font face='Arial, Helvetica, sans-serif' size='-2'><BR>Version " . SMTVER . "<BR>&copy; Jeremy M. Guthrie All rights reserved.</font>\n";
$PageTitle="Syslog Management Tool";
php?>
<HTML>
<HEAD>
<TITLE>
<?php echo $PageTitle; php?>
</TITLE>
</HEAD>
<?php
startbody();
echo $HeaderText;
$endtime=time();
echo "<BR>Page loaded in " . ($endtime - $begintime) . " seconds.<BR>\n";
echo $FooterText;
php?>
</BODY>
</HTML>
<?php
dbdisconnect($sec_dbsocket);
dbdisconnect($dbsocket);
php?>