|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* AVE.cms - Модуль Who is online
|
|
|
|
*
|
|
|
|
* @package AVE.cms
|
|
|
|
* @subpackage module_WhoIsOnline
|
|
|
|
* @since 2.09
|
|
|
|
* @filesource
|
|
|
|
*/
|
|
|
|
|
|
|
|
$module_sql_install = array();
|
|
|
|
$module_sql_deinstall = array();
|
|
|
|
$module_sql_update = array();
|
|
|
|
|
|
|
|
$module_sql_deinstall[] = "DROP TABLE IF EXISTS %%PRFX%%_module_who_is_online";
|
|
|
|
|
|
|
|
$module_sql_install[] = "CREATE TABLE %%PRFX%%_module_who_is_online (
|
|
|
|
`id` int(10) unsigned NOT NULL auto_increment,
|
|
|
|
`ip` int(11) unsigned NOT NULL default '0',
|
|
|
|
`country` char(64) NOT NULL default '',
|
|
|
|
`countrycode` char(2) NOT NULL default '',
|
|
|
|
`city` char(64) NOT NULL default '',
|
|
|
|
`dt` timestamp NOT NULL default CURRENT_TIMESTAMP,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `ip` (`ip`),
|
|
|
|
KEY `countrycode` (`countrycode`)
|
|
|
|
) 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;
|
|
|
|
";
|
|
|
|
|
|
|
|
?>
|