The buttonbar at the top of each page is now a fixed 'div' element
[gnucomo.git] / src / web / parameter.php
index 393457b..81c13dc 100644 (file)
@@ -9,7 +9,7 @@
 ***********************
 **      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.
 
@@ -53,7 +58,7 @@
 
 ******************************/
 
-// 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');
@@ -96,9 +101,11 @@ class param_page extends page
 
       $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')
       {
@@ -207,7 +214,7 @@ class param_page extends page
             <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>
@@ -232,7 +239,6 @@ class param_page extends page
       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'>
@@ -240,7 +246,6 @@ class param_page extends page
         <br>
         <input type='submit' name='action' value='Create Parameter'>
         </form>
-        </p>
       <?php 
    }
    if (!empty($_GET['paramid']))