instead of a framed page.
Contributed by Edwin Nadorp.
***********************
** FILE NAME : abuse.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.3 $
+** VERSION NUMBER : $Revision: 1.4 $
**
** DESCRIPTION : Abuse list page
**
/*****************************
$Log: abuse.php,v $
- Revision 1.3 2007-10-19 07:15:52 arjen
+ Revision 1.4 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.3 2007/10/19 07:15:52 arjen
In the abuse list, IP addresses can be whitelisted.
Revision 1.2 2007/01/11 13:44:29 arjen
******************************/
-// RCSID = "$Id: abuse.php,v 1.3 2007-10-19 07:15:52 arjen Exp $";
+// RCSID = "$Id: abuse.php,v 1.4 2007-11-21 14:38:06 arjen Exp $";
ini_set('include_path', '.:./classes:../phpclasses');
$res = pg_exec($this->database, "SELECT objectname FROM object
WHERE objectid=CAST('" . $_GET['oid']."' AS BIGINT)");
$obj = pg_fetch_object($res, 0);
- echo "<h1>Abuse List for " . $obj->objectname . "</h1><hr>";
+
+ echo "<script type='text/ecmascript'>";
+ echo "document.getElementById('menu_title').innerHTML =";
+ echo " '<h1>Abuse List for " . $obj->objectname . "<\/h1>'</script>";
if (!empty($_POST['ACTION']) && ($_POST['ACTION'] == 'Abuse'))
{
}
else
{
- echo "<form method='post'>";
+ echo "<form method='post' action='abuse.php'>";
echo "Report <input type='submit' name='ACTION' value='Abuse'>";
echo " for IP address <input type='text' name='source'>";
echo " or <input type='submit' name='ACTION' value='Whitelist'>";
echo " with status <input type='text' name='status'>";
echo "</form>";
- echo "<form method='post'>";
+ echo "<form method='post' action='abuse.php'>";
echo "<input type='submit' name='ACTION' value='Investigate'>";
echo " or <input type='submit' name='ACTION' value='Block'>";
echo " this subnet: <input type='text' name='subnet'>";
***********************
** FILE NAME : classes.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.1 $
+** VERSION NUMBER : $Revision: 1.2 $
**
** DESCRIPTION : Parameter classes Administration page.
** Input parameters: action (POST) : empty, 'Create'
/*****************************
$Log: classes.php,v $
- Revision 1.1 2005-06-04 07:22:40 arjen
+ Revision 1.2 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.1 2005/06/04 07:22:40 arjen
New page: Parameter classes administration.
******************************/
-// RCSID = "$Id: classes.php,v 1.1 2005-06-04 07:22:40 arjen Exp $";
+// RCSID = "$Id: classes.php,v 1.2 2007-11-21 14:38:06 arjen Exp $";
ini_set('include_path', '.:./classes:../phpclasses');
?>
-<script language='JavaScript'>
+<script type='text/ecmascript'>
function CheckCreate(f)
{
if (isset($_GET['classname']) && isset($_GET['propname']))
{
- echo "<h1>Detailed information for property " . $_GET['propname']
+ echo "<script type='text/ecmascript'>document.getElementById('menu_title').innerHTML = '<h1>Detailed information<\/h1>'</script><br>";
+ echo "<h1>for property " . $_GET['propname']
. " of class " . $_GET['classname'] . "</h1><br>\n";
if (isset($_POST['action']) && $_POST['action'] == 'Save Changes')
. "' AND property_name='" . $_GET['propname'] . "'");
$cls = pg_fetch_object($res, 0);
- echo "<form action='classes.php?classname=" . $cls->name . "&propname=" . $cls->property_name . "' method='POST'>";
+ echo "<form action='classes.php?classname=" . $cls->name . "&propname=" . $cls->property_name . "' method='POST'>";
echo "<table>";
echo "<tr><td>Description</td><td><input name='description' type='text' value='";
}
else
{
- echo "<h1>Parameter Classes Administration</h1><hr>";
+ echo "<script type='text/ecmascript'>document.getElementById('menu_title').innerHTML = '<h1>Parameter Classes Administration<\/h1>'</script><br>";
$res = pg_exec($this->database, "SELECT name, property_name, description FROM parameter_class
ORDER BY name, property_name");
echo "<table>";
- echo "<tr><th>Class</th><th>Property</th><th>Description</th><tr>";
+ echo "<tr><th>Class</th><th>Property</th><th>Description</th></tr>";
$cls = 0;
while ($cls < pg_numrows($res))
{
$u = pg_fetch_object($res, $cls);
?>
- <tr><td align='center'><a href='classes.php?classname=<?php echo $u->name?>&propname=<?php echo $u->property_name ?>'><img src='change.png'></a><br>
+ <tr><td align='center'><a href='classes.php?classname=<?php echo $u->name?>&propname=<?php echo $u->property_name ?>'><img src='change.png'></a><br>
<b><?php echo $u->name ?></b>
</td><td>
<?php echo $u->property_name ?>
?>
<h2>Create new parameter class property:</h2>
-<p>
<form action='classes.php' method='post' onSubmit='return CheckCreate(this)'>
Class name: <input name='classname' type='text'>
<br>
<input type='submit' name='action' value='Create'>
</form>
-</p>
<?php
}
{
border-style : none ;
}
+
+#header {
+ position : fixed;
+ width : 100%;
+ height : 60px;
+ top : 13px;
+ right : 0px;
+ bottom : auto;
+ left : 3px;
+ border-bottom : 1px solid #cccccc;
+}
+
+#menu_title {
+ position : fixed;
+ width : auto;
+ height : 80px;
+ top : 0px;
+ right : auto;
+ bottom : auto;
+ left : 380px;
+ border-bottom : 0px solid #cccccc;
+}
+
+#content {
+ position : fixed;
+ top : 73px;
+ bottom : 20px;
+ margin : 0px 0px 0px 5px;
+ width : auto;
+ height : auto;
+ padding-left : 5px;
+ padding-right : 12px;
+ color : #000000;
+ border-left : 0px solid #cccccc;
+ overflow : auto;
+}
+
+#footer {
+ position : fixed;
+ width : 100%;
+ height : 20px;
+ top : auto;
+ right : 0;
+ bottom : 0;
+ margin-left : 10px;
+ border-top : 1px solid #cccccc;
+ text-align : center;
+}
+
+#log_date {
+ font-family : sans-serif;
+ font-size : 20px;
+}
--- /dev/null
+<?php
+
+/**************************************************************************
+** (c) Copyright 2003, Andromeda Technology & Automation
+** This is free software; you can redistribute it and/or modify it under the
+** terms of the GNU General Public License, see the file COPYING.
+***************************************************************************
+** MODULE INFORMATION *
+***********************
+** FILE NAME : login.php
+** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
+** VERSION NUMBER : $Revision: 1.1 $
+**
+** DESCRIPTION : The entry page for the Gnucomo web interface
+**
+** EXPORTED OBJECTS :
+** LOCAL OBJECTS :
+** MODULES USED :
+***************************************************************************
+** ADMINISTRATIVE INFORMATION *
+********************************
+** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
+** CREATION DATE : Dec 03, 2002
+** LAST UPDATE : Feb 08, 2003
+** MODIFICATIONS :
+**************************************************************************/
+
+/*****************************
+ $Log: index.php,v $
+ Revision 1.1 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.3 2003/02/13 09:01:29 arjen
+ All web interface pages use the page class.
+
+******************************/
+
+// RCSID = "$Id: index.php,v 1.1 2007-11-21 14:38:06 arjen Exp $";
+
+ini_set('include_path', '.:./classes:../phpclasses');
+require_once('page.class.php');
+//session_start();
+
+$login_page = new page("Gnucomo Login");
+
+$login_page->Showpage();
+
+?>
***********************
** FILE NAME : issues.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.1 $
+** VERSION NUMBER : $Revision: 1.2 $
**
** DESCRIPTION : Issue types Administration page.
** Input parameters: action (POST) : empty, 'Create'
/*****************************
$Log: issues.php,v $
- Revision 1.1 2007-02-01 12:31:23 arjen
+ Revision 1.2 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.1 2007/02/01 12:31:23 arjen
Added web interface for editing issues
******************************/
-// RCSID = "$Id: issues.php,v 1.1 2007-02-01 12:31:23 arjen Exp $";
+// RCSID = "$Id: issues.php,v 1.2 2007-11-21 14:38:06 arjen Exp $";
ini_set('include_path', '.:./classes:../phpclasses');
?>
-<script language='JavaScript'>
+<script type='text/ecmascript'>
function CheckCreate(f)
{
. $_POST['issueid'] . "'");
}
- echo "<h1>Issue Types Administration</h1><hr>";
+ echo "<script type='text/ecmascript'>document.getElementById('menu_title').innerHTML = '<h1>Issue Types Administration<\/h1>'</script><br>";
$res = pg_exec($this->database, "SELECT type_of_issueid, name, suggested_priority, description
FROM type_of_issue ORDER BY name");
echo "<table>";
- echo "<tr><th>Issue</th><th>Priority</th><th>Description</th><tr>";
+ echo "<tr><th>Issue</th><th>Priority</th><th>Description</th></tr>";
$cls = 0;
while ($cls < pg_numrows($res))
{
$u = pg_fetch_object($res, $cls);
?>
- <tr><td align='center'><img src='bell.png'><br>
+ <tr><td align='center'><img src='bell.png' alt='bell'><br>
<b><?php echo $u->name ?></b>
</td><td>
<?php echo $u->suggested_priority ?>
?>
<h2>Create new issue type:</h2>
-<p>
<form action='issues.php' method='post' onSubmit='return CheckCreate(this)'>
Issue name: <input name='issuename' type='text'>
<br>
<input type='submit' name='action' value='Create'>
</form>
-</p>
<?php
}
***********************
** FILE NAME : log.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.7 $
+** VERSION NUMBER : $Revision: 1.8 $
**
** DESCRIPTION : Logs page
**
/*****************************
$Log: log.php,v $
- Revision 1.7 2007-10-27 08:38:18 arjen
+ Revision 1.8 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.7 2007/10/27 08:38:18 arjen
Removed link to advanced log analysis
Revision 1.6 2005/06/04 07:18:26 arjen
******************************/
-// RCSID = "$Id: log.php,v 1.7 2007-10-27 08:38:18 arjen Exp $";
+// RCSID = "$Id: log.php,v 1.8 2007-11-21 14:38:06 arjen Exp $";
ini_set('include_path', '.:./classes:../phpclasses');
{
if (!empty($_GET['oid']))
{
+ $oid = $_GET['oid'];
$res = pg_exec($this->database, "SELECT objectname FROM object
- WHERE objectid=CAST('" . $_GET['oid']. "' AS BIGINT)");
+ WHERE objectid=CAST('$oid' AS BIGINT)");
$obj = pg_fetch_object($res, 0);
- echo "<h1>Log for " . $obj->objectname . "</h1><hr>";
+ echo "<script type='text/ecmascript'>
+ document.getElementById('menu_title').innerHTML = \"<h1>Log for "
+ . $obj->objectname . "<\/h1>\"
+ </script>";
// Determine which day to display.
// This is either from a previous button though a _POST[] variable
// or the last day in the log table by default.
- if (empty($_POST['logday']))
+ if (empty($_GET['logday']))
{
$res = pg_exec($this->database, "SELECT date_trunc('day',object_timestamp) FROM log
- WHERE objectid='". $_GET['oid'] ."'
+ WHERE objectid='$oid'
ORDER BY object_timestamp DESC LIMIT 1");
- $last_time = pg_fetch_object($res, 0);
- $logday = strtotime($last_time->date_trunc);
+ if( pg_num_rows($res) > 0 )
+ {
+ $last_time = pg_fetch_object($res, 0);
+ $logday = strtotime($last_time->date_trunc);
+ }
+ else
+ {
+ $logday = "";
+ }
}
else
{
- $logday = $_POST['logday'];
+ $logday = $_GET['logday'];
}
// Make buttons to request the previous and the next day of logs.
- echo "<form method='POST'>";
- echo "<input type='submit' value='<<'>";
- echo "<input type='hidden' name='logday' value='" . ($logday - 24 * 60 * 60) . "'>";
- echo "</form>";
-
- echo "<h3>" . date('F d, Y', $logday) ."</h3>";
-
- echo "<form method='POST'>";
- echo "<input type='submit' value='>>'>";
- echo "<input type='hidden' name='logday' value='" . ($logday + 24 * 60 * 60) . "'>";
- echo "</form>";
+ echo "<div id=\"log_date\">";
+ $logday1 = $logday - 24 * 60 * 60;
+ echo "<a href=\"log.php?oid=$oid&logday=$logday1\" title=\"previous day\"><<</a>";
+ echo " " . date('F d, Y', $logday) . " ";
+ $logday2 = $logday + 24 * 60 * 60;
+ echo "<a href=\"log.php?oid=$oid&logday=$logday2\" title=\"next day\">>></a>";
+ echo "</div>";
// Show the log for one day only.
$res = pg_exec($this->database, "SELECT logid, object_timestamp, servicecode, rawdata FROM log "
- ."WHERE objectid = CAST('" . $_GET['oid'] . "' AS BIGINT)
+ ."WHERE objectid = CAST('$oid' AS BIGINT)
AND date_trunc('day', object_timestamp)='" . date('Y-m-d', $logday) . "'
ORDER BY object_timestamp, logid");
***********************
** FILE NAME : login.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.3 $
+** VERSION NUMBER : $Revision: 1.4 $
**
** DESCRIPTION : The entry page for the Gnucomo web interface
**
/*****************************
$Log: login.php,v $
- Revision 1.3 2003-02-13 09:01:29 arjen
+ Revision 1.4 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.3 2003/02/13 09:01:29 arjen
All web interface pages use the page class.
******************************/
-// RCSID = "$Id: login.php,v 1.3 2003-02-13 09:01:29 arjen Exp $";
+// RCSID = "$Id: login.php,v 1.4 2007-11-21 14:38:06 arjen Exp $";
ini_set('include_path', '.:./classes:../phpclasses');
require_once('page.class.php');
+//session_start();
$login_page = new page("Gnucomo Login");
***********************
** FILE NAME : logout.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.2 $
+** VERSION NUMBER : $Revision: 1.3 $
**
** DESCRIPTION : Gnucomo logout script.
** Simply clears the username in the session and
/*****************************
$Log: logout.php,v $
- Revision 1.2 2003-02-13 09:00:45 arjen
+ Revision 1.3 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.2 2003/02/13 09:00:45 arjen
Added comment header
******************************/
-// RCSID = "$Id: logout.php,v 1.2 2003-02-13 09:00:45 arjen Exp $";
+// RCSID = "$Id: logout.php,v 1.3 2007-11-21 14:38:06 arjen Exp $";
session_start();
$_SESSION['username'] = '';
-include('login.php');
+//include('login.php');
+header( "Location: login.php" );
***********************
** FILE NAME : notification.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.4 $
+** VERSION NUMBER : $Revision: 1.5 $
**
** DESCRIPTION : Display and handle notifications.
** There are two major views to this page: either a list of
/*****************************
$Log: notification.php,v $
- Revision 1.4 2007-01-11 13:44:29 arjen
+ Revision 1.5 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.4 2007/01/11 13:44:29 arjen
Manually edit parameters.
View logs from abusing IP addresses.
******************************/
-// RCSID = "$Id: notification.php,v 1.4 2007-01-11 13:44:29 arjen Exp $";
+// RCSID = "$Id: notification.php,v 1.5 2007-11-21 14:38:06 arjen Exp $";
ini_set('include_path', '.:./classes:../phpclasses');
{
?>
-<script language='JavaScript'>
+<script type='text/ecmascript'>
function CheckRemark(f)
{
. " ORDER BY notificationid");
echo "<table>";
+ echo '<tr><th>Time</th><th>Number</th><th>Issue</th><th>Status</th><th>Priority</th></tr>';
$row = 0;
while ($row < pg_numrows($res))
{
$res = pg_exec($this->database, "SELECT objectname FROM object WHERE objectid= CAST ('" . $note->objectid . "' AS BIGINT)");
$obj = pg_fetch_object($res, 0);
echo "<h1>Notification " . $note->notificationid . " for " . $obj->objectname . "</h1><hr>";
+ echo "<script type='text/ecmascript'>document.getElementById('menu_title').innerHTML = '<h1>Notification " . $note->notificationid . " for " . $obj->objectname . "<\/h1>'</script><br>";
$r = pg_exec($this->database, "SELECT description FROM type_of_issue WHERE type_of_issueid = CAST ('"
. $note->type_of_issueid . "' AS BIGINT)");
);
echo "<h2>Enter a remark for the next action</h2>";
- echo "<form method='post' onSubmit='return CheckRemark(this)'>";
- echo "<textarea name='remark'></textarea><br>";
+ echo "<form method='post' onSubmit='return CheckRemark(this)' action=''>";
+ echo "<textarea name='remark' cols='30' rows='5'></textarea><br>";
/* Display a list of possible actions */
if ($first)
{
$first = false;
- echo " checked='on'";
+ echo " CHECKED";
}
echo " value='$act'>" . $action->description . "<br>";
}
$res = pg_exec($this->database, "SELECT objectname FROM object WHERE objectid=" . $_GET['oid']);
$obj = pg_fetch_object($res, 0);
- echo "<h1>Notifications for " . $obj->objectname . "</h1><hr>";
+ echo "<script type='text/ecmascript'>document.getElementById('menu_title').innerHTML = '<h1>Notifications for " . $obj->objectname . "<\/h1>'</script><br>";
$res = pg_exec($this->database, "SELECT notificationid, timestamp, type_of_issueid,
statuscode, priority
. " ORDER BY notificationid");
echo "<table>";
+ echo '<tr><th>Time</th><th>Number</th><th>Issue</th><th>Status</th><th>Priority</th></tr>';
$row = 0;
while ($row < pg_numrows($res))
{
***********************
** FILE NAME : objects.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.10 $
+** VERSION NUMBER : $Revision: 1.11 $
**
** DESCRIPTION : Objects Administration page.
** Input parameters: action (POST) : empty, 'Create'
/*****************************
$Log: objects.php,v $
- Revision 1.10 2005-06-04 07:24:38 arjen
+ Revision 1.11 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.10 2005/06/04 07:24:38 arjen
New page: Abuse list
Revision 1.9 2003/09/01 06:55:00 arjen
******************************/
-// RCSID = "$Id: objects.php,v 1.10 2005-06-04 07:24:38 arjen Exp $";
+// RCSID = "$Id: objects.php,v 1.11 2007-11-21 14:38:06 arjen Exp $";
ini_set('include_path', '.:./classes:../phpclasses');
{
?>
-<script language='JavaScript'>
+<script type='text/ecmascript'>
function CheckCreate(f)
{
if (isset($_GET['oid']))
{
- echo "<h1>Detailed information for object " . $_GET['oid'] . "</h1><hr>";
+ echo "<script type='text/ecmascript'>document.getElementById('menu_title').innerHTML = \"<h1>Detailed information for object " . $_GET['oid'] . "<\/h1>\"</script><br>\n";
if (isset($_POST['action']) && $_POST['action'] == 'Save Changes')
{
echo $obj->objectname . "'></td></tr>";
echo "<tr><td>Identification code</td><td><input name='ocode' type='text' value='";
echo $obj->objectcode . "'></td></tr>";
- echo "<tr><td>Description</td><td><textarea name='odescription'>";
+ echo "<tr><td>Description</td><td><textarea name='odescription' rows='3' cols='30'>";
echo $obj->object_description . "</textarea></td></tr>";
- echo "<tr><td>Owner</td><td><textarea name='oowner'>";
+ echo "<tr><td>Owner</td><td><textarea name='oowner' rows='3' cols='30'>";
echo $obj->object_owner . "</textarea></td></tr>";
- echo "<tr><td>Physical location</td><td><textarea name='olocation'>";
+ echo "<tr><td>Physical location</td><td><textarea name='olocation' rows='3' cols='30'>";
echo $obj->physical_location . "</textarea></td></tr>";
- echo "<tr><td>Remarks</td><td><textarea name='oremark'>";
+ echo "<tr><td>Remarks</td><td><textarea name='oremark' rows='3' cols='30'>";
echo $obj->remark . "</textarea></td></tr>";
echo "<tr><td>Timezone</td><td><input name='otimezone' type='text' value='";
echo $obj->timezone . "'></td></tr>";
$srv_obj_res = pg_exec($this->database, "SELECT * FROM object_service WHERE objectid='"
. $obj->objectid . "' AND servicecode='" . $srv->servicecode . "'");
- echo "<tr><form action='objects.php?oid=" . $obj->objectid . "' method='POST'>";
+ echo "<tr>";
+ echo "<form action='objects.php?oid=" . $obj->objectid . "' method='POST'>";
echo "<input type='hidden' name='servcode' value='" . $srv->servicecode . "'>";
if (pg_numrows($srv_obj_res) == 0)
$usr_obj_res = pg_exec($this->database, "SELECT * FROM object_user WHERE objectid='"
. $obj->objectid . "' AND username='" . $usr->username . "'");
- echo "<tr><form action='objects.php?oid=" . $obj->objectid . "' method='POST'>";
+ echo "<tr>";
+ echo "<form action='objects.php?oid=" . $obj->objectid . "' method='POST'>";
echo "<input type='hidden' name='username' value='" . $usr->username . "'>";
if (pg_numrows($usr_obj_res) == 0)
}
else
{
- echo "<h1>Objects Administration</h1><hr>";
+ echo "<script type='text/ecmascript'>
+ document.getElementById('menu_title').innerHTML = \"<h1>Objects Administration<\/h1>\"
+ </script>
+ <br>";
+
$res = pg_exec($this->database, "SELECT * FROM object ORDER BY objectname");
?>
$count_notifications += $this->nr_notifications;
$closed_notifications += $this->closed_notifications;
?>
- <tr><td><center><a href='objects.php?oid=<?php echo $u->objectid?>'><img src='server.png'></a><br>
+ <tr><td><center><a href='objects.php?oid=<?php echo $u->objectid?>'><img src='server.png' alt='server'></a><br>
<b><?php echo $u->objectname ?></b></center>
</td><td>
<?php echo nl2br($u->object_description) ?>
</td><td class='number'>
- <?php echo "<a href='log.php?oid=$u->objectid'> $this->nr_logs </a>" ?>
+ <?php if ( $this->nr_logs > 0 )
+ {
+ echo "<a href='log.php?oid=$u->objectid'> $this->nr_logs </a>";
+ }
+ else
+ {
+ echo "0";
+ }
+ ?>
</td><td class='number'>
<?php echo "<a href='parameter.php?oid=$u->objectid'>" . $this->nr_parameters
. " (" . $this->removed_parameters . " removed)</a>" ?>
</td><td class='number'>
- <?php echo "<a href='notification.php?oid=$u->objectid'>" . $this->nr_notifications
- . " (" . $this->closed_notifications . " closed)</a>" ?>
+ <?php if( $this->nr_notifications == $this->closed_notifications )
+ {
+ echo $this->nr_notifications . " (" . $this->closed_notifications . " closed)";
+ }
+ else
+ {
+ echo "<a href='notification.php?oid=$u->objectid'>" . $this->nr_notifications
+ . " (" . $this->closed_notifications . " closed)</a>";
+ }
+ ?>
</td><td class='number'>
<?php echo "<a href='abuse.php?oid=$u->objectid'>" . "Abuse list"
. " </a>" ?>
?>
<h2>Create new object:</h2>
-<p>
<form action='objects.php' method='post' onSubmit='return CheckCreate(this)'>
Object's name (FQDN): <input name='objectname' type='text'>
<br>
<input type='submit' name='action' value='Create'>
</form>
-</p>
<?php
***********************
** FILE NAME : page.class.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.9 $
+** VERSION NUMBER : $Revision: 1.10 $
**
** DESCRIPTION : Base class for Gnucomo web interface pages.
**
/*****************************
$Log: page.class.php,v $
- Revision 1.9 2007-10-23 14:47:42 arjen
+ Revision 1.10 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.9 2007/10/23 14:47:42 arjen
Prepared for release 0.0.10
Revision 1.8 2007/01/11 13:44:29 arjen
******************************/
-// RCSID = "$Id: page.class.php,v 1.9 2007-10-23 14:47:42 arjen Exp $";
+// RCSID = "$Id: page.class.php,v 1.10 2007-11-21 14:38:06 arjen Exp $";
require_once('gnucomo_config.php');
<div class='login'>
<h1 align="center">GNU Computer Monitoring</h1>
<h4 align="center"><i>Version 0.0.10, October 19, 2007</i></h4>
- <p>
- <h2 class='error'><?php echo $last_error?></h2>
- </p>
+ <h2 class='error'><?php echo $last_error?></h2>
<center><table class='form'>
<tr>
<td width='50%' class='form'>
- <a href='http://gnucomo.org/' target='_top'><img src='logo.png' alt='GnoCoMo logo'></a></td>
- <td class='form'><form name="login" method="POST">
+ <a href='http://gnucomo.org/' target='_top'><img src='logo.png' alt='GnuCoMo logo'></a></td>
+ <td class='form'><form name="login" method="POST" action="index.php">
<table class='form'>
<tr>
<td class='form'>Username</td>
<title><?php echo $this->the_title ?></title>
</head>
<body>
+ <div id="header">
+ <a href='index.php'><img src='small-logo.png' title='Gnucomo' alt='Gnucomo'></a>
+ <a href='objects.php'><img src='server.png' title='Objects' alt='Objects'></a>
+ <a href='users.php'><img src='user.png' title='Users' alt='Users'></a>
+ <a href='services.php'><img src='service.png' title='Services' alt='Services'></a>
+ <a href='issues.php'><img src='bell.png' title='Issues' alt='Issues'></a>
+ <a href='classes.php'><img src='change.png' title='Classes' alt='Classes'></a>
+ <!-- a href='notification2.php'>N2</a -->
+ <a href='logout.php'><img src='exit.png' title='Logout' alt='Logout'></a>
+ </div>
+
+ <div id="menu_title"> </div>
+
+ <div id="content">
<?php
}
function Body()
{
- echo "The default body.";
+ //echo "The default body.";
+ echo "<div id='content'>
+ <img src='logo.png' alt='GnuCoMo'>
+ </div>";
}
function Tail()
{
pg_close($this->database);
}
+ echo "<br></div>
+ <div id='footer'>
+ © <a href='http://www.gnucomo.org'>GnuCoMo</a>
+ </div>";
echo "</body>";
echo "</html>";
}
***********************
** FILE NAME : parameter.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.8 $
+** VERSION NUMBER : $Revision: 1.9 $
**
** DESCRIPTION : Parameter administration for a specific object.
** Input - GET[oid] : Object id
/*****************************
$Log: parameter.php,v $
- Revision 1.8 2007-01-11 13:44:29 arjen
+ Revision 1.9 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.8 2007/01/11 13:44:29 arjen
Manually edit parameters.
View logs from abusing IP addresses.
******************************/
-// RCSID = "$Id: parameter.php,v 1.8 2007-01-11 13:44:29 arjen Exp $";
+// RCSID = "$Id: parameter.php,v 1.9 2007-11-21 14:38:06 arjen Exp $";
ini_set('include_path', '.:./classes:../phpclasses');
$res = pg_exec($this->database, "SELECT objectname FROM object WHERE objectid=CAST('" . $ObjId ."' AS BIGINT)");
$obj = pg_fetch_object($res, 0);
- echo "<h1>Parameters for " . $obj->objectname . "</h1>";
+ echo "<script type='text/ecmascript'>document.getElementById('menu_title').innerHTML = '<h1>Parameters for " . $obj->objectname . "<\/h1>'</script><br>";
- echo "Action = " . $_POST['action'] . "<br>";
+ if( isset($_POST['action']) ) {
+ echo "Action = " . $_POST['action'] . "<br>";
+ }
// See if we have an update for the database
if (isset($_POST['action']) && $_POST['action'] == 'Create Parameter')
{
<tr><td align='center'>
<?php echo $par->class?>
</td><td>
- <?php echo "<a href=parameter.php?paramid=" . $par->paramid . ">" . $par->name . "</a>"?>
+ <?php echo "<a href=\"parameter.php?paramid=" . $par->paramid . "\">" . $par->name . "</a>"?>
</td><td>
<?php echo $par->description?>
</td><td>
echo round($duration / $row * 1000, 3) . " milliseconds per parameter).<br>";
?>
<h2>Create new parameter:</h2>
- <p>
<form action='parameter.php?oid=<?php echo $ObjId ?>' method='post'>
Class : <input type='text' name='paramclass'>
Name : <input type='text' name='paramname'>
<br>
<input type='submit' name='action' value='Create Parameter'>
</form>
- </p>
<?php
}
if (!empty($_GET['paramid']))
***********************
** FILE NAME : parameter_compare.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.6 $
+** VERSION NUMBER : $Revision: 1.7 $
**
** DESCRIPTION :
**
/*****************************
$Log: parameter_compare.php,v $
- Revision 1.6 2003-12-03 08:03:28 arjen
+ Revision 1.7 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.6 2003/12/03 08:03:28 arjen
Optionally show or hide removed parameters from the parameter
comparison page.
******************************/
-// RCSID = "$Id: parameter_compare.php,v 1.6 2003-12-03 08:03:28 arjen Exp $";
+// RCSID = "$Id: parameter_compare.php,v 1.7 2007-11-21 14:38:06 arjen Exp $";
ini_set('include_path', '.:./classes:../phpclasses');
echo "<tr><th>Name</th><th>Properties</th><th>Name</th><th>Propterties</th></tr>\n";
$hide_removed = true;
- $hide_removed = $_POST['show_removed'] != 'on';
+ $hide_removed = empty($_POST['show_removed']) || $_POST['show_removed'] != 'on';
$row = 0;
while ($row < pg_numrows($res))
display_parameter($nextpar->name, $prnext, $Style, $this->is_removed($nextpar->paramid));
display_parameter($par->name, $pr, $Style, $this->is_removed($par->paramid));
}
-
}
else
{
***********************
** FILE NAME : services.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.3 $
+** VERSION NUMBER : $Revision: 1.4 $
**
** DESCRIPTION : Service Administration page.
** Input parameters: action (POST) : empty, 'Create'
/*****************************
$Log: services.php,v $
- Revision 1.3 2007-10-19 07:16:44 arjen
+ Revision 1.4 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.3 2007/10/19 07:16:44 arjen
Improved interface for editing check patterns.
Revision 1.2 2005/06/04 07:25:59 arjen
******************************/
-// RCSID = "$Id: services.php,v 1.3 2007-10-19 07:16:44 arjen Exp $";
+// RCSID = "$Id: services.php,v 1.4 2007-11-21 14:38:06 arjen Exp $";
ini_set('include_path', '.:./classes:../phpclasses');
?>
-<script language='JavaScript'>
+<script type='text/ecmascript'>
function CheckCreate(f)
{
if (isset($_GET['servcode']))
{
- echo "<h1>Detailed information for service " . $_GET['servcode'] . "</h1><br>\n";
+ echo "<script type='text/ecmascript'>
+ document.getElementById('menu_title').innerHTML =
+ '<h1>Detailed Information for service " . $_GET['servcode'] . "<\/h1>'</script><br>";
if (isset($_POST['action']) && $_POST['action'] == 'Save Changes')
{
echo "<option value='$prior'";
if ($prior == $srv->default_priority)
{
- echo " selected='true'";
+ echo " SELECTED";
}
echo ">$prior</option>\n";
}
echo "<option value='$prior'";
if ($prior == $srv->max_priority)
{
- echo " selected='true'";
+ echo " SELECTED";
}
echo ">$prior</option>\n";
}
}
else
{
- echo "<h1>Service Administration</h1><hr>";
+ echo "<script type='text/ecmascript'>document.getElementById('menu_title').innerHTML = '<h1>Service Administration<\/h1>'</script><br>";
$res = pg_exec($this->database, "SELECT * FROM service ORDER BY servicecode");
echo "<table>";
- echo "<tr><th>Service code</th><th>Name</th><th>Priority</th><th>Max priority</th><tr>";
+ echo "<tr><th>Service code</th><th>Name</th><th>Priority</th><th>Max priority</th></tr>";
$srv = 0;
while ($srv < pg_numrows($res))
{
$u = pg_fetch_object($res, $srv);
?>
- <tr><td align='center'><a href='services.php?servcode=<?php echo $u->servicecode?>'><img src='service.png'></a><br>
+ <tr><td align='center'><a href='services.php?servcode=<?php echo $u->servicecode?>'><img src='service.png' alt='service'></a><br>
<b><?php echo $u->servicecode ?></b>
</td><td>
<?php echo $u->servicename ?>
?>
<h2>Create new service:</h2>
-<p>
<form action='services.php' method='post' onSubmit='return CheckCreate(this)'>
Service code: <input name='servcode' type='text'>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
-<option value='5' selected='true'>5</option>
+<option value='5' SELECTED>5</option>
</select>
<br>
<input type='submit' name='action' value='Create'>
</form>
-</p>
<?php
}
***********************
** FILE NAME : users.php
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.4 $
+** VERSION NUMBER : $Revision: 1.5 $
**
** DESCRIPTION : User Administration page.
** Input parameters: action (POST) : empty, 'Create'
/*****************************
$Log: users.php,v $
- Revision 1.4 2004-01-10 20:03:02 arjen
+ Revision 1.5 2007-11-21 14:38:06 arjen
+ The buttonbar at the top of each page is now a fixed 'div' element
+ instead of a framed page.
+ Contributed by Edwin Nadorp.
+
+ Revision 1.4 2004/01/10 20:03:02 arjen
*** empty log message ***
Revision 1.3 2003/02/21 08:44:19 arjen
******************************/
-// RCSID = "$Id: users.php,v 1.4 2004-01-10 20:03:02 arjen Exp $";
+// RCSID = "$Id: users.php,v 1.5 2007-11-21 14:38:06 arjen Exp $";
ini_set('include_path', '.:./classes:../phpclasses');
{
?>
-<script language='JavaScript'>
+<script type='text/ecmascript'>
function CheckCreate(f)
{
if (f.username.value == "")
if (isset($_GET['username']))
{
- echo "<h1>Detailed information for user " . $_GET['username'] . "</h1><br>\n";
-
+ echo "<script type='text/ecmascript'>
+ document.getElementById('menu_title').innerHTML =
+ '<h1>Detailed information for user " . $_GET['username'] . "<\/h1>'</script><br>";
if (isset($_POST['action']) && $_POST['action'] == 'Save Changes')
{
$qry = "UPDATE usr SET display_name='" . $_POST['dspname'] . "'";
echo "<option value='$seclevel'";
if ($seclevel == $usr->security_level)
{
- echo " selected='true'";
+ echo " SELECTED";
}
echo ">$seclevel</option>\n";
}
}
else
{
- echo "<h1>User Administration</h1><hr>";
+ echo "<script type='text/ecmascript'>document.getElementById('menu_title').innerHTML = '<h1>User Administration<\/h1>'</script><br>";
$res = pg_exec($this->database, "SELECT username, display_name, email, security_level
FROM usr ORDER BY username");
{
$u = pg_fetch_object($res, $usr);
?>
- <tr><td align='center'><a href='users.php?username=<?php echo $u->username ?>'><img src='user.png'></a><br>
+ <tr><td align='center'><a href='users.php?username=<?php echo $u->username ?>'><img src='user.png' alt='users'></a><br>
<b><?php echo $u->username ?></b>
</td><td>
<?php echo $u->display_name ?>
?>
<h2>Create new user:</h2>
-<p>
<form action='users.php' method='post' onSubmit='return CheckCreate(this)'>
User name: <input name='username' type='text'>
<br>
<input type='submit' name='action' value='Create'>
</form>
-</p>
<h2>Change your password:</h2>
<form action='users.php' method='post' onSubmit='return CheckPW(this)'>