예제 #1
0
<?php

require_once 'loginhelper.php';
require_once 'garage.php';
require_once 'dbconnection.php';
require_once 'garagesTableGateway.php';
start_session();
//if user is not logged in, return to  log in form
if (!is_logged_in()) {
    header("Location: loginform.php");
}
$user = $_SESSION['user'];
$dbconnection = dbconnection::getConnection();
$gateway = new garageTableGateway($dbconnection);
$statement = $gateway->getGarage();
?>

<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!--javascript script for delete confirmation -->
        <script src="deleteConfirm.js"></script>
    </head>
    <body>
         <!--Links to my google fonts bootstrap/my own style sheets & javascript scripts-->
        <?php 
require 'utils/styles.php';
?>
        <?php 
예제 #2
0
function setValue($formdata, $fieldName)
{
    if (isset($formdata) && isset($formdata[$fieldName])) {
        echo $formdata[$fieldName];
    }
}
if (!isset($formdata)) {
    $formdata = array();
}
if (!isset($errors)) {
    $errors = array();
}
$dbconnection = dbconnection::getConnection();
//connect to the garage table through  garageTableGateway using the connection above
$garageGateway = new garageTableGateway($dbconnection);
$garages = $garageGateway->getGarage();
?>
<!DOCTYPE html>

<html>

    <head>
        <meta charset="UTF-8">
        <title>Create Bus</title>
        <!--javascript script for form validation-->
        <script src="validateBus.js"></script>
    </head>

    <body>
        <!--Links to my google fonts bootstrap/my own style sheets & javascript scripts-->
        <?php