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.
59 lines
1.6 KiB
59 lines
1.6 KiB
<?php |
|
|
|
/** |
|
* AVE.cms - Модуль Авторизация |
|
* |
|
* @package AVE.cms |
|
* @subpackage module_Login |
|
* @filesource |
|
*/ |
|
|
|
/** |
|
* mySQL-запросы для установки, обновления и удаления модуля |
|
*/ |
|
|
|
$module_sql_install = array(); |
|
$module_sql_deinstall = array(); |
|
$module_sql_update = array(); |
|
|
|
//Удаление модуля |
|
|
|
$module_sql_deinstall[] = "DROP TABLE IF EXISTS `CPPREFIX_module_login`;"; |
|
|
|
//Установка модуля |
|
$module_sql_install[] = "CREATE TABLE `CPPREFIX_module_login` ( |
|
`Id` tinyint(1) unsigned NOT NULL auto_increment, |
|
`login_reg_type` enum('now','email','byadmin') NOT NULL default 'now', |
|
`login_antispam` enum('0','1') NOT NULL default '0', |
|
`login_status` enum('1','0') NOT NULL default '1', |
|
`login_deny_domain` text NOT NULL, |
|
`login_deny_email` text NOT NULL, |
|
`login_require_company` enum('0','1') NOT NULL default '0', |
|
`login_require_firstname` enum('0','1') NOT NULL default '0', |
|
`login_require_lastname` enum('0','1') NOT NULL default '0', |
|
PRIMARY KEY (Id) |
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;"; |
|
|
|
$module_sql_install[] = "INSERT INTO `CPPREFIX_module_login` VALUES (1, 'email', 1, 1, 'domain.ru', 'name@domain.ru',0,0,0);"; |
|
|
|
// Обновление модуля |
|
$module_sql_update[] = " |
|
UPDATE |
|
`CPPREFIX_module` |
|
SET |
|
ModuleAveTag = '" . $modul['ModuleAveTag'] . "', |
|
ModulePHPTag = '" . $modul['ModulePHPTag'] . "', |
|
ModuleVersion = '" . $modul['ModuleVersion'] . "' |
|
WHERE |
|
ModuleSysName = '" . $modul['ModuleSysName'] . "' |
|
LIMIT 1; |
|
"; |
|
|
|
$module_sql_update[] = " |
|
RENAME TABLE |
|
`CPPREFIX_modul_login` |
|
TO |
|
`CPPREFIX_module_login` |
|
"; |
|
|
|
?>
|