[############################################################################### ## $RCSfile: resultResume.epl,v $ ## $Author: duket $ ## $Date: 2008/07/09 18:55:39 $ ## ts=2 ## Commented out login validation. look for #LOGIN. ################################################################################ ## DESC: Make all the verity search calls and display the seeker detail ###############################################################################] [- ## ## The modules that will help. ## use Apache; use Apache::Constants qw(REDIRECT); use Dice::Session; use Dice::Profile; use Dice::Util; use Dice::ProviderReports; use Dice::LogWriter; ## ## ## setCacheMode(); #LOGIN if ((!validateSession()) || (!isAuthenticated())) { #LOGIN remove the next lone to reenable login if (validateSession()) { $session_exists = 1; } else { $session_exists = 0; } if ($ENV{DOCUMENT_ROOT} =~ m/employer/) { $req_rec->header_out("Location" => "error.epl"); $req_rec->status(REDIRECT); exit; } if (defined($fdat{DOCKEY})) { ## ## This is the document of interest. We'll extract the XML of ## interest and place it in a temporary file. Note: we'll use ## a random number to avoid concurrency issues. ## $doc_key = $fdat{DOCKEY}; $force = $fdat{FORCE}; $force = 0 unless defined $force; $file = $doc_key; $file =~s/\/announce\/xml\/.\/.\/(.*?)\@.*/$1/s; } else { ## ## Contrary to popular belief, cheaters do sometimes prosper. ## However, in this case they do not prevail! ## $req_rec->header_out("Location" => "talentMatch.epl"); $req_rec->status(REDIRECT); exit; } if ($session_exists) { $query_str = getSessionVal(QUERY_STRING); } else { $query_str = ""; } if (!defined($query_str)) { $query_str = ""; } $query_str = uc($query_str); $D1User = getSessionVal(D1User); ### ### Put this in our Journal ### if (!$D1User) { $groupId = getSessionVal(GROUP_ID); $userId = getSessionVal(USER_ID); if ($userId < 1) { $userId = -1; } if ($groupId < 1) { $groupId = -1; } $rv = updateSeekerViewLog($userId, $groupId, "2", $doc_key); ## 2 means resume view if ($rv) { openLog("resultResume.pm"); writeLog($LOG_ERR, "resultResume updateSeekerViewLog error: $rv\n"); closeLog(); } } ## ## check for resume link ## $rv = getXML($file, \$xml); $xml =~s/\(.*)\<\/ResumeLink\>/$1/s; $ResumeLink = $1; $ResumeLink =~ s/\s+//g; if ($ResumeLink && (length($ResumeLink) > 3) ) { ## ## There was some kind of error with document retrieve. ## if ($ResumeLink =~ m/^http/) { ## do nothing } else { $ResumeLink = "http://" . $ResumeLink; } $req_rec->header_out("Location" => "$ResumeLink"); $req_rec->status(REDIRECT); exit; } ## ## get the exposed resume, if there is one. ## ##if ($force) { ## $rv = getResume($file, \$resume); ##} else { ## $rv = getExposedResume($file, \$resume); ##} $rv = getResume($file, \$resume); ## ## Did the call come back ok. ## if ($rv == 0) { } else { ## ## There was some kind of error with document retrieve. ## $req_rec->header_out("Location" => "error.epl"); $req_rec->status(REDIRECT); exit; } $temp = $resume; $temp=~s/^\s*//sg; if (length($temp) == 0) { $resume = "There is no resume for this person on line"; } if ($resume=~/\/sg; $html = "no"; }; -] [- ## ## Turn escaping of HTML off. ## $escmode = 0; -] [$ if ($html eq "yes") $] [+ $resume +] [$ else $]
[+ $resume +]
[$ endif $] [- ## ## Turn escaping of HTML backon. Note: I'm not sure if this is needed ## but it can't hurt (DPT)! ## $escmode = 1; -]