2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 06/25/2013 *
4 * =================== Last change: 06/25/2013 *
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 *
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. *
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. *
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, *
31 ************************************************************************/
33 // Some security stuff...
34 if (!defined('__SECURITY')) {
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 '',
51 INDEX (`from_userid`)",
52 'Ingoing points transfers');
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 '',
67 'Outgoing points transfers');
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ürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2);
73 addAdminMenuSql('transfer','del_transfer','Manuell löschen','Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3);
76 addMemberMenuSql('extras', 'transfer', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transfer', 5);
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');
85 // Add row(s) to user's data
86 addExtensionAddTableColumnSql('user_data', 'opt_in', "ENUM('Y','N') NOT NULL DEFAULT 'N'");