Пример #1
0
<?php

include '../lib/config.php';
include '../lib/function.php';
include '../models/table_model.php';
$page = null;
$page = isset($_GET['page']) ? $_GET['page'] : "list";
$title = ucfirst("table");
$_SESSION['menu_active'] = 6;
switch ($page) {
    case 'list':
        $first_building_id = get_first_building_id();
        $building_id = isset($_GET['building_id']) ? $_GET['building_id'] : $first_building_id;
        $building_name = get_building_name($building_id);
        $building_img = get_building_img($building_id);
        //get_header2($title);
        //$query = select();
        $action_room = "table.php?page=save_room";
        $action_table = "table.php?page=save_table&building_id={$building_id}";
        $action_logout = "logout.php";
        //$building_next();
        //$building_prev();
        include '../views/table/list.php';
        //get_footer();
        break;
    case 'save_table_location':
        $id = $_GET['id'];
        $data_x = $_GET['data_x'];
        $data_y = $_GET['data_y'];
        $data_top = $_GET['data_top'];
        save_table_location($id, $data_x, $data_y, $data_top);
Пример #2
0
include '../models/order_model.php';
$page = null;
$page = isset($_GET['page']) ? $_GET['page'] : "list";
$title = ucfirst("Order");
$_SESSION['menu_active'] = 2;
switch ($page) {
    case 'list':
        $where_branch = "";
        if ($_SESSION['user_type_id'] == 3 || $_SESSION['user_type_id'] == 4 || $_SESSION['user_type_id'] == 5) {
            $where_branch = " where branch_id = '" . $_SESSION['branch_id'] . "' ";
            $branch_id = $_SESSION['branch_id'];
        } else {
            $first_branch_id = get_first_branch_id();
            $branch_id = isset($_GET['branch_id']) ? $_GET['branch_id'] : $first_branch_id;
        }
        $first_building_id = get_first_building_id($branch_id);
        $building_id = isset($_GET['building_id']) ? $_GET['building_id'] : $first_building_id;
        $branch_name = get_branch_name($branch_id);
        $building_name = get_building_name($building_id);
        $building_img = get_building_img($building_id);
        //get_header2($title);
        //$query = select();
        $action_room = "order.php?page=save_room";
        $action_table = "order.php?page=save_table&building_id={$building_id}";
        $action_logout = "logout.php";
        //$building_next();
        //$building_prev();
        include '../views/order/list.php';
        //get_footer();
        break;
    case 'save_table_location':