<?php

// $Id: index.php 2338 2012-07-18 10:54:42Z cimorrison $

// Index is just a stub to redirect to the appropriate view
// as defined in config.inc.php using the variable $default_view
// If $default_room is defined in config.inc.php then this will
// be used to redirect to a particular room.

require "defaultincludes.inc";
require_once "mrbs_sql.inc";

switch ($default_view)
{
  case "month":
    $redirect_str = "month.php";
    break;
  case "week":
    $redirect_str = "week.php";
    break;
  default:
    $redirect_str = "day2.php";
}

$rooms = $_POST["rooms"];
$areas = $_POST["areas"];

$redirect_str .= "?year=$year&month=$month&day=$day&area=$areas&room=$rooms";

header("Location: $redirect_str");

?>