"; // display the form if ($usersave) { if ($discrepancy_text && $reported_by) { format_message(0,"Writeup modified. Return to Open Writeups page."); } if (!$discrepancy_text) { format_message(1,"You didn't enter any discrepancy text. Please try again."); } if (!$reported_by) { format_message(1,"You didn't enter your name in the Reported by: block. Please try again."); } } if ($techsave) { if ($role && $action_text) { format_message(0,"Writeup modified. Return to Open Writeups page."); } if ($role && !$action_text) { format_message(1,"You didn't enter any action taken text. Please try again."); } } echo "
"; // start writeup table section if ($status==1) $statusind="OPEN"; if ($status==2) $statusind="CLSD"; if ($status==3) $statusind="DFRD"; echo " "; $effstate=$nefstate=""; if($period_effective==1) { $effstate="checked"; $eff_ind="Effective"; } if($period_effective==0) { $nefstate="checked"; $eff_ind="Non-Effective"; } $openstate=$closedstate=$deferredstate=""; if($status==1) $openstate="selected"; if($status==2) $closedstate="selected"; if($status==3) $deferredstate="selected"; echo " "; } else { echo "
Writeup ID
$id
Device
"; if ($useredit) { echo " "; } else { $dname=dblookup($drs_db,"devices","id","name",$device); echo "
$dname
"; } echo "
Subsystem
"; if ($useredit) { echo " "; } else { $ssname=dblookup($drs_db,"subsystems","id","name",$subsystem); $ssdesc=dblookup($drs_db,"subsystems","id","description",$subsystem); echo "
$ssname
"; } echo "
Period
"; if ($useredit) { echo " "; } else { $pertimes=dblookup($drs_db,"periods","id","times",$period); echo "
$period
"; } echo "
Report Date
"; if ($useredit) { echo "
$report_date
"; } echo " Report Time
"; if ($useredit) { echo " "; } else { echo "
$report_time
"; } echo " Discrepancy (required)
"; if ($useredit) { echo "
"; } else { echo "
$discrepancy_text

"; } echo " Reported by (required)
"; if ($useredit) { echo " "; } else { echo "
$reported_by
"; } echo " Sim period effective?  
"; if ($useredit) { echo " Yes      No "; } else { echo "
$eff_ind
"; } echo " "; if ($useredit) { echo " "; } else { $wustat=dblookup($drs_db,"writeups","id","status",$id); if ($wustat==2 && !$role) $allowuseredit="disabled"; echo " "; } // end of user section echo " Status
"; if ($techedit) { echo " "; } else { echo "
$statusind
"; } echo " Action taken by
"; if ($techedit) { if ($role==ADMIN) { // allow selection of tech name echo " "; } else { // limit the choice to the tech in question echo " "; } } else { $techfname=dblookup($drs_db,"users","id","firstname",$action_by); $techlname=dblookup($drs_db,"users","id","lastname",$action_by); echo "
$techfname $techlname 
"; } echo " Status change reason
"; if ($techedit) { echo " "; } else { $reasonname=dblookup($drs_db,"reasons","id","text",$action_reason); echo"
$reasonname 
"; } echo " Action Taken (required)
"; if ($techedit) { echo "
"; } else { echo "
$action_text 
"; } echo " Action Taken Date
"; if ($techedit) { echo " "; } else { echo "
$action_date
"; } echo " Action Taken Time
"; if ($techedit) { echo " "; } else { echo "
$action_time
"; } if ($techedit) { echo " "; } else { if (!$role) $live="disabled"; echo " "; } echo "

"; banner($print); pageblock("right","end"); pagetable("end"); framework("end","","",$print); ?>