コード例 #1
0
ファイル: Dependents.php プロジェクト: elmo911/WolfeSolutions
Reject::permission($_SESSION['user']);
include "DB/Models/Dependent.php";
include "DB/Models/Employee.php";
include "DB/Models/User.php";
include "Helpers/ClientPage.php";
$user = User::getUserByUID($_SESSION['user']['UID']);
$employee = Employee::getEmployeeByUID($_SESSION['user']['UID']);
$fname = $_POST["first"];
$lname = $_POST["last"];
$relation = $_POST["relation"];
$birthday = $_POST["birthday"];
$depAdded = false;
if (isset($fname) && isset($lname) && isset($relation) && isset($birthday)) {
    $dependent = new Dependent();
    $dependent->constr($fname, $lname, $relation, $birthday);
    Dependent::addDependent($employee, $dependent);
    $depAdded = true;
}
$dependents = Dependent::getEmployeeDependents($_SESSION['user']['EID'], $_SESSION['user']['CID']);
?>

<html>
<header>
    <?php 
ClientPage::headers("My Dependents");
?>
</header>
<body>

<?php 
ClientPage::clientNav("My Profile");