IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

adding menu hierarchy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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";
Note: See TracChangeset for help on using the changeset viewer.