Example #1
0
<html>	
<?php 
include_once '../../credentials.php';
include_once 'view/view_project.php';
include_once 'model/model_project.php';
include_once 'controller/controller_auth.php';
$a = new controller_auth($username, $password);
$m = new model_page($username, $password);
$r = new view_page($username, $password);
include_once 'template/header.php';
$a->do_auth($username, $password);
if ($_SESSION['valid'] == TRUE) {
    //Initialize and set relevant arrays
    $OrderID = $_GET['id'];
    $ProjectInformation = $m->get_project_information($OrderID);
    $ClientInformation = $m->get_client_information($OrderID);
    $WorkerAssignments = $m->get_assignments_by_project($OrderID);
    $Employees = $m->get_employees($OrderID);
    $ProjectHours = $m->get_hours_by_project($OrderID);
    $ProjectExpenses = $m->get_expenses_by_project($OrderID);
    $ProjectClientPayments = $m->get_client_payments_by_project($OrderID);
    //Process submitted information.
    if (isset($_GET['action'])) {
        $action = $_GET['action'];
        $m->{$action}($_POST);
    }
    //Start Main Content Here
    echo <<<eos
<div class="row">
  <div class="col-md-8">
\t<div class="row">