2016-05-31 20:27:03 +03:00

57 lines
2.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* AVE.cms - Модуль Баннеры
*
* @package AVE.cms
* @subpackage module_Banner
* @filesource
*/
/**
* mySQL-запросы для установки, обновления и удаления модуля
*/
$module_sql_install = array();
$module_sql_deinstall = array();
$module_sql_update = array();
$module_sql_deinstall[] = "DROP TABLE IF EXISTS `CPPREFIX_modul_banner_categories`;";
$module_sql_deinstall[] = "DROP TABLE IF EXISTS `CPPREFIX_modul_banners`;";
$module_sql_install[] = "CREATE TABLE `CPPREFIX_modul_banner_categories` (
`Id` mediumint(5) unsigned NOT NULL auto_increment,
`KatName` varchar(100) NOT NULL default '',
PRIMARY KEY (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
$module_sql_install[] = "CREATE TABLE `CPPREFIX_modul_banners` (
`Id` int(10) unsigned NOT NULL auto_increment,
`KatId` mediumint(5) unsigned NOT NULL default '1',
`Bannertags` varchar(255) NOT NULL default '',
`BannerUrl` varchar(255) NOT NULL default '',
`Gewicht` tinyint(3) unsigned NOT NULL default '0',
`Bannername` varchar(100) NOT NULL default '',
`Views` int(10) unsigned NOT NULL default '0',
`Klicks` int(10) unsigned NOT NULL default '0',
`BildAlt` varchar(255) NOT NULL default '',
`MaxKlicks` int(10) unsigned NOT NULL default '0',
`MaxViews` int(10) unsigned NOT NULL default '0',
`ZStart` smallint(2) unsigned NOT NULL default '0',
`ZEnde` smallint(2) unsigned NOT NULL default '0',
`Aktiv` tinyint(1) unsigned NOT NULL default '1',
`Target` varchar(255) NOT NULL default '_blank',
`Width` int(10) unsigned NOT NULL default '0',
`Height` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
$module_sql_install[] = "INSERT INTO `CPPREFIX_modul_banner_categories` VALUES ('1', 'Категория 1');";
$module_sql_install[] = "INSERT INTO `CPPREFIX_modul_banner_categories` VALUES ('2', 'Категория 2');";
$module_sql_install[] = "INSERT INTO `CPPREFIX_modul_banners` VALUES ('', '1', 'media_ave.jpg', 'http://ave-cms.ru', '1', 'AVE.CMS-Banner', '0', '0', 'AVE.CMS- это бесплатная многофункциональная система управления сайтом.', '0', '0', '0', '0', '1', '_self', '0', '0');";
$module_sql_install[] = "INSERT INTO `CPPREFIX_modul_banners` VALUES ('', '1', 'media_gitget.jpg', 'https://gitget.ru', '1', 'GitGet-Banner', '0', '0', 'Репозитории сообщества AVE.CMS. Все от сборки до модуля.', '0', '0', '0', '0', '1', '_blank', '0', '0');";
$module_sql_update[] = "UPDATE CPPREFIX_module SET ModuleAveTag = '" . $modul['ModuleAveTag'] . "', ModulePHPTag = '" . $modul['ModulePHPTag'] . "', ModuleVersion = '" . $modul['ModuleVersion'] . "' WHERE ModuleSysName = '" . BANNER_DIR . "' LIMIT 1;";
?>