#!/usr/bin/perl -Tw
# (Text::Template can't do -T, but no user input is used dangerously)
#
-# $Id: shift.cgi,v 1.4 2000-09-23 18:10:54 ivan Exp $
+# $Id: shift.cgi,v 1.5 2002-07-10 01:08:49 ivan Exp $
#
# Copyright (C) 2000 Adam Gould
# Copyright (C) 2000 Michal Migurski
use strict;
use vars qw( $template_file $data_directory $mail_smtpserver $mail_from
$mail_subject @mail_cc $mail_footer
- $cgi $template %shifthash %warning @messages );
+ $cgi $template %shifthash %warning @messages $magic );
use subs qw( form inputbox );
use Fcntl ":flock";
use CGI 2.15;
# subroutines for the template
sub form {
- $cgi->start_form;
+ $magic = defined $cgi->param('__MAGIC') ? $cgi->param('__MAGIC') : '';
+ $cgi->delete_all();
+ $cgi->start_form();
}
sub inputbox {
my $field = shift;
return $shifthash{$field} || " "
- if defined $cgi->param('__MAGIC') && $cgi->param('__MAGIC') eq 'print';
+ if $magic eq 'print';
$shifthash{$field}='' unless defined $shifthash{$field};
$warning{$field}='' unless defined $warning{$field};
#"$field ".