Changeset 10621
- Timestamp:
- Dec 11, 2006, 10:32:55 AM (19 years ago)
- Location:
- trunk/ippMonitor
- Files:
-
- 6 edited
-
def/autocode.php (modified) (2 diffs)
-
def/pzPendingExp.d (modified) (1 diff)
-
def/pzPendingImfile.d (modified) (1 diff)
-
raw/ipp.css (modified) (1 diff)
-
raw/ipp.imfiles.dat (modified) (1 diff)
-
raw/ipp.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/def/autocode.php
r9439 r10621 20 20 echo "<p> $TITLE </p>"; 21 21 22 // set up the form 23 echo "<form action=\"$FILE\" method=\"POST\">\n"; 24 22 25 // define restrictiosn to the queries 23 26 // ** TABLE RESTRICTIONS ** 24 27 28 // get the result table count 29 if ($WHERE) { 30 $sql = "SELECT count(*) FROM $TABLE WHERE $WHERE"; 31 } else { 32 $sql = "SELECT count(*) FROM $TABLE"; 33 } 34 $qry = $db->query($sql); 35 if (DB::iserror($db)) { 36 echo "<b>error reading $TABLE table count</b><br>\n"; 37 menu_end(); 38 } 39 if (!$qry->fetchInto($row)) { 40 echo "<b>error reading $TABLE table count</b><br>\n"; 41 menu_end(); 42 } 43 // set up the row counter variables 44 if ($ID['from']) { 45 $rowStart = $ID['from']; 46 } else { 47 $rowStart = 0; 48 } 49 $rowLast = $rowStart + $dTABLE; 50 $rowTotal = $row[0]; 51 if ($rowLast > $rowTotal) { $rowLast = $rowTotal; } 52 echo "<b> $rowStart to $rowLast of $rowTotal items</b><br>\n"; 53 25 54 // query the database 26 55 if ($WHERE) { 27 $sql = "SELECT $FIELDS FROM $TABLE WHERE $WHERE LIMIT 40";56 $sql = "SELECT $FIELDS FROM $TABLE WHERE $WHERE LIMIT $dTABLE OFFSET $rowStart"; 28 57 } else { 29 $sql = "SELECT $FIELDS FROM $TABLE LIMIT 40";58 $sql = "SELECT $FIELDS FROM $TABLE LIMIT $dTABLE OFFSET $rowStart"; 30 59 } 31 60 … … 38 67 // ** HEAD CODE ** 39 68 40 // set up the table and form 41 echo "<form action=\"$FILE\" method=\"POST\">\n"; 69 if ($rowStart > 0) { 70 $value = 0; 71 $link = "$FILE" . "?" . $ID['link'] . "&from=$value"; 72 echo "<a width=10 class=\"button\" href=\"$link\"><<</a>\n"; 73 } else { 74 echo "<<\n"; 75 } 76 if ($rowStart >= $dTABLE) { 77 $value = $rowStart - $dTABLE; 78 $link = "$FILE" . "?" . $ID['link'] . "&from=$value"; 79 echo "<a class=\"button\" href=\"$link\"><</a>\n"; 80 } else { 81 echo "<\n"; 82 } 42 83 84 if ($rowLast < $rowTotal) { 85 $value = $rowStart + $dTABLE; 86 $link = "$FILE" . "?" . $ID['link'] . "&from=$value"; 87 echo "<a class=\"button\" href=\"$link\">></a>\n"; 88 } else { 89 echo ">\n"; 90 } 91 92 if ($rowLast < $rowTotal) { 93 $value = $rowTotal - $dTABLE; 94 $link = "$FILE" . "?" . $ID['link'] . "&from=$value"; 95 echo "<a class=\"button\" href=\"$link\">>></a>\n"; 96 } else { 97 echo ">>\n"; 98 } 99 100 echo " : or enter start row: <input type=\"text\" name=\"from\" size=\"5\" value=\"$rowStart\">\n"; 101 102 // set up the table 43 103 echo "<table class=list>\n"; 44 104 echo "<tr>\n"; -
trunk/ippMonitor/def/pzPendingExp.d
r9009 r10621 8 8 FIELD camera, 20, camera 9 9 FIELD telescope, 20, telescope 10 FIELD exp_type, 20, type11 FIELD imfiles, 20, N files -
trunk/ippMonitor/def/pzPendingImfile.d
r9323 r10621 8 8 FIELD camera, 20, camera 9 9 FIELD telescope, 20, telescope 10 FIELD bytes, 20, number of bytes11 FIELD md5sum, 20, checksum12 10 FIELD class, 20, class 13 11 FIELD class_id, 20, class ID 14 FIELD uri, 20, URI -
trunk/ippMonitor/raw/ipp.css
r9439 r10621 9 9 a:link, a:visited, a:active { text-decoration: underline; font-weight: bold; color: #ff0000 } 10 10 11 a.menutop { text-decoration: none; color: #ffffff; font-weight: bold } 12 a.menutops { text-decoration: none; color: #80f0ff; font-weight: bold } 13 a.menuext { text-decoration: none; color: #ffffff; font-weight: bold } 11 a.button { text-decoration: none; font-weight: bold; color: #000000; background: #0080c0} 12 a.menutop { text-decoration: none; font-weight: bold; color: #ffffff} 13 a.menutops { text-decoration: none; font-weight: bold; color: #80f0ff} 14 a.menuext { text-decoration: none; font-weight: bold; color: #ffffff} 14 15 a.menulink { text-decoration: none; font-weight: normal; color: #000000} 15 16 a.menuselect { text-decoration: none; font-weight: normal; color: #0000ff} -
trunk/ippMonitor/raw/ipp.imfiles.dat
r9439 r10621 32 32 menulink | menuselect | link | detResidImfile | detResidImfile.php 33 33 menulink | menuselect | link | masterDetrendImfiles | masterDetrendImfiles.php 34 menulink | menuselect | link | detMasterImfile | detMasterImfile.php35 34 menulink | menuselect | link | pzPendingImfile | pzPendingImfile.php 36 35 menulink | menuselect | link | p2PendingImfile | p2PendingImfile.php -
trunk/ippMonitor/raw/ipp.php
r9439 r10621 1 1 <?php 2 3 $dTABLE = 40; 2 4 3 5 function logintext () { … … 126 128 $ID['proj'] = $_GET[proj]; 127 129 $ID['menu'] = $_GET[menu]; 130 $ID['from'] = $_GET[from]; 128 131 129 132 if ($VERBOSE) { … … 139 142 $ID['proj'] = $_POST[proj]; 140 143 $ID['menu'] = $_POST[menu]; 144 $ID['from'] = $_POST[from]; 141 145 142 146 if ($VERBOSE) {
Note:
See TracChangeset
for help on using the changeset viewer.
