Small update
[iDB.git] / inc / misc / setcheck.php
bloba3f8775e8c29dda81710cc905e492125645113ab
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.
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.
11 Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: setcheck.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
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']!="sqlite3"&&
37 $Settings['sqltype']!="cubrid") {
38 $Settings['sqltype'] = "mysql"; }
39 if($Settings['sqltype']=="mysql"||
40 $Settings['sqltype']=="mysqli"||
41 $Settings['sqltype']=="sqlite"||
42 $Settings['sqltype']=="sqlite3"||
43 $Settings['sqltype']=="cubrid") {
44 $SQLimit = "LIMIT %i,%i"; }
45 if($Settings['sqltype']=="pgsql") {
46 $SQLimit = "OFFSET %i LIMIT %i"; }
47 if(!isset($Settings['enable_pathinfo'])) {
48 $Settings['enable_pathinfo'] = "off"; }
49 if($Settings['enable_pathinfo']!="on"&&
50 $Settings['enable_pathinfo']!="off") {
51 $Settings['enable_pathinfo'] = "off"; }
52 $Settings['sessionid_in_urls'] = "off";
53 if(!isset($Settings['sessionid_in_urls'])) {
54 $Settings['sessionid_in_urls'] = "off"; }
55 if($Settings['sessionid_in_urls']!="on"&&
56 $Settings['sessionid_in_urls']!="off") {
57 $Settings['sessionid_in_urls'] = "off"; }
58 if(!isset($Settings['use_captcha'])) {
59 $Settings['use_captcha'] = "on"; }
60 if(isset($Settings['use_captcha'])) {
61 if($Settings['use_captcha']!="on"&&
62 $Settings['use_captcha']!="off") {
63 $Settings['use_captcha'] = "on"; } }
64 if(!isset($Settings['captcha_guest'])) {
65 $Settings['captcha_guest'] = "on"; }
66 if(isset($Settings['captcha_guest'])) {
67 if($Settings['captcha_guest']!="on"&&
68 $Settings['captcha_guest']!="off") {
69 $Settings['captcha_guest'] = "on"; } }
70 if(!isset($Settings['captcha_clean'])) {
71 $Settings['captcha_clean'] = "off"; }
72 if(isset($Settings['captcha_clean'])) {
73 if($Settings['captcha_clean']!="on"&&
74 $Settings['captcha_clean']!="off") {
75 $Settings['captcha_clean'] = "on"; } }
76 $sidurls = $Settings['sessionid_in_urls'];
77 if(!isset($Settings['board_offline'])) {
78 $Settings['board_offline'] = "off"; }
79 if($Settings['board_offline']!="on"&&
80 $Settings['board_offline']!="off") {
81 $Settings['board_offline'] = "off"; }
82 $oldusername = null; $oldtopicname = null; $ext = null;
83 if($Settings['DefaultTheme']==null) {
84 $Settings['DefaultTheme'] = "iDB"; }
85 if($Settings['DefaultTimeZone']==null) {
86 $Settings['DefaultTimeZone'] = date_default_timezone_get(); }
87 if(!isset($Settings['use_captcha'])) {
88 $Settings['use_captcha'] = "off"; }
89 if($Settings['use_captcha']!="on"&&
90 $Settings['use_captcha']!="off") {
91 $Settings['use_captcha'] = "off"; }
92 if(!isset($Settings['captcha_clean'])) {
93 $Settings['captcha_clean'] = "off"; }
94 if($Settings['captcha_clean']!="on"&&
95 $Settings['captcha_clean']!="off") {
96 $Settings['captcha_clean'] = "off"; }
97 if($Settings['enable_rss']!="on"&&
98 $Settings['enable_rss']!="on") {
99 $Settings['enable_rss'] = "off"; }
100 if($Settings['enable_rss']=="on") {
101 $Settings['enable_rss'] = "on"; }
102 if (file_exists("themes/iDB/settings.php")) {
103 $FallBack['DefaultTheme'] = "iDB"; }
104 if (!file_exists("themes/iDB/settings.php")) {
105 $FallBack['DefaultTheme'] = "Gray"; }
106 if($Settings['DefaultTheme']!=null) {
107 if (file_exists("themes/".$Settings['DefaultTheme']."/settings.php")) {
108 /* The file Skin Exists */ }
109 else { $Settings['DefaultTheme']=$FallBack['DefaultTheme'];
110 /* The file Skin Dose Not Exists */ } }
111 if($Settings['TestReferer']!="on"&&
112 $Settings['TestReferer']!="off") {
113 $Settings['TestReferer'] = "off"; }
114 if($Settings['charset']==null) {
115 $Settings['charset'] = "iso-8859-15"; }
116 if($Settings['qstr']==null) {
117 $Settings['qstr'] = "&"; }
118 if($Settings['qsep']==null) {
119 $Settings['qsep'] = "="; }
120 if($Settings['qsep']=="#"||
121 $Settings['qstr']=="#") {
122 $Settings['qstr'] = "&";
123 $Settings['qsep'] = "="; }
124 if($Settings['qsep']==$Settings['qstr']) {
125 $Settings['qstr'] = "&";
126 $Settings['qsep'] = "="; }
127 if($Settings['qstr']=="/"||
128 $Settings['qstr']=="&") {
129 $Settings['qsep'] = "="; }
130 /*if($Settings['qstr']!="&"&&
131 $Settings['qstr']!="/") {
132 qstring($Settings['qstr'],$Settings['qsep']); }*/
133 if(!isset($_GET['page'])) { $_GET['page'] = null; }
134 if(!isset($_GET['act'])) { $_GET['act'] = null; }
135 if(!isset($_POST['act'])) { $_POST['act'] = null; }
136 if(!isset($_GET['id'])) { $_GET['id'] = null; }
137 if(!isset($_GET['debug'])) { $_GET['debug'] = "false"; }
138 if(!isset($_GET['post'])) { $_GET['post'] = null; }
139 if(!isset($_POST['License'])) { $_POST['License'] = null; }
140 if(!isset($Settings['enable_https'])) {
141 $Settings['enable_https'] = "off"; }
142 if($Settings['enable_https']!="on"&&
143 $Settings['enable_https']!="off") {
144 $Settings['enable_https'] = "off"; }
145 if(!isset($Settings['file_ext'])||
146 $Settings['file_ext']==null) {
147 $Settings['file_ext'] = ".php"; }
148 if(!isset($Settings['rss_ext'])||
149 $Settings['rss_ext']==null) {
150 $Settings['rss_ext'] = ".php"; }
151 if(!isset($Settings['js_ext'])||
152 $Settings['js_ext']==null) {
153 $Settings['js_ext'] = ".js"; }
154 if(!isset($Settings['add_power_by'])) {
155 $Settings['add_power_by'] = "off"; }
156 if($Settings['add_power_by']=="on") {
157 $idbpowertitle = " (Powered by ".$iDB.")";
158 $itbpowertitle = " (Powered by ".$iTB.")"; }
159 if($Settings['add_power_by']!="on") {
160 $idbpowertitle = null;
161 $itbpowertitle = null; }
162 if($Settings['GuestGroup']==null) {
163 $Settings['GuestGroup'] = "Guest"; }
164 if($Settings['MemberGroup']==null) {
165 $Settings['MemberGroup'] = "Member"; }
166 if($Settings['ValidateGroup']==null&&
167 $Settings['AdminValidate']=="on") {
168 $Settings['ValidateGroup'] = "Validate"; }
169 if($Settings['html_type']=="html4") {
170 $Settings['html_type'] = "html5"; }
171 /*if($_GET['debug']!="off"||$_GET['debug']=="on") {
172 output_add_rewrite_var("amp;debug",$_GET['debug']); }*/
173 if (!isset($_GET['action'])) { $_GET['action'] = null; }
174 if (!isset($_GET['activity'])) { $_GET['activity'] = null; }
175 if (!isset($_GET['function'])) { $_GET['function'] = null; }
176 if (!isset($_GET['mode'])) { $_GET['mode'] = null; }
177 if (!isset($_GET['show'])) { $_GET['show'] = null; }
178 if (!isset($_GET['do'])) { $_GET['do'] = null; }
179 if ($_GET['act']==null&&$_GET['action']!=null) { $_GET['act']=$_GET['action']; }
180 if ($_GET['act']==null&&$_GET['activity']!=null) { $_GET['act']=$_GET['activity']; }
181 if ($_GET['act']==null&&$_GET['function']!=null) { $_GET['act']=$_GET['function']; }
182 if ($_GET['act']==null&&$_GET['mode']!=null) { $_GET['act']=$_GET['mode']; }
183 if ($_GET['act']==null&&$_GET['show']!=null) { $_GET['act']=$_GET['show']; }
184 if ($_GET['act']==null&&$_GET['do']!=null) { $_GET['act']=$_GET['do']; }
185 if ($_GET['act']=="idx"||$_GET['act']=="View") { $_GET['act']="view"; }
186 if ($_GET['act']=="Lo-Fi"||$_GET['act']=="lo-fi") { $_GET['act']="lowview"; }
187 if ($_GET['act']=="Low-View"||$_GET['act']=="low-view") { $_GET['act']="lowview"; }
188 if ($_GET['act']=="LowView"||$_GET['act']=="loview") { $_GET['act']="lowview"; }
189 if ($_GET['act']=="iDBInfo") { header('Location: http://sourceforge.net/projects/intdb/'); }
190 if ($_GET['act']=="iDBSite") { header('Location: http://intdb.sourceforge.net/'); }
191 if ($_GET['act']=="OldiDBInfo") { header('Location: http://developer.berlios.de/projects/idb/'); }
192 if ($_GET['act']=="OldiDBSite") { header('Location: https://idb.osdn.jp/'); }
193 if ($_GET['act']=="DF2kInfo") { header('Location: http://developer.berlios.de/projects/df2k/'); }
194 if ($_GET['act']=="DF2kSite") { header('Location: http://df2k.berlios.de/'); }
195 if ($_GET['act']=="GM2kSite") { header('Location: https://idb.osdn.jp/'); }