$self_name $item_id\n"; echo "
\n" ."\n" ."\n" ."\n" ."\n" ."\n" ."\n" ."\n" ##---------------- ."\n\n" ##---------------- . ($modstr ? "\n" : "" ) ##---------------- . ($comment ? "\n" : "" ) ##---------------- ."\n
\n" ."\n" ."\n" ."\n" ."\n" ."\n" ."\n" ."\n" . $modstr ."
You want to changefromtowork date
\n" ."
". "

Your comment is:

\n"
			 ."$comment

\n" ."
\n" ##---------------- . ($errflag ? "" : "\n" ) ."\n" .' OR Press the Back button of your browser' .' to edit your input
'; ; } else { send_html_header("$self_name $item_id"); echo "

$self_name $item_id

\n"; echo "\n" ."\n" ."\n" ."You didn't modify anything. " ."\n" ; } send_common_trailer(); exit; } ################################################################ if($confirm) { ## HTML-escape all posted data and reset vars in current scope esc_r($HTTP_POST_VARS); extract($HTTP_POST_VARS, EXTR_OVERWRITE); $err = ''; $op = 'edit_analog_cable'; if(!start_transaction($conn,$op,$scriptid,$comment)) { $err .= "Can't start transaction."; } else { ## ---------------------------------------------------------------- $sernum = make_sernum($conn, $item_id, $item_type); ## ---------------------------------------------------------------- if($comment) { $q = pg_exec( $conn, "INSERT INTO item_comment" ." (tn,sernum,workdate)" ." values" ." (currval('tn'),$sernum,'now');" ); if(!$q) { $err .= "Error setting comment.
\n"; } } ## ---------------------------------------------------------------- $res = check_change4('status', $HTTP_POST_VARS); if($res['error']) { $err .= "Error verifying 'status' vars: $res[error].
\n"; } elseif($res['diff']) { $err .= edit_set_selected( $sernum, $status, $status_date, 'status', 'statuses', 'status'); } ## ================================================================ if(!$err) { if(!pg_exec($conn, "COMMIT;")) { $err .= "Error commiting changes."; } } } ################################################################ ## Exit on a error. But, if DB is successfully modified ## just continue to display an updated page. if($err) { pg_exec($conn, "ROLLBACK;"); echo "\n" ."$err
\n" ."Database has not been modified.\n" ."\n" ."\n" ."\n" ."
\n" ; send_common_trailer(); exit; } } ################################################################ # Query DB about current item parameters ## ================================================================ ## Prepare status info $res = edit_get_status($item_id, $item_type); if($statusarr['error']) { echo "$res[error]
"; } $status = $res['status']; $status_date = $res['date']; $status_set = $res['isset']; $status_options = $res['options']; ## ================================================================ ## Is this cable connected? $res = cable_get_bases(ANALOG_CABLE_TYPE, $sernum); if($res['error']) { echo "$res[error]
"; } $cabling_lastdate = $res['last_date']; $cable_bases = $res['data']; ## ---------------------------------------------------------------- ## If cable in is connected, what is the chamber module position ## in the Cradle? if($cable_bases[1]['base_id'] != "") { $res = edit_get_base($cable_bases[1]['base_id']); if($res['error']) { echo "$res[error]
"; } $cradle_sernum = $res['base_sernum']; $cradle_point = $res['point']; } ## ---------------------------------------------------------------- $comments = get_comments($sernum); ################################################################ # Display a form with current parameters as default values send_html_header("$self_name $item_id"); #echo "
\n";
#print_r($cable_bases);
#echo "
\n"; echo "
\n" ."

$self_name $item_id

\n" ."\n" ."\n" # -------------------------------- ."
\n" ."

Status:" ."\n" ."\n" . ($status_set? "" : "(default) " ) ." Status change date: " ."\n" ."\n" ."\n" ."

\n" # -------------------------------- ."

\n" ; $str = "\n" ."\n" ; reset($cable_bases); while(list($key, $val) = each($cable_bases)) { $str .= "" ."" .( $val['base_id'] == "" ? "" : "" ) ."\n"; } $str .= "
Cable endConnected to
$val[iname](not connected)$val[base_description] " .( $val['item_point'] == 1 ? ("" . format_default_id($val['base_id']) ."") : href2($val['base_id'], format_default_id($val['base_id'])) ) ." as $val[name]
\n"; echo $str; #================================================================ echo "" ."

\n" # -------------------------------- ."
\n" ."

Comment to add
\n" .' ' ."

\n" # ---------------- ."
\n" ."\n" ."\n" ."
\n" # ---------------------------------------------------------------- .( $comments ? "

\n" ."Existing comments about " ."$self_name $item_id:\n" . $comments ."
\n" : "" ) # ---------------------------------------------------------------- ."
\n" ; ################################################################ ?>