<?php
run_query("CREATE TABLE IF NOT EXISTS `" . $config['table_prefix'] . "calendars` (`id` int(11) NOT NULL AUTO_INCREMENT, `cat_id` int(11) NOT NULL, `num` int(11) NOT NULL, `name` varchar(255) NOT NULL, `help` text NOT NULL, PRIMARY KEY (`id`)) ENGINE = MYISAM DEFAULT CHARSET = utf8");
run_query("CREATE TABLE IF NOT EXISTS `" . $config['table_prefix'] . "calendar_tables` (`calendar_id` int(11) NOT NULL, `table_id` int(11) NOT NULL, `date_field` varchar(255) NOT NULL, `color` varchar(255) NOT NULL, KEY `calendar_id` (`calendar_id`, `table_id`)) ENGINE = MYISAM DEFAULT CHARSET = utf8");
run_query("CREATE TABLE IF NOT EXISTS `" . $config['table_prefix'] . "calendar_fields` (`calendar_id` int(11) NOT NULL, `field_id` int(11) NOT NULL, `view` tinyint(1) NOT NULL DEFAULT '0', `edit` tinyint(1) NOT NULL DEFAULT '0', `mount` tinyint(1) NOT NULL DEFAULT '0', KEY `calendar_id` (`calendar_id`, `field_id`)) ENGINE = MYISAM DEFAULT CHARSET = utf8");
run_query("CREATE TABLE IF NOT EXISTS `" . $config['table_prefix'] . "acc_calendars` (`id` int(11) NOT NULL AUTO_INCREMENT , `group_id` int(11) NOT NULL DEFAULT '0', `calendar_id` int(11) NOT NULL DEFAULT '0', `access` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`)) ENGINE = MYISAM DEFAULT CHARSET = utf8");
run_query("CREATE TABLE IF NOT EXISTS `" . $config['table_prefix'] . "acc_calendars_par` (`id` int(11) NOT NULL AUTO_INCREMENT , `group_id` int(11) NOT NULL DEFAULT '0', `calendar_id` int(11) NOT NULL DEFAULT '0', `access` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`)) ENGINE = MYISAM DEFAULT CHARSET = utf8");
?>
