install.sql 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. CREATE TABLE `bx_antispam_ip_table` (
  2. `ID` int(11) NOT NULL auto_increment,
  3. `From` int(10) unsigned NOT NULL,
  4. `To` int(10) unsigned NOT NULL,
  5. `Type` enum('allow','deny') NOT NULL default 'deny',
  6. `LastDT` int(11) unsigned NOT NULL,
  7. `Desc` varchar(128) NOT NULL,
  8. PRIMARY KEY (`ID`),
  9. KEY `From` (`From`),
  10. KEY `To` (`To`)
  11. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  12. CREATE TABLE `bx_antispam_dnsbl_rules` (
  13. `id` int(11) NOT NULL AUTO_INCREMENT,
  14. `chain` enum('spammers','whitelist','uridns') NOT NULL,
  15. `zonedomain` varchar(255) NOT NULL,
  16. `postvresp` varchar(32) NOT NULL,
  17. `url` varchar(255) NOT NULL,
  18. `recheck` varchar(255) NOT NULL,
  19. `comment` varchar(255) NOT NULL,
  20. `added` int(11) NOT NULL,
  21. `active` tinyint(4) NOT NULL,
  22. PRIMARY KEY (`id`)
  23. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  24. INSERT INTO `bx_antispam_dnsbl_rules` (`chain`, `zonedomain`, `postvresp`, `url`, `recheck`, `comment`, `added`, `active`) VALUES
  25. ('spammers', 'sbl.spamhaus.org.', 'any', 'http://www.spamhaus.org/sbl/', 'http://www.spamhaus.org/query/bl?ip=%s', '_bx_antispam_rule_note_spamhaus_org', 0, 1),
  26. ('spammers', 'dnsbl.tornevall.org.', '230', 'http://dnsbl.tornevall.org/', '', '_bx_antispam_rule_note_dnsbl_tornevall_org', 0, 0),
  27. ('uridns', 'multi.surbl.org.', 'any', 'http://www.surbl.org/', 'http://george.surbl.org/lookup.html', '_bx_antispam_rule_note_surbl_org', 0, 1),
  28. ('spammers', 'zomgbl.spameatingmonkey.net.', 'any', 'http://spameatingmonkey.com/index.html', '', '_bx_antispam_rule_note_zomgbl_spameatingmonkey_net', 0, 0);
  29. CREATE TABLE `bx_antispam_dnsbluri_zones` (
  30. `level` tinyint(4) NOT NULL,
  31. `zone` varchar(64) NOT NULL
  32. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  33. CREATE TABLE `bx_antispam_block_log` (
  34. `id` int(11) NOT NULL AUTO_INCREMENT,
  35. `ip` int(10) unsigned NOT NULL,
  36. `member_id` int(10) unsigned NOT NULL,
  37. `type` varchar(32) NOT NULL,
  38. `extra` text NOT NULL,
  39. `added` int(11) NOT NULL,
  40. PRIMARY KEY (`id`),
  41. KEY `ip` (`ip`),
  42. KEY `member_id` (`member_id`)
  43. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  44. -- Studio page and widget
  45. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  46. (3, 'bx_antispam', '_bx_antispam', '_bx_antispam', 'bx_antispam@modules/boonex/antispam/|std-pi.png');
  47. SET @iPageId = LAST_INSERT_ID();
  48. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  49. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  50. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  51. (@iPageId, 'bx_antispam', '{url_studio}module.php?name=bx_antispam', '', 'bx_antispam@modules/boonex/antispam/|std-wi.png', '_bx_antispam', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
  52. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  53. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));