|
|
|
<?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 %%PRFX%%_module_import;";
|
|
|
|
|
|
|
|
$module_sql_install[] = "CREATE TABLE %%PRFX%%_module_import (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` varchar(255) NOT NULL,
|
|
|
|
`rub_id` int(10) unsigned NOT NULL,
|
|
|
|
`parser` varchar(255) NOT NULL,
|
|
|
|
`docs_disable` enum('0','1') NOT NULL default '0',
|
|
|
|
`docs_create` enum('0','1') NOT NULL default '0',
|
|
|
|
`file` varchar(255) NOT NULL,
|
|
|
|
`monitor` enum('0','1') NOT NULL default '0',
|
|
|
|
`tags` text NOT NULL,
|
|
|
|
`fields` longtext NOT NULL,
|
|
|
|
`time_edited` int(10) unsigned NOT NULL,
|
|
|
|
`time_run` int(10) unsigned 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;
|
|
|
|
";
|