Модуль Вопрос/ответ v1.26.1
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.5 KiB

<?php
/**
* AVE.cms - Модуль Вопрос-Ответ
*
* @package AVE.cms
* @subpackage module_FAQ
* @filesource
*/
/**
* mySQL-запросы для установки, обновления и удаления модуля
*/
$module_sql_install = array();
$module_sql_deinstall = array();
$module_sql_update = array();
$module_sql_deinstall[] = "DROP TABLE IF EXISTS %%PRFX%%_module_faq;";
$module_sql_deinstall[] = "DROP TABLE IF EXISTS %%PRFX%%_module_faq_quest;";
$module_sql_install[] = "CREATE TABLE %%PRFX%%_module_faq (
`id` mediumint(5) unsigned NOT NULL auto_increment,
`faq_title` char(100) NOT NULL default '',
`faq_description` char(255) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
$module_sql_install[] = "CREATE TABLE %%PRFX%%_module_faq_quest (
`id` mediumint(5) unsigned NOT NULL auto_increment,
`faq_id` mediumint(5) unsigned NOT NULL default '1',
`faq_quest` text NOT NULL,
`faq_answer` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
$module_sql_update[] = "
UPDATE
`%%PRFX%%_module`
SET
ModuleAveTag = '" . $modul['ModuleAveTag'] . "',
ModulePHPTag = '" . $modul['ModulePHPTag'] . "',
ModuleVersion = '" . $modul['ModuleVersion'] . "'
WHERE
ModuleSysName = '" . $modul['ModuleSysName'] . "'
LIMIT 1;
";
$module_sql_update[] = "
RENAME TABLE
`%%PRFX%%_modul_faq`
TO
`%%PRFX%%_module_faq`
";
$module_sql_update[] = "
RENAME TABLE
`%%PRFX%%_modul_faq_quest`
TO
`%%PRFX%%_module_faq_quest`
";
?>