The buttonbar at the top of each page is now a fixed 'div' element
[gnucomo.git] / src / web / services.php
index c48b494..23dc9f9 100644 (file)
@@ -9,7 +9,7 @@
 ***********************
 **      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
@@ -40,7 +45,7 @@
 
 ******************************/
 
-// 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');
 
@@ -51,7 +56,7 @@ function clientscripts()
 
 ?>
 
-<script language='JavaScript'>
+<script type='text/ecmascript'>
 
 function CheckCreate(f)
 {
@@ -101,7 +106,9 @@ class service_page extends page
 
    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')
       {
@@ -155,7 +162,7 @@ class service_page extends page
          echo "<option value='$prior'";
          if ($prior == $srv->default_priority)
          {
-            echo " selected='true'";
+            echo " SELECTED";
          }
          echo ">$prior</option>\n";
       }
@@ -166,7 +173,7 @@ class service_page extends page
          echo "<option value='$prior'";
          if ($prior == $srv->max_priority)
          {
-            echo " selected='true'";
+            echo " SELECTED";
          }
          echo ">$prior</option>\n";
       }
@@ -236,18 +243,18 @@ class service_page extends page
    }
    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 ?>
@@ -269,7 +276,6 @@ class service_page extends page
 ?>
 
 <h2>Create new service:</h2>
-<p>
 
 <form action='services.php' method='post' onSubmit='return CheckCreate(this)'>
 Service code: <input name='servcode' type='text'>
@@ -286,12 +292,11 @@ Maximum priority: <select name='maxprior'>
 <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
    }