header("Job Search", project.HJobQueryImage, "");
var page="";
if (request.hr!=null){
client.hrEnabled = (request.hr=="yes") ? "yes" : "no"; // Change the parameter name to something other than "hr" here and in JobHome to hide from hackers,
} else {
client.hrEnabled = "MikeWasHere"
};
if (request.site==null || request.site=="") {request.site=client.site};
if (request.department==null || request.department==""){request.department=client.department};
client.department=request.department;
client.site=request.site;
if (project.jobOptionsReusable!="true"){
ComputeOptions("site", "job");
ComputeOptions("department", "job");
project.jobOptionsReusable="true";
};
// ------------------ Begin second half of page. Get a list of jobs and display in table -------------
whereClause = "";
extendWhere("site");
extendWhere("department");
if (whereClause=="" && project.jobListingsReusable=="true"){ // write(" CHECKPOINT USE OLD ANSWER");flush();
write(project.jobListings);
}else{ // write(" COMPUTE NEW ANSWER");flush();
if (whereClause!=""){
whereClause=" WHERE " + whereClause
};
fields = new FieldsList("JOB");
dbConnect();
command="SELECT jid, image, site, department, req, tcreated, title FROM JOB"
+ whereClause;
cursor = database.cursor(command);
flushCount=0;
foundData=false;
saveWrite(""
+"
"
+"
"
+"
"
+"
JOB TITLE
"
+"
DEPARTMENT
"
+"
LOCATION
"
+"
REQ NUMBER
"
+"
DATE
"
+"
"
+"
");
while (cursor.next()){
foundData=true;
image=fetchV("image");
if (image==null || image=="null" || image==""){image="None"};
// In this section, do not use the precomputed images as built by makeImage.
// The images referred to via makeImage must be known at compile time.
// But the images specified here may be new, or may not even exist.
saveWrite(""
+"