#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
require "./cookie.lib";
require "./tricklib.cgi";
&get_input;
print "Content-type: text/html\n\n";
$dirname = $in{'dir'};
@trash = split(/\//,$dirname);
$dirname1 = pop @trash;
$dirname1 =~ s/-/ /g;
$abspath = "../content/";
$fullpath = $abspath . $dirname;
#
$dirname1 Resume, Sample $dirname1 Resumes, Free $dirname1 Resume Examples
print qq~
$dirname1 Resume Samples and Writing Guide
~;
open(LATEST, "header.txt");
@bnr_all = ;
close(LATEST);
print "@bnr_all\n";
#print qq~
#
#~;
@heir = split('/',$dirname);
pop(@heir);
print "Home ";
$i=0;
foreach $tag (@heir)
{
push @inarray, $tag;
print " » $tag Resumes \n";
$i++;
}
print " » $dirname1 Resume\n";
print qq~
$dirname1 Resume
~;
$infofile = "../info/$dirname" . ".txt";
open(LATEST, $infofile);
@bnr_all = ;
close(LATEST);
print "@bnr_all\n";
print qq~
~;
$dircount=0;
$filecount=0;
opendir(DIR,$fullpath);
@listing = readdir(DIR);
closedir(DIR);
foreach $list (@listing) {
$currentdir = $fullpath . "/". $list;
if (-d $currentdir) {
if ($list ne "." && $list ne "..") {
$dircount++;
}
}
unless (-d $currentdir) {
$filecount++;
}
}
if( $dircount ne "0" ) {
$totdirs = get_dirs($dirname);
}
if( $filecount ne "0" ) {
print "$dirname1 Resume Samples ";
$totfiles = &get_files($dirname);
}
if(($totdirs eq "") && ($totfiles eq "")) {
print "There is no \"$dirname1\" sample resumes to show. We will soon update this category and add some $dirname1 resumes. \n";
}
open(LATEST, "footer.txt");
@bnr_all = ;
close(LATEST);
print "@bnr_all\n";
print qq~
~;
exit;