|
|
|
<?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`
|
|
|
|
";
|
|
|
|
?>
|