if ($action == 'edit_job') { // TO DO // GET ALL FIELD VALUES FOR JOB BASED ON JOB ID $job_id = $_POST['jobID']; $job_title = $_POST['jobTitle']; $job_category = $_POST['catID']; $job_type = $_POST['jobType']; $job_city = $_POST['city']; $job_state = $_POST['state']; $job_summary = $_POST['summary']; $job_description = $_POST['description']; include 'edit_job.php'; } else { if ($action == 'view_job') { $job_id = $_GET['job_id']; $job = get_job_by_id($job_id); // Get job data // TO DO $job_category = $job['catID']; $job_title = $job['jobTitle']; $job_type = $job['jobType']; $job_city = $job['city']; $job_state = $job['state']; $job_summary = $job['summary']; $job_description = $job['description']; // include './view_job.php'; } else { if ($action == 'update_job') { // Get job data // TO DO
function checkout_job_action($session_uid, $id) { // needed to set the tab active $extras_active = true; $jobs_active = true; //check if the user is admin if (user_is_admin($session_uid)) { $job = get_job_by_id($id); checkout_job($session_uid, $job); // Redirect browser header("Location: http://" . $_SERVER['SERVER_NAME'] . "/jobs"); // Make sure that code below does not get executed when we redirect exit; } else { require 'templates/login.php'; } }