source: extensions/NBC_UserAdvManager/branches/2.11/maintain.inc.php @ 3859

Last change on this file since 3859 was 3859, checked in by Eric, 15 years ago

Release 2.11.0 - Merged from trunk

  • Property svn:eol-style set to LF
File size: 2.0 KB
RevLine 
[3859]1<?php
2
3if(!defined("NBC_UserAdvManager_PATH"))
4  define('NBC_UserAdvManager_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
5
6include_once (NBC_UserAdvManager_PATH.'include/constants.php');
7
8function plugin_install()
9{
10  $q = '
11    INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
12    VALUES ("nbc_UserAdvManager","true;false;false;-1;-1;-1;false;false;;-1;;;false;;","Parametres du plugin nbc UserAdvManager")
13  ;';
14  pwg_query($q);
15
16  $q = '
17    INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
18    VALUES ("nbc_UserAdvManager_ConfirmMail","false;5;false;Hello.<br>This is a reminder message because you registered on our gallery but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again 5 days to validate your registration.<br><br>Note: After this period, your account will be permanently deleted.;Hello.<br>This is a reminder message because you registered on our gallery but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have 2 days to confirm your registration by clicking on the link in the message you should have received when you registered.<br><br>Note: After this period, your account will be permanently deleted.","Parametres nbc_UserAdvManager - ConfirmMail;")
19  ;';
20  pwg_query($q);
21
22        $q = "
23    CREATE TABLE IF NOT EXISTS ".USER_CONFIRM_MAIL_TABLE." (
24      id varchar(50) NOT NULL default '',
25      user_id smallint(5) NOT NULL default '0',
26      mail_address varchar(255) default NULL,
27      status enum('webmaster','admin','normal','generic','guest') default NULL,
28      date_check datetime default NULL,
29      PRIMARY KEY  (id)
30    )
31  ;";
32  pwg_query($q);
33}
34
35
36
37function plugin_uninstall()
38{
39  global $conf;
40
41  if (isset($conf['nbc_UserAdvManager']))
42  {
43    $q = '
44      DELETE FROM '.CONFIG_TABLE.'
45      WHERE param="nbc_UserAdvManager"
46    ;';
47
48    pwg_query($q);
49  }
50
51
52  $q = 'DROP TABLE '.USER_CONFIRM_MAIL_TABLE.';';
53  pwg_query( $q );
54}
55?>
Note: See TracBrowser for help on using the repository browser.