OSDN Git Service

Small update and bugfix
[idb/iDB.git.git] / inc / misc / setcheck.php
1 <?php
2 /*
3     This program is free software; you can redistribute it and/or modify
4     it under the terms of the Revised BSD License.
5
6     This program is distributed in the hope that it will be useful,
7     but WITHOUT ANY WARRANTY; without even the implied warranty of
8     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9     Revised BSD License for more details.
10
11     Copyright 2004-2015 iDB Support - http://idb.berlios.de/
12     Copyright 2004-2015 Game Maker 2k - http://gamemaker2k.org/
13
14     $FileInfo: setcheck.php - Last Update: 01/26/2017 SVN 810 - Author: cooldude2k $
15 */
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="setcheck.php"||$File3Name=="/setcheck.php") {
18         require('index.php');
19         exit(); }
20 if(!isset($Settings['showverinfo'])) { $Settings['showverinfo'] = "on"; }
21 if(!isset($_GET['debug'])) { $_GET['debug'] = false; }
22 if(!isset($GZipEncode)) { $GZipEncode = array("Type" => "none"); }
23 if(!is_array($GZipEncode)) { $GZipEncode = array("Type" => "none"); }
24 if(!isset($preact)) { $preact = null; }
25 if(!isset($Settings['hash_type'])) { $Settings['hash_type'] = null; }
26 if(!isset($Error)) { $Error = null; }
27 if(!isset($passright)) { $passright = null; }
28 $SQLimit = null;
29 if(!isset($Settings['sqltype'])) {
30         $Settings['sqltype'] = "mysql"; }
31 $Settings['sqltype'] = strtolower($Settings['sqltype']);
32 if($Settings['sqltype']!="mysql"&&
33         $Settings['sqltype']!="mysqli"&&
34         $Settings['sqltype']!="pgsql"&&
35         $Settings['sqltype']!="sqlite"&&
36         $Settings['sqltype']!="cubrid") {
37         $Settings['sqltype'] = "mysql"; }
38 if($Settings['sqltype']=="mysql"||
39         $Settings['sqltype']=="mysqli"||
40         $Settings['sqltype']=="sqlite"||
41         $Settings['sqltype']=="cubrid") {
42         $SQLimit = "LIMIT %i,%i"; }
43 if($Settings['sqltype']=="pgsql") {
44         $SQLimit = "OFFSET %i LIMIT %i"; }
45 if(!isset($Settings['enable_pathinfo'])) {
46   $Settings['enable_pathinfo'] = "off";  }
47 if($Settings['enable_pathinfo']!="on"&&
48         $Settings['enable_pathinfo']!="off") {
49   $Settings['enable_pathinfo'] = "off";  }
50 $Settings['sessionid_in_urls'] = "off";
51 if(!isset($Settings['sessionid_in_urls'])) {
52   $Settings['sessionid_in_urls'] = "off";  }
53 if($Settings['sessionid_in_urls']!="on"&&
54         $Settings['sessionid_in_urls']!="off") {
55   $Settings['sessionid_in_urls'] = "off";  }
56 if(!isset($Settings['use_captcha'])) {
57         $Settings['use_captcha'] = "on"; }
58 if(isset($Settings['use_captcha'])) {
59         if($Settings['use_captcha']!="on"&&
60                 $Settings['use_captcha']!="off") {
61         $Settings['use_captcha'] = "on"; } }
62 if(!isset($Settings['captcha_guest'])) {
63         $Settings['captcha_guest'] = "on"; }
64 if(isset($Settings['captcha_guest'])) {
65         if($Settings['captcha_guest']!="on"&&
66                 $Settings['captcha_guest']!="off") {
67         $Settings['captcha_guest'] = "on"; } }
68 if(!isset($Settings['captcha_clean'])) {
69         $Settings['captcha_clean'] = "off"; }
70 if(isset($Settings['captcha_clean'])) {
71         if($Settings['captcha_clean']!="on"&&
72                 $Settings['captcha_clean']!="off") {
73         $Settings['captcha_clean'] = "on"; } }
74 $sidurls = $Settings['sessionid_in_urls'];
75 if(!isset($Settings['board_offline'])) {
76   $Settings['board_offline'] = "off";  }
77 if($Settings['board_offline']!="on"&&
78         $Settings['board_offline']!="off") {
79   $Settings['board_offline'] = "off";  }
80 $oldusername = null; $oldtopicname = null; $ext = null;
81 if($Settings['DefaultTheme']==null) {
82         $Settings['DefaultTheme'] = "iDB"; }
83 if($Settings['DefaultTimeZone']==null) {
84         $Settings['DefaultTimeZone'] = date_default_timezone_get(); }
85 if(!isset($Settings['use_captcha'])) {
86         $Settings['use_captcha'] = "off"; }
87 if($Settings['use_captcha']!="on"&&
88         $Settings['use_captcha']!="off") { 
89         $Settings['use_captcha'] = "off"; }
90 if(!isset($Settings['captcha_clean'])) {
91         $Settings['captcha_clean'] = "off"; }
92 if($Settings['captcha_clean']!="on"&&
93         $Settings['captcha_clean']!="off") { 
94         $Settings['captcha_clean'] = "off"; }
95 if($Settings['enable_rss']!="on"&&
96         $Settings['enable_rss']!="on") { 
97         $Settings['enable_rss'] = "off"; }
98 if($Settings['enable_rss']=="on") { 
99     $Settings['enable_rss'] = "on"; }
100 if (file_exists("themes/iDB/settings.php")) {
101         $FallBack['DefaultTheme'] = "iDB"; }
102 if (!file_exists("themes/iDB/settings.php")) {
103         $FallBack['DefaultTheme'] = "Gray"; }
104 if($Settings['DefaultTheme']!=null) {
105 if (file_exists("themes/".$Settings['DefaultTheme']."/settings.php")) {
106 /* The file Skin Exists */ }
107 else { $Settings['DefaultTheme']=$FallBack['DefaultTheme'];
108 /* The file Skin Dose Not Exists */ } }
109 if($Settings['TestReferer']!="on"&&
110         $Settings['TestReferer']!="off") {
111         $Settings['TestReferer'] = "off"; }
112 if($Settings['charset']==null) {
113         $Settings['charset'] = "iso-8859-15"; }
114 if($Settings['qstr']==null) {
115         $Settings['qstr'] = "&"; }
116 if($Settings['qsep']==null) {
117         $Settings['qsep'] = "="; }
118 if($Settings['qsep']=="#"||
119         $Settings['qstr']=="#") {
120         $Settings['qstr'] = "&";
121         $Settings['qsep'] = "="; }
122 if($Settings['qsep']==$Settings['qstr']) {
123         $Settings['qstr'] = "&";
124         $Settings['qsep'] = "="; }
125 if($Settings['qstr']=="/"||
126         $Settings['qstr']=="&") {
127         $Settings['qsep'] = "="; }
128 /*if($Settings['qstr']!="&"&&
129         $Settings['qstr']!="/") {
130 qstring($Settings['qstr'],$Settings['qsep']); }*/
131 if(!isset($_GET['page'])) { $_GET['page'] = null; }
132 if(!isset($_GET['act'])) { $_GET['act'] = null; }
133 if(!isset($_POST['act'])) { $_POST['act'] = null; }
134 if(!isset($_GET['id'])) { $_GET['id'] = null; } 
135 if(!isset($_GET['debug'])) { $_GET['debug'] = "false"; }
136 if(!isset($_GET['post'])) { $_GET['post'] = null; }
137 if(!isset($_POST['License'])) { $_POST['License'] = null; }
138 if(!isset($Settings['enable_https'])) {
139   $Settings['enable_https'] = "off";  }
140 if($Settings['enable_https']!="on"&&
141         $Settings['enable_https']!="off") {
142   $Settings['enable_https'] = "off";  }
143 if(!isset($Settings['file_ext'])||
144         $Settings['file_ext']==null) {
145         $Settings['file_ext'] = ".php"; }
146 if(!isset($Settings['rss_ext'])||
147         $Settings['rss_ext']==null) {
148         $Settings['rss_ext'] = ".php"; }
149 if(!isset($Settings['js_ext'])||
150         $Settings['js_ext']==null) {
151         $Settings['js_ext'] = ".js"; }
152 if(!isset($Settings['add_power_by'])) {
153   $Settings['add_power_by'] = "off";  }
154 if($Settings['add_power_by']=="on") {
155 $idbpowertitle = " (Powered by ".$iDB.")";
156 $itbpowertitle = " (Powered by ".$iTB.")"; }
157 if($Settings['add_power_by']!="on") {
158 $idbpowertitle = null;
159 $itbpowertitle = null; }
160 if($Settings['GuestGroup']==null) {
161         $Settings['GuestGroup'] = "Guest"; }
162 if($Settings['MemberGroup']==null) {
163         $Settings['MemberGroup'] = "Member"; }
164 if($Settings['ValidateGroup']==null&&
165         $Settings['AdminValidate']=="on") {
166 $Settings['ValidateGroup'] = "Validate"; }
167 if($Settings['html_type']=="html4") { 
168         $Settings['html_type'] = "html5"; }
169 /*if($_GET['debug']!="off"||$_GET['debug']=="on") {
170         output_add_rewrite_var("amp;debug",$_GET['debug']); }*/
171 if (!isset($_GET['action'])) { $_GET['action'] = null; }
172 if (!isset($_GET['activity'])) { $_GET['activity'] = null; }
173 if (!isset($_GET['function'])) { $_GET['function'] = null; }
174 if (!isset($_GET['mode'])) { $_GET['mode'] = null; }
175 if (!isset($_GET['show'])) { $_GET['show'] = null; }
176 if (!isset($_GET['do'])) { $_GET['do'] = null; }
177 if ($_GET['act']==null&&$_GET['action']!=null) { $_GET['act']=$_GET['action']; }
178 if ($_GET['act']==null&&$_GET['activity']!=null) { $_GET['act']=$_GET['activity']; }
179 if ($_GET['act']==null&&$_GET['function']!=null) { $_GET['act']=$_GET['function']; }
180 if ($_GET['act']==null&&$_GET['mode']!=null) { $_GET['act']=$_GET['mode']; }
181 if ($_GET['act']==null&&$_GET['show']!=null) { $_GET['act']=$_GET['show']; }
182 if ($_GET['act']==null&&$_GET['do']!=null) { $_GET['act']=$_GET['do']; }
183 if ($_GET['act']=="idx"||$_GET['act']=="View") { $_GET['act']="view"; }
184 if ($_GET['act']=="Lo-Fi"||$_GET['act']=="lo-fi") { $_GET['act']="lowview"; }
185 if ($_GET['act']=="Low-View"||$_GET['act']=="low-view") { $_GET['act']="lowview"; }
186 if ($_GET['act']=="LowView"||$_GET['act']=="loview") { $_GET['act']="lowview"; }
187 if ($_GET['act']=="iDBInfo") { header('Location: http://sourceforge.net/projects/intdb/'); }
188 if ($_GET['act']=="iDBSite") { header('Location: http://intdb.sourceforge.net/'); }
189 if ($_GET['act']=="OldiDBInfo") { header('Location: http://developer.berlios.de/projects/idb/'); }
190 if ($_GET['act']=="OldiDBSite") { header('Location: http://idb.berlios.de/'); }
191 if ($_GET['act']=="DF2kInfo") { header('Location: http://developer.berlios.de/projects/df2k/'); }
192 if ($_GET['act']=="DF2kSite") { header('Location: http://df2k.berlios.de/'); }
193 if ($_GET['act']=="GM2kSite") { header('Location: http://upload.idb.s1.jcink.com/'); }
194 ?>