source: extensions/free_mail/maintain.inc.php @ 3912

Last change on this file since 3912 was 3912, checked in by cljosse, 11 years ago
File size: 944 bytes
Line 
1<?php
2
3if(!defined("Free_Mail_PATH"))
4  define('Free_Mail_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
5
6include_once (Free_Mail_PATH.'include/constants.php');
7
8function plugin_install()
9{
10  $q = '
11    INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
12    VALUES ("free_mail","true;false;false;-1;-1;-1;false;false;;-1;;;false;;","Parametres du plugin free mail")
13  ;';
14  pwg_query($q);
15
16$id=0;
17
18        $q = "
19    CREATE TABLE IF NOT EXISTS ".FREE_MAIL_TABLE." (
20
21      `id`  smallint(5) NOT NULL default '0',
22      `date_check` INT NOT NULL DEFAULT '0' ,
23      PRIMARY KEY  (`id` )
24    )
25  ;";
26  pwg_query($q);
27
28
29 
30}
31
32
33
34function plugin_uninstall()
35{
36  global $conf;
37
38  if (isset($conf['free_mail']))
39  {
40    $q = '
41      DELETE FROM '.CONFIG_TABLE.'
42      WHERE param="free_mail"
43    ;';
44
45    pwg_query($q);
46  }
47
48
49  $q = 'DROP TABLE '.FREE_MAIL_TABLE.';';
50  pwg_query( $q );
51}
52?>
Note: See TracBrowser for help on using the repository browser.