コード例 #1
0
ファイル: job_applicant.php プロジェクト: kennho/cs2102
 public static function get_all_job_applicant($connection)
 {
     $statement = $connection->prepare("SELECT * FROM jobapplicant");
     $statement->execute();
     $result = $statement->get_result();
     $job_applicants = array();
     while ($row = $result->fetch_assoc()) {
         $job_applicant = new JobApplicant();
         $job_applicant->set_email($row["email"]);
         $job_applicant->set_password($row["password"]);
         $job_applicant->set_first_name($row["first_name"]);
         $job_applicant->set_last_name($row["last_name"]);
         $job_applicant->set_industry($row["industry"]);
         $job_applicant->set_about($row["about_me"]);
         $job_applicant->set_contact($row["contact"]);
         $job_applicant->set_nationality($row["nationality"]);
         $job_applicant->set_birthday($row["birthday"]);
         $job_applicant->set_location($row["location"]);
         array_push($job_applicants, $job_applicant);
     }
     return $job_applicants;
 }
コード例 #2
0
ファイル: index.php プロジェクト: kennho/cs2102
//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_applicant.php");
//require_once($_SERVER['DOCUMENT_ROOT'] . "/kenneth/cs2102_admin/controller/admin/authentication/index.php");
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_applicant.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/cs2102/controller/admin/authentication/index.php";
use model\Admin;
use model\Database;
use model\JobApplicant;
session_start();
AuthenticationController::authenticate();
$database = new Database();
$connection = $database->get_connection();
$job_applicants = JobApplicant::get_all_job_applicant($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>
コード例 #3
0
ファイル: index.php プロジェクト: kennho/cs2102
 public function delete()
 {
     $email = $_GET["email"];
     JobApplicant::delete_job_applicant($email, $this->connection);
     header("Location: " . $_SERVER["HTTP_REFERER"]);
 }