Changeset 9009 for trunk/ippMonitor/raw/ipp.php
- Timestamp:
- Sep 27, 2006, 2:14:15 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/raw/ipp.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/raw/ipp.php
r9008 r9009 19 19 // connect to the database 20 20 require_once('DB.php'); 21 #$db = DB::connect("mysql://ipp:ipp@localhost/ipp");21 // $db = DB::connect("mysql://ipp:ipp@localhost/ipp"); 22 22 $db = DB::connect("mysql://ipp:ipp@localhost/detrend"); 23 23 if (DB::iserror($db)) { … … 81 81 $ID['menu'] = $_GET[menu]; 82 82 // echo "using GET: ", $ID['pass'], $ID['proj']; 83 84 // echo "GET list<br>\n"; 85 // foreach ($_GET as $key => $value) { 86 // echo "$key : $value<br>\n"; 87 // } 83 88 } 84 89 if ($_SERVER[REQUEST_METHOD] == 'POST') { … … 87 92 $ID['menu'] = $_POST[menu]; 88 93 // echo "using POST: ", $ID['pass'], $ID['proj']; 94 95 // echo "POST list<br>\n"; 96 // foreach ($_POST as $key => $value) { 97 // echo "$key : $value<br>\n"; 98 // } 89 99 } 90 100 … … 178 188 179 189 function check_restrict ($key, $where) { 180 // echo "key: $key<br>\n";190 $htmlkey = preg_replace ('|\.|', '_', $key); 181 191 if ($_SERVER[REQUEST_METHOD] == 'GET') { 182 $value = $_GET[$ key];192 $value = $_GET[$htmlkey]; 183 193 // echo "using GET<br>\n"; 184 194 } else { 185 $value = $_POST[$ key];195 $value = $_POST[$htmlkey]; 186 196 // echo "using POST<br>\n"; 187 197 } … … 199 209 } 200 210 201 function write_query_row ($key) { 202 $value = $_POST[$key]; 211 function write_query_row ($key, $width) { 212 $htmlkey = preg_replace ('|\.|', '_', $key); 213 $value = $_POST[$htmlkey]; 203 214 if (($_SERVER[REQUEST_METHOD] == 'POST') && $value) { 204 echo "<td class=\"list\"> <input type=\"text\" name=\"$key\" value=\"$value\"> </td>\n";215 echo "<td class=\"list\"> <input type=\"text\" name=\"$key\" size=\"$width\" value=\"$value\"> </td>\n"; 205 216 } else { 206 echo "<td class=\"list\"> <input type=\"text\" name=\"$key\" > </td>\n";217 echo "<td class=\"list\"> <input type=\"text\" name=\"$key\" size=\"$width\"> </td>\n"; 207 218 } 208 219 } 209 220 210 221 // expect image supplied with key=name 222 // this function should define matching hidden inputs in the form 211 223 function insert_image ($key) { 212 224
Note:
See TracChangeset
for help on using the changeset viewer.
