Extension 'yoomedia' now alpha status, some rewrites
[mailer.git] / inc / modules / admin / what-config_removeip.php
1 <?php
2 /************************************************************************
3  * MXChange v0.2.1                                    Start: 10/01/2008 *
4  * ================                             Last change: 10/01/2008 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : what-config_removeip.php                         *
8  * -------------------------------------------------------------------- *
9  * Short description : Configuration for the caching system             *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Konfiguration des Caching-Systems                *
12  * -------------------------------------------------------------------- *
13  *                                                                      *
14  * -------------------------------------------------------------------- *
15  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
16  * For more information visit: http://www.mxchange.org                  *
17  *                                                                      *
18  * This program is free software; you can redistribute it and/or modify *
19  * it under the terms of the GNU General Public License as published by *
20  * the Free Software Foundation; either version 2 of the License, or    *
21  * (at your option) any later version.                                  *
22  *                                                                      *
23  * This program is distributed in the hope that it will be useful,      *
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
26  * GNU General Public License for more details.                         *
27  *                                                                      *
28  * You should have received a copy of the GNU General Public License    *
29  * along with this program; if not, write to the Free Software          *
30  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
31  * MA  02110-1301  USA                                                  *
32  ************************************************************************/
33
34 // Some security stuff...
35 if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
36         $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
37         require($INC);
38 }
39
40 // Add description as navigation point
41 ADD_DESCR("admin", __FILE__);
42
43 if (isset($_POST['ok'])) {
44         // Save configuration
45         ADMIN_SAVE_SETTINGS($_POST);
46 } else {
47         // Prepare data
48         switch ($_CONFIG['removeip_anon_ip']) {
49                 case 'Y':
50                         define('__CFG_REMOVEIP_ANON_IP_Y', " checked=\"checked\"");
51                         define('__CFG_REMOVEIP_ANON_IP_N', "");
52                         break;
53
54                 case 'N':
55                         define('__CFG_REMOVEIP_ANON_IP_Y', "");
56                         define('__CFG_REMOVEIP_ANON_IP_N', " checked=\"checked\"");
57                         break;
58         } // END - switch
59
60         switch ($_CONFIG['removeip_anon_host']) {
61                 case 'Y':
62                         define('__CFG_REMOVEIP_ANON_HOST_Y', " checked=\"checked\"");
63                         define('__CFG_REMOVEIP_ANON_HOST_N', "");
64                         break;
65
66                 case 'N':
67                         define('__CFG_REMOVEIP_ANON_HOST_Y', "");
68                         define('__CFG_REMOVEIP_ANON_HOST_N', " checked=\"checked\"");
69                         break;
70         } // END - switch
71
72         switch ($_CONFIG['removeip_anon_ua']) {
73                 case 'Y':
74                         define('__CFG_REMOVEIP_ANON_UA_Y', " checked=\"checked\"");
75                         define('__CFG_REMOVEIP_ANON_UA_N', "");
76                         break;
77
78                 case 'N':
79                         define('__CFG_REMOVEIP_ANON_UA_Y', "");
80                         define('__CFG_REMOVEIP_ANON_UA_N', " checked=\"checked\"");
81                         break;
82         } // END - switch
83
84         switch ($_CONFIG['removeip_anon_ref']) {
85                 case 'Y':
86                         define('__CFG_REMOVEIP_ANON_REF_Y', " checked=\"checked\"");
87                         define('__CFG_REMOVEIP_ANON_REF_N', "");
88                         break;
89
90                 case 'N':
91                         define('__CFG_REMOVEIP_ANON_REF_Y', "");
92                         define('__CFG_REMOVEIP_ANON_REF_N', " checked=\"checked\"");
93                         break;
94         } // END - switch
95
96         switch ($_CONFIG['removeip_admin_show']) {
97                 case 'Y':
98                         define('__CFG_REMOVEIP_ADMIN_SHOW_Y', " checked=\"checked\"");
99                         define('__CFG_REMOVEIP_ADMIN_SHOW_N', "");
100                         break;
101
102                 case 'N':
103                         define('__CFG_REMOVEIP_ADMIN_SHOW_Y', "");
104                         define('__CFG_REMOVEIP_ADMIN_SHOW_N', " checked=\"checked\"");
105                         break;
106         } // END - switch
107
108         switch ($_CONFIG['removeip_guest_show']) {
109                 case 'Y':
110                         define('__CFG_REMOVEIP_GUEST_SHOW_Y', " checked=\"checked\"");
111                         define('__CFG_REMOVEIP_GUEST_SHOW_N', "");
112                         break;
113
114                 case 'N':
115                         define('__CFG_REMOVEIP_GUEST_SHOW_Y', "");
116                         define('__CFG_REMOVEIP_GUEST_SHOW_N', " checked=\"checked\"");
117                         break;
118         } // END - switch
119
120         switch ($_CONFIG['removeip_member_show']) {
121                 case 'Y':
122                         define('__CFG_REMOVEIP_MEMBER_SHOW_Y', " checked=\"checked\"");
123                         define('__CFG_REMOVEIP_MEMBER_SHOW_N', "");
124                         break;
125
126                 case 'N':
127                         define('__CFG_REMOVEIP_MEMBER_SHOW_Y', "");
128                         define('__CFG_REMOVEIP_MEMBER_SHOW_N', " checked=\"checked\"");
129                         break;
130         } // END - switch
131
132         switch ($_CONFIG['removeip_sponsor_show']) {
133                 case 'Y':
134                         define('__CFG_REMOVEIP_SPONSOR_SHOW_Y', " checked=\"checked\"");
135                         define('__CFG_REMOVEIP_SPONSOR_SHOW_N', "");
136                         break;
137
138                 case 'N':
139                         define('__CFG_REMOVEIP_SPONSOR_SHOW_Y', "");
140                         define('__CFG_REMOVEIP_SPONSOR_SHOW_N', " checked=\"checked\"");
141                         break;
142         } // END - switch
143
144         switch ($_CONFIG['anonymous_ip']) {
145                 case "127.0.0.1":
146                         define('__CFG_ANONYMOUS_IP_LOCAL' , " selected=\"selected\"");
147                         define('__CFG_ANONYMOUS_IP_ZERO'  , "");
148                         define('__CFG_ANONYMOUS_IP_RANDOM', "");
149                         break;
150
151                 case "0.0.0.0":
152                         define('__CFG_ANONYMOUS_IP_LOCAL' , "");
153                         define('__CFG_ANONYMOUS_IP_ZERO'  , " selected=\"selected\"");
154                         define('__CFG_ANONYMOUS_IP_RANDOM', "");
155                         break;
156
157                 case "RANDOM":
158                         define('__CFG_ANONYMOUS_IP_LOCAL' , "");
159                         define('__CFG_ANONYMOUS_IP_ZERO'  , "");
160                         define('__CFG_ANONYMOUS_IP_RANDOM', " selected=\"selected\"");
161                         break;
162         } // END - switch
163
164         // Load template
165         LOAD_TEMPLATE("admin_config_removeip");
166 }
167 //
168 ?>