***********************
** 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
}