示例#1
0
<?php

include "header_inc.php";
?>

<div id="centerDiv">
<div class="newsBg">
<?php 
$review = new Query("recensioner");
$review->whereQuery("*", "active", 1, "date", "DESC", 10000);
$paging = new Paging($review, 20);
$paging->where();
$reviewShow = new Review($review);
$reviewShow->showReview();
$reviewShow->listReviews($paging);
?>

    
<?php 
echo $paging->previousShow("se", "smallPink") . ' ' . $paging->nextShow("se", "smallPink") . '<br />' . $paging->linksShow2("se", "smallGray", "smallPink");
?>



</div>
</div>
<?php 
include "footer.php";
<?php

require_once 'model/session.php';
$session = new Session();
$data = NULL;
$menu_data = [];
if (isset($_GET['id'])) {
    require_once 'model/restaurant.php';
    require_once 'model/menu.php';
    require_once 'model/review.php';
    $restaurant = new Restaurant();
    $menu = new Menu($_GET['id']);
    $review = new Review();
    $data = $restaurant->find('id', $_GET['id']);
    $menu_data = $menu->multipleFind('restaurant_id', $_GET['id']);
    $reviews = $review->showReview($_GET['id']);
    $countReview = $review->find2('user_id', $session->get_session_data('id'), 'restaurant_id', $_GET['id']);
    $countReview = count($countReview);
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<?php 
include "./include/header.php";
?>
	<title>Restaurant Finder</title>
</head>
<body>