Last change
on this file since 18530 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
|
Rev | Line | |
---|
[3609] | 1 | <?php |
---|
| 2 | |
---|
| 3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 4 | |
---|
| 5 | function 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 | |
---|
| 24 | function plugin_uninstall() |
---|
| 25 | { |
---|
| 26 | global $prefixeTable; |
---|
| 27 | |
---|
| 28 | $q = 'DROP TABLE ' . $prefixeTable . 'antiaspi_ip_ban;'; |
---|
| 29 | pwg_query($q); |
---|
| 30 | } |
---|
| 31 | |
---|
[3293] | 32 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.