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"; };
write(""); if (client.hrEnabled=="yes"){ header2("", "Customize job listing:", button("Add", null, "jobedit.html?mode=add"), button("Submit", null, "javascript:document.formQuery.submit()"), "", ""); } else { header2("", "Customize job listing:", button("Submit", null, "javascript:document.formQuery.submit()"), "", "", ""); };
LOCATION
DEPARTMENT

// ------------------ 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 TITLEDEPARTMENTLOCATION REQ NUMBERDATE
"); 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("" +"" +"" + "" + "" + "" + "" + "" + "" +"
" + "" + fetchV("title") + "" + fetchV("department") + "" + fetchV("site") + "" + fetchV("req") + "" + dateToString(cursor.tcreated) + "
"); flushCount=flushCount+1; if ((flushCount%10)==1){flush()}; }; if (foundData!=true){write("
Sorry, no jobs were found where location = " + request.site + " and department = " + request.department + "

") } else { if (whereClause==""){ project.jobListings=page; project.jobListingsReusable="true" }; } }; dbDisconnect(); footer();