Please login with individual username (not the generic 'trd').
";
exit;
}
if(isset($_POST['person'])) $uini = $_POST['person'];
if(isset($_GET['what'])) $what = $_GET['what'];
else {
echo "
ERROR: Received request without PSU type.
";
exit;
}
?>
New PSU ';
print 'Back to search ';
?>
Log Off
Voltage
ERROR: commit.php received Wiener LV PSU insertion request with empty data!";
print "
Back";
exit;
}
if($_POST['nrackid']=='NULL') $nrackid="NULL";
else $nrackid="'".$_POST['nrackid']."'";
if($_POST['nheight']=='NULL') $nheight="NULL";
else $nheight="'".$_POST['nheight']."'";
if($_POST['nlocid']=='NULL') $nlocid="NULL";
else $nlocid="'".$_POST['nlocid']."'";
$query = "INSERT INTO psu VALUES ('".$_POST['nserial']."',".$nrackid.",".$nheight;
$query .= ",'".$_POST['nstatus']."','".$_POST['ntype']."','".$_POST['nmacad']."','".$_POST['nfirmw'];
$query .= "',".$nlocid.",'".$uini."')";
$res = pg_query($query);
if($res){
print "New Wiener LV PSU successfully added!
";
print "
Back";
} else {
print '
ERROR : Query not executed and Wiener LV PSU not inserted.';
print '
Query:'.$query;
print '
Error message from gateDB:';
print '
'.pg_result_error($res);
print "
Back";
}
} else if($what=="hv"){
if (!$_POST['hvserial'] || !$_POST['hvtype']){
print "
ERROR: commit.php received Iseg HV PSU insertion request with empty data!";
print "
Back";
exit;
}
$query = "INSERT INTO psuhv VALUES ('";
$query .= $_POST['hvserial']."',".$_POST['hvsmid'].",'".$_POST['hvtype']."',";
$query .= $_POST['hvlocid'].",".$_POST['hvchann'].",'".$_POST['hvfirmw']."','".$_POST['hvstatus']."','".$uini."')";
$res = pg_query($query);
if($res){
print "New ISEG HV PSU successfully added!
";
print "
Back";
} else {
print '
ERROR : Query not executed and ISEG HV PSU not inserted.';
print '
Query:'.$query;
print '
Error message from gateDB:';
print '
'.pg_result_error($res);
print "
Back";
}
} else {
print "
ERROR: commit.php received unknown PSU type!";
print "
Back";
exit;
}
?>