$title = $_POST['title']; $company = $_POST['company']; $rPackage = $_POST['rPackage']; $summary = $_POST['summary']; $experience = $_POST['experience']; $responsibility = $_POST['responsibilities']; $location = $_POST['location']; $contract = $_POST['contract']; //eId variable stores the employer's id stored in the session $eId = $_SESSION['id']; //current date will be stored in date variable $date = date("j/ n/ Y"); try { ini_set("display_errors", 1); //establish a connection $connection = DB::getConnection(DB::host, DB::database, DB::user, DB::password); //instantiate a new employer table, passing the connection details as a parameter $table = new jobsTable($connection); //instantiate a new job object $job = new job(-1, $title, $company, $rPackage, $summary, $experience, $responsibility, $location, $contract, $eId, $date); //addJob will add the newly created job object into the database and return the id which will be stored. $id = $table->addJob($job); //the job object's id will be set. $job->setId($id); //redirect to the employer's control panel header("Location: eControlPanel.php"); } catch (PDOException $e) { //if a problem occurs, close the connection $connection = null; exit("Connection failed: " . $e->getMessage()); }
<head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="css/960_16_col.css"> <link rel="stylesheet" href="css/pageStyle.css"> <link rel="stylesheet" href="css/bootstrap.css"> <title> Saved Job Applications </title> </head> <body> <?php try { ini_set("display_errors", 1); $connection = DB::getConnection(DB::host, DB::database, DB::user, DB::password); // gets the user id and searches for a matching id in the member table and displays the user's details $sTable = new seekerTable($connection); $jsTable = new jobSaveTable($connection); $jTable = new jobsTable($connection); $id = $_SESSION['id']; $jobSaves = $jsTable->showAllUnseen(); $duplicate = false; $saveNum = $_GET['saveNum']; $count = $saveNum; $limit = $count + 10; $loopPass = 0; $previousSaveNum = $saveNum - 10; $jobs = $jTable->showAll(); $seeker = $sTable->findById($id); $theme = $seeker->getTheme(); } catch (PODException $e) { $connection = null; exit("Connection Failed: " . $e->getMessage()); }
<link rel="stylesheet" href="css/bootstrap.css"> <link rel="stylesheet" href="css/pageStyle.css"> <script src="js/ajaxApplicantRequest.js"></script> <title>Job Application</title> </head> <body onload="ajaxFunction()"> <?php try { ini_set("display_errors", 1); $id = $_SESSION['id']; $fName = $_SESSION['seeker']; $jId = $_GET['jId']; $connection = DB::getConnection(DB::host, DB::database, DB::user, DB::password); // gets the user id and searches for a matching id in the employer table and displays the employer's details $table = new jobsTable($connection); $sTable = new seekerTable($connection); $seeker = $sTable->findById($id); $theme = $seeker->getTheme(); $job = $table->findById($jId); } catch (PODException $e) { $connection = null; exit("Connection Failed: " . $e->getMessage()); } ?> <div id="page-container<?php echo $theme; ?> "> <div id="header"> <header class="container_16">