"); ?>

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

"); echo "

Details for ISEG HV module with serial $serial

"; // get the list of current locations: $idarray = array(); $locarray = array(); $locquery = "SELECT * FROM loc"; $locres = pg_query($locquery) or die ("
ERROR - Couldn't execute location query: ".$locquery); if(pg_num_rows($locres) != 0){ while ($locrow = pg_fetch_array($locres)){ extract($locrow); $idarray[] = "L".$loc_id; $locarray[] = $name; } } else die ("
ERROR: cannot get the list of current locations."); $NumLoc = sizeof($locarray); print "

Change Location & Status

"; print '
'; print 'Move it to: '; print '
And/or change its current status to: '; print ''; print ''; print '
     '; print '  
'; echo "

Comments:

"; $cmntquery = "SELECT cmnt_id FROM psuhv_cmnt_link WHERE psuhv_id='".$serial."'"; $cmntres = pg_query($cmntquery) or die ("
Cannot execute comment query: ".$cmntquery); if(pg_num_rows($cmntres) != 0){ $Comment = array('who','when','title','body'); $NumPars = sizeof($Comment); echo ''; echo Array_to_HTML_Table($Comment,$NumPars); while ($idrow = pg_fetch_array($cmntres)){ // loop over comments extract($idrow); $textquery = "SELECT * FROM comment WHERE cmnt_id=".$cmnt_id; $textres = pg_query($textquery) or die ("
Cannot execute comment text query: ".$textquery); if(pg_num_rows($textres) != 0){ $textrow = pg_fetch_array($textres); extract($textrow); $CurrentComment = array($person,$timestamp,$title,$body); echo Array_to_HTML_Table($CurrentComment,$NumPars); } else { $CurrentComment = array('-','-','-','-'); echo Array_to_HTML_Table($CurrentComment,$NumPars); } } // loop over comments echo '
'; // close table } else echo "there are no comments recorded for this iseg module."; print '

Add a comment

'; echo "

History:

"; $histquery = "SELECT * FROM psuhv_old WHERE psuhv_id='".$serial."'"; $histres = pg_query($histquery) or die ("
ERROR - Couldn't execute history query: ".$histquery); $histnum = pg_num_rows($histres); if($histnum != 0){ $HistPars = array('location','type','status','firmware','person','begin','end'); $NumPars = sizeof($HistPars); echo ''; echo Array_to_HTML_Table($HistPars,$NumPars); while ($histrow = pg_fetch_array($histres)){ extract($histrow); if(isset($loc_id)){ $locq = "SELECT name FROM loc WHERE loc_id=".$loc_id; $resq = pg_query($locq) or die ("
ERROR - Couldn't execute location query: ".$locq); $rowq = pg_fetch_array($resq); extract($rowq); $location = $name; } else $location = $sm_id; $HistVals = array($location,$type,$status,$firmware,$person,substr($begin_time,0,19),substr($end_time,0,19)); echo Array_to_HTML_Table($HistVals,$NumPars); } echo '
'; // close table } else echo "there is no recorded history for this iseg module."; print "
Back"; ?>