Ejemplo n.º 1
0
 public static function get_all_job_offer($connection)
 {
     $statement = $connection->prepare("SELECT * FROM joboffer");
     $statement->execute();
     $result = $statement->get_result();
     $job_offers = array();
     while ($row = $result->fetch_assoc()) {
         $job_offer = new JobOffer();
         $job_offer->set_creator($row["creator"]);
         $job_offer->set_date($row["date"]);
         $job_offer->set_title($row["title"]);
         $job_offer->set_position($row["position"]);
         $job_offer->set_industry($row["industry"]);
         $job_offer->set_requirement($row["requirement"]);
         $job_offer->set_years_of_experience($row["yearsOfExp"]);
         $job_offer->set_contact($row["contact"]);
         $job_offer->set_description($row["description"]);
         array_push($job_offers, $job_offer);
     }
     return $job_offers;
 }
Ejemplo n.º 2
0
require_once $_SERVER['DOCUMENT_ROOT'] . "/cs2102/model/admin.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/cs2102/model/database.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/cs2102/model/job_offer.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/cs2102/controller/admin/authentication/index.php";
//require_once($_SERVER['DOCUMENT_ROOT'] . "/kenneth/cs2102_admin/model/admin.php");
//require_once($_SERVER['DOCUMENT_ROOT'] . "/kenneth/cs2102_admin/model/database.php");
//require_once($_SERVER['DOCUMENT_ROOT'] . "/kenneth/cs2102_admin/model/job_offer.php");
//require_once($_SERVER['DOCUMENT_ROOT'] . "/kenneth/cs2102_admin/controller/admin/authentication/index.php");
use model\Admin;
use model\Database;
use model\JobOffer;
session_start();
AuthenticationController::authenticate();
$database = new Database();
$connection = $database->get_connection();
$job_offers = JobOffer::get_all_job_offer($connection);
?>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Management System</title>

		<!-- stylesheets -->
		<link href="../../../stylesheet/reset.css" rel="stylesheet" type="text/css">
		<link href="../../../stylesheet/icon.css" rel="stylesheet" type="text/css">
		<link href="../../../stylesheet/default.css" rel="stylesheet" type="text/css">
		<link href="../../../stylesheet/content.css" rel="stylesheet" type="text/css">

		<!-- javascript -->
		<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>