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.
47 lines
1.3 KiB
47 lines
1.3 KiB
9 years ago
|
<?php
|
||
|
|
||
|
/**
|
||
|
* AVE.cms - Модуль импорта
|
||
|
*
|
||
|
* @package AVE.cms
|
||
|
* @subpackage module_Import
|
||
|
* @filesource
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* mySQL-запросы для установки, обновления и удаления модуля
|
||
|
*/
|
||
|
|
||
|
$module_sql_install = array();
|
||
|
$module_sql_deinstall = array();
|
||
|
$module_sql_update = array();
|
||
|
|
||
|
$module_sql_deinstall[] = "DROP TABLE IF EXISTS CPPREFIX_module_import;";
|
||
|
|
||
|
$module_sql_install[] = "CREATE TABLE CPPREFIX_module_import (
|
||
|
`id` mediumint(5) unsigned NOT NULL auto_increment,
|
||
|
`import_name` varchar(255) NOT NULL,
|
||
|
`import_rub` int(10) unsigned default NULL,
|
||
|
`import_parser` varchar(255) NOT NULL,
|
||
|
`import_delete_docs` enum('0','1') NOT NULL default '0',
|
||
|
`import_docs_create` enum('0','1') NOT NULL default '0',
|
||
|
`import_default_file` varchar(255) NOT NULL,
|
||
|
`import_monitor_file` enum('0','1') NOT NULL,
|
||
|
`import_last_update` int(10) unsigned default NULL,
|
||
|
`import_text` longtext NOT NULL,
|
||
|
PRIMARY KEY (`id`)
|
||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
|
||
|
|
||
|
// Обновление модуля
|
||
|
$module_sql_update[] = "
|
||
|
UPDATE
|
||
|
`CPPREFIX_module`
|
||
|
SET
|
||
|
ModuleAveTag = '" . $modul['ModuleAveTag'] . "',
|
||
|
ModulePHPTag = '" . $modul['ModulePHPTag'] . "',
|
||
|
ModuleVersion = '" . $modul['ModuleVersion'] . "'
|
||
|
WHERE
|
||
|
ModuleSysName = '" . $modul['ModuleSysName'] . "'
|
||
|
LIMIT 1;
|
||
|
";
|
||
|
?>
|