]> git.mxchange.org Git - mailer.git/blob - inc/extensions/transfer/mode-setup.php
095feb718a83e1d4865b3b04e45ba6ee702bcbb9
[mailer.git] / inc / extensions / transfer / mode-setup.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 06/25/2013 *
4  * ===================                          Last change: 06/25/2013 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : mode-setup.php                                   *
8  * -------------------------------------------------------------------- *
9  * Short description : Point transfers between members                  *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Punktetransfers zwischen Mitgliedern             *
12  * -------------------------------------------------------------------- *
13  * $Revision::                                                        $ *
14  * $Date::                                                            $ *
15  * $Tag:: 0.2.1-FINAL                                                 $ *
16  * $Author::                                                          $ *
17  * -------------------------------------------------------------------- *
18  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
19  * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
20  * For more information visit: http://mxchange.org                      *
21  *                                                                      *
22  * This program is free software; you can redistribute it and/or modify *
23  * it under the terms of the GNU General Public License as published by *
24  * the Free Software Foundation; either version 2 of the License, or    *
25  * (at your option) any later version.                                  *
26  *                                                                      *
27  * This program is distributed in the hope that it will be useful,      *
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
30  * GNU General Public License for more details.                         *
31  *                                                                      *
32  * You should have received a copy of the GNU General Public License    *
33  * along with this program; if not, write to the Free Software          *
34  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
35  * MA  02110-1301  USA                                                  *
36  ************************************************************************/
37
38 // Some security stuff...
39 if (!defined('__SECURITY')) {
40         die();
41 } // END - if
42
43 // @TODO Remove double tabs from all lines
44                 // Transfer from a member
45                 addDropTableSql('user_transfers_in');
46                 addCreateTableSql('user_transfers_in', "
47 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
48 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
49 `from_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
50 `points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
51 `reason` VARCHAR(255) NOT NULL DEFAULT '',
52 `time_trans` VARCHAR(14) NOT NULL DEFAULT 0,
53 `trans_id` VARCHAR(12) NOT NULL DEFAULT '',
54 PRIMARY KEY (`id`),
55 INDEX (`userid`),
56 INDEX (`from_userid`)",
57                         'Ingoing points transfers');
58
59                 // Transfers to a member
60                 addDropTableSql('user_transfers_out');
61                 addCreateTableSql('user_transfers_out', "
62 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
63 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
64 `to_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
65 `points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
66 `reason` VARCHAR(255) NOT NULL DEFAULT '',
67 `time_trans` VARCHAR(14) NOT NULL DEFAULT 0,
68 `trans_id` VARCHAR(12) NOT NULL DEFAULT '',
69 PRIMARY KEY (`id`),
70 INDEX (`userid`),
71 INDEX (`to_userid`)",
72                         'Outgoing points transfers');
73
74                 // Admin menu
75                 addAdminMenuSql('transfer', NULL, '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transfer','Verwalten Sie hier die {OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transaktionen zwischen Ihren Mitgliedern.', 7);
76                 addAdminMenuSql('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1);
77                 addAdminMenuSql('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden d&uuml;rfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen l&ouml;schen.', 2);
78                 addAdminMenuSql('transfer','del_transfer','Manuell l&ouml;schen','Hier k&ouml;nnen Sie - abgesehen von der automatischen L&ouml;schung - Transaktionen selber l&ouml;schen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gel&ouml;scht werden.', 3);
79
80                 // Member menu
81                 addMemberMenuSql('extras', 'transfer', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transfer', 5);
82
83                 // Add config values
84                 addConfigAddSql('transfer_max', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 50');
85                 addConfigAddSql('transfer_age', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 28));
86                 addConfigAddSql('transfer_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}');
87                 addConfigAddSql('transfer_balance', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 100');
88                 addConfigAddSql('transfer_code', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 5');
89
90                 // Add row(s) to user's data
91                 addExtensionAddTableColumnSql('user_data', 'opt_in', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
92
93 // [EOF]
94 ?>