The buttonbar at the top of each page is now a fixed 'div' element
[gnucomo.git] / src / web / notification.php
index d779819..09edc5c 100644 (file)
@@ -9,7 +9,7 @@
 ***********************
 **      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.
 
@@ -52,7 +57,7 @@
 
 ******************************/
 
-// 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');
 
@@ -62,7 +67,7 @@ function clientscripts()
 {
 ?>
 
-<script language='JavaScript'>
+<script type='text/ecmascript'>
 
 function CheckRemark(f)
 {
@@ -129,6 +134,7 @@ class notification_page extends page
                                        . " 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))
       {
@@ -165,6 +171,7 @@ class notification_page extends page
       $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)");
@@ -292,8 +299,8 @@ class notification_page extends page
       );
 
       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 */
 
@@ -309,7 +316,7 @@ class notification_page extends page
          if ($first)
          {
             $first = false;
-            echo " checked='on'";
+            echo " CHECKED";
          }
          echo " value='$act'>" . $action->description . "<br>";
       }
@@ -328,7 +335,7 @@ class notification_page extends page
 
          $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
@@ -337,6 +344,7 @@ class notification_page extends page
                                           . " 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))
          {