<?php
require_once(MODULE_PATH . "/booking/booking.php");

$m = new BookingModule();
$m->set("title", "");
$m->set("title_heading_level", "");

// Transfer page fields to module settings.
foreach($page->fields as $f)
{
	$m->set($f->key, $f->value);
}

$CI = get_instance();

if($m->enable_jquery())
{
	$CI->enable_jquery = true;
}
if($m->enable_jquery_ui())
{
	$CI->enable_jquery_ui = true;
}

foreach($m->scripts() as $script)
{
	$CI->scripts[] = $script;
}

if(file_exists(MODULE_PATH . "/booking/booking.less"))
{
	$CI->less[] = MODULE_PATH . "/booking/booking.less";
}

$m->render();
