]> git.mxchange.org Git - mailer.git/blob - inc/extensions/transfer/mode-setup.php
Updated copyright year.
[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  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
14  * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
15  * For more information visit: http://mxchange.org                      *
16  *                                                                      *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or    *
20  * (at your option) any later version.                                  *
21  *                                                                      *
22  * This program is distributed in the hope that it will be useful,      *
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
25  * GNU General Public License for more details.                         *
26  *                                                                      *
27  * You should have received a copy of the GNU General Public License    *
28  * along with this program; if not, write to the Free Software          *
29  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
30  * MA  02110-1301  USA                                                  *
31  ************************************************************************/
32
33 // Some security stuff...
34 if (!defined('__SECURITY')) {
35         die();
36 } // END - if
37
38 // @TODO Remove double tabs from all lines
39                 // Transfer from a member
40                 addDropTableSql('user_transfers_in');
41                 addCreateTableSql('user_transfers_in', "
42 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
43 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
44 `from_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
45 `points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
46 `reason` VARCHAR(255) NOT NULL DEFAULT '',
47 `time_trans` VARCHAR(14) NOT NULL DEFAULT 0,
48 `trans_id` VARCHAR(12) NOT NULL DEFAULT '',
49 PRIMARY KEY (`id`),
50 INDEX (`userid`),
51 INDEX (`from_userid`)",
52                         'Ingoing points transfers');
53
54                 // Transfers to a member
55                 addDropTableSql('user_transfers_out');
56                 addCreateTableSql('user_transfers_out', "
57 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
58 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
59 `to_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
60 `points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
61 `reason` VARCHAR(255) NOT NULL DEFAULT '',
62 `time_trans` VARCHAR(14) NOT NULL DEFAULT 0,
63 `trans_id` VARCHAR(12) NOT NULL DEFAULT '',
64 PRIMARY KEY (`id`),
65 INDEX (`userid`),
66 INDEX (`to_userid`)",
67                         'Outgoing points transfers');
68
69                 // Admin menu
70                 addAdminMenuSql('transfer', NULL, '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transfer','Verwalten Sie hier die {OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transaktionen zwischen Ihren Mitgliedern.', 7);
71                 addAdminMenuSql('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1);
72                 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);
73                 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);
74
75                 // Member menu
76                 addMemberMenuSql('extras', 'transfer', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transfer', 5);
77
78                 // Add config values
79                 addConfigAddSql('transfer_max', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 50');
80                 addConfigAddSql('transfer_age', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 28));
81                 addConfigAddSql('transfer_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}');
82                 addConfigAddSql('transfer_balance', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 100');
83                 addConfigAddSql('transfer_code', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 5');
84
85                 // Add row(s) to user's data
86                 addExtensionAddTableColumnSql('user_data', 'opt_in', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
87
88 // [EOF]
89 ?>