$query = "UPDATE jobs SET title=\"{$title}\",organization=\"{$org}\",department={$dept},location=\"{$loc}\",description=\"{$descr}\",applicationInstructions=\"{$instr}\" WHERE idJob={$job_id} AND randKey=\"{$randkey}\""; $result2 = mysql_query($query); //redirectToPreview($job_id,$randkey,"none","Success"); header("Location: jobs.php?action=preview&job_id={$job_id}&key={$key}"); } elseif ($action == 'list') { header('Location: index.php'); } elseif ($action == 'process_remove') { $job_id = $_POST['job_id']; $randkey = $_POST['key']; $query = "DELETE FROM jobs WHERE idJob={$job_id} AND randKey=\"{$randkey}\""; $result2 = mysql_query($query); header("Location: jobs.php?action=just_removed"); } elseif ($action == 'none') { $job_id = $_POST['job_id']; $randkey = $_POST['key']; redirectToPreview($job_id, $randkey, "none", ""); } elseif ($action == 'confirm') { $job_id = $_POST['job_id']; $randkey = $_POST['key']; $query = "SELECT * FROM jobs WHERE randKey=\"{$randkey}\""; $result2 = mysql_query($query); $numrows = mysql_numrows($result2); if ($numrows == 1) { $query = "UPDATE jobs SET confirmed=1 WHERE randKey=\"{$randkey}\""; $result2 = mysql_query($query); } //redirectToPreview($job_id,$randkey,"none","Confirmed"); header('Location: jobs.php?action=just_confirmed'); //redirectToPreview($job_id,$randkey,"none"); } ?>
redirectToPreview($id, $randkey, "none", "Success"); } elseif ($action == 'list') { header('Location: index.php'); } elseif ($action == 'remove') { $id = $_POST['id']; $randkey = $_POST['key']; $query = "DELETE FROM jobs WHERE idJob={$id} AND randKey=\"{$randkey}\""; $result2 = mysql_query($query); header('Location: index.php?msg=\'Posting Removed\''); } elseif ($action == 'none') { $id = $_POST['id']; $randkey = $_POST['key']; redirectToPreview($id, $randkey, "none", ""); } elseif ($action == 'confirm') { $id = $_POST['id']; $randkey = $_POST['key']; $query = "SELECT * FROM jobs WHERE randKey=\"{$randkey}\""; $result2 = mysql_query($query); $numrows = mysql_numrows($result2); if ($numrows == 1) { $query = "UPDATE jobs SET confirmed=1 WHERE randKey=\"{$randkey}\""; $result2 = mysql_query($query); } redirectToPreview($id, $randkey, "none", "Confirmed"); //redirectToPreview($id,$randkey,"none"); } ?> <body> </html>