/* ================================================================= FUNCTION: addJob() DESCRIPTION: gets the last JobID in the the table, increments it by 1, and inserts a new row with that JobID. =================================================================*/ function addJob(jobid) { if (jobid == 0) { maxcursor = database.cursor ("select max(jobid) from jobs"); maxcursor.next(); // Initialize the cursor. nextjobid = maxcursor[0] + 1; // Increment the cursor by one. debug(nextjobid + " is my neat message."); maxcursor.close(); jobcursor = database.cursor ("select * from jobs where jobid = '" + nextjobid + "'", true); jobcursor.next(); jobcursor.jobid = nextjobid; jobcursor.empid = client.userID; jobcursor.insertRow("JOBS"); return(nextjobid); } else return(request.jobid); // END IF } // End addJob() // Security check - make sure they've logged in. If not, send them // to the LOGIN page. securityCheck(client.valid, client.usertype, "employer", "../login.htm"); // Dynamically generate the body string according to the attributes in the // configuration file specified as the argument of dynBody() bodystr = dynBody("settings.cfg"); if(!dbCheck()) { redirect("../error.htm?error=dbfail"); } newjobid = addJob(request.jobid); cursor = database.cursor("select * from jobs where jobid = '" + newjobid + "'", true); cursor.next(); // Initialize the cursor. Job Attributes for JobID <server>write(cursor.jobid)</server>

Job Attributes for JobID write(cursor.jobid)

Job Title"); /* Only write out the value if it is not null. If did not perform this check and the value was null, the string "null" would be printed, and that would look messy. */ if (cursor.desc != null) { descrip = unEscString(cursor.desc); write(descrip); }
Salary Range if ( (cursor.salarylow + "") == "null") tempStr = ""; else tempStr = (cursor.salarylow + ""); // Get values from the lookup table "SALARYTYPE" cursor2 = database.cursor("select * from salarytype"); write("From: "); // see "dynhtml.js" in the "lib" subdirectory dynSelect("salarylow", "1", false, "", tempStr, cursor2); cursor2.close() if ( (cursor.salaryhigh + "") == "null") tempStr = ""; else tempStr = (cursor.salaryhigh + ""); // Get values from the lookup table "SALARYTYPE" cursor2 = database.cursor("select * from salarytype"); write(" To: "); dynSelect("salaryhigh", "1", false, "", tempStr, cursor2); cursor2.close();
Requirements:
Education if (cursor.mineduc == null) tempStr = ""; else tempStr = cursor.mineduc; // Get values from the lookup table "EDUCTYPE" cursor2 = database.cursor("select * from eductype"); // see "dynhtml.js" in the "lib" subdirectory dynSelect("mineduc", "1", false, "", tempStr, cursor2); cursor2.close();
Years Experience"); /* Only write out the value if it is not null. If did not perform this check and the value was null, the string "null" would be printed, and that would look messy. */ if (cursor.skills != null) { skills = unEscString(cursor.skills); write(skills); }
Job Data:
City
Country: if (cursor.lcountry == null) tempStr = ""; // Default to a value of United States else tempStr = cursor.lcountry; countryList("lcountry", "1", false, "", tempStr);
Contact Name -->

cursor.close();