##
%fields = (
ID => [0, 'Link ID:', 'text'],
change_type => [1, 'Type Of Change:', 'drop'],
change_summary => [2, 'Summary Of Change :', 'text'],
machines => [3, 'Machines involved :', 'drop'],
date => [4, 'Date of change:', 'text'],
time => [5, 'Time of change:', 'text'],
change_reason => [6, 'Reason for change:', 'textarea']
);
%fields_drop = ( #types of system change
'sys' => 'sys',
'ops' => 'ops',
'cmd' => 'cmd');
####
sub build_record_page {
my (%record) = @_;
my ($val) = "";
my ($html) = qq~
Record
~;
foreach $obj (@db_fields) {
if ($obj eq $db_key) {
next;
}
$html .= qq~$db_name{$obj} ~;
if ($db_type{$obj} eq "text") { # Makes the text box
if ($record{$obj}) { $val = qq~ VALUE="$record{$obj}"~; }
else { $val = ""; }
$html .= qq~~;
}
if ($db_type{$obj} eq "drop") { # Makes the dropdown box
if ($record{$obj}) { $val = qq~ VALUE="$record{$obj}"~; }
else { $val = ""; }
$html .= qq~ ~;
}
$html .= "
";
print $html;
}