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

Last change on this file since 30672 was 3987, checked in by cljosse, 15 years ago

Create Release for 1.7.3 and 2.04

File size: 1.0 KB
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","off,on,off","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_mail` INT NOT NULL DEFAULT '0',
23`nb_mails` INT NOT NULL DEFAULT '0',
24`date_quarantaine` INT NOT NULL DEFAULT '0',
25`quarantaine` BOOL NOT NULL ,
26`message` TEXT NOT NULL ,
27         
28         
29      PRIMARY KEY  (`id` )
30    )
31  ;";
32  pwg_query($q);
33
34
35 
36}
37
38
39
40function plugin_uninstall()
41{
42  global $conf;
43
44  if (isset($conf['free_mail']))
45  {
46    $q = '
47      DELETE FROM '.CONFIG_TABLE.'
48      WHERE param="free_mail"
49    ;';
50
51    pwg_query($q);
52  }
53
54
55  $q = 'DROP TABLE '.FREE_MAIL_TABLE.';';
56   pwg_query( $q );
57 
58 
59}
60?>
Note: See TracBrowser for help on using the repository browser.