if ( param("Apply Edit") ) {
#print header();
#if the "Apply Edit" button was pushed
my $note;
if (!(param("thenote"))) {$note=" ";}
else{
$note = param("thenote");
}
$xml->{name}->{ param('selname') }->{note} = $note || die "assignment operator failed.";
print XMLout( $xml, OutputFile => $xmlfile, NoAttr => 1, SuppressEmpty => undef ) || die "XMLout busted: $! .";
my $title = "Whiteboard" || die "Can't assign title";
open( OUTFILE, ">", $htmlfile ) || die "Can't open $htmlfile for writing.";
select(OUTFILE) || die "can't select OUTFILE";
print start_html(
-title => $title,
-style => { 'src' => 'basic.css' }
)|| die "Can't print start_html";
print "
";
print h3( a( { href => "../" }, "MFST" ) );
print h1( "Whiteboard", span($title) );
print "
";
print "";
print "
";
print
"Name |
Location/Notes | ";
my $counter = 0;
foreach $i (keys( %{ $xml->{name} } )) {
if (!($xml->{name}->{$i}->{note})){
$xml->{name}->{$i}->{note}=" ";
}
if ( $counter == 0 ) {
print
"\n\n$i | \n$xml->{name}->{$i}->{note} |
";
}
else {
print
"\n\n$i | \n$xml->{name}->{$i}->{note} |
";
}
++$counter;
}
print "
";
print
"
Edit Whiteboard