IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 27, 2006, 2:14:15 PM (20 years ago)
Author:
eugene
Message:

added field width

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/raw/ipp.php

    r9008 r9009  
    1919  // connect to the database
    2020  require_once('DB.php');
    21 # $db = DB::connect("mysql://ipp:ipp@localhost/ipp");
     21  // $db = DB::connect("mysql://ipp:ipp@localhost/ipp");
    2222  $db = DB::connect("mysql://ipp:ipp@localhost/detrend");
    2323  if (DB::iserror($db)) {
     
    8181    $ID['menu'] = $_GET[menu];
    8282    // 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    // }
    8388  }
    8489  if ($_SERVER[REQUEST_METHOD] == 'POST') {
     
    8792    $ID['menu'] = $_POST[menu];
    8893    // 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    // }
    8999  }
    90100
     
    178188
    179189function check_restrict ($key, $where) {
    180   // echo "key: $key<br>\n";
     190  $htmlkey = preg_replace ('|\.|', '_', $key);
    181191  if ($_SERVER[REQUEST_METHOD] == 'GET') {
    182     $value = $_GET[$key];
     192    $value = $_GET[$htmlkey];
    183193    // echo "using GET<br>\n";
    184194  } else {
    185     $value = $_POST[$key];
     195    $value = $_POST[$htmlkey];
    186196    // echo "using POST<br>\n";
    187197  }
     
    199209}
    200210
    201 function write_query_row ($key) {
    202   $value = $_POST[$key];
     211function write_query_row ($key, $width) {
     212  $htmlkey = preg_replace ('|\.|', '_', $key);
     213  $value = $_POST[$htmlkey];
    203214  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";
    205216  } 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";
    207218  }
    208219}
    209220
    210221// expect image supplied with key=name
     222// this function should define matching hidden inputs in the form
    211223function insert_image ($key) {
    212224
Note: See TracChangeset for help on using the changeset viewer.