示例#1
0
   <?php 
include "navigation/guestNav.php";
//if user login
if (isset($_SESSION['userType']) && isset($_SESSION['userId']) && !empty($_SESSION['userType']) && !empty($_SESSION['userId'])) {
    $userType = $_SESSION['userType'];
    $userId = $_SESSION['userId'];
    include_once "class/Captain.class.php";
    include_once "class/Boat.class.php";
    $boat = new Boat();
    $captain = new Captain();
    $boatList = array();
    $captList = array();
    //*************************** UPCOMING APPOINTMENTS ****************************************************
    echo "<div class='container'> ";
    echo "<h1>My Boats</h1>";
    $boatList = $boat->retrieveBoats($userId);
    for ($i = 0; $i < count($boatList); $i++) {
        $boatName = $boatList[$i]->getBoatName();
        $boatModel = $boatList[$i]->getBoatModel();
        $boatCapacity = $boatList[$i]->getBoatCapacity();
        $registration_number = $boatList[$i]->getRegistrationNumber();
        $registration_exp = $boatList[$i]->getRegistrationExp();
        echo "<div class='row'> ";
        echo "<div class='col-md-8 col-xs-12'>";
        echo "Boat Name = " . $boatName;
        echo "</br> Boat Model =" . $boatModel;
        echo "</br> Boat Capacity =" . $boatCapacity;
        echo "</br> Registration Number =" . $registration_number;
        echo "</br> Registration Expired =" . $registration_exp;
        echo "</div>";
        echo "<div class='col-md-2 col-xs-6'>";