IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8984 for trunk/ippMonitor/raw


Ignore:
Timestamp:
Sep 26, 2006, 10:40:55 AM (20 years ago)
Author:
eugene
Message:

adding menu hierarchy

Location:
trunk/ippMonitor/raw
Files:
8 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/raw/Login.php

    r8980 r8984  
    44
    55if (($_SERVER[REQUEST_METHOD] != 'POST') && ($_SERVER[REQUEST_METHOD] != 'GET')) {
    6   menu ('Login', 'ipp.css', '');
     6  menu ('ipp.menu.dat', 'Login', 'ipp.css', '');
    77  echo "Invalid Client Request<br>\n";
    88  menu_end ();
     
    1414  $ID = checkID ();
    1515
    16   menu ('Login', 'ipp.css', $ID['link']);
     16  menu ('ipp.menu.dat', 'Login', 'ipp.css', $ID['link']);
    1717
    1818  $pass = $ID['pass'];
     
    3434    $ID = checkLogin ();
    3535
    36     menu ('Login', 'ipp.css', $ID['link']);
     36    menu ('ipp.menu.dat', 'Login', 'ipp.css', $ID['link']);
    3737    echo "Login Accepted\n";
    3838    menu_end();
     
    4141
    4242  if (key_exists (logout, $_POST)) {
    43     menu ('Login', 'ipp.css', '');
     43    menu ('ipp.menu.dat', 'Login', 'ipp.css', '');
    4444    echo "You are now logged out<br>\n";
    4545    logintext ();
     
    5050
    5151  // missing a valid POST state (login or logout)
    52   menu ('Login', 'ipp.css', '');
     52  menu ('ipp.menu.dat', 'Login', 'ipp.css', '');
    5353  echo "Invalid Client Post Request<br>\n";
    5454  foreach ($_POST as $key => $value) {
  • trunk/ippMonitor/raw/SelectProject.php

    r8980 r8984  
    1 
    2 <? function projectform () { ?>
    3   <p>
    4   Select the project of interest
    5   </p>
    6   <form action="<? $myPage ?>" method="POST">
    7   Project: <input type="text" name="proj"><br>
    8   <input type="submit" name="project">
    9   </form>
    10 <? } ?>
    11 
    121<?php
    132
    14 include 'menu.php';
     3include 'ipp.php';
    154
    165checkID ();
    176
    187if ($_SERVER[REQUEST_METHOD] == 'GET') {
    19     menu ('Project', 'ipp.css');
    20     projectform ();
     8    menu ('ipp.menu.dat', 'Project', 'ipp.css', '');
     9    echo "<p> Select the project of interest </p>\n";
     10    echo "<form action=\"$myPage\" method=\"POST\">\n";
     11    echo "Project: <input type=\"text\" name=\"proj\"><br>\n";
     12    echo "<input type=\"submit\" name=\"project\">\n";
     13    echo "</form>\n";
     14
    2115    menu_end ();
    2216}
    2317
    2418if ($_SERVER[REQUEST_METHOD] != 'POST') {
    25   menu ('Project', 'ipp.css');
     19  menu ('ipp.menu.dat', 'Project', 'ipp.css', '');
    2620  echo "Invalid Client Request<br>\n";
    2721  menu_end ();
     
    3226  # validate the existence of the project
    3327  $_GET[proj] = $myProj;
    34   menu ('Project', 'ipp.css');
     28  menu ('ipp.menu.dat', 'Project', 'ipp.css', '');
    3529  echo "New project is : $myProj\n";
    3630  menu_end();
    3731}
    3832 
    39 menu ('Project', 'ipp.css');
     33menu ('ipp.menu.dat', 'Project', 'ipp.css', '');
    4034echo "Invalid Client Post Request<br>\n";
    4135foreach ($_POST as $key => $value) {
  • trunk/ippMonitor/raw/ipp.menu.dat

    r8982 r8984  
    1717
    1818menutop   | menutop      | plain   | &nbsp;                       |
    19 menutop   | menutop      | plain   | Load and Setup               |
    20 menulink  | menuselect   | link    | Summit Exp                   | summitExp.php                         
    21 menulink  | menuselect   | link    | New Exp                      | newExp.php                   
    22 menulink  | menuselect   | link    | Copy Pending Exp             | pzPendingExp.php             
    23 menulink  | menuselect   | link    | Raw Detrend Exp              | rawDetrendExp.php             
    24 menulink  | menuselect   | link    | Raw Science Exp              | rawScienceExp.php             
     19menutop   | menutop      | link    | Load and Setup               | LoadSetup.php
     20menutop   | menutop      | link    | Science Steps                | ScienceSteps.php
     21menutop   | menutop      | link    | Detrend Steps                | DetrendSteps.php
     22menutop   | menutop      | link    | Imfile Tables                | ImfileTables.php
    2523
    2624menutop   | menutop      | plain   | &nbsp;                       |
    27 menutop   | menutop      | plain   | Science Steps                |
    28 menulink  | menuselect   | link    | P1 Pending Exp               | p1PendingExp.php             
    29 menulink  | menuselect   | link    | P2 Pending Exp               | p2PendingExp.php             
    30 menulink  | menuselect   | link    | P2 Processed Exp             | p2ProcessedExp.php           
    31 menulink  | menuselect   | link    | P3 Pending Exp               | p3PendingExp.php             
    3225
    33 menutop   | menutop      | plain   | &nbsp;                       |
    34 menutop   | menutop      | plain   | Detrend Steps                |
    35 menulink  | menuselect   | link    | Det Run                      | detRun.php                   
    36 menulink  | menuselect   | link    | Det Run Summary              | detRunSummary.php             
    37 menulink  | menuselect   | link    | Det Master Frame             | detMasterFrame.php           
    38 menulink  | menuselect   | link    | Det Input Exp                | detInputExp.php                   
    39 menulink  | menuselect   | link    | Det Resid Exp                | detResidExp.php                       
    40 
    41 menutop   | menutop      | plain   | &nbsp;                       |
    42 menutop   | menutop      | plain   | Imfile Tables                | none           
    43 menulink  | menuselect   | link    | detMasterImfile              | detMasterImfile.php                   
    44 menulink  | menuselect   | link    | detNormalizedImfile          | detNormalizedImfile.php               
    45 menulink  | menuselect   | link    | detNormalizedStatImfile      | detNormalizedStatImfile.php           
    46 menulink  | menuselect   | link    | detProcessedImfile           | detProcessedImfile.php               
    47 menulink  | menuselect   | link    | detResidImfile               | detResidImfile.php           
    48 menulink  | menuselect   | link    | detStackedImfile             | detStackedImfile.php                 
    49 menulink  | menuselect   | link    | newImfile                    | newImfile.php                         
    50 menulink  | menuselect   | link    | p2PendingImfile              | p2PendingImfile.php                   
    51 menulink  | menuselect   | link    | p2ProcessedImfile            | p2ProcessedImfile.php                 
    52 menulink  | menuselect   | link    | pzPendingImfile              | pzPendingImfile.php                   
    53 menulink  | menuselect   | link    | rawImfile                    | rawImfile.php                         
    54 
    55 menutop   | menutop      | plain   | &nbsp;                       |
    5626menutop   | menutop      | plain   | External Links               | none           
    5727menutop   | menutop      | link    | test page                    | phptest.php     
  • trunk/ippMonitor/raw/ipp.php

    r8980 r8984  
    3333// - pass (NOT the same as the user password: randomly generated for the session and given a timeout)
    3434
     35// have this function take the current menu and style?
    3536function checkLogin () {
    3637
     
    4243
    4344  if (!$success) { 
    44     menu ('Login', 'ipp.css', '');
     45    menu ('ipp.menu.dat', 'Login', 'ipp.css', '');
    4546    echo "Login Failed, please try again<br>\n";
    4647    loginform ();
     
    6768  // check for valid server method
    6869  if (($_SERVER[REQUEST_METHOD] != 'POST') && ($_SERVER[REQUEST_METHOD] != 'GET')) {
    69     menu ('Login', 'ipp.css', '');
     70    menu ('ipp.menu.dat', 'Login', 'ipp.css', '');
    7071    echo "Invalid Client Request<br>\n";
    7172    menu_end ();
     
    7778    $ID['pass'] = $_GET[pass];
    7879    $ID['proj'] = $_GET[proj];
    79     echo "using GET: ", $ID['pass'], $ID['proj'];
     80    // echo "using GET: ", $ID['pass'], $ID['proj'];
    8081  }
    8182  if ($_SERVER[REQUEST_METHOD] == 'POST') {
    8283    $ID['pass'] = $_POST[pass];
    8384    $ID['proj'] = $_POST[proj];
    84     echo "using POST: ", $ID['pass'], $ID['proj'];
     85    // echo "using POST: ", $ID['pass'], $ID['proj'];
    8586  }
    8687
    8788  // user is not logged in at all
    8889  if ($ID['pass'] == "") {
    89     menu('Login', 'ipp.css', '');
     90    menu('ipp.menu.dat', 'Login', 'ipp.css', '');
    9091    logintext ();   
    9192    loginform ();
     
    9596  // user supplied an invalid pass
    9697  if ($ID['pass'] != "foobar") {
    97     menu('Login', 'ipp.css', '');
     98    menu('ipp.menu.dat', 'Login', 'ipp.css', '');
    9899    echo "unknown user, please login again<br>\n";
    99100    loginform ();
     
    113114}
    114115
    115 function menu ($title, $sheet, $append) {
     116function menu ($source, $title, $sheet, $append) {
    116117
    117118  echo "<html><head><title> $title </title></head>\n\n";
     
    121122  $root = "/phpipp";
    122123
    123   $file = fopen ("ipp.menu.dat", "r");
     124  $file = fopen ($source, "r");
    124125
    125126  echo "<table class=page cellspacing=10px><tr><td valign=top>\n";
  • trunk/ippMonitor/raw/phptest.php

    r8980 r8984  
    1 <?php include 'ipp.php'; ?>
     1<?php
    22
    3 <?php menu('test.page', 'ipp.css', ''); ?>
     3include 'ipp.php';
    44
    5 <?
     5menu('ipp.menu.dat', 'test.page', 'ipp.css', '');
    66
    77$varlist = array ('SERVER_NAME', 'GATEWAY_INTERFACE', 'SERVER_PROTOCOL',
     
    1919}
    2020
     21menu_end();
    2122?>
    22 
    23 <?php menu_end(); ?>
    24 
    25 </body>
    26 </html>
Note: See TracChangeset for help on using the changeset viewer.