IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9439 for trunk/ippMonitor/raw


Ignore:
Timestamp:
Oct 9, 2006, 3:11:06 PM (20 years ago)
Author:
eugene
Message:

work on links and formats

Location:
trunk/ippMonitor/raw
Files:
15 edited

Legend:

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

    r9008 r9439  
    55$ID = checkID ();
    66
    7 menu('ipp.detrend.dat', 'Detrend Steps', 'ipp.css', $ID['link']);
     7// require an explicit project
     8if (! $ID['proj']) { projectform ($ID); }
     9
     10menu('ipp.detrend.dat', 'Detrend Steps', 'ipp.css', $ID['link'], $ID['proj']);
    811
    912// document body
  • trunk/ippMonitor/raw/ImfileTables.php

    r8984 r9439  
    55$ID = checkID ();
    66
    7 menu('ipp.imfiles.dat', 'Imfile Tables', 'ipp.css', $ID['link']);
     7// require an explicit project
     8if (! $ID['proj']) { projectform ($ID); }
     9
     10menu('ipp.imfiles.dat', 'Imfile Tables', 'ipp.css', $ID['link'], $ID['proj']);
    811
    912// document body
  • trunk/ippMonitor/raw/LoadSetup.php

    r8984 r9439  
    55$ID = checkID ();
    66
    7 menu('ipp.copy.dat', 'Load and Setup', 'ipp.css', $ID['link']);
     7// require an explicit project
     8if (! $ID['proj']) { projectform ($ID); }
     9
     10menu('ipp.copy.dat', 'Load and Setup', 'ipp.css', $ID['link'], $ID['proj']);
    811
    912// document body
  • trunk/ippMonitor/raw/Login.php

    r8984 r9439  
    44
    55if (($_SERVER[REQUEST_METHOD] != 'POST') && ($_SERVER[REQUEST_METHOD] != 'GET')) {
    6   menu ('ipp.menu.dat', '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 ('ipp.menu.dat', 'Login', 'ipp.css', $ID['link']);
     16  menu ('ipp.menu.dat', 'Login', 'ipp.css', $ID['link'], $ID['proj']);
    1717
    1818  $pass = $ID['pass'];
     
    3434    $ID = checkLogin ();
    3535
    36     menu ('ipp.menu.dat', 'Login', 'ipp.css', $ID['link']);
     36    menu ('ipp.menu.dat', 'Login', 'ipp.css', $ID['link'], $ID['proj']);
    3737    echo "Login Accepted\n";
    3838    menu_end();
     
    4141
    4242  if (key_exists (logout, $_POST)) {
    43     menu ('ipp.menu.dat', '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 ('ipp.menu.dat', '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/ScienceSteps.php

    r8984 r9439  
    55$ID = checkID ();
    66
    7 menu('ipp.science.dat', 'Science Steps', 'ipp.css', $ID['link']);
     7// require an explicit project
     8if (! $ID['proj']) { projectform ($ID); }
     9
     10menu('ipp.science.dat', 'Science Steps', 'ipp.css', $ID['link'], $ID['proj']);
    811
    912// document body
  • trunk/ippMonitor/raw/SelectProject.php

    r9017 r9439  
    44
    55if (($_SERVER[REQUEST_METHOD] != 'POST') && ($_SERVER[REQUEST_METHOD] != 'GET')) {
    6   menu ('ipp.menu.dat', 'Select Project', 'ipp.css', '');
     6  menu ('ipp.menu.dat', 'Select Project', 'ipp.css', '', '');
    77  echo "Invalid Client Request<br>\n";
    88  menu_end ();
     
    1313
    1414if ($_SERVER[REQUEST_METHOD] == 'GET') {
    15     menu ('ipp.menu.dat', 'Select Project', 'ipp.css', '');
    16     echo "<p> Select the project of interest </p>\n";
    17     echo "<form action=\"$myPage\" method=\"POST\">\n";
    18     echo "Project: <input type=\"text\" name=\"proj\"><br>\n";
    19     echo "<input type=\"submit\" name=\"project\">\n";
    20 
    21     $pass = $ID['pass'];
    22     echo "<input type=\"hidden\" name=\"pass\" value=\"$pass\">\n";
    23     echo "</form>\n";
    24 
    25     menu_end ();
     15  projectform ($ID);
    2616}
    2717
     
    4030    }
    4131
    42     menu ('ipp.menu.dat', 'Select Project', 'ipp.css', $ID['link']);
     32    menu ('ipp.menu.dat', 'Select Project', 'ipp.css', $ID['link'], $ID['proj']);
    4333    echo "New project is : $myProj<br>\n";
    4434    menu_end();
  • trunk/ippMonitor/raw/ipp.copy.dat

    r9003 r9439  
    1515menulink  | menuselect   | link    | Login                        | Login.php     
    1616menulink  | menuselect   | link    | Select Project               | SelectProject.php     
     17menulink  | menuselect   | link    | [$PROJECT]                   | SelectProject.php     
    1718
    1819menutop   | menutop      | plain   | &nbsp;                       |
    19 menutop   | menutop      | link    | Load and Setup               | LoadSetup.php
     20menutops  | menutops     | link    | Load and Setup               | LoadSetup.php
    2021menutop   | menutop      | link    | Science Steps                | ScienceSteps.php
    2122menutop   | menutop      | link    | Detrend Steps                | DetrendSteps.php
     
    2829menulink  | menuselect   | link    | Raw Detrend Exp              | rawDetrendExp.php             
    2930menulink  | menuselect   | link    | Raw Science Exp              | rawScienceExp.php             
    30 
    31 menutop   | menutop      | plain   | &nbsp;                       |
    32 menutop   | menutop      | plain   | External Links               | none
    33 menutop   | menutop      | link    | test page                    | phptest.php     
  • trunk/ippMonitor/raw/ipp.css

    r8980 r9439  
    1010
    1111a.menutop     { text-decoration: none; color: #ffffff; font-weight: bold }
     12a.menutops    { text-decoration: none; color: #80f0ff; font-weight: bold }
    1213a.menuext     { text-decoration: none; color: #ffffff; font-weight: bold }
    1314a.menulink    { text-decoration: none; font-weight: normal; color: #000000}
     
    1617
    1718td.menutop    { text-align: left; background: #0080c0; font-size: small; color: #ffffff; padding: 2px; }
     19td.menutops   { text-align: left; background: #0080c0; font-size: small; color: #000000; padding: 2px; }
    1820td.menuext    { text-align: left; background: #303070; font-size: small; color: #ffffff; padding: 2px; }
    1921td.menulink   { text-align: left; background: #d0d0ff; font-size: small; color: #000000; padding: 2px; font-weight: normal; text-indent: 0px; }
  • trunk/ippMonitor/raw/ipp.detrend.dat

    r9347 r9439  
    1515menulink  | menuselect   | link    | Login                        | Login.php     
    1616menulink  | menuselect   | link    | Select Project               | SelectProject.php     
     17menulink  | menuselect   | link    | [$PROJECT]                   | SelectProject.php     
    1718
    1819menutop   | menutop      | plain   | &nbsp;                       |
    1920menutop   | menutop      | link    | Load and Setup               | LoadSetup.php
    2021menutop   | menutop      | link    | Science Steps                | ScienceSteps.php
    21 menutop   | menutop      | link    | Detrend Steps                | DetrendSteps.php
     22menutops  | menutops     | link    | Detrend Steps                | DetrendSteps.php
    2223menutop   | menutop      | link    | Imfile Tables                | ImfileTables.php
    2324
    2425menutop   | menutop      | plain   | &nbsp;                       |
    25 menulink  | menuselect   | link    | Master Detrend Frames        | masterDetrendFrames.php
    26 menulink  | menuselect   | link    | Master Detrend Imfiles       | masterDetrendImfiles.php
     26menulink  | menuselect   | link    | Detrend Frames               | masterDetrendFrames.php
    2727menulink  | menuselect   | link    | Detrend Runs                 | detRunSummary.php             
    2828menulink  | menuselect   | link    | Raw Detrend Exp              | rawDetrendExp_detrend.php
     
    3030menulink  | menuselect   | link    | Proc Detrend Exp             | detProcessedExp.php
    3131menulink  | menuselect   | link    | Resid Detrend Exp            | detResidExp.php
    32 
    33 menutop   | menutop      | plain   | &nbsp;                       |
    34 menutop   | menutop      | plain   | External Links               | none
    35 menutop   | menutop      | link    | test page                    | phptest.php
     32menulink  | menuselect   | link    | Norm Detrend Exp             | detNormalizedExp.php
  • trunk/ippMonitor/raw/ipp.imfiles.dat

    r9080 r9439  
    1515menulink  | menuselect   | link    | Login                        | Login.php     
    1616menulink  | menuselect   | link    | Select Project               | SelectProject.php     
     17menulink  | menuselect   | link    | [$PROJECT]                   | SelectProject.php     
    1718
    1819menutop   | menutop      | plain   | &nbsp;                       |
     
    2021menutop   | menutop      | link    | Science Steps                | ScienceSteps.php
    2122menutop   | menutop      | link    | Detrend Steps                | DetrendSteps.php
    22 menutop   | menutop      | link    | Imfile Tables                | ImfileTables.php
     23menutops  | menutops     | link    | Imfile Tables                | ImfileTables.php
    2324
    2425menutop   | menutop      | plain   | &nbsp;                       |
  • trunk/ippMonitor/raw/ipp.menu.dat

    r8984 r9439  
    1515menulink  | menuselect   | link    | Login                        | Login.php     
    1616menulink  | menuselect   | link    | Select Project               | SelectProject.php     
     17menulink  | menuselect   | link    | [$PROJECT]                   | SelectProject.php     
    1718
    1819menutop   | menutop      | plain   | &nbsp;                       |
     
    2122menutop   | menutop      | link    | Detrend Steps                | DetrendSteps.php
    2223menutop   | menutop      | link    | Imfile Tables                | ImfileTables.php
    23 
    24 menutop   | menutop      | plain   | &nbsp;                       |
    25 
    26 menutop   | menutop      | plain   | External Links               | none           
    27 menutop   | menutop      | link    | test page                    | phptest.php     
  • trunk/ippMonitor/raw/ipp.php

    r9347 r9439  
    1313  echo '<input type="submit" name="login" value="login">', "\n";
    1414  echo '</form>', "\n\n";
     15}
     16
     17function projectform ($ID) {
     18    menu ('ipp.menu.dat', 'Select Project', 'ipp.css', $ID['link'], $ID['proj']);
     19    echo "<p> Please select the project of interest </p>\n";
     20    echo "<form action=\"SelectProject.php\" method=\"POST\">\n";
     21    echo "Project: <input type=\"text\" name=\"proj\"><br>\n";
     22    echo "<input type=\"submit\" name=\"project\">\n";
     23
     24    $pass = $ID['pass'];
     25    echo "<input type=\"hidden\" name=\"pass\" value=\"$pass\">\n";
     26    echo "</form>\n";
     27
     28    menu_end ();
    1529}
    1630
     
    5468  $success = $qry->fetchInto($row);
    5569  if (!$success) { 
    56     menu ('ipp.menu.dat', 'Login', 'ipp.css', '');
     70    menu ('ipp.menu.dat', 'Login', 'ipp.css', '', '');
    5771    echo "Login Failed, please try again<br>\n";
    5872    loginform ();
     
    97111function checkID () {
    98112
     113  $VERBOSE = 0;
     114
    99115  // check for valid server method
    100116  if (($_SERVER[REQUEST_METHOD] != 'POST') && ($_SERVER[REQUEST_METHOD] != 'GET')) {
    101     menu ('ipp.menu.dat', 'Login', 'ipp.css', '');
     117    menu ('ipp.menu.dat', 'Login', 'ipp.css', '', '');
    102118    echo "Invalid Client Request<br>\n";
    103119    menu_end ();
     
    110126    $ID['proj'] = $_GET[proj];
    111127    $ID['menu'] = $_GET[menu];
    112     // echo "using GET: ", $ID['pass'], $ID['proj'];
    113 
    114     // echo "GET list<br>\n";
    115     // foreach ($_GET as $key => $value) {
    116     // echo "$key : $value<br>\n";
    117     // }
     128
     129    if ($VERBOSE) {
     130      echo "using GET: ", $ID['pass'], $ID['proj'], "<br>\n";
     131      echo "GET list<br>\n";
     132      foreach ($_GET as $key => $value) {
     133        echo "$key : $value<br>\n";
     134      }
     135    }
    118136  }
    119137  if ($_SERVER[REQUEST_METHOD] == 'POST') {
     
    121139    $ID['proj'] = $_POST[proj];
    122140    $ID['menu'] = $_POST[menu];
    123     // echo "using POST: ", $ID['pass'], $ID['proj'];
    124 
    125     // echo "POST list<br>\n";
    126     // foreach ($_POST as $key => $value) {
    127     // echo "$key : $value<br>\n";
    128     // }
     141
     142    if ($VERBOSE) {
     143      echo "using POST: ", $ID['pass'], $ID['proj'], "<br>\n";
     144      echo "POST list<br>\n";
     145      foreach ($_POST as $key => $value) {
     146        echo "$key : $value<br>\n";
     147      }
     148    }
    129149  }
    130150
    131151  // user is not logged in at all
    132152  if ($ID['pass'] == "") {
    133     menu('ipp.menu.dat', 'Login', 'ipp.css', '');
     153    menu('ipp.menu.dat', 'Login', 'ipp.css', '', '');
    134154    logintext ();   
    135155    loginform ();
     
    153173  $success = $qry->fetchInto($row);
    154174  if (! $success) {
    155     menu('ipp.menu.dat', 'Login', 'ipp.css', '');
     175    menu('ipp.menu.dat', 'Login', 'ipp.css', '', '');
    156176    echo "unknown user, please login again<br>\n";
    157177    loginform ();
     
    170190}
    171191
    172 function menu ($source, $title, $sheet, $append) {
     192function menu ($source, $title, $sheet, $append, $project) {
    173193
    174194  echo "<html><head><title> $title </title></head>\n\n";
     
    178198  $root = "/phpipp";
    179199
     200  if (! $project) { $project = "none"; }
     201
    180202  $file = fopen ($source, "r");
    181203
     
    190212    $name = trim($line[3]);
    191213    $base = trim($line[4]);
     214
     215    if (preg_match ('|\$PROJECT|', $name)) {
     216      $name = preg_replace ('|\$PROJECT|', $project, $name);
     217    }
    192218
    193219    if ($append) {
  • trunk/ippMonitor/raw/ipp.science.dat

    r9399 r9439  
    1515menulink  | menuselect   | link    | Login                        | Login.php     
    1616menulink  | menuselect   | link    | Select Project               | SelectProject.php     
     17menulink  | menuselect   | link    | [$PROJECT]                   | SelectProject.php     
    1718
    1819menutop   | menutop      | plain   | &nbsp;                       |
    1920menutop   | menutop      | link    | Load and Setup               | LoadSetup.php
    20 menutop   | menutop      | link    | Science Steps                | ScienceSteps.php
     21menutops  | menutops     | link    | Science Steps                | ScienceSteps.php
    2122menutop   | menutop      | link    | Detrend Steps                | DetrendSteps.php
    2223menutop   | menutop      | link    | Imfile Tables                | ImfileTables.php
     
    2930menulink  | menuselect   | link    | P2 Pending Exp               | p2PendingExp.php             
    3031menulink  | menuselect   | link    | P3 Pending Exp               | p3PendingExp.php             
    31 
    32 menutop   | menutop      | plain   | &nbsp;                       |
    33 menutop   | menutop      | plain   | External Links               | none           
    34 menutop   | menutop      | link    | test page                    | phptest.php     
  • trunk/ippMonitor/raw/masterDetrendImfiles.php

    r9080 r9439  
    44
    55$ID = checkID ();
    6 if ($ID['proj']) {
    7   $db = dbconnect($ID['proj']);
    8 } else {
    9   $db = dbconnect('detrend');
    10 }
     6// require an explicit project
     7if (! $ID['proj']) { projectform ($ID); }
     8
     9$db = dbconnect($ID['proj']);
    1110
    1211if ($ID['menu']) {
     
    1615}
    1716
    18 menu($myMenu, 'Master Detrend Imfiles', 'ipp.css', $ID['link']);
     17menu($myMenu, 'Master Detrend Imfiles', 'ipp.css', $ID['link'], $ID['proj']);
    1918
    2019echo "<p> Master Detrend Imfiles </p>";
  • trunk/ippMonitor/raw/phptest.php

    r8984 r9439  
    33include 'ipp.php';
    44
    5 menu('ipp.menu.dat', 'test.page', 'ipp.css', '');
     5menu('ipp.menu.dat', 'test.page', 'ipp.css', '', '');
    66
    77$varlist = array ('SERVER_NAME', 'GATEWAY_INTERFACE', 'SERVER_PROTOCOL',
Note: See TracChangeset for help on using the changeset viewer.