Cover V12, I05
may2003.tar

Listing 1 Sort-by-date Patch for NPI 0.1a

The following patch should be applied to the index.php file using the following 
command:

patch -u index.php patch.diff

--------copy all below this line and save it as patch.diff ----------
--- index2.php    Wed Dec 11 21:05:44 2002
+++ index.php    Wed Dec 11 21:59:49 2002
@@ -222,6 +222,24 @@
 $cats = array();
 while (($row = mysql_fetch_row($eid))) { $cats[] = $row[0]; }
 mysql_free_result($eid);
+
+
+//
+// Begin Modifications by Tony Howlett and Lorell Hathcock
+//
+
+$nsssql = "SELECT DISTINCT scandate FROM scans ORDER BY scandate;";
+$nsseid = sqlquery($nsssql);
+$nssdates = array();
+$nssdates2 = array();
+while (($nssrow = mysql_fetch_row($nsseid))) { $nssdates[] = $nssrow[0]; }
+$nssdates2 = $nssdates;
+mysql_free_result($nsseid);
+
+//
+// End Modifications by Tony Howlett and Lorell Hathcock
+//
+
 ?>
 
 <FORM method=GET action="index.php">
@@ -270,10 +288,39 @@
         echo htmlentities($host); ?>"></TD>
     <TD><INPUT name="port" type="text" maxlength="5" size="5" \
         value="<?php echo htmlentities($port); ?>"></TD>
-    <TD NOWRAP>From: <INPUT name="sdate" type="text" maxlength="10" \
-        size="10" value="<?php echo htmlentities($sdate); ?>">&nbsp;&nbsp;
-        To: <INPUT name="edate" type="text" maxlength="10" size="10" \
-        value="<?php echo htmlentities($edate); ?>"></TD>
+    <TD NOWRAP>From:
+
+
+<!-----------------
+//
+// Begin Modifications by Tony Howlett and Lorell Hathcock
+// ------------>
+
+    <SELECT name="sdate" size="1">
+    <OPTION value=""<?php if (!$sdate) echo " SELECTED"; ?>>- Any -</OPTION>
+<?php    while (list($i, $c) = each($nssdates)) {
+      echo '        <OPTION value="', htmlentities($c), '"';
+      if ($c == $sdate) echo " SELECTED";
+      echo '>', htmlentities($c), "</OPTION>\n";
+    } ?>
+        </SELECT>
+
+    &nbsp;&nbsp;To:
+
+    <SELECT name="edate" size="1">
+    <OPTION value=""<?php if (!$edate) echo " SELECTED"; ?>>- Any -</OPTION>
+<?php    while (list($i, $c) = each($nssdates2)) {
+      echo '        <OPTION value="', htmlentities($c), '"';
+      if ($c == $edate) echo " SELECTED";
+      echo '>', htmlentities($c), "</OPTION>\n";
+    } ?>
+        </SELECT>
+<!-----------------
+//
+// End Modifications by Tony Howlett and Lorell Hathcock
+// ------------>
+
+    </TD>
     <TD><Input type="submit" value="Search"></TD>
     <TD><Input type="reset"></TD>
        </TR>