$error_msg .= common_bottom(); die($error_msg); } //end : mizuko 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(); $tpl->assign('navbar', $tmp); $command = 'none'; } $tpl->set_waiter_template_file('orders'); // command selection switch ($command) { case 'access_denied': access_denied_waiter(); break; case 'create': $list = array(); $dishid = trim($_REQUEST['dishid']); if (empty($start_data['quantity'])) { $start_data['quantity'] = get_conf(__FILE__, __LINE__, "default_quantity"); }
/** * Interface for cleared tables * * Template: question.tpl * Assigns: navbar, question, . * * @return integer error code */ function table_cleared_interface() { global $tpl; $tpl->set_waiter_template_file('question'); $tmp = navbar_menu(); $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; }