示例#1
0
文件: users.php 项目: zcsevcik/edu
<?php

/*
 * users.php:      Restaurace (IIS 2012)
 *
 * Author(s):      Marie Kratochvilova <*****@*****.**>
 *                 Radek Sevcik        <*****@*****.**>
 *
 * Date:           Thu, 4 Feb 2016 01:46:54 +0100
 *
 * This file is part of iis12_restaurace.
 */
require_once 'config.inc.php';
define('XSLT_USERS', PATH_XSLT . '/users.xslt');
redirect_if_not_perm(role_supervisor());
function change_pwd($login, $pwd)
{
    $login = MyDB::escape($login);
    $pwd = hash('sha512', $pwd);
    $pwd = MyDB::escape($pwd);
    MyDB::getInstance()->exec("UPDATE uzivatele SET heslo='{$pwd}' WHERE login='******';");
    return 0;
}
function change_name($login, $name)
{
    $login = MyDB::escape($login);
    $name = MyDB::escape($name);
    MyDB::getInstance()->exec("UPDATE uzivatele SET jmeno='{$name}' WHERE login='******';");
    return 0;
}
function change_mail($login, $mail)
示例#2
0
<?php

/*
 * objednavky.php:  Restaurace (IIS 2012)
 *
 * Author(s):      Marie Kratochvilova <*****@*****.**>
 *                 Radek Sevcik        <*****@*****.**>
 *
 * 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>