Added update_year.sh (still not fully flexible) and updated all years with it.
[mailer.git] / inc / extensions / doubler / 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 : Double points                                    *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Punkte verdoppeln                                *
12  * -------------------------------------------------------------------- *
13  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
14  * Copyright (c) 2009 - 2015 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                 // Doubler table
40                 addDropTableSql('doubler');
41                 addCreateTableSql('doubler', "
42 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
43 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
44 `refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
45 `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
46 `remote_ip` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
47 `timemark` BIGINT(10) NOT NULL DEFAULT 0,
48 `completed` ENUM('Y','N') NOT NULL DEFAULT 'N',
49 `is_ref` ENUM('Y','N') NOT NULL DEFAULT 'N',
50 PRIMARY KEY (`id`),
51 INDEX (`refid`),
52 INDEX (`userid`)",
53                         'User doubler data');
54
55                 //
56                 // --- SETTINGS ---
57                 //
58                 // Minimum points to double
59                 addConfigAddSql('doubler_min', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000');
60                 // Maximum points to double
61                 addConfigAddSql('doubler_max', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000');
62                 // Points left on users account after doubling
63                 addConfigAddSql('doubler_left', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000');
64                 // Charge for doubling points which goes to the webmaster (shreddered in fact!)
65                 addConfigAddSql('doubler_charge', 'FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000');
66                 // Referral percents
67                 addConfigAddSql('doubler_ref', 'FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000');
68                 // Shall I use the jackpot to take points from? (Y/N, default=Y)
69                 addConfigAddSql('doubler_jackpot', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
70                 // A user account to take points from (default: 0->none)
71                 addConfigAddSql('doubler_userid', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
72                 // Total payed out points from your doublers
73                 addConfigAddSql('doubler_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
74                 // Sending mode of mails (immediately/daily reset)
75                 // --> This also means who fast the doubled points will be payed out!
76                 addConfigAddSql('doubler_send_mode', "ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'");
77                 // Timeout for entries to be purged (default: one week)
78                 addConfigAddSql('doubler_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7));
79                 // Number of newest entries to display
80                 addConfigAddSql('doubler_display_new', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10');
81                 // Number of entries which will be payed out soon
82                 addConfigAddSql('doubler_display_pay', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10');
83                 // Number of entries which are already payed out
84                 addConfigAddSql('doubler_display_old', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10');
85                 // Points used by every member
86                 addExtensionAddTableColumnSql('user_data', 'doubler_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
87                 // Counter for usage of the doubler
88                 addConfigAddSql('doubler_counter', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
89
90                 //
91                 // --- MENU SYSTEMS ---
92                 //
93                 // Admin menu
94                 addAdminMenuSql('doubler', NULL, '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Verdoppler','Einstellungen und Eintr&auml;ge auflisten.', 4);
95                 addAdminMenuSql('doubler','list_doubler','Auflisten','Eintr&auml;ge aus der Verdiensttabelle auflisten', 1);
96                 addAdminMenuSql('doubler','config_doubler','Einstellungen','Prozentuale Geb&uuml;hr usw. einstellen.', 2);
97
98                 // Guest menu (informations / default doubler link)
99                 addGuestMenuSql('main', 'doubler', 'Verdoppeln!', 3);
100
101                 // Member menu
102                 addMemberMenuSql('main', 'doubler', 'Verdoppeln!', 7);
103
104 // [EOF]
105 ?>