Example #1
0
function menu()
{
    $r = array('Home' => 'index.php', 'Jídelní lístek' => 'napojak.php', 'Online Rezervace' => 'rezervace.php', 'Kontakt' => 'kontakt.php');
    if (role_waiter() || role_supervisor()) {
        $r['Výpis rezervací'] = 'rezervace.php?action=vypis-rezervaci';
    }
    if (role_chief() || role_waiter() || role_supervisor()) {
        $r['Objednávky'] = 'objednavky.php';
    }
    if (role_supervisor()) {
        $r['Správa uživatelů'] = 'users.php';
    }
    return $r;
}
Example #2
0
<?php

/*
 * objednavky.php:  Restaurace (IIS 2012)
 *
 * Author(s):      Marie Kratochvilova <xkrato11@stud.fit.vutbr.cz>
 *                 Radek Sevcik        <xsevci44@stud.fit.vutbr.cz>
 *
 * Date:           Thu, 4 Feb 2016 01:46:54 +0100
 *
 * This file is part of iis12_restaurace.
 */
require_once 'config.inc.php';
redirect_if_not_perm(role_supervisor() || role_chief() || role_waiter());
function render_head()
{
    return <<<EOL
    <link href="css/rezervace.css" rel="stylesheet" type="text/css">
    <link href="css/jquery.dataTables.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
    <script src="js/jquery.dataTables.min.js"></script>
    <script>
    \t\$(document).ready(function()
    \t{
  \t\t\t\$('.datatable').dataTable({
\t\t\t\t"bStateSave": true,
\t\t\t});
\t\t});
    </script>