function table_cleared_interface_pos()
{
    global $tpl;
    $tpl->set_waiter_template_file('question');
    $tmp = navbar_menu_pos();
    $tpl->assign('navbar', $tmp);
    $tmp = '
	' . ucfirst(phr('TABLE_HAS_BEEN_CLEARED'));
    $tpl->assign('question', $tmp);
    $redirect = redirect_waiter('tables.php');
    $tpl->append('scripts', $redirect);
    return 0;
}
示例#2
0
    $error_msg .= common_bottom();
    die($error_msg);
}
//end : gjergj
if (!access_allowed(USER_BIT_WAITER) && !access_allowed(USER_BIT_CASHIER)) {
    $command = 'access_denied';
}
// if no command has been given, tries to infer one
if (empty($command) || $command == "none") {
    $command = table_suggest_command($_SESSION['sourceid']);
}
$table = new table($_SESSION['sourceid']);
if (!$table->exists() && $command != 'access_denied') {
    $tmp = 'table doesn\'t exist.<br/>' . "\n";
    $tpl->append('messages', $tmp);
    $tmp = navbar_menu_pos();
    $tpl->assign('navbar', $tmp);
    $command = 'none';
}
$tpl->set_waiter_template_file('orders_pos');
// command selection
switch ($command) {
    case 'access_denied':
        access_denied_waiter_pos();
        break;
    case 'create':
        $list = array();
        $dishid = trim($_REQUEST['dishid']);
        if (empty($start_data['quantity'])) {
            $start_data['quantity'] = get_conf(__FILE__, __LINE__, "default_quantity");
        }