The buttonbar at the top of each page is now a fixed 'div' element
[gnucomo.git] / src / web / classes.php
index d481649..1bafa1c 100644 (file)
@@ -9,7 +9,7 @@
 ***********************
 **      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');
 
@@ -46,7 +51,7 @@ function clientscripts()
 
 ?>
 
-<script language='JavaScript'>
+<script type='text/ecmascript'>
 
 function CheckCreate(f)
 {
@@ -105,7 +110,8 @@ class class_page extends page
 
    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')
@@ -140,7 +146,7 @@ class class_page extends page
                                     . "' 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 . "&amp;propname=" . $cls->property_name . "' method='POST'>";
       echo "<table>";
 
       echo "<tr><td>Description</td><td><input name='description' type='text' value='";
@@ -179,19 +185,19 @@ class class_page extends page
    }
    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?>&amp;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 ?>
@@ -212,7 +218,6 @@ class class_page extends page
 ?>
 
 <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'>
@@ -220,7 +225,6 @@ Property name: <input name='propname' type='text'>
 <br>
 <input type='submit' name='action' value='Create'>
 </form>
-</p>
 
 <?php
    }