Changeset 13566 for trunk/ippMonitor/raw/ipp.php
- Timestamp:
- May 30, 2007, 6:13:58 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/raw/ipp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/raw/ipp.php
r13264 r13566 1 1 <?php 2 2 3 $dTABLE = 10;3 $dTABLE = 80; 4 4 5 5 function logintext () { … … 282 282 } 283 283 284 function navigate_buttons ($rowStart, $rowLast, $dTABLE, $rowTotal, $buttonLink, $ID, $file) { 285 286 if ($rowStart > 0) { 287 $value = 0; 288 $link = "$file" . "?" . $ID['link'] . "&from=$value"; 289 if ($buttonLink != "") { 290 $link = $link . "&$buttonLink"; 291 } 292 echo "<a width=10 class=\"button\" href=\"$link\"><<</a>\n"; 293 } else { 294 echo "<<\n"; 295 } 296 if ($rowStart >= $dTABLE) { 297 $value = $rowStart - $dTABLE; 298 $link = "$file" . "?" . $ID['link'] . "&from=$value"; 299 if ($buttonLink != "") { 300 $link = $link . "&$buttonLink"; 301 } 302 echo "<a class=\"button\" href=\"$link\"><</a>\n"; 303 } else { 304 echo "<\n"; 305 } 306 307 if ($rowLast < $rowTotal) { 308 $value = $rowStart + $dTABLE; 309 $link = "$file" . "?" . $ID['link'] . "&from=$value"; 310 if ($buttonLink != "") { 311 $link = $link . "&$buttonLink"; 312 } 313 echo "<a class=\"button\" href=\"$link\">></a>\n"; 314 } else { 315 echo ">\n"; 316 } 317 318 if ($rowLast < $rowTotal) { 319 $value = $rowTotal - $dTABLE; 320 $link = "$file" . "?" . $ID['link'] . "&from=$value"; 321 if ($buttonLink != "") { 322 $link = $link . "&$buttonLink"; 323 } 324 echo "<a class=\"button\" href=\"$link\">>></a>\n"; 325 } else { 326 echo ">>\n"; 327 } 328 } 329 284 330 function check_restrict ($key, $where) { 285 331 $htmlkey = preg_replace ('|\.|', '_', $key); 286 332 if ($_SERVER[REQUEST_METHOD] == 'GET') { 287 333 $value = $_GET[$htmlkey]; 288 // echo "using GET: $value<br>\n";289 334 } else { 290 335 $value = $_POST[$htmlkey]; 291 // echo "using POST: $value<br>\n"; 292 } 293 // echo "value: $value<br>\n"; 336 } 294 337 if ($value != "") { 295 338 if ($where) { 296 339 $where = $where . " AND $key = '$value'"; 297 // echo "where 1: $where<br>\n";298 340 } else { 299 $where = "$key = '$value'"; 300 // echo "where 2: $where<br>\n"; 341 $where = "WHERE $key = '$value'"; 301 342 } 302 343 } 303 344 return $where; 345 } 346 347 function check_ordering ($where) { 348 349 if ($_SERVER[REQUEST_METHOD] == 'GET') { 350 $value = $_GET['sort']; 351 } else { 352 $value = $_POST['sort']; 353 } 354 if ($value != "") { 355 $where = $where . " ORDER BY $value"; 356 } 357 return $where; 358 } 359 360 function button_restrict ($key, $line) { 361 $htmlkey = preg_replace ('|\.|', '_', $key); 362 if ($_SERVER[REQUEST_METHOD] == 'GET') { 363 $value = $_GET[$htmlkey]; 364 } else { 365 $value = $_POST[$htmlkey]; 366 } 367 if ($value != "") { 368 if ($line) { 369 $line = $line . "&$key=$value"; 370 } else { 371 $line = "$key=$value"; 372 } 373 } 374 return $line; 375 } 376 377 function write_table_header ($class, $name, $value, $buttonLink, $ID, $file) { 378 379 $link = "$file" . "?" . $ID['link'] . "&sort=$value"; 380 if ($buttonLink != "") { 381 $link = $link . "&$buttonLink"; 382 } 383 echo "<th class=\"$class\"><a href=\"$link\"> $name </a></th>\n"; 304 384 } 305 385 306 386 function write_query_row ($key, $width) { 307 387 $htmlkey = preg_replace ('|\.|', '_', $key); 308 $value = $_POST[$htmlkey]; 309 if (($_SERVER[REQUEST_METHOD] == 'POST') && $value) { 388 if ($_SERVER[REQUEST_METHOD] == 'GET') { 389 $value = $_GET[$htmlkey]; 390 } else { 391 $value = $_POST[$htmlkey]; 392 } 393 if ($value != "") { 310 394 echo "<td class=\"list\"> <input type=\"text\" name=\"$key\" size=\"$width\" value=\"$value\"> </td>\n"; 311 395 } else { 312 396 echo "<td class=\"list\"> <input type=\"text\" name=\"$key\" size=\"$width\"> </td>\n"; 397 } 398 } 399 400 function write_table_cell ($class, $link, $value) { 401 $myValue = $value; 402 if ($myValue == "") { $myValue = " "; } 403 404 if ($link) { 405 echo "<td class=\"$class\"><a href=\"$link\"> $myValue </a></td>\n"; 406 } else { 407 echo "<td class=\"$class\"> $myValue </td>\n"; 313 408 } 314 409 }
Note:
See TracChangeset
for help on using the changeset viewer.
