Esempio n. 1
0
<?php

include '../include/header.php';
//include_once 'dbconnect.php';
include '../model/processitems.php';
include '../model/food.php';
include '../model/seller.php';
include '../model/carts.php';
$processitem = new Processitems();
$foods = array();
if (isset($_GET['home_search'])) {
    $foods = $processitem->getFoodFromIndex($_GET['home_search']);
} else {
    if (isset($_GET['search'])) {
        $foods = $processitem->getFoodFromFilters($_GET['search']);
    } else {
        if (isset($_GET['input-search'])) {
            $foods = $processitem->getFoodFromSearchBox($_GET['input-search']);
        } else {
            $foods = $processitem->getFood();
        }
    }
}
if (isset($_GET['cart'])) {
    $cart = new Cart();
    $cart->setFood_id($_GET['cart']);
    $cart->setQuantity('1');
    $processitem->addToCart($cart);
}
?>
						
Esempio n. 2
0
<?php

session_start();
include '../model/user.php';
include '../model/processitems.php';
$userid = 0;
if (isset($_SESSION['user'])) {
    $userid = $_SESSION['user'];
    $processitems = new Processitems();
    $u = $processitems->getUsername();
}
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../favicon.ico">

    <title>JUSTBITE</title>

    <!-- Bootstrap core CSS -->
    <link href="../css/bootstrap.css" rel="stylesheet">
	
    <!-- Custom styles for this template -->
    <link href="../css/carousel.css" rel="stylesheet">
	<link href="../css/style.css" rel="stylesheet">
Esempio n. 3
0
<?php

include '../include/header.php';
include '../model/processitems.php';
include '../model/food.php';
include '../model/seller.php';
include '../model/review.php';
include '../model/carts.php';
$processitems = new Processitems();
if (isset($_POST['btn-review'])) {
    $review = new Review();
    $review->setName($_POST['rname']);
    $review->setComment($_POST['comment']);
    $review->setEmail($_POST['rmail']);
    $review->setId($_POST['rid']);
    $mydate = getdate(date("U"));
    $rday = $mydate[month] . " " . $mydate[mday] . ", " . $mydate[year];
    $rtime = date(" H:i", time());
    $review->setRday($rday);
    $review->setRtime($rtime);
    $msg = $processitems->addReview($review);
}
if (isset($_GET['id'])) {
    $food = new Foods();
    $food->setId($_GET['id']);
    $objs = $processitems->getProduct($food);
    $f = $objs[0];
    $s = $objs[1];
    $r = $objs[2];
} else {
    if (isset($_POST['id'])) {