DROP TABLE IF EXISTS `site_plugin_contact_departments`;
CREATE TABLE IF NOT EXISTS `site_plugin_contact_departments` (
  `item_id` int(11) NOT NULL AUTO_INCREMENT,
  `module_id` int(11) NOT NULL,
  `item_show` int(1) NOT NULL,
  `item_order` int(11) NOT NULL,
  `item_phone` varchar(50) NOT NULL,
  `item_fax` varchar(50) NOT NULL,
  `item_email` varchar(100) NOT NULL,
  `item_email_template` varchar(100) NOT NULL,
  `item_email_autoresponder` varchar(100) NOT NULL,
  PRIMARY KEY (`item_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

DROP TABLE IF EXISTS `site_plugin_contact_departments_lang`;
CREATE TABLE IF NOT EXISTS `site_plugin_contact_departments_lang` (
  `item_id` int(11) NOT NULL,
  `module_id` INT NOT NULL,
  `lang_id` int(11) NOT NULL,
  `item_name` varchar(255) NOT NULL,
  `item_address` text NOT NULL,
  `item_contact_pers` varchar(100) NOT NULL,
  `item_webpage` text NOT NULL,
  KEY `item_id` (`item_id`),
  KEY `lang_id_2` (`lang_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `site_plugin_contact_fields`;
CREATE TABLE IF NOT EXISTS `site_plugin_contact_fields` (
  `item_id` int(11) NOT NULL AUTO_INCREMENT,
  `module_id` int(11) NOT NULL,
  `item_order` int(11) NOT NULL,
  `item_field` varchar(255) NOT NULL,
  `item_type` varchar(30) NOT NULL,
  `item_required` int(1) NOT NULL,
  `item_size` varchar(5) NOT NULL,
  `item_system` INT( 1 ) NOT NULL,
  PRIMARY KEY (`item_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ;

DROP TABLE IF EXISTS `site_plugin_contact_fields_lang`;
CREATE TABLE IF NOT EXISTS `site_plugin_contact_fields_lang` (
  `item_id` int(11) NOT NULL,
  `lang_id` int(3) NOT NULL,
  `module_id` int(11) NOT NULL,
  `item_title` varchar(255) NOT NULL,
  `item_error_msg` varchar(255) NOT NULL,
  `item_options` text NOT NULL,
  KEY `lang_id` (`lang_id`),
  KEY `item_id` (`item_id`),
  KEY `lang_id_2` (`lang_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `site_plugin_contact_images`;
CREATE TABLE IF NOT EXISTS `site_plugin_contact_images` (
  `item_id` int(11) NOT NULL AUTO_INCREMENT,
  `item_order` int(11) NOT NULL,
  `module_id` int(11) NOT NULL,
  `item_image` int(11) NOT NULL,
  PRIMARY KEY (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

DROP TABLE IF EXISTS `site_plugin_contact_links`;
CREATE TABLE IF NOT EXISTS `site_plugin_contact_links` (
  `item_id` int(11) NOT NULL AUTO_INCREMENT,
  `module_id` int(11) NOT NULL,
  `item_order` int(11) NOT NULL,
  `item_title` varchar(255) NOT NULL,
  `item_value` varchar(255) NOT NULL,
  `item_link` varchar(255) NOT NULL,
  PRIMARY KEY (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

DROP TABLE IF EXISTS `site_plugin_contact_messages`;
CREATE TABLE IF NOT EXISTS `site_plugin_contact_messages` (
  `item_id` int(11) NOT NULL AUTO_INCREMENT,
  `item_department` int(11) NOT NULL,
  `item_code` varchar(32) DEFAULT NULL,
  `item_file` int(1) DEFAULT NULL,
  `item_file_file` varchar(255) DEFAULT NULL,
  `module_id` int(11) DEFAULT NULL,
  `item_new` int(1) DEFAULT NULL,
  `item_replied` int(1) NOT NULL,
  `item_replied_date` int(11) NOT NULL,
  `item_date` int(11) DEFAULT NULL,
  `item_email` varchar(255) DEFAULT NULL,
  `item_name` varchar(255) DEFAULT NULL,
  `item_subject` varchar(255) DEFAULT NULL,
  `item_message` text,
  `item_anonymous` int(1) NOT NULL,
  PRIMARY KEY (`item_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
