Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
4 | |
---|
5 | function plugin_install() |
---|
6 | { |
---|
7 | global $prefixeTable; |
---|
8 | |
---|
9 | if (!defined('ADDINFO_TABLE')) define('ADDINFO_TABLE', $prefixeTable.'AddInfo_images'); |
---|
10 | $query = "CREATE TABLE IF NOT EXISTS ". ADDINFO_TABLE ." ( |
---|
11 | id SMALLINT( 5 ) UNSIGNED NOT NULL , |
---|
12 | info1 VARCHAR( 255 ) NOT NULL , |
---|
13 | info2 VARCHAR( 255 ) NOT NULL , |
---|
14 | info3 VARCHAR( 255 ) NOT NULL , |
---|
15 | PRIMARY KEY (id))DEFAULT CHARSET=utf8;"; |
---|
16 | $result = pwg_query($query); |
---|
17 | |
---|
18 | } |
---|
19 | |
---|
20 | function plugin_uninstall() |
---|
21 | { |
---|
22 | global $prefixeTable; |
---|
23 | |
---|
24 | $q = 'DROP TABLE ' . $prefixeTable . 'AddInfo_images;'; |
---|
25 | pwg_query($q); |
---|
26 | } |
---|
27 | |
---|
28 | |
---|
29 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.