4.0 -- NetCat 4.0 Standard [401] component file, generated 2010-06-09 11:41:29 INSERT INTO `Class` SET `Class_Name` = 'mzep.ru: Новости компании', `Class_Group` = 'mzep.ru', `DaysToHold` = '0', `AllowTags` = '1', `FormPrefix` = '$f_AdminCommon\n
', `FormSuffix` = '".opt( !$nc_title , \nopt($totRows>$f_RowNum && $cc_settings[ListingStyle]==\'fixed\' , "
Страницы: ".browse_messages($cc_env, 5)."
" ).\nopt($totRows && $cc_settings[ListingStyle]==\'day\' , "Архив по дням: ".listQuery("SELECT DATE_FORMAT(Date,\'%Y\') AS year, DATE_FORMAT(Date,\'%m\') AS month, DATE_FORMAT(Date,\'%d\') AS day FROM Message$classID WHERE Subdivision_ID=$sub AND Sub_Class_ID=$cc AND DATE_FORMAT(Date,\'%Y%m\')=\'$year$month\' GROUP BY DATE_FORMAT(Date,\'%d\') ORDER BY Date" , \'".($i?" | ":NULL).($data[day]==\'.$day.\'?$data[day]:"$data[day]")."\' )).\nopt($totRows && $cc_settings[ListingStyle]==\'month\', "Архив по месяцам: ".listQuery("SELECT DATE_FORMAT(Date,\'%Y\') AS year, DATE_FORMAT(Date,\'%m\') AS month FROM Message$classID WHERE Subdivision_ID=$sub AND Sub_Class_ID=$cc AND DATE_FORMAT(Date,\'%Y\')=\'$year\' GROUP BY DATE_FORMAT(Date,\'%m\') ORDER BY Date" , \'".($i?" | ":NULL).($data[month]==\'.$month.\'?$data[month]:"$data[month]")."\' )).\nopt($totRows && $cc_settings[ListingStyle]==\'year\', "Архив по годам: ".listQuery("SELECT DATE_FORMAT(Date,\'%Y\') AS year FROM Message$classID WHERE Subdivision_ID=$sub AND Sub_Class_ID=$cc GROUP BY DATE_FORMAT(Date,\'%Y\') ORDER BY Date" , \'".($i?" | ":NULL).($data[year]==\'.$year.\'?$data[year]:"$data[year]")."\' ))\n)."\n\n
', `RecordTemplate` = '$f_AdminButtons\n
\n\n".opt( $cc_settings[Group]==\'date\'&& $groupHeader=( $curDep == $f_Date_day ? NULL : $curDep=$f_Date_day ) , "

$groupHeader.$f_Date_month.$f_Date_year

" )\n.opt( $cc_settings[Group]==\'month\'&& $groupHeader=( $curDep == $f_Date_month ? NULL : $curDep=$f_Date_month ) , "

$groupHeader.$f_Date_year

" )."\n\n

".opt_case($cc_settings[FullLink]==\'title\' && $f_Text, "$f_Title" , "$f_Title")."

\n".opt( $f_SourceTitle || $f_SourceLink ,\n"
Источник: ".opt_case( $f_SourceTitle && $f_SourceLink , "$f_SourceTitle",\nopt_case( !$f_SourceLink,$f_SourceTitle , "$f_SourceLink" )\n)."
"\n)\n.opt( $cc_settings[DateStyle]!=\'disable\' , "
".\nopt( $cc_settings[FullLink]==\'date\' && $f_Text , "").\nopt( $cc_settings[DateStyle]!=\'time\' , "$f_Date_day.$f_Date_month.$f_Date_year " ).\nopt( $cc_settings[DateStyle]!=\'date\' , "$f_Date_hours:$f_Date_minutes " ).\nopt( $cc_settings[FullLink]==\'date\' && $f_Text, "" )."
"\n)\n.opt($cc_settings[FullLink]==\'more\' && $f_Text, "подробнее...")."\n".(nc_module_check_by_keyword("comments") ? "
комментарии и ответы: ".$nc_comments->count($f_RowID) : "")."\n
\n', `RecordsPerPage` = '10', `SortBy` = 'Date DESC', `RecordTemplateFull` = '
\n

$f_Title

\n
$f_Text
\n".opt( $cc_settings[DateStyle]!=\'disable\' , "
".\nopt( $cc_settings[DateStyle]!=\'time\' , "$f_Date_day.$f_Date_month.$f_Date_year " ).\nopt( $cc_settings[DateStyle]!=\'date\' , "$f_Date_hours:$f_Date_minutes " )."
"\n)\n.opt( $f_SourceTitle || $f_SourceLink ,\n"
Источник: ".opt_case( $f_SourceTitle && $f_SourceLink , "$f_SourceTitle",\nopt_case( !$f_SourceLink,$f_SourceTitle , "$f_SourceLink" )\n)."
"\n)."\n
\n\n".(nc_module_check_by_keyword("comments") ? "
".$nc_comments->wall($f_RowID)."
" : "")."\n', `TitleTemplate` = '', `AddTemplate` = '', `EditTemplate` = '', `AddActionTemplate` = '', `EditActionTemplate` = '', `SearchTemplate` = '', `FullSearchTemplate` = '', `SubscribeTemplate` = '', `System_Table_ID` = '0', `Settings` = 'if ( nc_module_check_by_keyword("comments") ) $nc_comments = new nc_comments($cc);\n\nlist( $year, $month, $day ) = split(\'-\', $GLOBALS[date]);\nif(!$year) $year = date(\'Y\');\nif(!$month) $month= date(\'m\');\nif(!$day) $day = date(\'d\');\n\nif ($cc_settings[ListingStyle]==\'fixed\' && !$recNum) $recNum = $cc_settings[FixedNumRows];', `AddCond` = '', `EditCond` = '', `SubscribeCond` = '', `NL2BR` = '0', `UseCaptcha` = '0', `CheckActionTemplate` = '', `DeleteActionTemplate` = '', `CustomSettingsTemplate` = '$settings_array = array(\n \'FullLink\' => array(\'type\' => \'select\',\n \'default_value\' => \'title\',\n \'caption\' => \'Ссылка на полный текст новости\',\n \'values\' => array(\'title\' => \'на заголовке\', \'more\' => \'на слове «подробнее»\', \'date\' => \'на дате\')\n ),\n \'ListingStyle\' => array(\'type\' => \'select\',\n \'default_value\' => \'fixed\',\n \'caption\' => \'Листинг страниц\',\n \'values\' => array(\'fixed\' => \'фиксированное количество\', \'year\' => \'по годам\', \'month\' => \'по месяцам\', \'day\' => \'по дням\')\n ),\n \'FixedNumRows\' => array(\'type\' => \'string\',\n \'default_value\' => \'20\',\n \'caption\' => \'Количество новостей на странице (при выводе фиксированного количества)\',\n \'size\' => \'3\',\n \'validate_regexp\' => \'/^\\d+$/\',\n \'validate_error\' => \'Введите целое число\'\n\n ),\'DateStyle\' => array(\'type\' => \'select\',\n \'default_value\' => \'dt\',\n \'caption\' => \'Стиль вывода даты и времени новостей\',\n \'values\' => array(\'dt\' => \'дата и время\', \'date\' => \'только дата\', \'time\' => \'только время\', \'disable\' => \'не выводить\')\n ),\n \'Group\' => array(\'type\' => \'select\',\n \'default_value\' => \'disable\',\n \'caption\' => \'Группировка новостей\',\n \'values\' => array(\'disable\' => \'не группировать\', \'date\' => \'по дате\', \'month\' => \'по месяцам\'),\n )\n);', `ClassDescription` = 'Компонент позволяет организовать простую ленту новостей компании. \nТакже может быть применен для более общих «редких» новостей.\n\nПоля: заголовок, анонс, текст новости, дата, внешняя ссылка, \nисточник и ссылка на него.\n', `DeleteCond` = '', `DeleteTemplate` = '', `ClassTemplate` = '0', `CacheForUser` = '0'; CREATE TABLE Message%INSERT_ID% (`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, `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, `SourceTitle` char(255) NULL, `SourceLink` char(255) NULL, `Title` char(255) NOT NULL, `Text` text NOT NULL, `Date` datetime NOT 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`) ) TYPE=MyISAM; INSERT INTO Field (`Class_ID`, `Field_Name`, `Description`, `TypeOfData_ID`, `Format`, `NotNull`, `Priority`, `DoSearch`, `DefaultState`, `TypeOfEdit_ID`) VALUES (%INSERT_ID%, 'SourceTitle', 'источник', 1, '', 0, 5, 0, '', 1); INSERT INTO Field (`Class_ID`, `Field_Name`, `Description`, `TypeOfData_ID`, `Format`, `NotNull`, `Priority`, `DoSearch`, `DefaultState`, `TypeOfEdit_ID`) VALUES (%INSERT_ID%, 'SourceLink', 'ссылка на источник', 1, 'url', 0, 6, 0, '', 1); INSERT INTO Field (`Class_ID`, `Field_Name`, `Description`, `TypeOfData_ID`, `Format`, `NotNull`, `Priority`, `DoSearch`, `DefaultState`, `TypeOfEdit_ID`) VALUES (%INSERT_ID%, 'Title', 'Краткий анонс', 1, '', 1, 0, 0, '', 1); INSERT INTO Field (`Class_ID`, `Field_Name`, `Description`, `TypeOfData_ID`, `Format`, `NotNull`, `Priority`, `DoSearch`, `DefaultState`, `TypeOfEdit_ID`) VALUES (%INSERT_ID%, 'Text', 'текст', 3, '6:60;html:0;br:0;fck:0;', 1, 2, 0, '', 1); INSERT INTO Field (`Class_ID`, `Field_Name`, `Description`, `TypeOfData_ID`, `Format`, `NotNull`, `Priority`, `DoSearch`, `DefaultState`, `TypeOfEdit_ID`) VALUES (%INSERT_ID%, 'Date', 'дата', 8, 'event_date', 1, 3, 0, '', 1);