--
-- Дамп данных таблицы `Module`
--

INSERT INTO `Module` (`Module_Name`, `Keyword`, `Description`, `Parameters`, `Example_URL`, `Help_URL`, `Installed`, `Number`, `Inside_Admin`, `Checked`) VALUES
('NETCAT_MODULE_SEARCH', 'search', 'NETCAT_MODULE_SEARCH_DESCRIPTION', 'ADMIN_SETTINGS_LOCATION=module.search.generalsettings', '', '', 1, '', 1, 1);

--
-- Структура таблицы `Search_BrokenLink`
--

CREATE TABLE IF NOT EXISTS `Search_BrokenLink` (
  `URL` text NOT NULL,
  `Referrer_URL` text NOT NULL,
  `Referrer_Document_ID` int(11) DEFAULT NULL,
  `ToDelete` tinyint(4) DEFAULT '0',
  KEY `URL` (`URL`(100)),
  KEY `Referrer_URL` (`Referrer_URL`(100))
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Структура таблицы `Search_Document`
--

CREATE TABLE IF NOT EXISTS `Search_Document` (
  `Document_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Catalogue_ID` int(11) NOT NULL,
  `Subdivision_ID` int(11) DEFAULT NULL,
  `Ancestors` text,
  `Path` text NOT NULL,
  `Title` text NOT NULL,
  `Content` mediumtext,
  `Meta` mediumtext,
  `ContentType` varchar(255) NOT NULL,
  `Language` varchar(255) NOT NULL,
  `IncludeInSitemap` tinyint(4) NOT NULL DEFAULT '0',
  `SitemapChangefreq` enum('','always','hourly','daily','weekly','monthly','yearly','never') DEFAULT NULL,
  `SitemapPriority` decimal(2,1) unsigned DEFAULT NULL,
  `Hash` char(40) DEFAULT NULL,
  `ToDelete` tinyint(4) NOT NULL DEFAULT '0',
  `LastModified` timestamp NULL DEFAULT NULL,
  `LastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`Document_ID`),
  KEY `Sitemap` (`Catalogue_ID`,`IncludeInSitemap`),
  KEY `Title` (`Title`(256))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `Search_Extension`
--

CREATE TABLE IF NOT EXISTS `Search_Extension` (
  `Rule_ID` int(11) NOT NULL AUTO_INCREMENT,
  `ExtensionInterface` varchar(255) NOT NULL,
  `ExtensionClass` varchar(255) NOT NULL,
  `SearchProvider` varchar(255) DEFAULT NULL,
  `Action` varchar(255) DEFAULT NULL,
  `Language` varchar(255) DEFAULT NULL,
  `ContentType` varchar(255) DEFAULT NULL,
  `Priority` tinyint(5) unsigned NOT NULL DEFAULT '127',
  `Checked` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`Rule_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=14 ;

--
-- Дамп данных таблицы `Search_Extension`
--

INSERT INTO `Search_Extension` (`Rule_ID`, `ExtensionInterface`, `ExtensionClass`, `SearchProvider`, `Action`, `Language`, `ContentType`, `Priority`, `Checked`) VALUES
(1, 'nc_search_provider', 'nc_search_provider_zend', '', '', '', '', 127, 1),
(2, 'nc_search_document_parser', 'nc_search_document_parser_html', '', '', '', 'text/html', 127, 1),
(3, 'nc_search_language_analyzer', 'nc_search_language_analyzer_morphy', '', '', 'ru', '', 127, 1),
(4, 'nc_search_language_analyzer', 'nc_search_language_analyzer_morphy', '', '', 'en', '', 127, 1),
(5, 'nc_search_language_filter', 'nc_search_language_filter_normalize', '', '', '', '', 20, 1),
(6, 'nc_search_language_filter', 'nc_search_language_filter_minlength', '', '', '', '', 40, 1),
(7, 'nc_search_language_filter', 'nc_search_language_filter_case', '', '', '', '', 60, 1),
(8, 'nc_search_language_filter', 'nc_search_language_filter_yo', '', '', 'ru', '', 80, 1),
(9, 'nc_search_language_filter', 'nc_search_language_filter_stopwords', '', '', '', '', 120, 1),
(10, 'nc_search_language_filter', 'nc_search_language_filter_synonyms', '', 'searching', '', '', 140, 1),
(11, 'nc_search_language_filter', 'nc_search_language_filter_analyzer', '', '', '', '', 100, 1),
(12, 'nc_search_language_corrector', 'nc_search_language_corrector_quotes', '', '', '', '', 50, 1),
(13, 'nc_search_language_corrector', 'nc_search_language_corrector_basic', '', '', '', '', 100, 1),
(14, 'nc_search_provider', 'nc_search_provider_index', '' , '' , '' , '', 127, 1);

-- --------------------------------------------------------

--
-- Структура таблицы `Search_Field`
--

CREATE TABLE IF NOT EXISTS `Search_Field` (
  `Name` varchar(255) NOT NULL,
  `Weight` decimal(5,2) unsigned NOT NULL,
  `Type` tinyint(4) NOT NULL DEFAULT '0',
  `IsIndexed` tinyint(4) NOT NULL DEFAULT '1',
  `IsSearchable` tinyint(4) NOT NULL DEFAULT '1',
  `IsNormalized` tinyint(4) NOT NULL DEFAULT '1',
  `IsSortable` tinyint(4) NOT NULL DEFAULT '0',
  `IsStored` tinyint(4) NOT NULL DEFAULT '0',
  `IsRetrievable` tinyint(4) NOT NULL DEFAULT '0',
  `Query` text,
  `QueryScope` enum('document','content') DEFAULT 'document',
  `QueryUseFirstMatched` tinyint(4) NOT NULL,
  `FilterContent` text,
  `RemoveFromParent` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`Name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `Search_Field`
--

INSERT INTO `Search_Field` (`Name`, `Weight`, `Type`, `IsIndexed`, `IsSearchable`, `IsNormalized`, `IsSortable`, `IsStored`, `IsRetrievable`, `Query`, `QueryScope`, `QueryUseFirstMatched`, `FilterContent`, `RemoveFromParent`) VALUES
('title', 3.00, 0, 1, 1, 1, 0, 0, 0, 'title', 'document', 0, NULL, 0),
('content', 1.00, 0, 1, 1, 1, 0, 0, 0, '#<!--\\s*content\\s*-->(.+?)<!--\\s*/content\\s*-->#si\r\nbody', 'document', 1, '#<!--\\s*noindex\\s*-->(.+?)<!--\\s*/noindex\\s*-->#si\nscript\nstyle', 0),
('meta', 2.00, 0, 1, 1, 1, 0, 0, 0, '//meta[@name="keywords"]/@content\r\n//meta[@name="description"]/@content', 'document', 0, NULL, 0),
('w2', 2.00, 0, 1, 1, 1, 0, 0, 0, 'h1 h2 h3', 'content', 0, NULL, 1),
('w1_5', 1.50, 0, 1, 1, 1, 0, 0, 0, 'b strong', 'content', 0, NULL, 1);

-- --------------------------------------------------------

--
-- Структура таблицы `Search_Link`
--

CREATE TABLE IF NOT EXISTS `Search_Link` (
  `Link_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Hash` binary(20) NOT NULL,
  `URL` text NOT NULL,
  `Processed` tinyint(4) NOT NULL,
  `Broken` tinyint(4) NOT NULL,
  PRIMARY KEY (`Link_ID`),
  UNIQUE KEY `Hash` (`Hash`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `Search_LinkReferrer`
--

CREATE TABLE IF NOT EXISTS `Search_LinkReferrer` (
  `Source_Document_ID` int(11) DEFAULT NULL,
  `Source_Link_ID` int(11) NOT NULL,
  `Target_Link_ID` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Структура таблицы `Search_Log`
--

CREATE TABLE IF NOT EXISTS `Search_Log` (
  `Log_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Type` varchar(255) NOT NULL,
  `Message` mediumtext NOT NULL,
  PRIMARY KEY (`Log_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `Search_Query`
--

CREATE TABLE IF NOT EXISTS `Search_Query` (
  `Query_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `QueryString` varchar(255) NOT NULL,
  `Area` text,
  `Catalogue_ID` int(11) DEFAULT NULL,
  `Language` varchar(255) DEFAULT NULL,
  `ResultsCount` int(11) NOT NULL,
  `IP` int(11) DEFAULT NULL,
  `User_ID` int(11) DEFAULT NULL,
  PRIMARY KEY (`Query_ID`),
  KEY `QueryString` (`QueryString`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `Search_Rule`
--

CREATE TABLE IF NOT EXISTS `Search_Rule` (
  `Rule_ID` int(11) NOT NULL auto_increment,
  `Name` varchar(255) NOT NULL,
  `Catalogue_ID` int(11) default NULL,
  `AreaString` text,
  `Https` tinyint(1) default 0,
  `Interval` smallint(6) default NULL,
  `IntervalType` varchar(255) NOT NULL,
  `Hour` tinyint(4) default NULL,
  `Minute` tinyint(4) default NULL,
  `LastStartTime` int(11) default NULL,
  `LastFinishTime` int(11) default NULL,
  `LastResult` blob NOT NULL,
  PRIMARY KEY  (`Rule_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Структура таблицы `Search_Schedule`
--

CREATE TABLE IF NOT EXISTS `Search_Schedule` (
  `Schedule_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Type` tinyint(4) NOT NULL,
  `AreaString` text NOT NULL,
  `StartTime` int(11) NOT NULL,
  PRIMARY KEY (`Schedule_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Структура таблицы `Search_Stopword`
--

CREATE TABLE IF NOT EXISTS `Search_Stopword` (
  `Word_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Language` varchar(10) NOT NULL,
  `Word` varchar(255) NOT NULL,
  PRIMARY KEY (`Word_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=492 ;

--
-- Дамп данных таблицы `Search_Stopword`
--

INSERT INTO `Search_Stopword` (`Word_ID`, `Language`, `Word`) VALUES
(1, 'ru', 'А'),
(2, 'ru', 'БЕЗ'),
(3, 'ru', 'БОЛЕЕ'),
(4, 'ru', 'БЫ'),
(5, 'ru', 'БЫТЬ'),
(6, 'ru', 'В'),
(7, 'ru', 'ВЕСИТЬ'),
(8, 'ru', 'ВЕСЬ'),
(9, 'ru', 'ВОТ'),
(10, 'ru', 'ВСЕ'),
(11, 'ru', 'ВЫ'),
(12, 'ru', 'ГДЕ'),
(13, 'ru', 'ДА'),
(14, 'ru', 'ДАЖЕ'),
(15, 'ru', 'ДЛИТЬ'),
(16, 'ru', 'ДЛЯ'),
(17, 'ru', 'ДО'),
(18, 'ru', 'ЕСЛИ'),
(19, 'ru', 'ЕЩЕ'),
(20, 'ru', 'ЖЕ'),
(21, 'ru', 'ЗА'),
(22, 'ru', 'ЗДЕСЬ'),
(23, 'ru', 'И'),
(24, 'ru', 'ИЗ'),
(25, 'ru', 'ИЛИ'),
(26, 'ru', 'К'),
(27, 'ru', 'КАК'),
(28, 'ru', 'КО'),
(29, 'ru', 'КОГДА'),
(30, 'ru', 'КТО'),
(31, 'ru', 'ЛИ'),
(32, 'ru', 'ЛИБО'),
(33, 'ru', 'МНОГО'),
(34, 'ru', 'МОЖЕТ'),
(35, 'ru', 'МОЧЬ'),
(36, 'ru', 'МЫ'),
(37, 'ru', 'НА'),
(38, 'ru', 'НАДО'),
(39, 'ru', 'НЕ'),
(40, 'ru', 'НЕТ'),
(41, 'ru', 'НИ'),
(42, 'ru', 'НО'),
(43, 'ru', 'НУ'),
(44, 'ru', 'О'),
(45, 'ru', 'ОБ'),
(46, 'ru', 'ОДНАКО'),
(47, 'ru', 'ОН'),
(48, 'ru', 'ОНА'),
(49, 'ru', 'ОНИ'),
(50, 'ru', 'ОНО'),
(51, 'ru', 'ОТ'),
(52, 'ru', 'ОЧЕНЬ'),
(53, 'ru', 'ПЕРЕТЬ'),
(54, 'ru', 'ПО'),
(55, 'ru', 'ПОД'),
(56, 'ru', 'ПРИ'),
(57, 'ru', 'ПРЯ'),
(58, 'ru', 'С'),
(59, 'ru', 'СО'),
(60, 'ru', 'ТАК'),
(61, 'ru', 'ТАКОЙ'),
(62, 'ru', 'ТАМ'),
(63, 'ru', 'ТО'),
(64, 'ru', 'ТОГО'),
(65, 'ru', 'ТОЖЕ'),
(66, 'ru', 'ТОЛЬКО'),
(67, 'ru', 'ТОТ'),
(68, 'ru', 'ТЫ'),
(69, 'ru', 'У'),
(70, 'ru', 'УЖ'),
(71, 'ru', 'УЖЕ'),
(72, 'ru', 'УЗКИЙ'),
(73, 'ru', 'ХОТЕТЬ'),
(74, 'ru', 'ХОТЯ'),
(75, 'ru', 'ЧЕГО'),
(76, 'ru', 'ЧЕЙ'),
(77, 'ru', 'ЧЕМ'),
(78, 'ru', 'ЧТО'),
(79, 'ru', 'ЧТОБЫ'),
(80, 'ru', 'ЭТО'),
(81, 'ru', 'ЭТОТ'),
(82, 'ru', 'Я'),
(83, 'en', 'A'),
(84, 'en', 'ABLE'),
(85, 'en', 'ABOUT'),
(86, 'en', 'ABOVE'),
(87, 'en', 'ACCORD'),
(88, 'en', 'ACCORDING'),
(89, 'en', 'ACCORDINGLY'),
(90, 'en', 'ACROSS'),
(91, 'en', 'ACTUALLY'),
(92, 'en', 'AFTER'),
(93, 'en', 'AFTERWARDS'),
(94, 'en', 'AGAIN'),
(95, 'en', 'AGAINST'),
(96, 'en', 'ALL'),
(97, 'en', 'ALLOW'),
(98, 'en', 'ALMOST'),
(99, 'en', 'ALONE'),
(100, 'en', 'ALONG'),
(101, 'en', 'ALREADY'),
(102, 'en', 'ALSO'),
(103, 'en', 'ALTHOUGH'),
(104, 'en', 'ALWAYS'),
(105, 'en', 'AMONG'),
(106, 'en', 'AMONGST'),
(107, 'en', 'AN'),
(108, 'en', 'AND'),
(109, 'en', 'ANOTHER'),
(110, 'en', 'ANY'),
(111, 'en', 'ANYBODY'),
(112, 'en', 'ANYHOW'),
(113, 'en', 'ANYONE'),
(114, 'en', 'ANYTHING'),
(115, 'en', 'ANYWAY'),
(116, 'en', 'ANYWAYS'),
(117, 'en', 'ANYWHERE'),
(118, 'en', 'APART'),
(119, 'en', 'APPEAR'),
(120, 'en', 'APPRECIATE'),
(121, 'en', 'APPROPRIATE'),
(122, 'en', 'AROUND'),
(123, 'en', 'AS'),
(124, 'en', 'ASIDE'),
(125, 'en', 'ASK'),
(126, 'en', 'ASKING'),
(127, 'en', 'ASSOCIATE'),
(128, 'en', 'ASSOCIATED'),
(129, 'en', 'AT'),
(130, 'en', 'AVAILABLE'),
(131, 'en', 'AWAY'),
(132, 'en', 'AWFULLY'),
(133, 'en', 'BE'),
(134, 'en', 'BECAUSE'),
(135, 'en', 'BECOME'),
(136, 'en', 'BEFORE'),
(137, 'en', 'BEFOREHAND'),
(138, 'en', 'BEHIND'),
(139, 'en', 'BELIEVE'),
(140, 'en', 'BELOW'),
(141, 'en', 'BESIDE'),
(142, 'en', 'BESIDES'),
(143, 'en', 'BEST'),
(144, 'en', 'BETTER'),
(145, 'en', 'BETWEEN'),
(146, 'en', 'BEYOND'),
(147, 'en', 'BOTH'),
(148, 'en', 'BRIEF'),
(149, 'en', 'BUT'),
(150, 'en', 'BY'),
(151, 'en', 'CAN'),
(152, 'en', 'CANNOT'),
(153, 'en', 'CANT'),
(154, 'en', 'CAUSE'),
(155, 'en', 'CERTAIN'),
(156, 'en', 'CERTAINLY'),
(157, 'en', 'CHANGE'),
(158, 'en', 'CLEARLY'),
(159, 'en', 'CO'),
(160, 'en', 'COME'),
(161, 'en', 'CONCERN'),
(162, 'en', 'CONCERNING'),
(163, 'en', 'CONSEQUENTLY'),
(164, 'en', 'CONSIDER'),
(165, 'en', 'CONSIDERING'),
(166, 'en', 'CONTAIN'),
(167, 'en', 'CORRESPOND'),
(168, 'en', 'CORRESPONDING'),
(169, 'en', 'COURSE'),
(170, 'en', 'CURRENTLY'),
(171, 'en', 'DEFINITELY'),
(172, 'en', 'DESCRIBE'),
(173, 'en', 'DESPITE'),
(174, 'en', 'DIFFERENT'),
(175, 'en', 'DO'),
(176, 'en', 'DOE'),
(177, 'en', 'DOING'),
(178, 'en', 'DOWN'),
(179, 'en', 'DOWNWARDS'),
(180, 'en', 'DURING'),
(181, 'en', 'EACH'),
(182, 'en', 'EG'),
(183, 'en', 'EITHER'),
(184, 'en', 'ELSE'),
(185, 'en', 'ELSEWHERE'),
(186, 'en', 'ENOUGH'),
(187, 'en', 'ENTIRELY'),
(188, 'en', 'ESPECIALLY'),
(189, 'en', 'ET'),
(190, 'en', 'EVEN'),
(191, 'en', 'EVER'),
(192, 'en', 'EVERY'),
(193, 'en', 'EVERYBODY'),
(194, 'en', 'EVERYONE'),
(195, 'en', 'EVERYTHING'),
(196, 'en', 'EVERYWHERE'),
(197, 'en', 'EXACTLY'),
(198, 'en', 'EXCEPT'),
(199, 'en', 'FAR'),
(200, 'en', 'FEW'),
(201, 'en', 'FOLLOW'),
(202, 'en', 'FOR'),
(203, 'en', 'FORMER'),
(204, 'en', 'FORMERLY'),
(205, 'en', 'FROM'),
(206, 'en', 'FURTHER'),
(207, 'en', 'FURTHERMORE'),
(208, 'en', 'GET'),
(209, 'en', 'GETTING'),
(210, 'en', 'GIVE'),
(211, 'en', 'GIVEN'),
(212, 'en', 'GO'),
(213, 'en', 'GOING'),
(214, 'en', 'GONE'),
(215, 'en', 'GOOD'),
(216, 'en', 'GOTTEN'),
(217, 'en', 'GREETING'),
(218, 'en', 'HA'),
(219, 'en', 'HAPPEN'),
(220, 'en', 'HARDLY'),
(221, 'en', 'HAVE'),
(222, 'en', 'HAVING'),
(223, 'en', 'HE'),
(224, 'en', 'HELLO'),
(225, 'en', 'HENCE'),
(226, 'en', 'HER'),
(227, 'en', 'HERE'),
(228, 'en', 'HEREAFTER'),
(229, 'en', 'HEREBY'),
(230, 'en', 'HEREIN'),
(231, 'en', 'HEREUPON'),
(232, 'en', 'HERSELF'),
(233, 'en', 'HI'),
(234, 'en', 'HIMSELF'),
(235, 'en', 'HIS'),
(236, 'en', 'HITHER'),
(237, 'en', 'HOPEFULLY'),
(238, 'en', 'HOW'),
(239, 'en', 'HOWBEIT'),
(240, 'en', 'HOWEVER'),
(241, 'en', 'I'),
(242, 'en', 'IF'),
(243, 'en', 'IGNORE'),
(244, 'en', 'IMMEDIATE'),
(245, 'en', 'IN'),
(246, 'en', 'INASMUCH'),
(247, 'en', 'INDEED'),
(248, 'en', 'INDICATE'),
(249, 'en', 'INNER'),
(250, 'en', 'INSOFAR'),
(251, 'en', 'INSTEAD'),
(252, 'en', 'INTO'),
(253, 'en', 'INWARD'),
(254, 'en', 'IT'),
(255, 'en', 'ITS'),
(256, 'en', 'ITSELF'),
(257, 'en', 'JUST'),
(258, 'en', 'KEEP'),
(259, 'en', 'KEPT'),
(260, 'en', 'KNOW'),
(261, 'en', 'KNOWN'),
(262, 'en', 'LAST'),
(263, 'en', 'LATE'),
(264, 'en', 'LATELY'),
(265, 'en', 'LATER'),
(266, 'en', 'LATTER'),
(267, 'en', 'LEAST'),
(268, 'en', 'LESS'),
(269, 'en', 'LEST'),
(270, 'en', 'LET'),
(271, 'en', 'LIKE'),
(272, 'en', 'LIKELY'),
(273, 'en', 'LITTLE'),
(274, 'en', 'LL'),
(275, 'en', 'LOOK'),
(276, 'en', 'LOOKING'),
(277, 'en', 'LTD'),
(278, 'en', 'MAINLY'),
(279, 'en', 'MANY'),
(280, 'en', 'MAY'),
(281, 'en', 'MAYBE'),
(282, 'en', 'MEAN'),
(283, 'en', 'MEANWHILE'),
(284, 'en', 'MERELY'),
(285, 'en', 'MORE'),
(286, 'en', 'MOREOVER'),
(287, 'en', 'MOST'),
(288, 'en', 'MOSTLY'),
(289, 'en', 'MUCH'),
(290, 'en', 'MUST'),
(291, 'en', 'MY'),
(292, 'en', 'MYSELF'),
(293, 'en', 'NAME'),
(294, 'en', 'NAMELY'),
(295, 'en', 'ND'),
(296, 'en', 'NEAR'),
(297, 'en', 'NEARLY'),
(298, 'en', 'NECESSARY'),
(299, 'en', 'NEED'),
(300, 'en', 'NEITHER'),
(301, 'en', 'NEVER'),
(302, 'en', 'NEVERTHELESS'),
(303, 'en', 'NEW'),
(304, 'en', 'NEXT'),
(305, 'en', 'NO'),
(306, 'en', 'NOBODY'),
(307, 'en', 'NON'),
(308, 'en', 'NONE'),
(309, 'en', 'NOONE'),
(310, 'en', 'NOR'),
(311, 'en', 'NORMALLY'),
(312, 'en', 'NOT'),
(313, 'en', 'NOTHING'),
(314, 'en', 'NOW'),
(315, 'en', 'NOWHERE'),
(316, 'en', 'O'),
(317, 'en', 'OBVIOUSLY'),
(318, 'en', 'OF'),
(319, 'en', 'OFF'),
(320, 'en', 'OFTEN'),
(321, 'en', 'OH'),
(322, 'en', 'OK'),
(323, 'en', 'OKAY'),
(324, 'en', 'OLD'),
(325, 'en', 'ON'),
(326, 'en', 'ONCE'),
(327, 'en', 'ONE'),
(328, 'en', 'ONLY'),
(329, 'en', 'ONTO'),
(330, 'en', 'OR'),
(331, 'en', 'OTHER'),
(332, 'en', 'OTHERWISE'),
(333, 'en', 'OUGHT'),
(334, 'en', 'OUR'),
(335, 'en', 'OURSELF'),
(336, 'en', 'OUT'),
(337, 'en', 'OUTSIDE'),
(338, 'en', 'OVER'),
(339, 'en', 'OVERALL'),
(340, 'en', 'OWN'),
(341, 'en', 'PARTICULAR'),
(342, 'en', 'PARTICULARLY'),
(343, 'en', 'PER'),
(344, 'en', 'PERHAPS'),
(345, 'en', 'PLACE'),
(346, 'en', 'PLACED'),
(347, 'en', 'PLEASE'),
(348, 'en', 'PLUS'),
(349, 'en', 'POSSIBLE'),
(350, 'en', 'PRESUMABLY'),
(351, 'en', 'PROBABLY'),
(352, 'en', 'PROVIDE'),
(353, 'en', 'QUITE'),
(354, 'en', 'RATHE'),
(355, 'en', 'RATHER'),
(356, 'en', 'RD'),
(357, 'en', 'RE'),
(358, 'en', 'REALLY'),
(359, 'en', 'REASONABLY'),
(360, 'en', 'REGARD'),
(361, 'en', 'REGARDING'),
(362, 'en', 'REGARDLESS'),
(363, 'en', 'RELATIVELY'),
(364, 'en', 'RESPECTIVELY'),
(365, 'en', 'RIGHT'),
(366, 'en', 'SAME'),
(367, 'en', 'SAW'),
(368, 'en', 'SAY'),
(369, 'en', 'SAYING'),
(370, 'en', 'SEE'),
(371, 'en', 'SEEING'),
(372, 'en', 'SEEM'),
(373, 'en', 'SEEMING'),
(374, 'en', 'SELF'),
(375, 'en', 'SENSIBLE'),
(376, 'en', 'SERIOUS'),
(377, 'en', 'SERIOUSLY'),
(378, 'en', 'SEVERAL'),
(379, 'en', 'SHALL'),
(380, 'en', 'SHE'),
(381, 'en', 'SINCE'),
(382, 'en', 'SO'),
(383, 'en', 'SOME'),
(384, 'en', 'SOMEBODY'),
(385, 'en', 'SOMEHOW'),
(386, 'en', 'SOMEONE'),
(387, 'en', 'SOMETHING'),
(388, 'en', 'SOMETIME'),
(389, 'en', 'SOMETIMES'),
(390, 'en', 'SOMEWHAT'),
(391, 'en', 'SOMEWHERE'),
(392, 'en', 'SOON'),
(393, 'en', 'SORRY'),
(394, 'en', 'SPECIFY'),
(395, 'en', 'STILL'),
(396, 'en', 'SUCH'),
(397, 'en', 'SURE'),
(398, 'en', 'TAKE'),
(399, 'en', 'TELL'),
(400, 'en', 'TEND'),
(401, 'en', 'THAN'),
(402, 'en', 'THANK'),
(403, 'en', 'THANX'),
(404, 'en', 'THAT'),
(405, 'en', 'THE'),
(406, 'en', 'THEIR'),
(407, 'en', 'THEMSELVES'),
(408, 'en', 'THEN'),
(409, 'en', 'THENCE'),
(410, 'en', 'THERE'),
(411, 'en', 'THEREAFTER'),
(412, 'en', 'THEREBY'),
(413, 'en', 'THEREFORE'),
(414, 'en', 'THEREIN'),
(415, 'en', 'THERES'),
(416, 'en', 'THEREUPON'),
(417, 'en', 'THEY'),
(418, 'en', 'THINK'),
(419, 'en', 'THIS'),
(420, 'en', 'THOROUGH'),
(421, 'en', 'THOROUGHLY'),
(422, 'en', 'THOUGH'),
(423, 'en', 'THROUGH'),
(424, 'en', 'THROUGHOUT'),
(425, 'en', 'THRU'),
(426, 'en', 'THUS'),
(427, 'en', 'TO'),
(428, 'en', 'TOGETHER'),
(429, 'en', 'TOO'),
(430, 'en', 'TOWARD'),
(431, 'en', 'TOWARDS'),
(432, 'en', 'TRULY'),
(433, 'en', 'TRY'),
(434, 'en', 'TRYING'),
(435, 'en', 'U'),
(436, 'en', 'UN'),
(437, 'en', 'UNDER'),
(438, 'en', 'UNFORTUNATELY'),
(439, 'en', 'UNLESS'),
(440, 'en', 'UNLIKELY'),
(441, 'en', 'UNTIL'),
(442, 'en', 'UNTO'),
(443, 'en', 'UP'),
(444, 'en', 'UPON'),
(445, 'en', 'USE'),
(446, 'en', 'USED'),
(447, 'en', 'USEFUL'),
(448, 'en', 'USUALLY'),
(449, 'en', 'V'),
(450, 'en', 'VALUE'),
(451, 'en', 'VARIOUS'),
(452, 'en', 'VERY'),
(453, 'en', 'VIA'),
(454, 'en', 'VIZ'),
(455, 'en', 'WANT'),
(456, 'en', 'WAY'),
(457, 'en', 'WE'),
(458, 'en', 'WELL'),
(459, 'en', 'WHAT'),
(460, 'en', 'WHATEVER'),
(461, 'en', 'WHEN'),
(462, 'en', 'WHENCE'),
(463, 'en', 'WHENEVER'),
(464, 'en', 'WHERE'),
(465, 'en', 'WHEREAFTER'),
(466, 'en', 'WHEREAS'),
(467, 'en', 'WHEREBY'),
(468, 'en', 'WHEREIN'),
(469, 'en', 'WHEREUPON'),
(470, 'en', 'WHEREVER'),
(471, 'en', 'WHETHER'),
(472, 'en', 'WHICH'),
(473, 'en', 'WHILE'),
(474, 'en', 'WHITHER'),
(475, 'en', 'WHO'),
(476, 'en', 'WHOEVER'),
(477, 'en', 'WHOLE'),
(478, 'en', 'WHOSE'),
(479, 'en', 'WHY'),
(480, 'en', 'WILL'),
(481, 'en', 'WILLING'),
(482, 'en', 'WISH'),
(483, 'en', 'WITH'),
(484, 'en', 'WITHIN'),
(485, 'en', 'WITHOUT'),
(486, 'en', 'WOULD'),
(487, 'en', 'YES'),
(488, 'en', 'YET'),
(489, 'en', 'YOU'),
(490, 'en', 'YOUR'),
(491, 'en', 'YOURSELF');

-- --------------------------------------------------------

--
-- Структура таблицы `Search_Synonym`
--

CREATE TABLE IF NOT EXISTS `Search_Synonym` (
  `Synonyms_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Language` varchar(10) NOT NULL,
  `Words` text NOT NULL,
  PRIMARY KEY (`Synonyms_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Дамп данных таблицы `Search_Synonym`
--

INSERT INTO `Search_Synonym` (`Synonyms_ID`, `Language`, `Words`) VALUES
(1, 'ru', 'a:2:{i:0;s:6:"NETCAT";i:1;s:14:"НЕТКЭТА";}');

-- --------------------------------------------------------

--
-- Структура таблицы `Search_Task`
--

CREATE TABLE IF NOT EXISTS `Search_Task` (
  `Task_ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `RunnerType` TINYINT UNSIGNED,
  `Links` mediumblob NOT NULL,
  `Area` mediumblob NOT NULL,
  `Disallowed` mediumblob,
  `Rule_ID` int(11) DEFAULT NULL,
  `StartTime` int(11) DEFAULT NULL,
  `TotalProcessed` int(11) DEFAULT '0',
  `TotalChecked` int(11) DEFAULT '0',
  `TotalNotFound` int(11) DEFAULT '0',
  `TotalDeleted` int(11) DEFAULT '0',
  `Token` int(11) NOT NULL,
  `LastActivity` int(11) DEFAULT NULL,
  `IsIdle` TINYINT UNSIGNED NOT NULL DEFAULT '0',
  PRIMARY KEY (`Task_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `Class`
--

INSERT INTO `Class` (`Class_ID`, `IsAuxiliary`, `Class_Name`, `Class_Group`, `DaysToHold`, `AllowTags`, `FormPrefix`, `FormSuffix`, `RecordTemplate`, `RecordsPerPage`, `SortBy`, `RecordTemplateFull`, `TitleTemplate`, `TitleList`, `UseAltTitle`, `AddTemplate`, `EditTemplate`, `AddActionTemplate`, `EditActionTemplate`, `SearchTemplate`, `FullSearchTemplate`, `SubscribeTemplate`, `System_Table_ID`, `Settings`, `AddCond`, `EditCond`, `SubscribeCond`, `DeleteCond`, `NL2BR`, `UseCaptcha`, `CheckActionTemplate`, `DeleteActionTemplate`, `CustomSettingsTemplate`, `ClassDescription`, `DeleteTemplate`, `ClassTemplate`, `Type`, `File_Mode`, `File_Path`, `File_Hash`) VALUES
(234, 1, 'Поиск по сайту', 'Поиск по сайту', 0, 0, '', '', '', 10, '', '', '', '', 0, '', '', '', '', '', '', '', 0, '', '', '', '', '', 1, 0, '', '', '', '', '', 0, 'useful', 1, '/234/', '8620972a3d3357b9a70fd695dd923f6d'),
(261, 1, 'Поиск по сайту (Мобильный)', 'Шаблоны компонентов', 0, 0, '', '', '', 5, '', '', '', '', 0, '', '', '', '', '', '', '', 0, '', '', '', '', '', 1, 0, '', '', '', '', '', 234, 'mobile', 1, '/234/261/', '36c293195c5eb87d1a47a297e0cc59ef'),
(449, 1, 'Для корзины удаленных объектов', 'Шаблоны компонентов', 0, 0, '', '', '', 20, '', '', NULL, NULL, 0, '', '', '', '', '', '', '', 0, '', '', '', '', '', 1, 0, '', '', NULL, NULL, '', 234, 'trash', 1, '/234/449/', '0bbc28b44382782356f81036ae41aeaf');

--
-- Структура таблицы `Message234`
--

CREATE TABLE IF NOT EXISTS `Message234` (
  `Message_ID` int(11) NOT NULL AUTO_INCREMENT,
  `User_ID` int(11) NOT NULL,
  `Subdivision_ID` int(11) NOT NULL,
  `Sub_Class_ID` int(11) NOT NULL,
  `Priority` int(11) NOT NULL DEFAULT '0',
  `Keyword` char(255) NOT NULL,
  `ncTitle` varchar(255) DEFAULT NULL,
  `ncKeywords` varchar(255) DEFAULT NULL,
  `ncDescription` text,
  `Checked` tinyint(4) NOT NULL DEFAULT '1',
  `TimeToDelete` date DEFAULT NULL,
  `TimeToUncheck` date DEFAULT NULL,
  `IP` char(15) DEFAULT NULL,
  `UserAgent` char(255) DEFAULT NULL,
  `Parent_Message_ID` int(11) NOT NULL DEFAULT '0',
  `Created` datetime NOT NULL,
  `LastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `LastUser_ID` int(11) NOT NULL,
  `LastIP` char(15) DEFAULT NULL,
  `LastUserAgent` char(255) DEFAULT NULL,
  PRIMARY KEY (`Message_ID`),
  UNIQUE KEY `Sub_Class_ID` (`Sub_Class_ID`,`Message_ID`,`Keyword`),
  KEY `User_ID` (`User_ID`),
  KEY `LastUser_ID` (`LastUser_ID`),
  KEY `Subdivision_ID` (`Subdivision_ID`),
  KEY `Parent_Message_ID` (`Parent_Message_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `Settings`
--

INSERT INTO `Settings` (`Key`, `Value`, `Module`, `Catalogue_ID`) VALUES
('ComponentID', '234', 'search', 0),
('ExcludeUrlRegexps', 'subscribe_\r\nadd_reply\r\nadd_topic\r\nbacklink\r\nnetcat/\r\nrss\r\nxml\r\ntag=\r\nsortBy=\r\nsortDesc=\r\nrecNum=', 'search', 0),
('SearchFormTemplate', '// Общие компоненты формы\r\n$form_start = "<form class=''nc_search'' action=''$actionurl'' method=''GET''>";\r\n$input = "<input class=''text'' type=''text'' size=''$inputsize'' name=''search_query''" .\r\n         " id=''nc_search_query'' value=''$inputvalue'' />";\r\n$submit = "<input class=''submit'' type=''submit'' value=''" . htmlspecialchars($submitname) . "'' />";\r\n$advanced = (!in_array($showadvancedlink, array(1, true, "on", "yes")) ? "" :\r\n    "<div class=''advancedlink''><a href=''$actionurl?advanced=1''>" .\r\n       NETCAT_MODULE_SEARCH_ADVANCED_LINK_TEXT .\r\n    "</a></div>");\r\n\r\n// Форма поиска без уточнения области\r\n$searchform["empty"]["prefix"] = $form_start . $input . $submit;\r\n$searchform["empty"]["active"] = "";\r\n$searchform["empty"]["unactive"] = "";\r\n$searchform["empty"]["divider"] = "";\r\n$searchform["empty"]["suffix"] = $advanced . "</form>";\r\n\r\n// Форма поиска со скрытой областью поиска\r\n$searchform["hidden"]["prefix"] = $form_start . $input . $submit;\r\n$searchform["hidden"]["active"] = "<input type=''hidden'' id=''nc_search_area_%AREANUM'' name=''area[]'' value=''%AREA'' />";\r\n$searchform["hidden"]["unactive"] = "<input type=''hidden'' id=''nc_search_area_%AREANUM'' name=''area[]'' value=''%AREA'' />";\r\n$searchform["hidden"]["divider"] = "<input type=''hidden'' id=''nc_search_area_%AREANUM'' name=''area[]'' value=''%AREA'' />";\r\n$searchform["hidden"]["suffix"] = $advanced . "</form>";\r\n\r\n// Форма поиска с выбором области поиска радиокнопкой\r\n$searchform["radio"]["prefix"] = $form_start . $input . $submit . "<div class=''areas''>";\r\n$searchform["radio"]["unactive"] =\r\n  "<span class=''radio''><input type=''radio'' id=''nc_search_area_%AREANUM'' name=''area'' value=''%AREA'' />" .\r\n  "<label for=''nc_search_area_%AREANUM''>%NAME</label></span>";\r\n$searchform["radio"]["active"] =\r\n  "<span class=''radio''><input type=''radio'' id=''nc_search_area_%AREANUM'' name=''area'' value=''%AREA'' checked=''checked'' /> " .\r\n  "<label for=''nc_search_area_%AREANUM''>%NAME</label></span>";\r\n$searchform["radio"]["divider"] = " ";\r\n$searchform["radio"]["suffix"] = "</div>" . $advanced . "</form>";\r\n\r\n// Форма поиска с выбором области поиска чекбоксом\r\n$searchform["checkbox"]["prefix"] = $form_start . $input . $submit . "<div class=''areas''>";\r\n$searchform["checkbox"]["unactive"] =\r\n  "<span class=''checkbox''><input type=''checkbox'' id=''nc_search_area_%AREANUM'' name=''area[]'' value=''%AREA'' />" .\r\n  "<label for=''nc_search_area_%AREANUM''>%NAME</label></span>";\r\n$searchform["checkbox"]["active"] =\r\n  "<span class=''checkbox''><input type=''checkbox'' id=''nc_search_area_%AREANUM'' name=''area'' value=''%AREA'' checked=''checked'' /> " .\r\n  "<label for=''nc_search_area_%AREANUM''>%NAME</label></span>";\r\n$searchform["checkbox"]["divider"] = " ";\r\n$searchform["checkbox"]["suffix"] = "</div>" . $advanced . "</form>";\r\n\r\n// Форма поиска с выбором области поиска выпадающим списком\r\n$searchform["select"]["prefix"] = $form_start . $input . "<select name=''area'' class=''area_select''>";\r\n$searchform["select"]["unactive"] = "<option value=''%AREA''>%NAME</option>";\r\n$searchform["select"]["active"] = "<option value=''%AREA'' selected=''1''>%NAME</option>";\r\n$searchform["select"]["divider"] = "\\n";\r\n$searchform["select"]["suffix"] = "</select>" . $submit . $advanced . "</form>";\r\n\r\n// Форма поиска с выбором области поиска ссылкой (нажатие на ссылку перезагружает\r\n// текущую страницу с параметром &area=; для использования на странице поиска)\r\n$searchform["links"]["prefix"] = $form_start . $input . $submit . "<div class=''areas''>";\r\n$searchform["links"]["unactive"] = "<span class=''link''><a href=''%URL&amp;area=%AREA''>%NAME</a></span>";\r\n$searchform["links"]["active"] = "<span class=''link link_active''>%NAME</span>";\r\n$searchform["links"]["divider"] = " ";\r\n$searchform["links"]["suffix"] = "</div>" . $advanced . "</form>";\r\n', 'search', 0),
('AdvancedSearchFormTemplate', '$advsearchform["prefix"] = "\r\n<form class=''nc_search'' method=''GET''>\r\n<table class=''nc_search_extra_form''>";\r\n\r\n$advsearchform["input"] = "\r\n    <tr>\r\n        <td>\r\n            <div class=''param''>\r\n                <div class=''caption''>" . NETCAT_MODULE_SEARCH_FIND_CAPTION . ":</div>\r\n            </div>\r\n        </td>\r\n\r\n        <td>\r\n            <div class=''input''>\r\n                <input type=''text'' name=''search_query'' value=''$inputvalue'' />\r\n            </div>\r\n        </td>\r\n    </tr>";\r\n\r\n$advsearchform["exclude"] = "\r\n    <tr>\r\n        <td>\r\n            <div class=''param''>\r\n                <div class=''caption''>" . NETCAT_MODULE_SEARCH_EXCLUDE_CAPTION . ":</div>\r\n            </div>\r\n        </td>\r\n\r\n        <td>\r\n            <div class=''input''>\r\n                <input type=''text'' name=''search_query_exclude'' value='''' />\r\n            </div>\r\n        </td>\r\n    </tr>";\r\n\r\n$advsearchform["field"] = "\r\n    <tr>\r\n        <td>\r\n            <div class=''param''>\r\n                <div class=''caption''>" . NETCAT_MODULE_SEARCH_FIELD_CAPTION . ":</div>\r\n            </div>\r\n        </td>\r\n\r\n        <td>\r\n            <div>\r\n                <div>\r\n                    <input type=''radio'' name=''field'' value='''' checked=''checked'' id=''nc_search_field_any'' />\r\n                    " . NETCAT_MODULE_SEARCH_FIELD_ANY . "\r\n                </div>\r\n\r\n                <div>\r\n                   <input type=''radio'' name=''field'' value=''title'' id=''nc_search_field_title'' />\r\n                   " . NETCAT_MODULE_SEARCH_FIELD_TITLE . "\r\n               </div>\r\n           </div>\r\n       </td>\r\n   </tr>";\r\n\r\n$advsearchform["interval"] = "\r\n    <tr>\r\n        <td style=''vertical-align: top; padding-top: 15px; ''>\r\n            <div class=''param''>\r\n                <div class=''caption''>" . NETCAT_MODULE_SEARCH_TIME_CAPTION . ":</div>\r\n            </div>\r\n        </td>\r\n\r\n        <td>\r\n            <div>\r\n                <div>\r\n                    <input type=''radio'' name=''interval'' value='''' checked=''checked'' id=''nc_search_datetime_any'' />\r\n                    " . NETCAT_MODULE_SEARCH_TIME_ANY . "\r\n                </div>\r\n\r\n                <div>\r\n                    <input type=''radio'' name=''interval'' value=''1'' id=''nc_search_datetime_interval'' />\r\n                    " . NETCAT_MODULE_SEARCH_TIME_LAST . "\r\n                    <input class=''interval_value'' type=''input'' name=''intervalvalue'' value=''1'' size=''2'' />\r\n                </div>\r\n\r\n                <div>\r\n                    <select class=''interval_unit'' name=''intervalunit''>\r\n                        <option value=''hour''>" . NETCAT_MODULE_SEARCH_TIME_LAST_HOURS . "</option>\r\n                        <option value=''day''>" . NETCAT_MODULE_SEARCH_TIME_LAST_DAYS . "</option>\r\n                        <option value=''week''>" . NETCAT_MODULE_SEARCH_TIME_LAST_WEEKS . "</option>\r\n                        <option value=''month''>" . NETCAT_MODULE_SEARCH_TIME_LAST_MONTHS . "</option>\r\n                    </select>\r\n                </div>\r\n            </div>\r\n        </td>\r\n    </tr>";\r\n\r\n$advsearchform["suffix"] = "\r\n    <tr>\r\n        <td></td>\r\n\r\n        <td>\r\n            <div class=''submit''>\r\n                <input class=''submit'' type=''submit'' value=''" . htmlspecialchars(NETCAT_MODULE_SEARCH_SUBMIT_BUTTON_TEXT) . "'' />\r\n            </div>\r\n        </td>\r\n    </tr>\r\n</table>\r\n</form>";', 'search', 0);

-- --------------------------------------------------------

ALTER TABLE `Catalogue` ADD COLUMN `SitemapPriority` float DEFAULT 0.5;
ALTER TABLE `Catalogue` ADD COLUMN `SitemapChangefreq` enum ('always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never' ) default 'daily';
ALTER TABLE `Catalogue` ADD COLUMN `IncludeInSitemap` int DEFAULT 1;

ALTER TABLE `Subdivision` ADD COLUMN `SitemapPriority` float DEFAULT NULL;
ALTER TABLE `Subdivision` ADD COLUMN `SitemapChangefreq` enum ('-1','always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never') default '-1';
ALTER TABLE `Subdivision` ADD COLUMN `IncludeInSitemap` int DEFAULT -1;