#!/usr/local/bin/perl
# upform.cgi
# Display the upload form

require './file-lib.pl';
$disallowed_buttons{'upload'} && &error($text{'ebutton'});
&ReadParse();
&header($text{'upload_title'});
print "<form action=upload.cgi$in{'extra'} enctype=multipart/form-data method=post>\n";
print "<table width=100% border>\n";
print "<tr $tb> <td><b>$text{'upload_title'}</b></td> </tr>\n";
print "<tr $cb> <td><table width=100%>\n";

print "<tr> <td><b>$text{'upload_file'}</b></td>\n";
print "<td><input type=file name=file size=20></td> </tr>\n";

print "<tr> <td><b>$text{'upload_dir'}</b></td>\n";
print "<td><input name=dir size=20 value='$in{'dir'}'>\n",
      "<input type=submit value=\"$text{'upload_ok'}\"></td> </tr>\n";

if ($dostounix == 1) {
	print "<tr> <td><b>$text{'upload_conv'}</b></td>\n";
	print "<td><input type=radio name=dos value=1> $text{'yes'}\n";
	print "<input type=radio name=dos value=0 checked> $text{'no'}</td> </tr>\n";
	}

if ($unarchive == 1) {
	print "<tr> <td><b>$text{'upload_zip'}</b></td>\n";
	print "<td><input type=radio name=zip value=2> $text{'upload_yes'}\n";
	print "<input type=radio name=zip value=1> $text{'yes'}\n";
	print "<input type=radio name=zip value=0 checked> $text{'no'}</td> </tr>\n";
	}

print "</table></td></tr></table>\n";
