#!C:\Perl\bin\perl.exe

use CGI::Carp qw(fatalsToBrowser);
use CGI qw(:standard); #Upload on lextutor seems to need this

###### NOTE ######
## THIS IS A GENERIC FOLDER-PERMISSIONS AVOIDER####

print "Content-type: text/html\n\n";
print "<html><head><title>FOLDER ACCESS (THESIS)</title></head><body><font face=arial>";

print "<p><blockquote><h2>Thesis Quizzes</h2>";


$dir = 'c:\inetpub/wwwroot/cv/webthesis/quizzes_2k' ;

print "<blockquote><table>";
opendir (DIR, "$dir/");
@FILES = sort grep(/\.txt/,readdir(DIR));
#@FILES = sort (readdir(DIR));

foreach (@FILES) {



	print "<tr><td><a href=$_ target=_blank>$_</a></td><td align=right>&nbsp;</td></tr>";

	}
closedir (DIR);
print "</table></blockquote>";
print "<p>Close this page to get back to lextutor/cv";
#Got it! Thanks CGI City


print <<"EOF";

<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=852812;
var sc_invisible=1;
var sc_partition=6;
var sc_security="929dd6c8";
var sc_text=2;
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/frames.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img  src="http://c7.statcounter.com/counter.php?sc_project=852812&amp;java=0&amp;security=929dd6c8&amp;invisible=1" alt="stats count" border="0"></a> </noscript>

EOF

print "</body></html>";