3.0 INSERT INTO Class SET Class_Name = 'Товары и услуги: Простой каталог товаров', Class_Group = 'Товары и услуги', DaysToHold = '0', AllowTags = '1', FormPrefix = '$f_AdminCommon\n
\n\n".( $NumCols>1 ? str_repeat("",$NumCols) : NULL )."\n', FormSuffix = '".( $f_RowNum%$NumCols ? str_repeat(\'\',($NumCols-$f_RowNum%$NumCols)) : NULL )."\n\n
 
\n\n".opt( $totRows>$f_RowNum && !$nc_title && !$srchPat ,\n"
\n".opt($cc_settings[\'PaginationMode\']!=\'nums\',"\n
\n ".opt_case($prevLink , "Назад","Назад")."\n ".opt_case($nextLink, "Далее","Далее")."\n
\n").opt($cc_settings[\'PaginationMode\']!=\'next_prev\',"\n
Страницы: ".browse_messages($cc_env, 5)."
\n")."\n
\n")."\n\n
', RecordTemplate = '".opt( !($f_RowNum%$NumCols) && $f_RowNum , \'\' )."\n\n$f_AdminButtons\n\n

".( $cc_settings[\'Link\'] != \'photo\' ? "$f_Title" : $f_Title )."

\n".( $f_PhotoSmall ? ( $cc_settings[\'Link\'] != \'title\' ? "\'$f_Title\'" : "\'$f_Title\'" ) : NULL )."\n".( !$cc_settings[\'ShowPrice\'] && $f_Price ? "
Цена: $f_Price $Pay
" : NULL )."\n".( $f_Description ? "
$f_Description
" : NULL )."\n\n', RecordsPerPage = '20', SortBy = '', RecordTemplateFull = '
\n

$f_Title

\n".( $f_PhotoSmall ? opt( $f_PhotoLarge , "" )."\'$f_Title\'".opt( $f_PhotoLarge , \'\' ) : NULL )."\n".( $f_TextFull ? "
$f_TextFull
" : NULL )."\n".( $f_Price ? "
Цена: $f_Price $Pay
" : NULL )."\n
', TitleTemplate = '', AddTemplate = '', EditTemplate = '', AddActionTemplate = '', EditActionTemplate = '', SearchTemplate = '', FullSearchTemplate = '', SubscribeTemplate = '', Settings = '( !isset($nc_num_cols) ? $NumCols = &$cc_settings[NumCols] : $NumCols= (int)$nc_num_cols );\n$ColWidth= ( $NumCols>1 ? \'width="\'.(floor(100/$NumCols)).\'%"\' : NULL);\n$Pay = array(\'rur\'=>\'руб.\',\'usd\'=>\'$\',\'eu\'=>\'€\',\'no\'=>\'\',\'other\'=>$cc_settings[\'OtherPay\']);\n$Pay = $Pay[$cc_settings[\'Pay\']];', AddCond = '', EditCond = '', SubscribeCond = '', NL2BR = '0', CheckActionTemplate = '', DeleteActionTemplate = '', CustomSettingsTemplate = '$settings_array = array(\n \'PaginationMode\' => array(\'type\' => \'select\',\n \'default_value\' => \'next_prev\',\n \'caption\' => \'Листинг по страницам\',\n \'values\' => array(\'next_prev\' => \'вперед/назад\', \'nums\' => \'по номерам страниц\', \'all\'=>\'оба варианта\')\n ),\n \'NumCols\' => array(\'type\' => \'string\',\n \'default_value\' => \'3\',\n \'caption\' => \'Количество колонок\',\n \'size\' => \'3\',\n \'validate_regexp\' => \'/^\\d+$/\',\n \'validate_error\' => \'Введите целое число\'\n ),\n \'ShowPrice\' => array(\'type\' => \'checkbox\',\n \'caption\' => \'Не выводить цену в списке\' \n ),\n \'Pay\' => array(\'type\' => \'select\',\n \'default_value\' => \'rur\',\n \'caption\' => \'Цена в\',\n \'values\' => array(\'rur\' => \'рубли\', \'usd\' => \'доллары\', \'eu\'=>\'евро\', \'no\'=>\'не выводить\', \'other\'=>\'другая валюта\' )\n ),\n \'OtherPay\' => array(\'type\' => \'string\',\n \'default_value\' => \'\',\n \'caption\' => \'Другая валюта\',\n \'size\' => \'21\'\n ),\n \'Link\' => array(\'type\' => \'select\',\n \'default_value\' => \'all\',\n \'caption\' => \'Ссылка на полный вид\',\n \'values\' => array( \'photo\' => \'на фото\', \'title\' => \'на названии\', \'all\'=>\'на фото и на названии\' )\n )\n);'; CREATE TABLE Message%INSERT_ID% (Message_ID int(11) NOT NULL auto_increment,User_ID int(11) NOT NULL default '0',Subdivision_ID int(11) NOT NULL default '0',Sub_Class_ID int(11) NOT NULL default '0',Priority int(11) NOT NULL default '0',Checked tinyint(4) NOT NULL default '1',TimeToDelete date default NULL,TimeToUncheck date default NULL,IP varchar(15) default NULL,UserAgent varchar(255) default NULL,Parent_Message_ID int(11) NOT NULL default '0',Created datetime NOT NULL default '0000-00-00 00:00:00',LastUpdated timestamp(14) NOT NULL,LastUser_ID int(11) NOT NULL default '0',LastIP varchar(15) default NULL,LastUserAgent varchar(255) default NULL,Keyword varchar(255) NOT NULL default '',Title char(255) NOT NULL,Price int NULL,PhotoSmall char(255) NULL,PhotoLarge char(255) NULL,Description text NULL,TextFull text NULL, PRIMARY KEY (Message_ID),UNIQUE KEY Sub_Class_ID_2 (Sub_Class_ID,Message_ID,Keyword),KEY User_ID (User_ID),KEY LastUser_ID (LastUser_ID),/*KEY Sub_Class_ID (Sub_Class_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%,'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%,'Price', 'Цена', 2, '', 0, 1, 0, '', 1); INSERT INTO Field (Class_ID, Field_Name, Description, TypeOfData_ID, Format, NotNull, Priority, DoSearch, DefaultState, TypeOfEdit_ID) VALUES (%INSERT_ID%,'PhotoSmall', 'Маленькое фото', 6, '50000:image/*', 0, 2, 0, '', 1); INSERT INTO Field (Class_ID, Field_Name, Description, TypeOfData_ID, Format, NotNull, Priority, DoSearch, DefaultState, TypeOfEdit_ID) VALUES (%INSERT_ID%,'PhotoLarge', 'Большое фото', 6, '200000:image/*', 0, 3, 0, '', 1); INSERT INTO Field (Class_ID, Field_Name, Description, TypeOfData_ID, Format, NotNull, Priority, DoSearch, DefaultState, TypeOfEdit_ID) VALUES (%INSERT_ID%,'Description', 'Краткое описание', 3, '4:60', 0, 4, 0, '', 1); INSERT INTO Field (Class_ID, Field_Name, Description, TypeOfData_ID, Format, NotNull, Priority, DoSearch, DefaultState, TypeOfEdit_ID) VALUES (%INSERT_ID%,'TextFull', 'Подробное описание', 3, '6:60', 0, 5, 0, '', 1);