OSDN Git Service

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