Index: trunk/dvodist/www-util/dvodist.page.mkd
===================================================================
--- trunk/dvodist/www-util/dvodist.page.mkd	(revision 40735)
+++ trunk/dvodist/www-util/dvodist.page.mkd	(revision 40737)
@@ -20,5 +20,5 @@
 menu("$utils/dvodist.menu.dat", 'DVO Distribution Server', $rootdir, "$rootdir/ipp.css", '', '');
 
-$script = basename($_SERVER[SCRIPT_NAME]);
+$script = basename($_SERVER['SCRIPT_NAME']);
 do_markdown ($script, $rootdir);
 
Index: trunk/dvodist/www-util/ipp.page.mkd
===================================================================
--- trunk/dvodist/www-util/ipp.page.mkd	(revision 40735)
+++ trunk/dvodist/www-util/ipp.page.mkd	(revision 40737)
@@ -19,5 +19,5 @@
 menu("$utils/ipp.menu.dat", 'DVO Distribution Server', $rootdir, "$rootdir/ipp.css", '', '');
 
-$script = basename($_SERVER[SCRIPT_NAME]);
+$script = basename($_SERVER['SCRIPT_NAME']);
 do_markdown ($script);
 
Index: trunk/dvodist/www-util/ipp.php
===================================================================
--- trunk/dvodist/www-util/ipp.php	(revision 40735)
+++ trunk/dvodist/www-util/ipp.php	(revision 40737)
@@ -56,5 +56,5 @@
   // loop over the lines in the file and generate lines in the menu
   while ($line = fgetcsv ($file, 1024, "|")) {
-    if (ereg ('^[:blank:]*#', $line[0])) continue;
+    if (preg_match ('/^\s*#/', $line[0])) continue;
     if (count($line) < 2) continue;
 
@@ -81,17 +81,16 @@
 
     // append additional elements if needed
+    $link = "$base";
     if ($append) {
       $link = "$base" . "?" . $append;
-    } else {
-      $link = "$base";
     }
 	
     // prepend the rootdir if needed (reference to /)
-    if ($link[0] == '/') {
+    if (substr($link, 0, 1) == "/") {
       $link = $root . $link;
     } 
 
     // hi-lite the current page (use select-style, not style)
-    $thisname = $_SERVER[SCRIPT_NAME]; 
+    $thisname = $_SERVER['SCRIPT_NAME']; 
     $page = $root . $base;
     if ($page == $thisname) {
@@ -147,5 +146,5 @@
   // loop over the lines in the file and generate lines in the menu
   while ($line = fgetcsv ($file, 1024, ":")) {
-    if (ereg ('^[:blank:]*#', $line[0])) continue;
+    if (preg_match ('/^\s*#/', $line[0])) continue;
     if (count($line) < 2) continue;
 
@@ -205,5 +204,5 @@
     $inline = trim ($inlist[$i], "@ \t");
     $line = explode (":", $inline);
-    if (ereg ('^[:blank:]*#', $line[0])) continue;
+    if (preg_match ('/^\s*#/', $line[0])) continue;
     if (count($line) < 2) continue;
 
Index: trunk/dvodist/www-util/ippdata.page.mkd
===================================================================
--- trunk/dvodist/www-util/ippdata.page.mkd	(revision 40735)
+++ trunk/dvodist/www-util/ippdata.page.mkd	(revision 40737)
@@ -18,5 +18,5 @@
 menu("$utils/ippdata.menu.dat", 'Pan-STARRS 1 Data Distribution Server', $rootdir, "$rootdir/ipp.css", '', '');
 
-$script = basename($_SERVER[SCRIPT_NAME]);
+$script = basename($_SERVER['SCRIPT_NAME']);
 do_markdown ($script, $rootdir);
 
