39 lines
1.3 KiB
PHP
39 lines
1.3 KiB
PHP
<?php
|
|
|
|
$module_sql_install = [];
|
|
$module_sql_deinstall = [];
|
|
$module_sql_update = [];
|
|
|
|
//Удаление модуля
|
|
|
|
$module_sql_deinstall[] = "DROP TABLE IF EXISTS `%%PRFX%%_module_login`;";
|
|
|
|
//Установка модуля
|
|
$module_sql_install[] = "CREATE TABLE `%%PRFX%%_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 `%%PRFX%%_module_login` VALUES (1, 'email', 1, 1, 'domain.ru', 'name@domain.ru',0,0,0);";
|
|
|
|
// Обновление модуля
|
|
$module_sql_update[] = "
|
|
UPDATE
|
|
`%%PRFX%%_module`
|
|
SET
|
|
ModuleAveTag = '" . $module['ModuleAveTag'] . "',
|
|
ModulePHPTag = '" . $module['ModulePHPTag'] . "',
|
|
ModuleVersion = '" . $module['ModuleVersion'] . "'
|
|
WHERE
|
|
ModuleSysName = '" . $module['ModuleSysName'] . "'
|
|
LIMIT 1;
|
|
";
|
|
?>
|