IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 14, 2010, 1:03:51 PM (16 years ago)
Author:
eugene
Message:

add distribution pages, simplify menu def files

File:
1 edited

Legend:

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

    r26888 r26947  
    283283  if (! $project) { $project = "none"; }
    284284
    285   $file = fopen ($source, "r");
    286 
     285  // hardwire this name based on the configuration (use ipp.php.in)
    287286  global $DBHOST;
    288287  $HOST = $_SERVER['SERVER_NAME'];
     
    291290  echo "<table class=menu cellspacing=0px>\n";
    292291
     292  menulines ($source, $root, $append, $project);
     293
     294  echo '</table></td><td class="body" valign=top>', "\n\n";
     295}
     296
     297function menulines ($source, $root, $append, $project) {
     298
     299  $file = fopen ($source, "r");
     300
     301  // loop over the lines in the file and generate lines in the menu
    293302  while ($line = fgetcsv ($file, 1024, "|")) {
     303    if (ereg ('^[:blank:]*#', $line[0])) continue;
     304    if (count($line) < 2) continue;
     305
     306    if (count($line) == 2) {
     307      $value = trim($line[0]);
     308      if ($value == "input") {
     309        $value = trim($line[1]);
     310        menulines ($value, $root, $append, $project);
     311      }
     312      continue;
     313    }
    294314    if (count($line) != 5) continue;
    295     if (ereg ('^[:blank:]*#', $line[0])) continue;
    296315
    297316    $type = trim($line[2]);
     
    333352  }
    334353  fclose ($file);
    335   echo '</table></td><td class="body" valign=top>', "\n\n";
    336354}
    337355
     
    430448  }
    431449  if ($value == "") { return $where; }
    432 
    433   global $restricted;
    434   $restricted = 1;
    435 
    436450  if ($where) {
    437451    $where = $where . " AND";
Note: See TracChangeset for help on using the changeset viewer.