source: extensions/AntiAspi/maintain.inc.php @ 3624

Last change on this file since 3624 was 3609, checked in by patdenice, 15 years ago

Convert all php and tpl files in Unix format for my plugins.

File size: 678 bytes
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5function plugin_install()
6{
7  global $prefixeTable;
8
9  $query = 'SHOW TABLES LIKE "' . $prefixeTable . 'antiaspi_ip_ban"';
10  $result = pwg_query($query);
11  if (!mysql_fetch_row($result))
12  {
13    $q = "CREATE TABLE " . $prefixeTable . "antiaspi_ip_ban (
14      id int(11) NOT NULL auto_increment,
15      ip char(50) NOT NULL default '',
16      date char(20) NOT NULL default '',
17      PRIMARY KEY (id),
18      KEY ip (ip))
19    DEFAULT CHARACTER SET utf8";
20    pwg_query($q);
21  }
22}
23
24function plugin_uninstall()
25{
26  global $prefixeTable;
27
28        $q = 'DROP TABLE ' . $prefixeTable . 'antiaspi_ip_ban;';
29  pwg_query($q);
30}
31
32?>
Note: See TracBrowser for help on using the repository browser.