Please login with individual username (not the generic 'trd').

"; exit(0); } if(isset($_GET['uini'])) $uini = $_GET['uini']; ?>

New PSU    '; print 'Back to search    '; ?> Log Off

ERROR: PSU serial number not set!"); if(isset($_GET['what'])) $what = $_GET['what']; else die ("
ERROR: PSU type not set!"); if(!$_POST['title']){ if($what=="lv") print '

Add comment for Wiener LV module '.$serial.':

'; if($what=="hv") print '

Add comment for ISEG HV module '.$serial.':

'; print '
'; print '
Comment Title: '; $default = 'Type comment body here...'; print '
Comment Body:
'; print '
'; print '  
'; } if($_POST['title'] && $_POST['body']){ $title = trim($_POST['title']); $body = trim($_POST['body']); pg_query("BEGIN"); $last_value = -1; // insert comment $query = "INSERT INTO comment (person,title,body) VALUES ('".$uini."','".$title."','".$body."')"; $query = $query." RETURNING cmnt_id"; $result = pg_query($query); if(!$result){ pg_query("ROLLBACK"); die ("
ERROR - Cannot execute comment update: ".$query); } if(pg_num_rows($result) != 0){ $row = pg_fetch_array($result); extract($row); $last_value = $cmnt_id; } else { pg_query("ROLLBACK"); die ("
ERROR: last sequence value not retrived!"); } if($last_value<0){ pg_query("ROLLBACK"); die ("
ERROR - Comment index lost! Nothing changed..."); } if($what=="lv") $lquery = "INSERT INTO psu_cmnt_link VALUES (".$last_value.",'".$serial."')"; else if($what=="hv") $lquery = "INSERT INTO psuhv_cmnt_link VALUES (".$last_value.",'".$serial."')"; else { pg_query("ROLLBACK"); die ("
ERROR - Undefined PSU type received! Aborting..."); } $lres = pg_query($lquery); if($lres) { print '

Comment successfully uploaded!

'; } else { pg_query("ROLLBACK"); die ("
ERROR - Cannot execute update: ".$lquery.'
'.pg_result_error($lres)); } pg_query("COMMIT"); print "
Back"; } ?>