<?xml version="1.0" encoding="utf-8"?>
<install type="component" version="1.5.0" method="upgrade">
	<name>Room_Booker</name>
	<author>JoomPlace Team</author>
	<creationDate>October 2010</creationDate>
	<copyright>(C) JoomPlace, www.joomplace.com</copyright>
	<license>http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 2</license>
	<authorEmail>support@joomplace.com</authorEmail>
	<authorUrl>www.joomplace.com</authorUrl>
	<version>1.1.11</version>
	<description>RoomBooker is a component for rooms reserving</description>
	<install>
		<queries>
			<query>DELETE FROM `#__components` WHERE `option` LIKE '%room_booker%'</query>
			<query>
			CREATE TABLE IF NOT EXISTS `#__rb_booking` (
 			 	`id` int(10) NOT NULL auto_increment,
  				`building_id` int(10) NOT NULL default '0',
  				`room_id` int(10) NOT NULL default '0',
  				`importance_id` int(10) NOT NULL default '0',
				`booking_type_id` int(10) NOT NULL default '0',
 				`period_id` int(10) NOT NULL default '0',
 				`class_id` int(10) NOT NULL default '0',
  				`recurring_type_id` int(10) NOT NULL default '0',
  				`booking_date` date NOT NULL default '0000-00-00',
  				`start_date` date NOT NULL default '0000-00-00',
  				`end_date` date NOT NULL default '0000-00-00',
  				`short_description` text,
  				`long_description` text,
  				`user_id` int(10) NOT NULL default '0',
  				`change_date` datetime default NULL,
  				`state` int(1) NOT NULL default '1',
				`approved` TINYINT(4) DEFAULT '0' NOT NULL,
				`start_time` time NOT NULL default '00:00:00',
				`end_time` time NOT NULL default '00:00:00',
  				PRIMARY KEY  (`id`)
			);
			</query>
			<query>
			CREATE TABLE IF NOT EXISTS `#__rb_booking_types` (
  				`id` int(10) NOT NULL auto_increment,
  				`name` varchar(255) default NULL,
  				`state` int(1) default '1',
  				PRIMARY KEY  (`id`),
  				UNIQUE KEY `name` (`name`)
			);
			</query>
			<query>
			CREATE TABLE IF NOT EXISTS `#__rb_buildings` (
  				`id` int(10) NOT NULL auto_increment,
  				`name` varchar(255) default NULL,
  				PRIMARY KEY  (`id`),
  				UNIQUE KEY `name` (`name`)
			);
			</query>
			<query>
			CREATE TABLE IF NOT EXISTS `#__rb_class` (
  				`id` int(10) NOT NULL auto_increment,
  				`name` varchar(255) default NULL,
  				`state` int(1) NOT NULL default '1',
  				PRIMARY KEY  (`id`),
  				UNIQUE KEY `name` (`name`)
			);
			</query>
			<query>
			CREATE TABLE IF NOT EXISTS `#__rb_files` (
  				`id` int(10) NOT NULL auto_increment,
  				`filename` varchar(255) default NULL,
  				`create_date` date default NULL,
  				PRIMARY KEY  (`id`)
			);
			</query>
			<query>
			CREATE TABLE IF NOT EXISTS `#__rb_importance` (
  				`id` int(10) NOT NULL auto_increment,
  				`name` varchar(255) default NULL,
  				`state` int(1) default '1',
  				PRIMARY KEY  (`id`),
 				UNIQUE KEY `name` (`name`)
			);
			</query>
			<query>CREATE TABLE IF NOT EXISTS `#__rb_language` (
  					`id` int(10) NOT NULL auto_increment,
  					`name` varchar(255) default NULL,
					`filename` varchar(255) default NULL,
  					`isdefault` int(1) default '0',
 					 PRIMARY KEY  (`id`)
					);
			</query>
			<query>
			CREATE TABLE IF NOT EXISTS `#__rb_periods` (
  				`id` int(10) NOT NULL auto_increment,
  				`name` varchar(255) default NULL,
  				`start_time` time default NULL,
				`end_time` time default NULL,
  				PRIMARY KEY  (`id`)
			);
			</query>
			<query>
			CREATE TABLE IF NOT EXISTS `#__rb_recurring` (
  				`id` int(10) NOT NULL,
  				`name` varchar(255) default NULL,
  				PRIMARY KEY  (`id`)
			);
			</query>
			<query>
			CREATE TABLE IF NOT EXISTS `#__rb_rooms` (
  				`id` int(10) NOT NULL auto_increment,
  				`building_id` int(10) NOT NULL default '0',
  				`name` varchar(255) default NULL,
  				`start_time` time NOT NULL default '00:00:00',
				`end_time` time NOT NULL default '00:00:00',
				`min_time` int(10) NOT NULL default '0',
				`max_time` int(10) NOT NULL default '0',
				`flexible` TINYINT( 4 ) DEFAULT '0' NOT NULL,
				PRIMARY KEY  (`id`),
  				UNIQUE KEY `name` (`name`)
			);
			</query>
			<query>
			CREATE TABLE IF NOT EXISTS `#__rb_settings` (
  				`id` int(10) NOT NULL auto_increment,
  				`name` varchar(255) default NULL,
  				`value` varchar(255) default NULL,
  				PRIMARY KEY  (`id`)
			);
			</query>
			<query>CREATE TABLE IF NOT EXISTS `#__rb_license` ( `license` text NOT NULL)</query>
		</queries>
	</install>
	<uninstall>
		<queries>
			<query>DELETE FROM `#__components` WHERE `option` LIKE '%room_booker%'</query>
		</queries>
	</uninstall>
	<installfile>install.room_booker.php</installfile>
	<uninstallfile>uninstall.room_booker.php</uninstallfile>
	<files>
		<filename>lconstants.php</filename>
		<filename>export/index.html</filename>		
		<filename>room_booker.php</filename>
		<filename>room_booker.html.php</filename>
		<filename>build_room.png</filename>
		<filename>my_booking.png</filename>
		<filename>new_booking.png</filename>
		<filename>report.png</filename>
		<filename>bg.jpg</filename>
		<filename>ag_date.png</filename>
		<filename>loopnone.png</filename>
		<filename>agenda.png</filename>
		<filename>7days.png</filename>
		<filename>style.css</filename>
	</files>
	<administration>
		<menu>RoomBooker</menu>
			<submenu>
				<menu link="option=com_room_booker&amp;task=config" task="config" alt="Configuration">Configuration</menu>
				<menu link="option=com_room_booker&amp;task=bookings_control" task="bookings_control" alt="Bookings_control">Bookings control</menu>
				<menu link="option=com_room_booker&amp;task=confirmation" task="confirmation" alt="Confirmation">Latest Bookings</menu>
				<menu link="option=com_room_booker&amp;task=help" task="help" alt="Help">Help</menu>
				<menu link="option=com_room_booker&amp;task=support" task="support" alt="Support">Support</menu>
				<menu link="option=com_room_booker&amp;task=about" task="about" alt="About">About</menu>
			</submenu>	
		<files>
				<filename>admin.room_booker.html.php</filename>
				<filename>admin.room_booker.php</filename>
				<filename>component.lib.php</filename>
				<filename>component.legacy.php</filename>
				<filename>jp_menu_pic.gif</filename>
				<filename>images/bottom_menu_bg.jpg</filename>
				<filename>images/EF_logo.jpg</filename>
				<filename>images/j_arrow.png</filename>
				<filename>images/j_arrow_down.png</filename>
				<filename>images/top_menu_bg.jpg</filename>
				<filename>images/rate_us.png</filename>				
				<filename>install.room_booker.php</filename>
				<filename>js/mootools.js</filename>
				<filename>room_booker.xml</filename>
				<filename>toolbar.room_booker.html.php</filename>
				<filename>toolbar.room_booker.php</filename>
				<filename>uninstall.room_booker.php</filename>
				<filename>Snoopy.class.php</filename>
				<filename>config.xml</filename>
				<filename>joomplace.txt</filename>
		</files>
	</administration>
		<languages>
		<language tag="en-GB">en-GB.com_room_booker.ini</language>
		<language tag="nl-NL">nl-NL.com_room_booker.ini</language>
	</languages>
</install>