示例#1
0
 public function set_position($position_name)
 {
     $position = new Position();
     $position->set_name($position_name);
     $this->position = $position;
 }
示例#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/position.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/position.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/cs2102/controller/admin/authentication/index.php";
use model\Admin;
use model\Database;
use model\Position;
session_start();
AuthenticationController::authenticate();
$database = new Database();
$connection = $database->get_connection();
$positions = Position::get_all_position($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()
 {
     $position = $_GET["position"];
     Position::delete_position($position, $this->connection);
     header("Location: " . $_SERVER["HTTP_REFERER"]);
 }