#!/usr/local/bin/perl # # A script to open a database to search for # job codes and create a list of the found jobs # ############ Process Query ############ @cgiPairs = split("&",$ENV{'QUERY_STRING'}); %cgiVals = (); foreach $pair ( @cgiPairs ) { ($key,$val) = split("=",$pair); $val =~ s/\+/ /g; $val =~ s/%(..)/pack("c",hex($1))/ge; $cgiVals{"$key"} = "$val"; } @valuesList = values(%cgiVals); ############ variables ############ $alpha = "Directory of Non-Faculty Job Vacancies"; $acsup = "Academic/Instructional Positions (Non-Faculty)"; $admin = "Administrative and Managerial Positions"; $pro = "The Professions Positions"; $clerical = "Administrative Support and Clerical Positions"; $faculty = "Faculty Positions (including Adjunct)"; $A = "Sciences"; $B = "Social & Behavioral Sciences"; $C = "Education"; $D = "Humanities"; $E = "Computer Sciences and Engineering"; $F = "Law"; $G = "Architecture"; $H = "Business and Public Administration"; $I = "Agriculture & Life Sciences"; $J = "Other Instructional Positions"; $K = "Fine Arts"; $L = "Medicine"; $M = "Nursing"; $N = "Pharmacy"; $O = "Public Health"; $counter = "A"; $printOnce = 1; $other = "Other Positions"; $research = "Research Positions"; $postdoc = "Postdoctoral Research Positions"; $temp = "Temporary and Part-Time Positions"; $technical = "Computer, Engineering and Technical Positions"; $trades = "Trades and Maintenance Positions"; $out = "Outside of Tucson Positions"; $ahsc = "Arizona Health Sciences Center Positions"; $filename = "../jobSummary.txt"; $date = `date '+%a. %b. %e, %Y'`; chop($date); ############ Subroutines ############ sub displayDisciplineTag { print "


$$counter "; } sub displayListing { print " "; if( $new eq "N" ) {print "new ";} if( $internal eq "I" ) {print "ua only ";} if( $repost eq "R" ) {print "repost ";} print " $jobTitle   ($department) $jobNo "; } ############ begin CGI output ############ print("Content-type: text/html\n\n"); print "UA Job Search Results\n \n
\n"; print "

\"\"

"; if( $cgiVals{'jobCode'} eq all ) {print $alpha;} if( $cgiVals{'jobCode'} eq ac ) {print $acsup;} if( $cgiVals{'jobCode'} eq ad ) {print $admin;} if( $cgiVals{'jobCode'} eq pro ) {print $pro;} if( $cgiVals{'jobCode'} eq cl ) {print $clerical;} if( $cgiVals{'jobCode'} eq fac ) {print $faculty;} if( $cgiVals{'jobCode'} eq ot ) {print $other;} if( $cgiVals{'jobCode'} eq rs ) {print $research;} if( $cgiVals{'jobCode'} eq rsp ) {print $postdoc;} if( $cgiVals{'jobCode'} eq pt ) {print $temp;} if( $cgiVals{'jobCode'} eq co ) {print $technical;} if( $cgiVals{'jobCode'} eq "tr" ) {print $trades;} if( $cgiVals{'jobCode'} eq out ) {print $out;} if( $cgiVals{'jobCode'} eq ah ) {print $ahsc;} print "

The University of Arizona is an EEO/AA - M/W/D/V Employer


"; ################## Displaying the search request ########################## open(INFILE,$filename); @jobData = ; close(INFILE); if (!@jobData) { print "Could not open file.
\n"; die; } foreach $j (@jobData) { chop($j); ($jobNo,$fileCode,$closeDate,$pullDate,$adTitle,$jobTitle,$department,$internal,$repost,$new,$discipline) = split(/\t/,$j); $jobTitle =~ s/\"//g; $department =~ s/\"//g; if( $cgiVals{'jobCode'} eq all && $fileCode ne rsp && $fileCode ne fac && $fileCode ne xfacx && $fileCode ne xrspx && $fileCode ne FileCode ) { &displayListing; } if( $fileCode ne all && $fileCode =~ $cgiVals{'jobCode'} && $fileCode ne rsp && $fileCode ne fac && $fileCode ne xfacx && $fileCode ne xrspx ) { &displayListing; } if( $cgiVals{'jobCode'} eq rsp && $fileCode =~ rsp) { &displayListing; } if( $cgiVals{'jobCode'} eq ah && $jobNo > 900000 && $fileCode ne xfacx && $fileCode ne xrspx && $fileCode ne fac && $fileCode ne rsp ) { &displayListing; } if( $cgiVals{'jobCode'} eq fac && $fileCode =~ fac ) { if($printOnce ==1) { print "

$A \| $B \| $C
$D \| $K \| $E \| $F
$G \| $H \| $I
$L \| $M \| $N \| $O \| $J

"; $printOnce++; } if($discipline eq $counter) { &displayDisciplineTag; $counter++ } &displayListing } } ################## Update, copyright, AHSC Link ########################## print "
This page last updated $date.
This information is published by Department of Human Resources, The University of Arizona.
Copyright 1998, Arizona Board of Regents.
"; ################## HR and UA Navigation ########################## print "

HR Home and UAInfo

\n

\n "; print " \n "; 1;