<?php /** * Date: 12/11/2015 * create by: Benjamin * Fichier: products.php */ $vehicles = new vehicle(); if (isset($_POST['products'])) { $vehicles->Fetch_Cars($_POST); } else { if (isset($_POST['search'])) { $search = explode(" ", $_POST['search']); $vehicles->Fetch_Cars(NULL, $search); $_SESSION['user']->Update_History($_POST); } else { $vehicles->Fetch_Cars(); } } $i = -1; ?> <main> <section id="products"> <div id="cars"> <?php if (isset($_SESSION['user']->_connected) && $_SESSION['user']->_connected) { ?> <form method="post" action="index.php?p=products"> <p> <input list="make" name="make" placeholder="make" <?php if (isset($_POST['make'])) {
} } class superbus extends tank { public function destroy() { echo "This bus cannot be destroyed. It is protected by the feminists.\n"; } public function damage() { echo "Don't damage this bus! That's transmisogyny!!!11\n"; } } $car = new vehicle("car", "Ford", "Focus", 2013, 1); $taxi = new vehicle("car", "Aquacars", "Portsmoothian Dream", 1972, 1); $plane = new vehicle("plane", "Boeing", 747, 1998, 4); $bus = new vehicle("bus", "Arriva", 101, 2013, 3); $tank = new tank("tank", "US Military", "ugly thing", 1773, 2); $dwc = new superbus("bus", "Social Justice Warriors", "Down With Cis", 2015, 99999999); $bus->doBattleWith($car); sleep(1); $bus->doBattleWith($taxi); sleep(1); $plane->doBattleWith($bus); sleep(1); $plane->doBattleWith($tank); sleep(1); $plane->doBattleWith($tank); sleep(1); $plane->doBattleWith($tank); sleep(1);
function show($tanggal) { $vehicle = vehicle::all(); return view('rent::rent_schedule.listschedule', compact('tanggal', 'vehicle')); }
<?php /** * Date: 16/11/2015 * create by: Benjamin * Fichier: car.php */ if (isset($_GET['id'])) { $car = new vehicle(); } if (isset($_GET['id']) && isset($_GET['f'])) { $_SESSION['user']->Update_Favorite($_GET['id'], $_GET['f']); } ?> <main> <section id="product_record"> <h1>Product</h1> <?php if (isset($_GET['id']) && $car->Fetch_Cars_Record($_GET['id'])) { ?> <article> <img class="car" src="assets/images/<?php echo $car->_vehicle_array['picture']; ?> " alt="<?php echo $car->_vehicle_array['model']; ?> ">
<?php /** * Created by PhpStorm. * User: Dhanujaya * Date: 1/13/2016 * Time: 10:17 AM */ class vehicle { var $name; var $speed; function setname($name, $speed) { $this->name = $name; $this->speed = $speed; } function printthis() { echo 'speed is ' . $this->speed . ' vehicle is ' . $this->name; } } $v1 = new vehicle(); $v1->setname('hyundai', '180'); $v1->printthis();