<?php require_once 'libraries/happpi/LoadAll.php'; // just handy for loading the entire library at once //require_once('libraries/happpi/lib/Part.php'); $Vehicle = new happpi\Vehicle(); ?> <!doctype html> <html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript" src="scripts/lookup.js"></script> <link href="css/stylesheet.css" rel="stylesheet" media="all" /> </head> <body> <header> <div class="search-box"> <form class="search-form" action="index.php" method="get" id="search"> <input type="search" class="search" name="searchTerm" placeholder="Enter your search query..." /> <button>Search</button> </form> </div> <div class="clearfix"></div> <div class="lookup"> <form name="lookup" action="index.php" method="get" id="lookup"> <input type="hidden" name="formSubmit" value="true" /> <a href="lifestyle.php">Shop By Lifestyle</a> <?php if (!isset($_GET["formSubmit"])) { echo '<select class="mount" name="mount">'; echo '<option value="">Select Mount</option>';
} elseif ($numItems > 1 && $i != $numItems) { echo '<a href="category.php?catID=' . $catBreadCrumb->getCatID() . '">'; echo $catBreadCrumb->getCatTitle(); echo "</a>"; echo " > "; } else { if ($i == $numItems) { echo $catBreadCrumb->getCatTitle(); } } } // end of foreach echo "<br />"; // get vehicle info from cookie values (year, make, model, style) if (isset($_COOKIE["vehicleID"])) { $Vehicle = new happpi\Vehicle(); $Vehicle->setYear($_COOKIE["vehicle_year"]); $Vehicle->setMake($_COOKIE["vehicle_make"]); $Vehicle->setModel($_COOKIE["vehicle_model"]); $Vehicle->setStyle($_COOKIE["vehicle_style"]); $yourVehicle = $Vehicle->getVehicle(); echo "Your vehicle:<strong> " . $yourVehicle->getYear() . " " . $yourVehicle->getMake() . " " . $yourVehicle->getModel() . " " . $yourVehicle->getStyle() . "</strong>"; } echo "<h1>" . $cat->getParent()->getCatTitle() . "</h1>"; echo "<div style='float:left;'>"; if ($cat->getContent() != null) { echo "<hr />"; foreach ($cat->getContent() as $content) { echo $content->getContent(); } } elseif ($cat->getParent()->getLongDesc() != "" && $cat->getContent() == "") {
echo "</a>"; echo "<br />"; echo "<br />"; } echo "<h2>Fits these Vehicles</h2>"; echo "<hr />"; $Vehicle = new happpi\Vehicle(); foreach ($Vehicle->getPartVehicles($Part->getPartID()) as $pv) { echo $pv->getYear() . " " . $pv->getMake() . " " . $pv->getModel() . " " . $pv->getStyle(); echo " "; echo '<a href="index.php?formSubmit=true&mount=rear&year=' . $pv->getYear() . '&make=' . $pv->getMake() . '&model=' . $pv->getModel() . '&style=' . $pv->getStyle() . '&go=true">Find hitches for this vehicle</a>'; echo "<br />"; } echo "<h2>Electrical</h2>"; echo "<hr />"; $Vehicle = new happpi\Vehicle(); if (isset($_COOKIE['vehicleID'])) { $Vehicle->setVehicleID($_COOKIE['vehicleID']); } foreach ($Vehicle->getConnector() as $Part) { echo "<h3>"; echo $Part->getShortDesc(); echo "</h3>"; foreach ($Part->getAttributes() as $attr) { echo "<strong>" . $attr->getKey() . "</strong>"; echo ": "; echo $attr->getValue(); echo " "; } echo "<br />"; echo '<img src="';