Update killglobals.php
[iDB.git] / inc / admin / main.php
blob1d7eb2d5957b6561153b9b92690c3a0036d6508a
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-2023 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2023 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: main.php - Last Update: 7/15/2023 SVN 1001 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="main.php"||$File3Name=="/main.php") {
18 require('index.php');
19 exit(); }
21 // Check if we can goto admin cp
22 if($_SESSION['UserGroup']==$Settings['GuestGroup']||$GroupInfo['HasAdminCP']=="no") {
23 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
24 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
25 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
26 if(!isset($_POST['update'])) { $_POST['update'] = null; }
27 if($_GET['act']=="sql"&&$GroupInfo['ViewDBInfo']!="yes") {
28 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
29 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
30 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
31 if(!isset($_POST['update'])) { $_POST['update'] = null; }
32 if($_GET['act']=="resyncthemes"&&$Settings['SQLThemes']!="on") { $_GET['act'] = "enablesthemes"; }
33 if($_GET['act']=="enablesthemes"&&$Settings['SQLThemes']!="off") { $_GET['act'] = "resyncthemes"; }
34 $iDBRDate = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
35 $iDBRSVN = $VER2[2]." ".$SubVerN;
36 $OutPutLog = null;
37 $LastUpdateS = "Last Update: ".$iDBRDate." ".$iDBRSVN;
38 $pretext = "<?php\n/*\n This program is free software; you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation; either version 2 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n Revised BSD License for more details.\n\n Copyright 2004-".$SVNDay[2]." iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1\n Copyright 2004-".$SVNDay[2]." Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2\n iDB Installer made by Game Maker 2k - http://idb.berlios.net/\n\n \$FileInfo: settings.php & settingsbak.php - ".$LastUpdateS." - Author: cooldude2k \$\n*/\n";
39 $pretext2 = array("/* Board Setting Section Begins */\n\$Settings = array();","/* Board Setting Section Ends \n Board Info Section Begins */\n\$SettInfo = array();","/* Board Setting Section Ends \n Board Dir Section Begins */\n\$SettDir = array();","/* Board Dir Section Ends */");
40 $settcheck = "\$File3Name = basename(\$_SERVER['SCRIPT_NAME']);\nif (\$File3Name==\"settings.php\"||\$File3Name==\"/settings.php\"||\n \$File3Name==\"settingsbak.php\"||\$File3Name==\"/settingsbak.php\") {\n header('Location: index.php');\n exit(); }\n";
41 if(!isset($_POST['update'])) { $_POST['update'] = null; }
42 function bool_string($boolean) {
43 if(!is_bool($boolean)) {
44 return $boolean; }
45 if(is_bool($boolean)) {
46 if($boolean==0||$boolean===false) {
47 return "false"; }
48 if($boolean==1||$boolean===true) {
49 return "true"; } } }
50 function null_string($string) {
51 $strtype = strtolower(gettype($string));
52 if($strtype=="string") {
53 return "'".$string."'"; }
54 if($strtype=="null") {
55 return "null"; }
56 if($strtype=="integer") {
57 return $string; }
58 return "null"; }
59 function rsq($string) {
60 if($string!=null) {
61 $string = preg_replace("/^(\')|$(\')/i","\'",$string); }
62 return $string; }
63 $KarmaExp = explode("&",$Settings['KarmaBoostDays']);
64 $KarmaNum = count($KarmaExp);
65 $Karmai = 0; $KarmaNex = 0; $KarmaTemp = null;
66 while ($Karmai < $KarmaNum) {
67 if(is_numeric($KarmaExp[$Karmai])) {
68 $KarmaTemp[$KarmaNex] = $KarmaExp[$Karmai];
69 ++$KarmaNex; }
70 ++$Karmai; }
71 $KarmaExp = $KarmaTemp;
72 $Settings['KarmaBoostDays'] = implode("&",$KarmaExp);
73 $KBoostPercent = explode("|",$Settings['KBoostPercent']);
74 if(count($KBoostPercent)<1) {
75 $Settings['KBoostPercent'] = "6|10"; }
76 if(!is_numeric($KBoostPercent[0])) {
77 $Settings['KBoostPercent'] = "6|10"; }
78 if(count($KBoostPercent)==1) {
79 $Settings['KBoostPercent'] = "6|10"; }
80 if(!is_numeric($KBoostPercent[1])) {
81 $Settings['KBoostPercent'] = "6|10"; }
82 if(count($KBoostPercent)>2) {
83 $Settings['KBoostPercent'] = "6|10"; }
84 if($Settings['html_type']=="html5") {
85 $Settings['output_type'] = "html"; }
86 if(!isset($Settings['sqltype'])) {
87 $Settings['sqltype'] = "mysql"; }
88 $Settings['sqltype'] = strtolower($Settings['sqltype']);
89 if($Settings['sqltype']!="mysql"&&
90 $Settings['sqltype']!="mysqli"&&
91 $Settings['sqltype']!="pgsql"&&
92 $Settings['sqltype']!="sqlite"&&
93 $Settings['sqltype']!="sqlite3"&&
94 $Settings['sqltype']!="pdo_sqlite3"&&
95 $Settings['sqltype']!="cubrid") {
96 $Settings['sqltype'] = "mysql"; }
97 if($Settings['sqltype']=="mysql"||
98 $Settings['sqltype']=="mysqli") {
99 $DBType['Server'] = "MySQL ".sql_server_info($SQLStat);
100 $DBType['Client'] = "MySQL ".sql_client_info($SQLStat); }
101 if($Settings['sqltype']=="pgsql") {
102 $DBType['Server'] = "Postgres ".sql_server_info($SQLStat);
103 $DBType['Client'] = "Postgres ".sql_client_info($SQLStat); }
104 if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3"||$Settings['sqltype']=="pdo_sqlite3") {
105 $DBType['Server'] = "SQLite ".sql_server_info($SQLStat);
106 $DBType['Client'] = sql_client_info($SQLStat); }
107 if($Settings['sqltype']=="cubrid") {
108 $DBType['Server'] = "CUBRID ".sql_server_info($SQLStat);
109 $DBType['Client'] = "CUBRID ".sql_client_info($SQLStat);
110 $DBType['PHP'] = "CUBRID ".cubrid_version(); }
111 if(!isset($Settings['vercheck'])) {
112 $Settings['vercheck'] = 2; }
113 if($Settings['vercheck']!=1&&
114 $Settings['vercheck']!=2) {
115 $Settings['vercheck'] = 2; }
116 if(!isset($Settings['start_date'])) {
117 $Settings['start_date'] = $utccurtime->getTimestamp(); }
118 if(!isset($Settings['SQLThemes'])) {
119 $Settings['SQLThemes'] = 'off'; }
120 if($Settings['SQLThemes']!="on"&&
121 $Settings['SQLThemes']!="off") {
122 $Settings['SQLThemes'] = 'off'; }
123 if(!isset($Settings['board_name'])&&isset($SettInfo['board_name'])) {
124 $Settings['board_name'] = $SettInfo['board_name']; }
125 if(!isset($SettInfo['board_name'])&&isset($Settings['board_name'])) {
126 $SettInfo['board_name'] = $Settings['board_name']; }
127 if($Settings['board_name']!=$SettInfo['board_name']) {
128 $SettInfo['board_name'] = $Settings['board_name']; }
129 if(!isset($Settings['VerCheckURL'])) {
130 $Settings['VerCheckURL'] = ""; }
131 if(!isset($Settings['IPCheckURL'])) {
132 $Settings['IPCheckURL'] = ""; }
133 if(!isset($Settings['log_config_format'])) {
134 $Settings['log_config_format'] = "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""; }
135 if(!isset($Settings['idb_time_format'])) {
136 $Settings['idb_time_format'] = "g:i A"; }
137 if(!isset($Settings['idb_date_format'])) {
138 $Settings['idb_date_format'] = "F j Y"; }
140 <table class="Table3">
141 <tr style="width: 100%; vertical-align: top;">
142 <td style="width: 15%; vertical-align: top;">
143 <?php
144 require($SettDir['admin'].'table.php');
145 if($_GET['act']=="delsessions"&&$GroupInfo['ViewDBInfo']=="yes") {
146 $time = $utccurtime->getTimestamp() - ini_get("session.gc_maxlifetime");
147 //$sqlg = sql_pre_query('DELETE FROM \"'.$Settings['sqltable'].'sessions\" WHERE \"expires\" < UNIX_TIMESTAMP();', array(null));
148 $sqlgc = sql_pre_query("DELETE FROM \"".$Settings['sqltable']."sessions\" WHERE \"expires\" < %i", array($time));
149 sql_query($sqlgc,$SQLStat);
150 $_POST['update'] = "now"; $_GET['act'] = "optimize"; }
151 if($_GET['act']=="enablesthemes"&&$GroupInfo['ViewDBInfo']=="yes"&&$Settings['SQLThemes']=="off") {
152 $Settings['board_name'] = htmlspecialchars($Settings['board_name'], ENT_QUOTES, $Settings['charset']);
153 $Settings['board_name'] = fixbamps($Settings['board_name']);
154 $Settings['board_name'] = remove_spaces($Settings['board_name']);
155 $Settings['board_name'] = str_replace("\&#039;", "&#039;", $Settings['board_name']);
156 $SettInfo['board_name'] = htmlspecialchars($SettInfo['board_name'], ENT_QUOTES, $Settings['charset']);
157 $SettInfo['board_name'] = fixbamps($SettInfo['board_name']);
158 $SettInfo['board_name'] = remove_spaces($SettInfo['board_name']);
159 $SettInfo['board_name'] = str_replace("\&#039;", "&#039;", $SettInfo['board_name']);
160 $SettInfo['Author'] = htmlspecialchars($SettInfo['Author'], ENT_QUOTES, $Settings['charset']);
161 $SettInfo['Author'] = fixbamps($SettInfo['Author']);
162 $SettInfo['Author'] = remove_spaces($SettInfo['Author']);
163 $SettInfo['Author'] = str_replace("\&#039;", "&#039;", $SettInfo['Author']);
164 $SettInfo['Keywords'] = htmlspecialchars($SettInfo['Keywords'], ENT_QUOTES, $Settings['charset']);
165 $SettInfo['Keywords'] = fixbamps($SettInfo['Keywords']);
166 $SettInfo['Keywords'] = remove_spaces($SettInfo['Keywords']);
167 $SettInfo['Keywords'] = str_replace("\&#039;", "&#039;", $SettInfo['Keywords']);
168 $SettInfo['Description'] = htmlspecialchars($SettInfo['Description'], ENT_QUOTES, $Settings['charset']);
169 $SettInfo['Description'] = fixbamps($SettInfo['Description']);
170 $SettInfo['Description'] = remove_spaces($SettInfo['Description']);
171 $SettInfo['Description'] = str_replace("\&#039;", "&#039;", $SettInfo['Description']);
172 $BoardSettings=$pretext2[0]."\n".
173 "\$Settings['sqlhost'] = ".null_string($Settings['sqlhost']).";\n".
174 "\$Settings['sqldb'] = ".null_string($Settings['sqldb']).";\n".
175 "\$Settings['sqltable'] = ".null_string($Settings['sqltable']).";\n".
176 "\$Settings['sqluser'] = ".null_string($Settings['sqluser']).";\n".
177 "\$Settings['sqlpass'] = ".null_string($Settings['sqlpass']).";\n".
178 "\$Settings['sqltype'] = ".null_string($Settings['sqltype']).";\n".
179 "\$Settings['board_name'] = ".null_string($Settings['board_name']).";\n".
180 "\$Settings['idbdir'] = ".null_string($Settings['idbdir']).";\n".
181 "\$Settings['idburl'] = ".null_string($Settings['idburl']).";\n".
182 "\$Settings['enable_https'] = ".null_string($Settings['enable_https']).";\n".
183 "\$Settings['weburl'] = ".null_string($Settings['weburl']).";\n".
184 "\$Settings['SQLThemes'] = 'on';\n".
185 "\$Settings['use_gzip'] = ".null_string($Settings['use_gzip']).";\n".
186 "\$Settings['html_type'] = ".null_string($Settings['html_type']).";\n".
187 "\$Settings['html_level'] = ".null_string($Settings['html_level']).";\n".
188 "\$Settings['output_type'] = ".null_string($Settings['output_type']).";\n".
189 "\$Settings['GuestGroup'] = ".null_string($Settings['GuestGroup']).";\n".
190 "\$Settings['MemberGroup'] = ".null_string($Settings['MemberGroup']).";\n".
191 "\$Settings['ValidateGroup'] = ".null_string($Settings['ValidateGroup']).";\n".
192 "\$Settings['AdminValidate'] = ".null_string($Settings['AdminValidate']).";\n".
193 "\$Settings['TestReferer'] = ".null_string($Settings['TestReferer']).";\n".
194 "\$Settings['DefaultTheme'] = ".null_string($Settings['DefaultTheme']).";\n".
195 "\$Settings['DefaultTimeZone'] = ".null_string($Settings['DefaultTimeZone']).";\n".
196 "\$Settings['start_date'] = ".null_string($Settings['start_date']).";\n".
197 "\$Settings['idb_time_format'] = ".null_string($Settings['idb_time_format']).";\n".
198 "\$Settings['idb_date_format'] = ".null_string($Settings['idb_date_format']).";\n".
199 "\$Settings['use_hashtype'] = ".null_string($Settings['use_hashtype']).";\n".
200 "\$Settings['charset'] = ".null_string($Settings['charset']).";\n".
201 "\$Settings['sql_collate'] = ".null_string($Settings['sql_collate']).";\n".
202 "\$Settings['sql_charset'] = ".null_string($Settings['sql_charset']).";\n".
203 "\$Settings['add_power_by'] = ".null_string($Settings['add_power_by']).";\n".
204 "\$Settings['send_pagesize'] = ".null_string($Settings['send_pagesize']).";\n".
205 "\$Settings['max_posts'] = ".null_string($Settings['max_posts']).";\n".
206 "\$Settings['max_topics'] = ".null_string($Settings['max_topics']).";\n".
207 "\$Settings['max_memlist'] = ".null_string($Settings['max_memlist']).";\n".
208 "\$Settings['max_pmlist'] = ".null_string($Settings['max_pmlist']).";\n".
209 "\$Settings['hot_topic_num'] = ".null_string($Settings['hot_topic_num']).";\n".
210 "\$Settings['qstr'] = ".null_string($Settings['qstr']).";\n".
211 "\$Settings['qsep'] = ".null_string($Settings['qsep']).";\n".
212 "\$Settings['file_ext'] = ".null_string($Settings['file_ext']).";\n".
213 "\$Settings['rss_ext'] = ".null_string($Settings['rss_ext']).";\n".
214 "\$Settings['js_ext'] = ".null_string($Settings['js_ext']).";\n".
215 "\$Settings['showverinfo'] = ".null_string($Settings['showverinfo']).";\n".
216 "\$Settings['vercheck'] = ".null_string($Settings['vercheck']).";\n".
217 "\$Settings['enable_rss'] = ".null_string($Settings['enable_rss']).";\n".
218 "\$Settings['enable_search'] = ".null_string($Settings['enable_search']).";\n".
219 "\$Settings['sessionid_in_urls'] = ".null_string($Settings['sessionid_in_urls']).";\n".
220 "\$Settings['fixpathinfo'] = ".null_string($OldSettings['fixpathinfo']).";\n".
221 "\$Settings['fixbasedir'] = ".null_string($OldSettings['fixbasedir']).";\n".
222 "\$Settings['fixcookiedir'] = ".null_string($OldSettings['fixcookiedir']).";\n".
223 "\$Settings['fixredirectdir'] = ".null_string($OldSettings['fixredirectdir']).";\n".
224 "\$Settings['enable_pathinfo'] = ".null_string($Settings['enable_pathinfo']).";\n".
225 "\$Settings['rssurl'] = ".null_string($Settings['rssurl']).";\n".
226 "\$Settings['board_offline'] = ".null_string($Settings['board_offline']).";\n".
227 "\$Settings['VerCheckURL'] = ".null_string($Settings['VerCheckURL']).";\n".
228 "\$Settings['IPCheckURL'] = ".null_string($Settings['IPCheckURL']).";\n".
229 "\$Settings['log_http_request'] = ".null_string($Settings['log_http_request']).";\n".
230 "\$Settings['log_config_format'] = ".null_string($Settings['log_config_format']).";\n".
231 "\$Settings['BoardUUID'] = ".null_string(base64_encode($Settings['BoardUUID'])).";\n".
232 "\$Settings['KarmaBoostDays'] = ".null_string($Settings['KarmaBoostDays']).";\n".
233 "\$Settings['KBoostPercent'] = ".null_string($Settings['KBoostPercent']).";\n".$pretext2[1]."\n".
234 "\$SettInfo['board_name'] = ".null_string($SettInfo['board_name']).";\n".
235 "\$SettInfo['Author'] = ".null_string($SettInfo['Author']).";\n".
236 "\$SettInfo['Keywords'] = ".null_string($SettInfo['Keywords']).";\n".
237 "\$SettInfo['Description'] = ".null_string($SettInfo['Description']).";\n".$pretext2[2]."\n".
238 "\$SettDir['maindir'] = ".null_string($SettDir['maindir']).";\n".
239 "\$SettDir['inc'] = ".null_string($SettDir['inc']).";\n".
240 "\$SettDir['logs'] = ".null_string($SettDir['logs']).";\n".
241 "\$SettDir['archive'] = ".null_string($SettDir['archive']).";\n".
242 "\$SettDir['misc'] = ".null_string($SettDir['misc']).";\n".
243 "\$SettDir['sql'] = ".null_string($SettDir['sql']).";\n".
244 "\$SettDir['admin'] = ".null_string($SettDir['admin']).";\n".
245 "\$SettDir['sqldumper'] = ".null_string($SettDir['sqldumper']).";\n".
246 "\$SettDir['mod'] = ".null_string($SettDir['mod']).";\n".
247 "\$SettDir['mplayer'] = ".null_string($SettDir['mplayer']).";\n".
248 "\$SettDir['themes'] = ".null_string($SettDir['themes']).";\n".$pretext2[3]."\n?>";
249 $BoardSettingsBak = $pretext.$settcheck.$BoardSettings;
250 $BoardSettings = $pretext.$settcheck.$BoardSettings;
251 $fp = fopen("settings.php","w+");
252 fwrite($fp, $BoardSettings);
253 fclose($fp);
254 // cp("settings.php","settingsbak.php");
255 $fp = fopen("settingsbak.php","w+");
256 fwrite($fp, $BoardSettingsBak);
257 fclose($fp);
258 $Settings['SQLThemes'] = "on";
259 $_POST['update'] = "now"; $_GET['act'] = "resyncthemes"; }
260 if(($_GET['act']=="themelist"&&$GroupInfo['ViewDBInfo']=="yes")||
261 ($_GET['act']=="gettheme"&&$_POST['act']=="gettheme"&&$GroupInfo['ViewDBInfo']=="yes")) {
262 if($_GET['act']=="gettheme"&&$_POST['act']=="gettheme"&&$_POST['GetTheme']==null) {
263 $_GET['act'] = "themelist"; $_POST['act'] = ""; }
264 if($_GET['act']=="gettheme"&&$_POST['act']=="gettheme"&&$_POST['GetTheme']=="None") {
265 $_GET['act'] = "themelist"; $_POST['act'] = ""; }
266 $conn_id = ftp_connect("ftp.berlios.de",21,90);
267 ftp_login($conn_id, "anonymous", "anonymous");
268 ftp_pasv($conn_id, true);
269 if($_GET['act']=="themelist") {
270 ftp_chdir($conn_id, "/pub/idb/themes/"); }
271 if($_GET['act']=="gettheme"&&$_POST['act']=="gettheme") {
272 ftp_chdir($conn_id, "/pub/idb/themes/".$_POST['GetTheme']."/");
273 ftp_get($conn_id, $SettDir['archive'].$_POST['GetTheme'].".tar", "./".$_POST['GetTheme'].".tar", FTP_BINARY);
274 untar($SettDir['archive'].$_POST['GetTheme'].".tar",$SettDir['themes'].$_POST['GetTheme']."/");
275 unlink($SettDir['archive'].$_POST['GetTheme'].".tar");
276 if($Settings['SQLThemes']=="off") { $_POST['update'] = "now"; }
277 if($Settings['SQLThemes']=="on") {
278 $_POST['update'] = "now"; $_GET['act'] = "resyncthemes"; } }
279 if($_GET['act']=="themelist") {
280 $themelist = ftp_nlist($conn_id, ".");
281 $it = 0; $numt = count($themelist);
282 $themeact = url_maker($exfile['admin'],$Settings['file_ext'],"act=gettheme",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']);
283 $admincptitle = " ".$ThemeSet['TitleDivider']." Theme Setup";
285 </td>
286 <td style="width: 85%; vertical-align: top;">
287 <div class="TableMenuBorder">
288 <?php if($ThemeSet['TableStyle']=="div") { ?>
289 <div class="TableMenuRow1">
290 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo $themeact; ?>">Theme Setup</a></div>
291 <?php } ?>
292 <table class="TableMenu" style="width: 100%;">
293 <?php if($ThemeSet['TableStyle']=="table") { ?>
294 <tr class="TableMenuRow1">
295 <td class="TableMenuColumn1"><span style="float: left;">
296 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo $themeact; ?>">Theme Setup</a>
297 </span><span style="float: right;">&#160;</span></td>
298 </tr><?php } ?>
299 <tr id="ProfileTitle" class="TableMenuRow2">
300 <th class="TableMenuColumn2">Theme Setup</th>
301 </tr>
302 <tr class="TableMenuRow3" id="NotePadRow">
303 <td class="TableMenuColumn3">
304 <form style="display: inline;" method="post" action="<?php echo $themeact; ?>"><div style="text-align: center;">
305 <label class="TextBoxLabel" for="GetTheme">Install Theme:</label><br />
306 <select size="1" name="GetTheme" id="GetTheme" class="TextBox">
307 <option value="None">None</option>
308 <?php
309 while ($it < $numt) {
310 if(!file_exists($SettDir['themes'].$themelist[$it])) {
311 echo "<option value=\"".$themelist[$it]."\">".$themelist[$it]."</option>\n"; }
312 ++$it; }
314 </select><br />
315 <input type="hidden" name="act" value="gettheme" style="display: none;" />
316 <input type="submit" value="Install" />
317 </div></form></td>
318 </tr>
319 <tr id="ProfileEnd" class="TableMenuRow4">
320 <td class="TableMenuColumn4">&#160;</td>
321 </tr>
322 </table>
323 </div>
324 <?php } ftp_close($conn_id); }
325 if($_GET['act']=="resyncthemes"&&$GroupInfo['ViewDBInfo']=="yes"&&$Settings['SQLThemes']=="on") {
326 $time = $utccurtime->getTimestamp() - ini_get("session.gc_maxlifetime");
327 //$sqlg = sql_pre_query('DELETE FROM \"'.$Settings['sqltable'].'sessions\" WHERE \"expires\" < UNIX_TIMESTAMP();', array(null));
328 if($Settings['sqltype']=="mysql"||
329 $Settings['sqltype']=="mysqli"||
330 $Settings['sqltype']=="cubrid") {
331 $sqlgc = sql_pre_query("TRUNCATE TABLE \"".$Settings['sqltable']."themes\"", array(null));
332 sql_query($sqlgc,$SQLStat);
333 $sqlgc = sql_pre_query("ALTER TABLE \"".$Settings['sqltable']."themes\" AUTO_INCREMENT=1", array(null));
334 sql_query($sqlgc,$SQLStat); }
335 if($Settings['sqltype']=="pgsql") {
336 $sqlgc = sql_pre_query("TRUNCATE TABLE \"".$Settings['sqltable']."themes\"", array(null));
337 sql_query($sqlgc,$SQLStat);
338 $sqlgc = sql_pre_query("SELECT setval('".$Settings['sqltable']."themes_id_seq', 1, false);", array(null));
339 sql_query($sqlgc,$SQLStat); }
340 if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3"||$Settings['sqltype']=="pdo_sqlite3") {
341 $sqlgc = sql_pre_query("DELETE FROM \"".$Settings['sqltable']."themes\";", array(null));
342 sql_query($sqlgc,$SQLStat); }
343 $skindir = dirname(realpath("sql.php"))."/".$SettDir['themes'];
344 if ($handle = opendir($skindir)) { $dirnum = null;
345 while (false !== ($file = readdir($handle))) {
346 if ($dirnum==null) { $dirnum = 0; }
347 if (is_dir($skindir.$file)) {
348 if (file_exists($skindir.$file."/info.php")) {
349 if ($file != "." && $file != "..") {
350 require($skindir.$file."/info.php");
351 $themelist[$dirnum] = $file;
352 ++$dirnum; } } } }
353 closedir($handle); asort($themelist);
354 $themenum=count($themelist); $themei=0;
355 while ($themei < $themenum) {
356 require($skindir.$themelist[$themei]."/settings.php");
357 $query = sql_pre_query("INSERT INTO \"".$Settings['sqltable']."themes\" (\"Name\", \"ThemeName\", \"ThemeMaker\", \"ThemeVersion\", \"ThemeVersionType\", \"ThemeSubVersion\", \"MakerURL\", \"CopyRight\", \"WrapperString\", \"CSS\", \"CSSType\", \"FavIcon\", \"OpenGraph\", \"TableStyle\", \"MiniPageAltStyle\", \"PreLogo\", \"Logo\", \"LogoStyle\", \"SubLogo\", \"TopicIcon\", \"MovedTopicIcon\", \"HotTopic\", \"MovedHotTopic\", \"PinTopic\", \"AnnouncementTopic\", \"MovedPinTopic\", \"HotPinTopic\", \"MovedHotPinTopic\", \"ClosedTopic\", \"MovedClosedTopic\", \"HotClosedTopic\", \"MovedHotClosedTopic\", \"PinClosedTopic\", \"MovedPinClosedTopic\", \"HotPinClosedTopic\", \"MovedHotPinClosedTopic\", \"MessageRead\", \"MessageUnread\", \"Profile\", \"WWW\", \"PM\", \"TopicLayout\", \"AddReply\", \"FastReply\", \"NewTopic\", \"QuoteReply\", \"EditReply\", \"DeleteReply\", \"Report\", \"LineDivider\", \"ButtonDivider\", \"LineDividerTopic\", \"TitleDivider\", \"ForumStyle\", \"ForumIcon\", \"SubForumIcon\", \"RedirectIcon\", \"TitleIcon\", \"NavLinkIcon\", \"NavLinkDivider\", \"BoardStatsIcon\", \"MemberStatsIcon\", \"BirthdayStatsIcon\", \"EventStatsIcon\", \"NoAvatar\", \"NoAvatarSize\") VALUES\n".
358 "('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s');", array($themelist[$themei], $ThemeSet['ThemeName'], $ThemeSet['ThemeMaker'], $ThemeSet['ThemeVersion'], $ThemeSet['ThemeVersionType'], $ThemeSet['ThemeSubVersion'], $ThemeSet['MakerURL'], $ThemeSet['CopyRight'], $ThemeSet['WrapperString'], $ThemeSet['CSS'], $ThemeSet['CSSType'], $ThemeSet['FavIcon'], $ThemeSet['OpenGraph'], $ThemeSet['TableStyle'], $ThemeSet['MiniPageAltStyle'], $ThemeSet['PreLogo'], $ThemeSet['Logo'], $ThemeSet['LogoStyle'], $ThemeSet['SubLogo'], $ThemeSet['TopicIcon'], $ThemeSet['MovedTopicIcon'], $ThemeSet['HotTopic'], $ThemeSet['MovedHotTopic'], $ThemeSet['PinTopic'], $ThemeSet['AnnouncementTopic'], $ThemeSet['MovedPinTopic'], $ThemeSet['HotPinTopic'], $ThemeSet['MovedHotPinTopic'], $ThemeSet['ClosedTopic'], $ThemeSet['MovedClosedTopic'], $ThemeSet['HotClosedTopic'], $ThemeSet['MovedHotClosedTopic'], $ThemeSet['PinClosedTopic'], $ThemeSet['MovedPinClosedTopic'], $ThemeSet['HotPinClosedTopic'], $ThemeSet['MovedHotPinClosedTopic'], $ThemeSet['MessageRead'], $ThemeSet['MessageUnread'], $ThemeSet['Profile'], $ThemeSet['WWW'], $ThemeSet['PM'], $ThemeSet['TopicLayout'], $ThemeSet['AddReply'], $ThemeSet['FastReply'], $ThemeSet['NewTopic'], $ThemeSet['QuoteReply'], $ThemeSet['EditReply'], $ThemeSet['DeleteReply'], $ThemeSet['Report'], $ThemeSet['LineDivider'], $ThemeSet['ButtonDivider'], $ThemeSet['LineDividerTopic'], $ThemeSet['TitleDivider'], $ThemeSet['ForumStyle'], $ThemeSet['ForumIcon'], $ThemeSet['SubForumIcon'], $ThemeSet['RedirectIcon'], $ThemeSet['TitleIcon'], $ThemeSet['NavLinkIcon'], $ThemeSet['NavLinkDivider'], $ThemeSet['BoardStatsIcon'], $ThemeSet['MemberStatsIcon'], $ThemeSet['BirthdayStatsIcon'], $ThemeSet['EventStatsIcon'], $ThemeSet['NoAvatar'], $ThemeSet['NoAvatarSize']));
359 sql_query($query,$SQLStat);
360 ++$themei; } }
361 $themequery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."themes\" WHERE \"Name\"='%s'", array($_GET['theme']));
362 $themeresult=sql_query($themequery,$SQLStat);
363 $themenum=sql_num_rows($themeresult);
364 require($SettDir['inc'].'sqlthemes.php');
365 $_POST['update'] = "now"; $_GET['act'] = "optimize"; }
366 if($_GET['act']=="optimize"&&$GroupInfo['ViewDBInfo']=="yes") {
367 $TablePreFix = $Settings['sqltable'];
368 function add_prefix($tarray) {
369 global $TablePreFix;
370 return $TablePreFix.$tarray; }
371 $TableChCk = array("categories", "catpermissions", "events", "forums", "groups", "levels", "members", "mempermissions", "messenger", "permissions", "polls", "posts", "restrictedwords", "sessions", "smileys", "themes", "topics", "wordfilter");
372 $TableChCk = array_map("add_prefix",$TableChCk);
373 $tcount = count($TableChCk); $ti = 0;
374 $TblOptimized = 0;
375 if($Settings['sqltype']!="sqlite"||$Settings['sqltype']=="sqlite3"||$Settings['sqltype']=="pdo_sqlite3") {
376 while ($ti < $tcount) {
377 if(isset($OptimizeAr["Msg_text"])) { unset($OptimizeAr["Msg_text"]); }
378 if(isset($OptimizeAr[3])) { unset($OptimizeAr[3]); }
379 if($Settings['sqltype']=="mysql"||
380 $Settings['sqltype']=="mysqli") {
381 if(isset($_GET['subact']) && $_GET['subact']=="repair") {
382 $RepairTea = sql_query(sql_pre_query("REPAIR TABLE \"".$TableChCk[$ti]."\"", array(null)),$SQLStat); }
383 $OptimizeTea = sql_query(sql_pre_query("OPTIMIZE TABLE \"".$TableChCk[$ti]."\"", array(null)),$SQLStat); }
384 if($Settings['sqltype']=="cubrid") {
385 $OptimizeTea = sql_query(sql_pre_query("UPDATE STATISTICS ON \"".$TableChCk[$ti]."\"", array(null)),$SQLStat); }
386 if($Settings['sqltype']=="pgsql") {
387 $OptimizeTea = sql_query(sql_pre_query("VACUUM ANALYZE \"".$TableChCk[$ti]."\"", array(null)),$SQLStat); }
388 if($Settings['sqltype']=="mysql"||
389 $Settings['sqltype']=="mysqli"||
390 $Settings['sqltype']=="cubrid") {
391 $OptimizeAr = sql_fetch_array($OptimizeTea);
392 if(!isset($OptimizeAr["Msg_text"])&&
393 isset($OptimizeAr[3])) { $OptimizeAr["Msg_text"] = $OptimizeAr[3]; }
394 if($OptimizeAr["Msg_text"]=="OK") {
395 ++$TblOptimized; } } ++$ti; } }
396 if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3"||$Settings['sqltype']=="pdo_sqlite3") {
397 sql_disconnect_db($SQLStat);
398 $SQLStat = sql_connect_db($Settings['sqlhost'],$Settings['sqluser'],$Settings['sqlpass'],$Settings['sqldb']);
399 $OptimizeTea = sql_query(sql_pre_query("VACUUM", array(null)),$SQLStat); }
400 if($Settings['sqltype']=="mysql"||
401 $Settings['sqltype']=="mysqli"||
402 $Settings['sqltype']=="cubrid") {
403 $OutPutLog = "MySQL Output: ".$TblOptimized." tables optimized."; }
404 if($Settings['sqltype']=="pgsql") {
405 $OutPutLog = "PGSQL Output: All tables optimized."; }
406 if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3"||$Settings['sqltype']=="pdo_sqlite3") {
407 $OutPutLog = "SQLite Output: All tables optimized."; }
408 if($Settings['sqltype']=="cubrid") {
409 $OutPutLog = "CUBRID Output: All tables optimized."; }
410 $_POST['update'] = "now"; $_GET['act'] = "view"; }
412 </td>
413 <td style="width: 85%; vertical-align: top;">
414 <?php if($_POST['update']=="now"&&$_GET['act']!=null) {
415 $updateact = url_maker($exfile['profile'],$Settings['file_ext'],"act=".$_GET['act']."&menu=main",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
416 $admincptitle = " ".$ThemeSet['TitleDivider']." Updating Settings";
417 redirect("refresh",$rbasedir.url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin'],FALSE),"3");
419 <div class="TableMenuBorder">
420 <?php if($ThemeSet['TableStyle']=="div") { ?>
421 <div class="TableMenuRow1">
422 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act']."&menu=main",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Updating Settings</a></div>
423 <?php } ?>
424 <table class="TableMenu" style="width: 100%;">
425 <?php if($ThemeSet['TableStyle']=="table") { ?>
426 <tr class="TableMenuRow1">
427 <td class="TableMenuColumn1"><span style="float: left;">
428 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act']."&menu=main",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Updating Settings</a>
429 </span><span style="float: right;">&#160;</span></td>
430 </tr><?php } ?>
431 <tr id="ProfileTitle" class="TableMenuRow2">
432 <th class="TableMenuColumn2">Updating Settings</th>
433 </tr>
434 <tr class="TableMenuRow3" id="ProfileUpdate">
435 <td class="TableMenuColumn3">
436 <div style="text-align: center;">
437 <?php if(isset($OutPutLog)) { echo "<br />".$OutPutLog; } ?>
438 <br />Settings have been updated <a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act']."&menu=main",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">click here</a> to go back. ^_^<br />&#160;</div>
439 <?php } if($_GET['act']=="view"&&$_POST['update']!="now") {
440 $query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
441 $result=sql_query($query,$SQLStat);
442 $num=sql_num_rows($result);
443 $i=0;
444 $YourID=sql_result($result,$i,"id");
445 $Notes=sql_result($result,$i,"Notes");
446 $noteact = url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
447 $notepadact = $noteact; $profiletitle = " ".$ThemeSet['TitleDivider']." NotePad";
448 $admincptitle = " ".$ThemeSet['TitleDivider']." Admin CP";
450 <div class="TableMenuBorder">
451 <?php if($ThemeSet['TableStyle']=="div") { ?>
452 <div class="TableMenuRow1">
453 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo $noteact; ?>">NotePad</a></div>
454 <?php } ?>
455 <table class="TableMenu" style="width: 100%;">
456 <?php if($ThemeSet['TableStyle']=="table") { ?>
457 <tr class="TableMenuRow1">
458 <td class="TableMenuColumn1"><span style="float: left;">
459 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo $noteact; ?>">NotePad</a>
460 </span><span style="float: right;">&#160;</span></td>
461 </tr><?php } ?>
462 <tr id="ProfileTitle" class="TableMenuRow2">
463 <th class="TableMenuColumn2">NotePad</th>
464 </tr>
465 <tr class="TableMenuRow3" id="NotePadRow">
466 <td class="TableMenuColumn3">
467 <form method="post" action="<?php echo $notepadact; ?>"><div style="text-align: center;">
468 <label class="TextBoxLabel" for="NotePad">Your NotePad</label><br />
469 <textarea class="TextBox" name="NotePad" id="NotePad" style="width: 75%; height: 128px;" rows="10" cols="84"><?php echo $Notes; ?></textarea>
470 <input type="hidden" name="act" value="view" style="display: none;" />
471 <input type="hidden" name="update" value="now" style="display: none;" />
472 <br /><input type="submit" class="Button" value="Save" />&#160;<input class="Button" type="reset" />
473 </div></form></td>
474 </tr>
475 <tr id="ProfileEnd" class="TableMenuRow4">
476 <td class="TableMenuColumn4">&#160;</td>
477 </tr>
478 </table>
479 </div>
480 <?php } if($_GET['act']=="settings"&&$_POST['update']!="now") {
481 $admincptitle = " ".$ThemeSet['TitleDivider']." Settings Manager";
482 $mguerys = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHERE (\"Name\"<>'%s') ORDER BY \"id\" ASC", array("Admin"));
483 $mgresults=sql_query($mguerys,$SQLStat);
484 $mnum=sql_num_rows($mgresults);
485 $mi = 0;
486 while ($mi < $mnum) {
487 $MGroups[$mi]=sql_result($mgresults,$mi,"Name");
488 ++$mi; }
489 sql_free_result($mgresults);
490 if($Settings['vercheck']===1) {
491 $AdminCheckURL = url_maker($exfile['admin'],$Settings['file_ext'],"act=vercheck&redirect=on",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); }
492 if($Settings['vercheck']===2) {
493 $AdminCheckURL = url_maker($exfile['admin'],$Settings['file_ext'],"act=vercheck&vercheck=newtype&redirect=on",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); }
494 $AddChkURL = null;
495 if(isset($_GET['menu'])&&$_GET['menu']=="main") { $AddChkURL = "&menu=main"; }
496 // http://www.tutorialspoint.com/php/php_function_timezone_identifiers_list.htm
497 $timezone_identifiers = DateTimeZone::listIdentifiers();
498 //$timezone_identifiers = timezone_identifiers_list();
499 $zonelist['africa'] = array();
500 $zonelist['america'] = array();
501 $zonelist['antarctica'] = array();
502 $zonelist['arctic'] = array();
503 $zonelist['asia'] = array();
504 $zonelist['atlantic'] = array();
505 $zonelist['australia'] = array();
506 $zonelist['europe'] = array();
507 $zonelist['indian'] = array();
508 $zonelist['pacific'] = array();
509 $zonelist['etcetera'] = array();
510 for ($i=0; $i < count($timezone_identifiers); $i++) {
511 $zonelookup = explode("/", $timezone_identifiers[$i]);
512 if(count($zonelookup)==1) { array_push($zonelist['etcetera'], array($timezone_identifiers[$i], $timezone_identifiers[$i])); }
513 if(count($zonelookup)>1) {
514 if($zonelookup[0]=="Africa") {
515 if(count($zonelookup)==2) {
516 array_push($zonelist['africa'], array($zonelookup[1], $timezone_identifiers[$i])); }
517 if(count($zonelookup)==3) {
518 array_push($zonelist['africa'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
519 if($zonelookup[0]=="America") {
520 if(count($zonelookup)==2) {
521 array_push($zonelist['america'], array($zonelookup[1], $timezone_identifiers[$i])); }
522 if(count($zonelookup)==3) {
523 array_push($zonelist['america'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
524 if($zonelookup[0]=="Antarctica") {
525 if(count($zonelookup)==2) {
526 array_push($zonelist['antarctica'], array($zonelookup[1], $timezone_identifiers[$i])); }
527 if(count($zonelookup)==3) {
528 array_push($zonelist['antarctica'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
529 if($zonelookup[0]=="Arctic") {
530 if(count($zonelookup)==2) {
531 array_push($zonelist['arctic'], array($zonelookup[1], $timezone_identifiers[$i])); }
532 if(count($zonelookup)==3) {
533 array_push($zonelist['arctic'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
534 if($zonelookup[0]=="Asia") {
535 if(count($zonelookup)==2) {
536 array_push($zonelist['asia'], array($zonelookup[1], $timezone_identifiers[$i])); }
537 if(count($zonelookup)==3) {
538 array_push($zonelist['asia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
539 if($zonelookup[0]=="Atlantic") {
540 if(count($zonelookup)==2) {
541 array_push($zonelist['atlantic'], array($zonelookup[1], $timezone_identifiers[$i])); }
542 if(count($zonelookup)==3) {
543 array_push($zonelist['atlantic'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
544 if($zonelookup[0]=="Australia") {
545 if(count($zonelookup)==2) {
546 array_push($zonelist['australia'], array($zonelookup[1], $timezone_identifiers[$i])); }
547 if(count($zonelookup)==3) {
548 array_push($zonelist['australia'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
549 if($zonelookup[0]=="Europe") {
550 if(count($zonelookup)==2) {
551 array_push($zonelist['europe'], array($zonelookup[1], $timezone_identifiers[$i])); }
552 if(count($zonelookup)==3) {
553 array_push($zonelist['europe'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
554 if($zonelookup[0]=="Indian") {
555 if(count($zonelookup)==2) {
556 array_push($zonelist['indian'], array($zonelookup[1], $timezone_identifiers[$i])); }
557 if(count($zonelookup)==3) {
558 array_push($zonelist['indian'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
559 if($zonelookup[0]=="Pacific") {
560 if(count($zonelookup)==2) {
561 array_push($zonelist['pacific'], array($zonelookup[1], $timezone_identifiers[$i])); }
562 if(count($zonelookup)==3) {
563 array_push($zonelist['pacific'], array($zonelookup[2].", ".$zonelookup[1], $timezone_identifiers[$i])); } }
566 $deftzstarttime = new DateTime();
567 $deftzstarttime->setTimestamp($Settings['start_date']);
568 $deftzstarttime->setTimezone($deftz);
569 $utctzstarttime = new DateTime();
570 $utctzstarttime->setTimestamp($Settings['start_date']);
571 $utctzstarttime->setTimezone($utctz);
572 $servtzstarttime = new DateTime();
573 $servtzstarttime->setTimestamp($Settings['start_date']);
574 $servtzstarttime->setTimezone($servtz);
575 $usertzstarttime = new DateTime();
576 $usertzstarttime->setTimestamp($Settings['start_date']);
577 $usertzstarttime->setTimezone($usertz);
578 $PreBorgURL = parse_url($OrgBoardURL);
579 $PreBetURL = parse_url($Settings['idburl']);
580 if($PreBorgURL['host']=="localhost.url"&&str_replace("/", "", $PreBorgURL['path'])=="localpath") {
581 $PreBetURL['host'] = $PreBorgURL['host'];
582 $PreBetURL['path'] = $PreBorgURL['path'];
583 $Settings['idburl'] = unparse_url($PreBetURL); }
584 if($PreBorgURL['host']=="localhost.url"&&str_replace("/", "", $PreBorgURL['path'])!="localpath") {
585 $PreBorgURL['host'] = $PreBorgURL['host'];
586 $Settings['idburl'] = unparse_url($PreBetURL); }
587 if($PreBorgURL['host']!="localhost.url"&&str_replace("/", "", $PreBorgURL['path'])=="localpath") {
588 $PreBetURL['path'] = $PreBorgURL['path'];
589 $Settings['idburl'] = unparse_url($PreBetURL); }
590 //$PreWorgURL = parse_url($PreWestURL);
591 $PreWorgURL = parse_url($OrgWebSiteURL);
592 $PreBetURL = parse_url($Settings['weburl']);
593 if($PreWorgURL['host']=="localhost.url"&&str_replace("/", "", $PreWorgURL['path'])=="localpath") {
594 $PreBetURL['host'] = $PreWorgURL['host'];
595 $PreBetURL['path'] = $PreWorgURL['path'];
596 $Settings['weburl'] = unparse_url($PreBetURL); }
597 if($PreWorgURL['host']=="localhost.url"&&str_replace("/", "", $PreWorgURL['path'])!="localpath") {
598 $PreWorgURL['host'] = $PreWorgURL['host'];
599 $Settings['weburl'] = unparse_url($PreBetURL); }
600 if($PreWorgURL['host']!="localhost.url"&&str_replace("/", "", $PreWorgURL['path'])=="localpath") {
601 $PreBetURL['path'] = $PreWorgURL['path'];
602 $Settings['weburl'] = unparse_url($PreBetURL); }
604 <div class="TableMenuBorder">
605 <?php if($ThemeSet['TableStyle']=="div") { ?>
606 <div class="TableMenuRow1">
607 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">iDB Settings Manager</a></div>
608 <?php } ?>
609 <table class="TableMenu" style="width: 100%;">
610 <?php if($ThemeSet['TableStyle']=="table") { ?>
611 <tr class="TableMenuRow1">
612 <td class="TableMenuColumn1"><span style="float: left;">
613 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">iDB Settings Manager</a>
614 </span><span style="float: right;">&#160;</span></td>
615 </tr><?php } ?>
616 <tr class="TableMenuRow2">
617 <th class="TableMenuColumn2" style="width: 100%; text-align: left;">
618 <span style="float: left;">&#160;Editing Setting for iDB: </span>
619 <span style="float: right;">&#160;</span>
620 </th>
621 </tr>
622 <tr class="TableMenuRow3">
623 <td class="TableMenuColumn3">
624 <form style="display: inline;" method="post" id="acptool" action="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
625 <table style="text-align: left;">
626 <tr>
627 <td style="width: 50%;"><span class="TextBoxLabel" title="Using User Time Zone">[User TimeZone] Install Date:</span></td>
628 <td style="width: 50%;"><?php echo $usertzstarttime->format($_SESSION['iDBDateFormat'].", ".$_SESSION['iDBTimeFormat']." P"); ?></td>
629 </tr><tr>
630 <td style="width: 50%;"><span class="TextBoxLabel" title="Using Board Time Zone">[Board TimeZone] Install Date:</span></td>
631 <td style="width: 50%;"><?php echo $servtzstarttime->format($_SESSION['iDBDateFormat'].", ".$_SESSION['iDBTimeFormat']." P"); ?></td>
632 </tr><tr>
633 <td style="width: 50%;"><span class="TextBoxLabel" title="Using Server Time Zone">[Server TimeZone] Install Date:</span></td>
634 <td style="width: 50%;"><?php echo $deftzstarttime->format($_SESSION['iDBDateFormat'].", ".$_SESSION['iDBTimeFormat']." P"); ?></td>
635 </tr><tr>
636 <td style="width: 50%;"><span class="TextBoxLabel" title="Using UTC Time Zone">[UTC TimeZone] Install Date:</span></td>
637 <td style="width: 50%;"><?php echo $utctzstarttime->format($_SESSION['iDBDateFormat'].", ".$_SESSION['iDBTimeFormat']." P"); ?></td>
638 </tr><?php if($GroupInfo['ViewDBInfo']=="yes") {
639 ?><tr style="text-align: left;">
640 <td style="width: 50%;"><span class="TextBoxLabel">Forum Software Version:</span></td>
641 <td style="width: 50%;"><?php echo "<span title=\"".$VerInfo['iDB_Full_Ver_Show']."\">".$VerInfo['iDB_Ver_Show']."</span>"; ?><!--&#160;<a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=vercheck",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>" onclick="window.open(this.href);return false;"><img src="<?php echo $AdminCheckURL; ?>" alt="Version Check: Click to see more info." title="Version Check: Click to see more info." /></a>--></td>
642 </tr><tr>
643 <td style="width: 50%;"><span class="TextBoxLabel">Forum UUID:</span></td>
644 <td style="width: 50%;"><?php echo $Settings['BoardUUID']; ?></td>
645 </tr><tr id="clickhere" style="text-align: left;">
646 <td style="width: 50%;"><span class="TextBoxLabel">Version Checker:</span></td>
647 <td style="width: 50%;"><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=settings".$AddChkURL,$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>#iverinfo" onclick="idbvercheck(); document.getElementById('clickhere').style.display = 'none';">Click Here</a></td>
648 </tr><?php if($OSType!=""&&isset($OSType)) {
649 ?><tr style="text-align: left;">
650 <td style="width: 50%;"><span class="TextBoxLabel">Server Operating System:</span></td>
651 <td style="width: 50%;"><?php echo $OSType; ?></td>
652 </tr><?php } ?><tr style="text-align: left;">
653 <td style="width: 50%;"><span class="TextBoxLabel">Current PHP Version:</span></td>
654 <td style="width: 50%;"><?php echo "PHP Version ".phpversion(); ?></td>
655 </tr><tr style="text-align: left;">
656 <td style="width: 50%;"><span class="TextBoxLabel">Zend Engine Version:</span></td>
657 <td style="width: 50%;"><?php echo "Zend Version ".zend_version(); ?></td>
658 </tr><?php } ?><tr style="text-align: left;">
659 <td style="width: 50%;"><label class="TextBoxLabel" for="BoardURL">Insert The Board URL:</label></td>
660 <td style="width: 50%;"><input type="url" class="TextBox" name="BoardURL" size="20" id="BoardURL" value="<?php echo $Settings['idburl']; ?>" /></td>
661 </tr><tr style="text-align: left;">
662 <td style="width: 50%;"><label class="TextBoxLabel" for="WebURL">Insert The WebSite URL:</label></td>
663 <td style="width: 50%;"><input type="url" class="TextBox" name="WebURL" size="20" id="WebURL" value="<?php echo $Settings['weburl']; ?>" /></td>
664 </tr><tr style="text-align: left;">
665 <td style="width: 50%;"><label class="TextBoxLabel" for="PassHashType">Hash passwords with:</label></td>
666 <td style="width: 50%;"><select id="PassHashType" name="PassHashType" class="TextBox">
667 <?php // PHP 5 hash algorithms to functions :o
668 if(function_exists('hash')&&function_exists('hash_algos')) {
669 if(in_array("md2",hash_algos())) { ?>
670 <option<?php if($Settings['use_hashtype']=="md2") { echo " selected=\"selected\""; } ?> value="md2">MD2</option>
671 <?php } if(in_array("md4",hash_algos())) { ?>
672 <option<?php if($Settings['use_hashtype']=="md4") { echo " selected=\"selected\""; } ?> value="md4">MD4</option>
673 <?php } if(in_array("md5",hash_algos())) { ?>
674 <option<?php if($Settings['use_hashtype']=="md5") { echo " selected=\"selected\""; } ?> value="md5">MD5</option>
675 <?php } if(in_array("gost",hash_algos())) { ?>
676 <option<?php if($Settings['use_hashtype']=="gost") { echo " selected=\"selected\""; } ?> value="gost">GOST</option>
677 <?php } if(in_array("joaat",hash_algos())) { ?>
678 <option<?php if($Settings['use_hashtype']=="joaat") { echo " selected=\"selected\""; } ?> value="joaat">JOAAT</option>
679 <?php } if(in_array("sha1",hash_algos())) { ?>
680 <option<?php if($Settings['use_hashtype']=="sha1") { echo " selected=\"selected\""; } ?> value="sha1">SHA1</option>
681 <?php } if(in_array("sha224",hash_algos())) { ?>
682 <option<?php if($Settings['use_hashtype']=="sha224") { echo " selected=\"selected\""; } ?> value="sha224">SHA224</option>
683 <?php } if(in_array("sha256",hash_algos())) { ?>
684 <option<?php if($Settings['use_hashtype']=="sha256") { echo " selected=\"selected\""; } ?> value="sha256">SHA256</option>
685 <?php } if(in_array("sha384",hash_algos())) { ?>
686 <option<?php if($Settings['use_hashtype']=="sha384") { echo " selected=\"selected\""; } ?> value="sha384">SHA384</option>
687 <?php } if(in_array("sha512",hash_algos())) { ?>
688 <option<?php if($Settings['use_hashtype']=="sha512") { echo " selected=\"selected\""; } ?> value="sha512">SHA512</option>
689 <?php } if(in_array("sha3-224",hash_algos())) { ?>
690 <option<?php if($Settings['use_hashtype']=="sha3-224") { echo " selected=\"selected\""; } ?> value="sha3-224">SHA3-224</option>
691 <?php } if(in_array("sha3-256",hash_algos())) { ?>
692 <option<?php if($Settings['use_hashtype']=="sha3-256") { echo " selected=\"selected\""; } ?> value="sha3-256">SHA3-256</option>
693 <?php } if(in_array("sha3-384",hash_algos())) { ?>
694 <option<?php if($Settings['use_hashtype']=="sha3-384") { echo " selected=\"selected\""; } ?> value="sha3-384">SHA3-384</option>
695 <?php } if(in_array("sha3-512",hash_algos())) { ?>
696 <option<?php if($Settings['use_hashtype']=="sha3-512") { echo " selected=\"selected\""; } ?> value="sha3-512">SHA3-512</option>
697 <?php } if(in_array("ripemd128",hash_algos())) { ?>
698 <option<?php if($Settings['use_hashtype']=="ripemd128") { echo " selected=\"selected\""; } ?> value="ripemd128">RIPEMD128</option>
699 <?php } if(in_array("ripemd160",hash_algos())) { ?>
700 <option<?php if($Settings['use_hashtype']=="ripemd160") { echo " selected=\"selected\""; } ?> value="ripemd160">RIPEMD160</option>
701 <?php } if(in_array("ripemd256",hash_algos())) { ?>
702 <option<?php if($Settings['use_hashtype']=="ripemd256") { echo " selected=\"selected\""; } ?> value="ripemd256">RIPEMD256</option>
703 <?php } if(in_array("ripemd320",hash_algos())) { ?>
704 <option<?php if($Settings['use_hashtype']=="ripemd320") { echo " selected=\"selected\""; } ?> value="ripemd320">RIPEMD320</option>
705 <?php } if(function_exists('password_hash')) { ?>
706 <option<?php if($Settings['use_hashtype']=="bcrypt") { echo " selected=\"selected\""; } ?> value="bcrypt">BCRYPT</option>
707 <?php } }
708 if(!function_exists('hash')&&!function_exists('hash_algos')) { ?>
709 <option<?php if($Settings['use_hashtype']=="md5") { echo " selected=\"selected\""; } ?> value="md5">MD5</option>
710 <option<?php if($Settings['use_hashtype']=="sha1") { echo " selected=\"selected\""; } ?> value="sha1">SHA1</option>
711 <?php if(function_exists('password_hash')) { ?>
712 <option<?php if($Settings['use_hashtype']=="bcrypt") { echo " selected=\"selected\""; } ?> value="bcrypt">BCRYPT</option>
713 <?php } } ?>
714 </select></td>
715 </tr><tr style="text-align: left;">
716 <td style="width: 50%;"><label class="TextBoxLabel" for="GuestGroup">Insert The Guest Group:</label></td>
717 <td style="width: 50%;"><select id="GuestGroup" name="GuestGroup" class="TextBox">
718 <option selected="selected" value="<?php echo $Settings['GuestGroup']; ?>">Old Value (<?php echo $Settings['GuestGroup']; ?>)</option>
719 <?php $gi = 0; $gnum = count($MGroups);
720 while ($gi < $gnum) { ?>
721 <option value="<?php echo $MGroups[$gi]; ?>"><?php echo $MGroups[$gi]; ?></option>
722 <?php ++$gi; } ?>
723 </select></td>
724 </tr><tr style="text-align: left;">
725 <td style="width: 50%;"><label class="TextBoxLabel" for="MemberGroup">Insert The Member Group:</label></td>
726 <td style="width: 50%;"><select id="MemberGroup" name="MemberGroup" class="TextBox">
727 <option selected="selected" value="<?php echo $Settings['MemberGroup']; ?>">Old Value (<?php echo $Settings['MemberGroup']; ?>)</option>
728 <?php $gi = 0; $gnum = count($MGroups);
729 while ($gi < $gnum) { ?>
730 <option value="<?php echo $MGroups[$gi]; ?>"><?php echo $MGroups[$gi]; ?></option>
731 <?php ++$gi; } ?>
732 </select></td>
733 </tr><tr style="text-align: left;">
734 <td style="width: 50%;"><label class="TextBoxLabel" for="ValidateGroup">Insert The Validate Group:</label></td>
735 <td style="width: 50%;"><select id="ValidateGroup" name="ValidateGroup" class="TextBox">
736 <option selected="selected" value="<?php echo $Settings['ValidateGroup']; ?>">Old Value (<?php echo $Settings['ValidateGroup']; ?>)</option>
737 <?php $gi = 0; $gnum = count($MGroups);
738 while ($gi < $gnum) { ?>
739 <option value="<?php echo $MGroups[$gi]; ?>"><?php echo $MGroups[$gi]; ?></option>
740 <?php ++$gi; } ?>
741 </select></td>
742 </tr><tr style="text-align: left;">
743 <td style="width: 50%;"><label class="TextBoxLabel" for="AdminValidate">Enable validate new members:</label></td>
744 <td style="width: 50%;"><select size="1" class="TextBox" name="AdminValidate" id="AdminValidate">
745 <option<?php if($Settings['AdminValidate']=="off") { echo " selected=\"selected\""; } ?> value="off">No</option>
746 <option<?php if($Settings['AdminValidate']=="on") { echo " selected=\"selected\""; } ?> value="on">Yes</option>
747 </select></td>
748 </tr><tr style="text-align: left;">
749 <td style="width: 50%;"><label class="TextBoxLabel" for="max_posts">Max replies per page:</label></td>
750 <td style="width: 50%;"><select id="max_posts" name="max_posts" class="TextBox">
751 <option selected="selected" value="<?php echo $Settings['max_posts']; ?>">Old Value (<?php echo $Settings['max_posts']; ?>)</option>
752 <option value="5">5</option>
753 <option value="10">10</option>
754 <option value="15">15</option>
755 <option value="20">20</option>
756 <option value="25">25</option>
757 <option value="30">30</option>
758 <option value="30">35</option>
759 <option value="30">40</option>
760 </select></td>
761 </tr><tr style="text-align: left;">
762 <td style="width: 50%;"><label class="TextBoxLabel" for="max_topics">Max topics per page:</label></td>
763 <td style="width: 50%;"><select id="max_topics" name="max_topics" class="TextBox">
764 <option selected="selected" value="<?php echo $Settings['max_topics']; ?>">Old Value (<?php echo $Settings['max_topics']; ?>)</option>
765 <option value="5">5</option>
766 <option value="10">10</option>
767 <option value="15">15</option>
768 <option value="20">20</option>
769 <option value="25">25</option>
770 <option value="30">30</option>
771 <option value="30">35</option>
772 <option value="30">40</option>
773 </select></td>
774 </tr><tr style="text-align: left;">
775 <td style="width: 50%;"><label class="TextBoxLabel" for="max_memlist">Max members per page:</label></td>
776 <td style="width: 50%;"><select id="max_memlist" name="max_memlist" class="TextBox">
777 <option selected="selected" value="<?php echo $Settings['max_memlist']; ?>">Old Value (<?php echo $Settings['max_memlist']; ?>)</option>
778 <option value="5">5</option>
779 <option value="10">10</option>
780 <option value="15">15</option>
781 <option value="20">20</option>
782 <option value="25">25</option>
783 <option value="30">30</option>
784 <option value="30">35</option>
785 <option value="30">40</option>
786 </select></td>
787 </tr><tr style="text-align: left;">
788 <td style="width: 50%;"><label class="TextBoxLabel" for="max_pmlist">Max pms per page:</label></td>
789 <td style="width: 50%;"><select id="max_pmlist" name="max_pmlist" class="TextBox">
790 <option selected="selected" value="<?php echo $Settings['max_pmlist']; ?>">Old Value (<?php echo $Settings['max_pmlist']; ?>)</option>
791 <option value="5">5</option>
792 <option value="10">10</option>
793 <option value="15">15</option>
794 <option value="20">20</option>
795 <option value="25">25</option>
796 <option value="30">30</option>
797 <option value="30">35</option>
798 <option value="30">40</option>
799 </select></td>
800 </tr><tr style="text-align: left;">
801 <td style="width: 50%;"><label class="TextBoxLabel" for="hot_topic_num">Number of replies for hot topic:</label></td>
802 <td style="width: 50%;"><select id="hot_topic_num" name="hot_topic_num" class="TextBox">
803 <option selected="selected" value="<?php echo $Settings['hot_topic_num']; ?>">Old Value (<?php echo $Settings['hot_topic_num']; ?>)</option>
804 <option value="5">5</option>
805 <option value="10">10</option>
806 <option value="15">15</option>
807 <option value="20">20</option>
808 <option value="25">25</option>
809 <option value="30">30</option>
810 <option value="30">35</option>
811 <option value="30">40</option>
812 </select></td>
813 </tr><tr style="text-align: left;">
814 <td style="width: 50%;"><label class="TextBoxLabel" title="Can save some bandwidth." for="UseGzip">Enable HTTP Compression:</label></td>
815 <td style="width: 50%;"><select size="1" class="TextBox" name="UseGzip" id="UseGzip">
816 <option<?php if($Settings['use_gzip']=="off") { echo " selected=\"selected\""; } ?> value="off">No</option>
817 <option<?php if($Settings['use_gzip']=="on") { echo " selected=\"selected\""; } ?> value="on">Yes</option>
818 <option<?php if($Settings['use_gzip']=="gzip") { echo " selected=\"selected\""; } ?> value="gzip">Only GZip</option>
819 <option<?php if($Settings['use_gzip']=="deflate") { echo " selected=\"selected\""; } ?> value="deflate">Only Deflate</option>
820 <?php if(function_exists('brotli_compress')) { ?>
821 <option<?php if($Settings['use_gzip']=="brotli") { echo " selected=\"selected\""; } ?> value="brotli">Only Brotli</option>
822 <?php } if(function_exists('zstd_compress')) { ?>
823 <option<?php if($Settings['use_gzip']=="zstd") { echo " selected=\"selected\""; } ?> value="brotli">Only Zstandard</option>
824 <?php } ?>
825 </select></td>
826 </tr><tr style="text-align: left;">
827 <td style="width: 50%;"><label class="TextBoxLabel" for="HTMLType">HTML Type to use:</label></td>
828 <td style="width: 50%;"><select size="1" class="TextBox" name="HTMLType" id="HTMLType">
829 <!--<option<?php if($Settings['html_type']=="xhtml10") { echo " selected=\"selected\""; } ?> value="xhtml10">XHTML 1.0</option>-->
830 <!--<option<?php if($Settings['html_type']=="xhtml11") { echo " selected=\"selected\""; } ?> value="xhtml11">XHTML 1.1</option>-->
831 <option<?php if($Settings['html_type']=="html5") { echo " selected=\"selected\""; } ?> value="html5">HTML 5</option>
832 <option<?php if($Settings['html_type']=="xhtml5") { echo " selected=\"selected\""; } ?> value="xhtml5">XHTML 5</option>
833 </select></td>
834 </tr><!--<tr style="text-align: left;">
835 <td style="width: 50%;"><label class="TextBoxLabel" for="OutPutType">Output file as:</label></td>
836 <td style="width: 50%;"><select size="1" class="TextBox" name="OutPutType" id="OutPutType">
837 <option<?php if($Settings['output_type']=="html") { echo " selected=\"selected\""; } ?> value="html">HTML</option>
838 <option<?php if($Settings['output_type']=="xhtml") { echo " selected=\"selected\""; } ?> value="xhtml">XHTML</option>
839 </select></td>
840 </tr>--><tr style="text-align: left;">
841 <td style="width: 50%;"><label class="TextBoxLabel" for="YourOffSet">Your TimeZone:</label></td>
842 <td style="width: 50%;"><select id="YourOffSet" name="YourOffSet" class="TextBox">
843 <optgroup label="Africa">
844 <?php
845 $optsel="";
846 for ($i=0; $i < count($zonelist['africa']); $i++) {
847 if($Settings['DefaultTimeZone']==$zonelist['africa'][$i][1]) { $optsel = " selected=\"selected\""; }
848 echo "<option".$optsel." value=\"".$zonelist['africa'][$i][1]."\">".str_replace("_", " ", $zonelist['africa'][$i][0])."</option>\n";
849 $optsel=""; }
851 </optgroup>
852 <optgroup label="America">
853 <?php
854 $optsel="";
855 for ($i=0; $i < count($zonelist['america']); $i++) {
856 if($Settings['DefaultTimeZone']==$zonelist['america'][$i][1]) { $optsel = " selected=\"selected\""; }
857 echo "<option".$optsel." value=\"".$zonelist['america'][$i][1]."\">".str_replace("_", " ", $zonelist['america'][$i][0])."</option>\n";
858 $optsel=""; }
860 </optgroup>
861 <optgroup label="Antarctica">
862 <?php
863 $optsel="";
864 for ($i=0; $i < count($zonelist['antarctica']); $i++) {
865 if($Settings['DefaultTimeZone']==$zonelist['antarctica'][$i][1]) { $optsel = " selected=\"selected\""; }
866 echo "<option".$optsel." value=\"".$zonelist['antarctica'][$i][1]."\">".str_replace("_", " ", $zonelist['antarctica'][$i][0])."</option>\n";
867 $optsel=""; }
869 </optgroup>
870 <optgroup label="Arctic">
871 <?php
872 $optsel="";
873 for ($i=0; $i < count($zonelist['arctic']); $i++) {
874 if($Settings['DefaultTimeZone']==$zonelist['arctic'][$i][1]) { $optsel = " selected=\"selected\""; }
875 echo "<option".$optsel." value=\"".$zonelist['arctic'][$i][1]."\">".str_replace("_", " ", $zonelist['arctic'][$i][0])."</option>\n";
876 $optsel=""; }
878 </optgroup>
879 <optgroup label="Asia">
880 <?php
881 for ($i=0; $i < count($zonelist['asia']); $i++) {
882 if($Settings['DefaultTimeZone']==$zonelist['asia'][$i][1]) { $optsel = " selected=\"selected\""; }
883 echo "<option".$optsel." value=\"".$zonelist['asia'][$i][1]."\">".str_replace("_", " ", $zonelist['asia'][$i][0])."</option>\n";
884 $optsel=""; }
886 </optgroup>
887 <optgroup label="Atlantic">
888 <?php
889 $optsel="";
890 for ($i=0; $i < count($zonelist['atlantic']); $i++) {
891 if($Settings['DefaultTimeZone']==$zonelist['atlantic'][$i][1]) { $optsel = " selected=\"selected\""; }
892 echo "<option".$optsel." value=\"".$zonelist['atlantic'][$i][1]."\">".str_replace("_", " ", $zonelist['atlantic'][$i][0])."</option>\n";
893 $optsel=""; }
895 </optgroup>
896 <optgroup label="Australia">
897 <?php
898 $optsel="";
899 for ($i=0; $i < count($zonelist['australia']); $i++) {
900 if($Settings['DefaultTimeZone']==$zonelist['australia'][$i][1]) { $optsel = " selected=\"selected\""; }
901 echo "<option".$optsel." value=\"".$zonelist['australia'][$i][1]."\">".str_replace("_", " ", $zonelist['australia'][$i][0])."</option>\n";
902 $optsel=""; }
904 </optgroup>
905 <optgroup label="Europe">
906 <?php
907 $optsel="";
908 for ($i=0; $i < count($zonelist['europe']); $i++) {
909 if($Settings['DefaultTimeZone']==$zonelist['europe'][$i][1]) { $optsel = " selected=\"selected\""; }
910 echo "<option".$optsel." value=\"".$zonelist['europe'][$i][1]."\">".str_replace("_", " ", $zonelist['europe'][$i][0])."</option>\n";
911 $optsel=""; }
913 </optgroup>
914 <optgroup label="Indian">
915 <?php
916 $optsel="";
917 for ($i=0; $i < count($zonelist['indian']); $i++) {
918 if($Settings['DefaultTimeZone']==$zonelist['indian'][$i][1]) { $optsel = " selected=\"selected\""; }
919 echo "<option".$optsel." value=\"".$zonelist['indian'][$i][1]."\">".str_replace("_", " ", $zonelist['indian'][$i][0])."</option>\n";
920 $optsel=""; }
922 </optgroup>
923 <optgroup label="Pacific">
924 <?php
925 $optsel="";
926 for ($i=0; $i < count($zonelist['pacific']); $i++) {
927 if($Settings['DefaultTimeZone']==$zonelist['pacific'][$i][1]) { $optsel = " selected=\"selected\""; }
928 echo "<option".$optsel." value=\"".$zonelist['pacific'][$i][1]."\">".str_replace("_", " ", $zonelist['pacific'][$i][0])."</option>\n";
929 $optsel=""; }
931 </optgroup>
932 <optgroup label="Etcetera">
933 <?php
934 $optsel="";
935 for ($i=0; $i < count($zonelist['etcetera']); $i++) {
936 if($Settings['DefaultTimeZone']==$zonelist['etcetera'][$i][1]) { $optsel = " selected=\"selected\""; }
937 echo "<option".$optsel." value=\"".$zonelist['etcetera'][$i][1]."\">".str_replace("_", " ", $zonelist['etcetera'][$i][0])."</option>\n";
938 $optsel=""; }
940 </optgroup>
941 </select></td>
942 </tr><tr style="text-align: left;">
943 <td style="width: 50%;"><label class="TextBoxLabel" for="DefaultTheme">Default Theme:</label></td>
944 <td style="width: 50%;"><select id="DefaultTheme" name="DefaultTheme" class="TextBox"><?php
945 if($Settings['SQLThemes']=="off") {
946 $skindir = dirname(realpath("settings.php"))."/".$SettDir['themes'];
947 if ($handle = opendir($skindir)) { $dirnum = null;
948 while (false !== ($file = readdir($handle))) {
949 if ($dirnum==null) { $dirnum = 0; }
950 if (is_dir($skindir.$file)&&file_exists($skindir.$file."/info.php")) {
951 if ($file != "." && $file != "..") {
952 require($skindir.$file."/info.php");
953 if($Settings['DefaultTheme']==$file) {
954 $themelist[$dirnum] = "<option selected=\"selected\" value=\"".$file."\">".$ThemeInfo['ThemeName']."</option>"; }
955 if($Settings['DefaultTheme']!=$file) {
956 $themelist[$dirnum] = "<option value=\"".$file."\">".$ThemeInfo['ThemeName']."</option>"; }
957 ++$dirnum; } } }
958 closedir($handle); asort($themelist);
959 $themenum=count($themelist); $themei=0;
960 while ($themei < $themenum) {
961 echo $themelist[$themei]."\n";
962 ++$themei; } } }
963 if($Settings['SQLThemes']=="on") {
964 $sknquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."themes\" ORDER BY \"id\" ASC, \"Name\" ASC", array(null));
965 $sknresult=sql_query($sknquery,$SQLStat);
966 $sknum=sql_num_rows($sknresult);
967 $skni=0;
968 while ($skni < $sknum) {
969 $ThemeInfo['Name'] = sql_result($sknresult,$skni,"Name");
970 $ThemeInfo['ThemeName'] = sql_result($sknresult,$skni,"ThemeName");
971 if($Settings['DefaultTheme']==$ThemeInfo['Name']) {
972 echo "<option selected=\"selected\" value=\"".$ThemeInfo['Name']."\">".$ThemeInfo['ThemeName']."</option>\n"; }
973 if($Settings['DefaultTheme']!=$ThemeInfo['Name']) {
974 echo "<option value=\"".$ThemeInfo['Name']."\">".$ThemeInfo['ThemeName']."</option>\n"; }
975 ++$skni; }
976 } ?></select></td>
977 </tr><tr style="text-align: left;">
978 <td style="width: 50%;"><label class="TextBoxLabel" for="enable_https">Enable HTTPS:</label></td>
979 <td style="width: 50%;"><select size="1" class="TextBox" name="enable_https" id="enable_https">
980 <option<?php if($Settings['enable_https']=="on") { echo " selected=\"selected\""; } ?> value="on">On</option>
981 <option<?php if($Settings['enable_https']=="off") { echo " selected=\"selected\""; } ?> value="off">Off</option>
982 </select></td>
983 </tr><tr style="text-align: left;">
984 <td style="width: 50%;"><label class="TextBoxLabel" for="enable_rss">Enable RSS:</label></td>
985 <td style="width: 50%;"><select size="1" class="TextBox" name="enable_rss" id="enable_rss">
986 <option<?php if($Settings['enable_rss']=="on") { echo " selected=\"selected\""; } ?> value="on">On</option>
987 <option<?php if($Settings['enable_rss']=="off") { echo " selected=\"selected\""; } ?> value="off">Off</option>
988 </select></td>
989 </tr><tr style="text-align: left;">
990 <td style="width: 50%;"><label class="TextBoxLabel" for="enable_search">Enable search:</label></td>
991 <td style="width: 50%;"><select size="1" class="TextBox" name="enable_search" id="enable_search">
992 <option<?php if($Settings['enable_search']=="on") { echo " selected=\"selected\""; } ?> value="on">On</option>
993 <option<?php if($Settings['enable_search']=="off") { echo " selected=\"selected\""; } ?> value="off">Off</option>
994 </select></td>
995 </tr><tr style="text-align: left;">
996 <td style="width: 50%;"><label class="TextBoxLabel" for="TestReferer">Test Referering URL:</label></td>
997 <td style="width: 50%;"><select id="TestReferer" name="TestReferer" class="TextBox">
998 <option<?php if($Settings['TestReferer']=="on") { echo " selected=\"selected\""; } ?> value="on">On</option>
999 <option<?php if($Settings['TestReferer']=="off") { echo " selected=\"selected\""; } ?> value="off">Off</option>
1000 </select></td>
1001 </tr><tr style="text-align: left;">
1002 <td style="width: 50%;"><label class="TextBoxLabel" for="iDBTimeFormat">Insert time format string:</label></td>
1003 <td style="width: 50%;"><input type="text" class="TextBox" name="iDBTimeFormat" size="20" id="iDBTimeFormat" value="<?php echo htmlentities($Settings['idb_time_format'], ENT_QUOTES, $Settings['charset']); ?>" /></td>
1004 </tr><tr style="text-align: left;">
1005 <td style="width: 50%;"><label class="TextBoxLabel" for="iDBDateFormat">Insert date format string:</label></td>
1006 <td style="width: 50%;"><input type="text" class="TextBox" name="iDBDateFormat" size="20" id="iDBDateFormat" value="<?php echo htmlentities($Settings['idb_date_format'], ENT_QUOTES, $Settings['charset']); ?>" /></td>
1007 </tr><tr style="text-align: left;">
1008 <td style="width: 50%;"><label class="TextBoxLabel" for="iDBHTTPLogger">Log Every HTTP Requests:</label></td>
1009 <td style="width: 50%;"><select id="iDBHTTPLogger" name="iDBHTTPLogger" class="TextBox">
1010 <option<?php if($Settings['log_http_request']=="on") { echo " selected=\"selected\""; } ?> value="on">On</option>
1011 <option<?php if($Settings['log_http_request']=="off") { echo " selected=\"selected\""; } ?> value="off">Off</option>
1012 </select></td>
1013 </tr><tr style="text-align: left;">
1014 <td style="width: 50%;"><label class="TextBoxLabel" for="iDBLoggerFormat">Insert The Format for HTTP Logger:</label></td>
1015 <td style="width: 50%;"><input type="text" class="TextBox" name="iDBLoggerFormat" size="20" id="iDBLoggerFormat" value="<?php echo htmlentities($Settings['log_config_format'], ENT_QUOTES, $Settings['charset']); ?>" /></td>
1016 </tr></table>
1017 <table style="text-align: left;">
1018 <tr style="text-align: left;">
1019 <td style="width: 100%;">
1020 <?php if($GroupInfo['ViewDBInfo']=="yes") { ?>
1021 <span style="display: none;" id="iverinfo"><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>#" onclick="idbvercheck();">Version Checker: Click Here</a><br /><br /></span>
1022 <?php } ?>
1023 <input type="hidden" name="act" value="settings" style="display: none;" />
1024 <input type="hidden" name="update" value="now" style="display: none;" />
1025 <input type="submit" class="Button" value="Apply" name="Apply_Changes" />
1026 <input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
1027 </td></tr></table>
1028 </form>
1029 </td>
1030 </tr>
1031 <tr class="TableMenuRow4">
1032 <td class="TableMenuColumn4">&#160;</td>
1033 </tr>
1034 </table>
1035 </div>
1036 <?php } if($_POST['act']=="settings"&&$_POST['update']=="now"&&$_GET['act']=="settings"&&
1037 $_SESSION['UserGroup']!=$Settings['GuestGroup']&&$GroupInfo['HasAdminCP']=="yes") {
1038 $_POST = array_map("rsq", $_POST);
1039 if(!isset($Settings['BoardUUID'])||$Settings['BoardUUID']===null) {
1040 $Settings['BoardUUID'] = rand_uuid("rand"); }
1041 $Settings['board_name'] = htmlspecialchars($Settings['board_name'], ENT_QUOTES, $Settings['charset']);
1042 $Settings['board_name'] = fixbamps($Settings['board_name']);
1043 $Settings['board_name'] = remove_spaces($Settings['board_name']);
1044 $Settings['board_name'] = str_replace("\&#039;", "&#039;", $Settings['board_name']);
1045 $SettInfo['board_name'] = htmlspecialchars($SettInfo['board_name'], ENT_QUOTES, $Settings['charset']);
1046 $SettInfo['board_name'] = fixbamps($SettInfo['board_name']);
1047 $SettInfo['board_name'] = remove_spaces($SettInfo['board_name']);
1048 $SettInfo['board_name'] = str_replace("\&#039;", "&#039;", $SettInfo['board_name']);
1049 $SettInfo['Author'] = htmlspecialchars($SettInfo['Author'], ENT_QUOTES, $Settings['charset']);
1050 $SettInfo['Author'] = fixbamps($SettInfo['Author']);
1051 $SettInfo['Author'] = remove_spaces($SettInfo['Author']);
1052 $SettInfo['Author'] = str_replace("\&#039;", "&#039;", $SettInfo['Author']);
1053 $SettInfo['Keywords'] = htmlspecialchars($SettInfo['Keywords'], ENT_QUOTES, $Settings['charset']);
1054 $SettInfo['Keywords'] = fixbamps($SettInfo['Keywords']);
1055 $SettInfo['Keywords'] = remove_spaces($SettInfo['Keywords']);
1056 $SettInfo['Keywords'] = str_replace("\&#039;", "&#039;", $SettInfo['Keywords']);
1057 $SettInfo['Description'] = htmlspecialchars($SettInfo['Description'], ENT_QUOTES, $Settings['charset']);
1058 $SettInfo['Description'] = fixbamps($SettInfo['Description']);
1059 $SettInfo['Description'] = remove_spaces($SettInfo['Description']);
1060 $SettInfo['Description'] = str_replace("\&#039;", "&#039;", $SettInfo['Description']);
1061 $_POST['BoardURL'] = htmlentities($_POST['BoardURL'], ENT_QUOTES, $Settings['charset']);
1062 $_POST['BoardURL'] = remove_spaces($_POST['BoardURL']);
1063 $_POST['WebURL'] = htmlentities($_POST['WebURL'], ENT_QUOTES, $Settings['charset']);
1064 $_POST['WebURL'] = remove_spaces($_POST['WebURL']);
1065 $_POST['iDBTimeFormat'] = convert_strftime($_POST['iDBTimeFormat']);
1066 $_POST['iDBDateFormat'] = convert_strftime($_POST['iDBDateFormat']);
1067 $Settings['idb_time_format'] = $_POST['iDBTimeFormat'];
1068 $Settings['idb_date_format'] = $_POST['iDBDateFormat'];
1069 $Settings['log_http_request'] = $_POST['iDBHTTPLogger'];
1070 $Settings['log_config_format'] = $_POST['iDBLoggerFormat'];
1071 if($_POST['HTMLType']=="html4") { $_POST['OutPutType'] = "html"; }
1072 if($_POST['HTMLType']=="xhtml10") { $_POST['OutPutType'] = "xhtml"; }
1073 if($_POST['HTMLType']=="xhtml11") { $_POST['OutPutType'] = "xhtml"; }
1074 if($_POST['HTMLType']=="html5") { $_POST['OutPutType'] = "html"; }
1075 if($_POST['HTMLType']=="xhtml5") { $_POST['OutPutType'] = "xhtml"; }
1076 if(!isset($_POST['PassHashType'])) {
1077 $_POST['PassHashType'] = "sha1"; }
1078 if(!function_exists('hash')||!function_exists('hash_algos')) {
1079 if($_POST['PassHashType']!="md5"&&
1080 $_POST['PassHashType']!="sha1") {
1081 $_POST['PassHashType'] = "sha1"; } }
1082 if(function_exists('hash')&&function_exists('hash_algos')) {
1083 if(!in_array($_POST['PassHashType'],hash_algos())) {
1084 $_POST['PassHashType'] = "sha1"; }
1085 if($_POST['PassHashType']!="md2"&&
1086 $_POST['PassHashType']!="md4"&&
1087 $_POST['PassHashType']!="md5"&&
1088 $_POST['PassHashType']!="sha1"&&
1089 $_POST['PassHashType']!="sha224"&&
1090 $_POST['PassHashType']!="sha256"&&
1091 $_POST['PassHashType']!="sha384"&&
1092 $_POST['PassHashType']!="sha512"&&
1093 $_POST['PassHashType']!="sha3-224"&&
1094 $_POST['PassHashType']!="sha3-256"&&
1095 $_POST['PassHashType']!="sha3-384"&&
1096 $_POST['PassHashType']!="sha3-512"&&
1097 $_POST['PassHashType']!="ripemd128"&&
1098 $_POST['PassHashType']!="ripemd160"&&
1099 $_POST['PassHashType']!="ripemd256"&&
1100 $_POST['PassHashType']!="ripemd320"&&
1101 $_POST['PassHashType']!="bcrypt") {
1102 $_POST['PassHashType'] = "sha1"; } }
1103 $BoardSettings=$pretext2[0]."\n".
1104 "\$Settings['sqlhost'] = ".null_string($Settings['sqlhost']).";\n".
1105 "\$Settings['sqldb'] = ".null_string($Settings['sqldb']).";\n".
1106 "\$Settings['sqltable'] = ".null_string($Settings['sqltable']).";\n".
1107 "\$Settings['sqluser'] = ".null_string($Settings['sqluser']).";\n".
1108 "\$Settings['sqlpass'] = ".null_string($Settings['sqlpass']).";\n".
1109 "\$Settings['sqltype'] = ".null_string($Settings['sqltype']).";\n".
1110 "\$Settings['board_name'] = ".null_string($Settings['board_name']).";\n".
1111 "\$Settings['idbdir'] = ".null_string($Settings['idbdir']).";\n".
1112 "\$Settings['idburl'] = ".null_string($_POST['BoardURL']).";\n".
1113 "\$Settings['enable_https'] = ".null_string($_POST['enable_https']).";\n".
1114 "\$Settings['weburl'] = ".null_string($_POST['WebURL']).";\n".
1115 "\$Settings['SQLThemes'] = ".null_string($Settings['SQLThemes']).";\n".
1116 "\$Settings['use_gzip'] = ".null_string($_POST['UseGzip']).";\n".
1117 "\$Settings['html_type'] = ".null_string($_POST['HTMLType']).";\n".
1118 "\$Settings['output_type'] = ".null_string($_POST['OutPutType']).";\n".
1119 "\$Settings['GuestGroup'] = ".null_string($_POST['GuestGroup']).";\n".
1120 "\$Settings['MemberGroup'] = ".null_string($_POST['MemberGroup']).";\n".
1121 "\$Settings['ValidateGroup'] = ".null_string($_POST['ValidateGroup']).";\n".
1122 "\$Settings['AdminValidate'] = ".null_string($_POST['AdminValidate']).";\n".
1123 "\$Settings['TestReferer'] = ".null_string($_POST['TestReferer']).";\n".
1124 "\$Settings['DefaultTheme'] = ".null_string($_POST['DefaultTheme']).";\n".
1125 "\$Settings['DefaultTimeZone'] = ".null_string($_POST['YourOffSet']).";\n".
1126 "\$Settings['start_date'] = ".null_string($Settings['start_date']).";\n".
1127 "\$Settings['idb_time_format'] = ".null_string($Settings['idb_time_format']).";\n".
1128 "\$Settings['idb_date_format'] = ".null_string($Settings['idb_date_format']).";\n".
1129 "\$Settings['use_hashtype'] = ".null_string($_POST['PassHashType']).";\n".
1130 "\$Settings['charset'] = ".null_string($Settings['charset']).";\n".
1131 "\$Settings['sql_collate'] = ".null_string($Settings['sql_collate']).";\n".
1132 "\$Settings['sql_charset'] = ".null_string($Settings['sql_charset']).";\n".
1133 "\$Settings['add_power_by'] = ".null_string($Settings['add_power_by']).";\n".
1134 "\$Settings['send_pagesize'] = ".null_string($Settings['send_pagesize']).";\n".
1135 "\$Settings['max_posts'] = ".null_string($_POST['max_posts']).";\n".
1136 "\$Settings['max_topics'] = ".null_string($_POST['max_topics']).";\n".
1137 "\$Settings['max_memlist'] = ".null_string($_POST['max_memlist']).";\n".
1138 "\$Settings['max_pmlist'] = ".null_string($_POST['max_pmlist']).";\n".
1139 "\$Settings['hot_topic_num'] = ".null_string($_POST['hot_topic_num']).";\n".
1140 "\$Settings['qstr'] = ".null_string($Settings['qstr']).";\n".
1141 "\$Settings['qsep'] = ".null_string($Settings['qsep']).";\n".
1142 "\$Settings['file_ext'] = ".null_string($Settings['file_ext']).";\n".
1143 "\$Settings['rss_ext'] = ".null_string($Settings['rss_ext']).";\n".
1144 "\$Settings['js_ext'] = ".null_string($Settings['js_ext']).";\n".
1145 "\$Settings['showverinfo'] = ".null_string($Settings['showverinfo']).";\n".
1146 "\$Settings['vercheck'] = ".null_string($Settings['vercheck']).";\n".
1147 "\$Settings['enable_rss'] = ".null_string($_POST['enable_rss']).";\n".
1148 "\$Settings['enable_search'] = ".null_string($_POST['enable_search']).";\n".
1149 "\$Settings['sessionid_in_urls'] = ".null_string($Settings['sessionid_in_urls']).";\n".
1150 "\$Settings['fixpathinfo'] = ".null_string($OldSettings['fixpathinfo']).";\n".
1151 "\$Settings['fixbasedir'] = ".null_string($OldSettings['fixbasedir']).";\n".
1152 "\$Settings['fixcookiedir'] = ".null_string($OldSettings['fixcookiedir']).";\n".
1153 "\$Settings['fixredirectdir'] = ".null_string($OldSettings['fixredirectdir']).";\n".
1154 "\$Settings['enable_pathinfo'] = ".null_string($Settings['enable_pathinfo']).";\n".
1155 "\$Settings['rssurl'] = ".null_string($Settings['rssurl']).";\n".
1156 "\$Settings['board_offline'] = ".null_string($Settings['board_offline']).";\n".
1157 "\$Settings['VerCheckURL'] = ".null_string($Settings['VerCheckURL']).";\n".
1158 "\$Settings['IPCheckURL'] = ".null_string($Settings['IPCheckURL']).";\n".
1159 "\$Settings['log_http_request'] = ".null_string($Settings['log_http_request']).";\n".
1160 "\$Settings['log_config_format'] = ".null_string($Settings['log_config_format']).";\n".
1161 "\$Settings['BoardUUID'] = ".null_string(base64_encode($Settings['BoardUUID'])).";\n".
1162 "\$Settings['KarmaBoostDays'] = ".null_string($Settings['KarmaBoostDays']).";\n".
1163 "\$Settings['KBoostPercent'] = ".null_string($Settings['KBoostPercent']).";\n".$pretext2[1]."\n".
1164 "\$SettInfo['board_name'] = ".null_string($SettInfo['board_name']).";\n".
1165 "\$SettInfo['Author'] = ".null_string($SettInfo['Author']).";\n".
1166 "\$SettInfo['Keywords'] = ".null_string($SettInfo['Keywords']).";\n".
1167 "\$SettInfo['Description'] = ".null_string($SettInfo['Description']).";\n".$pretext2[2]."\n".
1168 "\$SettDir['maindir'] = ".null_string($SettDir['maindir']).";\n".
1169 "\$SettDir['inc'] = ".null_string($SettDir['inc']).";\n".
1170 "\$SettDir['logs'] = ".null_string($SettDir['logs']).";\n".
1171 "\$SettDir['archive'] = ".null_string($SettDir['archive']).";\n".
1172 "\$SettDir['misc'] = ".null_string($SettDir['misc']).";\n".
1173 "\$SettDir['sql'] = ".null_string($SettDir['sql']).";\n".
1174 "\$SettDir['admin'] = ".null_string($SettDir['admin']).";\n".
1175 "\$SettDir['sqldumper'] = ".null_string($SettDir['sqldumper']).";\n".
1176 "\$SettDir['mod'] = ".null_string($SettDir['mod']).";\n".
1177 "\$SettDir['themes'] = ".null_string($SettDir['themes']).";\n".$pretext2[3]."\n?>";
1178 $BoardSettingsBak = $pretext.$settcheck.$BoardSettings;
1179 $BoardSettings = $pretext.$settcheck.$BoardSettings;
1180 $fp = fopen("settings.php","w+");
1181 fwrite($fp, $BoardSettings);
1182 fclose($fp);
1183 // cp("settings.php","settingsbak.php");
1184 $fp = fopen("settingsbak.php","w+");
1185 fwrite($fp, $BoardSettingsBak);
1186 fclose($fp); } if($_GET['act']=="sql"&&$_POST['update']!="now"&&$GroupInfo['ViewDBInfo']=="yes") {
1187 $admincptitle = " ".$ThemeSet['TitleDivider']." Database Manager";
1189 <div class="TableMenuBorder">
1190 <?php if($ThemeSet['TableStyle']=="div") { ?>
1191 <div class="TableMenuRow1">
1192 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=sql",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">iDB Database Manager</a></div>
1193 <?php } ?>
1194 <table class="TableMenu" style="width: 100%;">
1195 <?php if($ThemeSet['TableStyle']=="table") { ?>
1196 <tr class="TableMenuRow1">
1197 <td class="TableMenuColumn1"><span style="float: left;">
1198 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=sql",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">iDB Database Manager</a>
1199 </span><span style="float: right;">&#160;</span></td>
1200 </tr><?php } ?>
1201 <tr class="TableMenuRow2">
1202 <th class="TableMenuColumn2" style="width: 100%; text-align: left;">
1203 <span style="float: left;">&#160;Editing SQL Settings for iDB: </span>
1204 <span style="float: right;">&#160;</span>
1205 </th>
1206 </tr>
1207 <tr class="TableMenuRow3">
1208 <td class="TableMenuColumn3">
1209 <form style="display: inline;" method="post" id="acptool" action="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=sql",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
1210 <table style="text-align: left;">
1211 <tr style="text-align: left;">
1212 <td style="width: 50%;"><span class="TextBoxLabel">Database Server:</span></td>
1213 <td style="width: 50%;"><?php echo $DBType['Server']; ?></td>
1214 </tr><?php if($Settings['sqltype']=="mysql"||
1215 $Settings['sqltype']=="mysqli"||
1216 $Settings['sqltype']=="pgsql"||
1217 $Settings['sqltype']=="cubrid") {
1218 ?><tr style="text-align: left;">
1219 <td style="width: 50%;"><span class="TextBoxLabel">Database Client:</span></td>
1220 <td style="width: 50%;"><?php echo $DBType['Client']; ?></td>
1221 </tr><?php } if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3"&&$Settings['sqltype']=="pdo_sqlite3") {
1222 ?><tr style="text-align: left;">
1223 <td style="width: 50%;"><span class="TextBoxLabel">Database File Size:</span></td>
1224 <td style="width: 50%;"><?php echo sprintf("%u", filesize($Settings['sqldb']))." bytes"; ?></td>
1225 </tr><tr style="text-align: left;">
1226 <td style="width: 50%;"><span class="TextBoxLabel">Human Readable File Size:</span></td>
1227 <td style="width: 50%;"><?php echo human_filesize(sprintf("%u", filesize($Settings['sqldb']))); ?></td>
1228 </tr><?php } if($Settings['sqltype']=="cubrid") { ?><tr style="text-align: left;">
1229 <td style="width: 50%;"><span class="TextBoxLabel">CUBRID PHP:</span></td>
1230 <td style="width: 50%;"><?php echo $DBType['PHP']; ?></td>
1231 </tr><?php } if($Settings['sqltype']!="sqlite"&&$Settings['sqltype']!="sqlite3"&&$Settings['sqltype']!="pdo_sqlite3") { ?><tr style="text-align: left;">
1232 <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseUserName">Insert Database User Name:</label></td>
1233 <td style="width: 50%;"><input type="text" name="DatabaseUserName" class="TextBox" id="DatabaseUserName" size="20" value="<?php echo $Settings['sqluser']; ?>" /></td>
1234 </tr><tr style="text-align: left;">
1235 <td style="width: 50%;"><label class="TextBoxLabel" for="DatabasePassword">Insert Database Password:</label></td>
1236 <td style="width: 50%;"><input type="password" name="DatabasePassword" class="TextBox" id="DatabasePassword" size="20" value="<?php echo $Settings['sqlpass']; ?>" /></td>
1237 </tr><tr style="text-align: left;">
1238 <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseName">Insert Database Name:</label></td>
1239 <td style="width: 50%;"><input type="text" name="DatabaseName" class="TextBox" id="DatabaseName" size="20" value="<?php echo $Settings['sqldb']; ?>" /></td>
1240 </tr><tr style="text-align: left;">
1241 <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseHost">Insert Database Host:</label></td>
1242 <td style="width: 50%;"><input type="text" name="DatabaseHost" class="TextBox" id="DatabaseHost" size="20" value="<?php echo $Settings['sqlhost']; ?>" /></td>
1243 </tr><tr style="text-align: left;">
1244 <td style="width: 50%;"><label class="TextBoxLabel" for="tableprefix">Insert Table Prefix:<br /></label></td>
1245 <td style="width: 50%;"><input type="text" name="tableprefix" class="TextBox" id="tableprefix" size="20" value="<?php echo $Settings['sqltable']; ?>" /></td>
1246 </tr><?php } if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3"||$Settings['sqltype']=="pdo_sqlite3") { ?><tr style="text-align: left;">
1247 <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseName">Insert Database FileName:</label></td>
1248 <td style="width: 50%;"><input type="text" name="DatabaseName" class="TextBox" id="DatabaseName" size="20" value="<?php echo $Settings['sqldb']; ?>" /></td>
1249 </tr><tr style="text-align: left;">
1250 <td style="width: 50%;"><label class="TextBoxLabel" for="tableprefix">Insert Table Prefix:<br /></label></td>
1251 <td style="width: 50%;"><input type="text" name="tableprefix" class="TextBox" id="tableprefix" size="20" value="<?php echo $Settings['sqltable']; ?>" /></td>
1252 </tr><?php } ?></table>
1253 <table style="text-align: left;">
1254 <tr style="text-align: left;">
1255 <td style="width: 100%;">
1256 <?php if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3"||$Settings['sqltype']=="pdo_sqlite3") { ?>
1257 <input type="hidden" name="DatabaseUserName" class="TextBox" id="DatabaseUserName" size="20" value="<?php echo $Settings['sqluser']; ?>" />
1258 <input type="hidden" name="DatabasePassword" class="TextBox" id="DatabasePassword" size="20" value="<?php echo $Settings['sqlpass']; ?>" />
1259 <input type="hidden" name="DatabaseHost" class="TextBox" id="DatabaseHost" size="20" value="<?php echo $Settings['sqlhost']; ?>" />
1260 <?php } ?>
1261 <input type="hidden" name="act" value="sql" style="display: none;" />
1262 <input type="hidden" name="update" value="now" style="display: none;" />
1263 <input type="submit" class="Button" value="Apply" name="Apply_Changes" />
1264 <input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
1265 </td></tr></table>
1266 </form>
1267 </td>
1268 </tr>
1269 <tr class="TableMenuRow4">
1270 <td class="TableMenuColumn4">&#160;</td>
1271 </tr>
1272 </table>
1273 </div>
1274 <?php } if($_POST['act']=="sql"&&$_POST['update']=="now"&&$_GET['act']=="sql"&&
1275 $_SESSION['UserGroup']!=$Settings['GuestGroup']&&$GroupInfo['HasAdminCP']=="yes"&&
1276 $GroupInfo['ViewDBInfo']=="yes") {
1277 $_POST = array_map("rsq", $_POST);
1278 if(!isset($Settings['BoardUUID'])||$Settings['BoardUUID']===null) {
1279 $Settings['BoardUUID'] = rand_uuid("rand"); }
1280 $Settings['board_name'] = htmlspecialchars($Settings['board_name'], ENT_QUOTES, $Settings['charset']);
1281 $Settings['board_name'] = fixbamps($Settings['board_name']);
1282 $Settings['board_name'] = remove_spaces($Settings['board_name']);
1283 $Settings['board_name'] = str_replace("\&#039;", "&#039;", $Settings['board_name']);
1284 $SettInfo['board_name'] = htmlspecialchars($SettInfo['board_name'], ENT_QUOTES, $Settings['charset']);
1285 $SettInfo['board_name'] = fixbamps($SettInfo['board_name']);
1286 $SettInfo['board_name'] = remove_spaces($SettInfo['board_name']);
1287 $SettInfo['board_name'] = str_replace("\&#039;", "&#039;", $SettInfo['board_name']);
1288 $SettInfo['Author'] = htmlspecialchars($SettInfo['Author'], ENT_QUOTES, $Settings['charset']);
1289 $SettInfo['Author'] = fixbamps($SettInfo['Author']);
1290 $SettInfo['Author'] = remove_spaces($SettInfo['Author']);
1291 $SettInfo['Author'] = str_replace("\&#039;", "&#039;", $SettInfo['Author']);
1292 $SettInfo['Keywords'] = htmlspecialchars($SettInfo['Keywords'], ENT_QUOTES, $Settings['charset']);
1293 $SettInfo['Keywords'] = fixbamps($SettInfo['Keywords']);
1294 $SettInfo['Keywords'] = remove_spaces($SettInfo['Keywords']);
1295 $SettInfo['Keywords'] = str_replace("\&#039;", "&#039;", $SettInfo['Keywords']);
1296 $SettInfo['Description'] = htmlspecialchars($SettInfo['Description'], ENT_QUOTES, $Settings['charset']);
1297 $SettInfo['Description'] = fixbamps($SettInfo['Description']);
1298 $SettInfo['Description'] = remove_spaces($SettInfo['Description']);
1299 $SettInfo['Description'] = str_replace("\&#039;", "&#039;", $SettInfo['Description']);
1300 $BoardSettings=$pretext2[0]."\n".
1301 "\$Settings['sqlhost'] = ".null_string($_POST['DatabaseHost']).";\n".
1302 "\$Settings['sqldb'] = ".null_string($_POST['DatabaseName']).";\n".
1303 "\$Settings['sqltable'] = ".null_string($_POST['tableprefix']).";\n".
1304 "\$Settings['sqluser'] = ".null_string($_POST['DatabaseUserName']).";\n".
1305 "\$Settings['sqlpass'] = ".null_string($_POST['DatabasePassword']).";\n".
1306 "\$Settings['sqltype'] = ".null_string($Settings['sqltype']).";\n".
1307 "\$Settings['board_name'] = ".null_string($Settings['board_name']).";\n".
1308 "\$Settings['idbdir'] = ".null_string($Settings['idbdir']).";\n".
1309 "\$Settings['idburl'] = ".null_string($Settings['idburl']).";\n".
1310 "\$Settings['enable_https'] = ".null_string($Settings['enable_https']).";\n".
1311 "\$Settings['weburl'] = ".null_string($Settings['weburl']).";\n".
1312 "\$Settings['SQLThemes'] = ".null_string($Settings['SQLThemes']).";\n".
1313 "\$Settings['use_gzip'] = ".null_string($Settings['use_gzip']).";\n".
1314 "\$Settings['html_type'] = ".null_string($Settings['html_type']).";\n".
1315 "\$Settings['html_level'] = ".null_string($Settings['html_level']).";\n".
1316 "\$Settings['output_type'] = ".null_string($Settings['output_type']).";\n".
1317 "\$Settings['GuestGroup'] = ".null_string($Settings['GuestGroup']).";\n".
1318 "\$Settings['MemberGroup'] = ".null_string($Settings['MemberGroup']).";\n".
1319 "\$Settings['ValidateGroup'] = ".null_string($Settings['ValidateGroup']).";\n".
1320 "\$Settings['AdminValidate'] = ".null_string($Settings['AdminValidate']).";\n".
1321 "\$Settings['TestReferer'] = ".null_string($Settings['TestReferer']).";\n".
1322 "\$Settings['DefaultTheme'] = ".null_string($Settings['DefaultTheme']).";\n".
1323 "\$Settings['DefaultTimeZone'] = ".null_string($Settings['DefaultTimeZone']).";\n".
1324 "\$Settings['start_date'] = ".null_string($Settings['start_date']).";\n".
1325 "\$Settings['idb_time_format'] = ".null_string($Settings['idb_time_format']).";\n".
1326 "\$Settings['idb_date_format'] = ".null_string($Settings['idb_date_format']).";\n".
1327 "\$Settings['use_hashtype'] = ".null_string($Settings['use_hashtype']).";\n".
1328 "\$Settings['charset'] = ".null_string($Settings['charset']).";\n".
1329 "\$Settings['sql_collate'] = ".null_string($Settings['sql_collate']).";\n".
1330 "\$Settings['sql_charset'] = ".null_string($Settings['sql_charset']).";\n".
1331 "\$Settings['add_power_by'] = ".null_string($Settings['add_power_by']).";\n".
1332 "\$Settings['send_pagesize'] = ".null_string($Settings['send_pagesize']).";\n".
1333 "\$Settings['max_posts'] = ".null_string($Settings['max_posts']).";\n".
1334 "\$Settings['max_topics'] = ".null_string($Settings['max_topics']).";\n".
1335 "\$Settings['max_memlist'] = ".null_string($Settings['max_memlist']).";\n".
1336 "\$Settings['max_pmlist'] = ".null_string($Settings['max_pmlist']).";\n".
1337 "\$Settings['hot_topic_num'] = ".null_string($Settings['hot_topic_num']).";\n".
1338 "\$Settings['qstr'] = ".null_string($Settings['qstr']).";\n".
1339 "\$Settings['qsep'] = ".null_string($Settings['qsep']).";\n".
1340 "\$Settings['file_ext'] = ".null_string($Settings['file_ext']).";\n".
1341 "\$Settings['rss_ext'] = ".null_string($Settings['rss_ext']).";\n".
1342 "\$Settings['js_ext'] = ".null_string($Settings['js_ext']).";\n".
1343 "\$Settings['showverinfo'] = ".null_string($Settings['showverinfo']).";\n".
1344 "\$Settings['vercheck'] = ".null_string($Settings['vercheck']).";\n".
1345 "\$Settings['enable_rss'] = ".null_string($Settings['enable_rss']).";\n".
1346 "\$Settings['enable_search'] = ".null_string($Settings['enable_search']).";\n".
1347 "\$Settings['sessionid_in_urls'] = ".null_string($Settings['sessionid_in_urls']).";\n".
1348 "\$Settings['fixpathinfo'] = ".null_string($OldSettings['fixpathinfo']).";\n".
1349 "\$Settings['fixbasedir'] = ".null_string($OldSettings['fixbasedir']).";\n".
1350 "\$Settings['fixcookiedir'] = ".null_string($OldSettings['fixcookiedir']).";\n".
1351 "\$Settings['fixredirectdir'] = ".null_string($OldSettings['fixredirectdir']).";\n".
1352 "\$Settings['enable_pathinfo'] = ".null_string($Settings['enable_pathinfo']).";\n".
1353 "\$Settings['rssurl'] = ".null_string($Settings['rssurl']).";\n".
1354 "\$Settings['board_offline'] = ".null_string($Settings['board_offline']).";\n".
1355 "\$Settings['VerCheckURL'] = ".null_string($Settings['VerCheckURL']).";\n".
1356 "\$Settings['IPCheckURL'] = ".null_string($Settings['IPCheckURL']).";\n".
1357 "\$Settings['log_http_request'] = ".null_string($Settings['log_http_request']).";\n".
1358 "\$Settings['log_config_format'] = ".null_string($Settings['log_config_format']).";\n".
1359 "\$Settings['BoardUUID'] = ".null_string(base64_encode($Settings['BoardUUID'])).";\n".
1360 "\$Settings['KarmaBoostDays'] = ".null_string($Settings['KarmaBoostDays']).";\n".
1361 "\$Settings['KBoostPercent'] = ".null_string($Settings['KBoostPercent']).";\n".$pretext2[1]."\n".
1362 "\$SettInfo['board_name'] = ".null_string($SettInfo['board_name']).";\n".
1363 "\$SettInfo['Author'] = ".null_string($SettInfo['Author']).";\n".
1364 "\$SettInfo['Keywords'] = ".null_string($SettInfo['Keywords']).";\n".
1365 "\$SettInfo['Description'] = ".null_string($SettInfo['Description']).";\n".$pretext2[2]."\n".
1366 "\$SettDir['maindir'] = ".null_string($SettDir['maindir']).";\n".
1367 "\$SettDir['inc'] = ".null_string($SettDir['inc']).";\n".
1368 "\$SettDir['logs'] = ".null_string($SettDir['logs']).";\n".
1369 "\$SettDir['archive'] = ".null_string($SettDir['archive']).";\n".
1370 "\$SettDir['misc'] = ".null_string($SettDir['misc']).";\n".
1371 "\$SettDir['sql'] = ".null_string($SettDir['sql']).";\n".
1372 "\$SettDir['admin'] = ".null_string($SettDir['admin']).";\n".
1373 "\$SettDir['sqldumper'] = ".null_string($SettDir['sqldumper']).";\n".
1374 "\$SettDir['mod'] = ".null_string($SettDir['mod']).";\n".
1375 "\$SettDir['themes'] = ".null_string($SettDir['themes']).";\n".$pretext2[3]."\n?>";
1376 $BoardSettingsBak = $pretext.$settcheck.$BoardSettings;
1377 $BoardSettings = $pretext.$settcheck.$BoardSettings;
1378 $fp = fopen("settings.php","w+");
1379 fwrite($fp, $BoardSettings);
1380 fclose($fp);
1381 // cp("settings.php","settingsbak.php");
1382 $fp = fopen("settingsbak.php","w+");
1383 fwrite($fp, $BoardSettingsBak);
1384 fclose($fp); } if($_GET['act']=="info"&&$_POST['update']!="now") {
1385 $admincptitle = " ".$ThemeSet['TitleDivider']." Board Info Manager";
1387 <div class="TableMenuBorder">
1388 <?php if($ThemeSet['TableStyle']=="div") { ?>
1389 <div class="TableMenuRow1">
1390 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=info",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Board Info Manager</a></div>
1391 <?php } ?>
1392 <table class="TableMenu" style="width: 100%;">
1393 <?php if($ThemeSet['TableStyle']=="table") { ?>
1394 <tr class="TableMenuRow1">
1395 <td class="TableMenuColumn1"><span style="float: left;">
1396 <?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=info",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Board Info Manager</a>
1397 </span><span style="float: right;">&#160;</span></td>
1398 </tr><?php } ?>
1399 <tr class="TableMenuRow2">
1400 <th class="TableMenuColumn2" style="width: 100%; text-align: left;">
1401 <span style="float: left;">&#160;Editing Board Info: </span>
1402 <span style="float: right;">&#160;</span>
1403 </th>
1404 </tr>
1405 <tr class="TableMenuRow3">
1406 <td class="TableMenuColumn3">
1407 <form style="display: inline;" method="post" id="acptool" action="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=info",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">
1408 <table style="text-align: left;">
1409 <tr style="text-align: left;">
1410 <td style="width: 50%;"><label class="TextBoxLabel" for="board_name">Insert board name:</label></td>
1411 <td style="width: 50%;"><input type="text" name="board_name" class="TextBox" id="board_name" size="20" value="<?php echo $SettInfo['board_name']; ?>" /></td>
1412 </tr><tr style="text-align: left;">
1413 <td style="width: 50%;"><label class="TextBoxLabel" for="Author">Insert boards admin name:</label></td>
1414 <td style="width: 50%;"><input type="text" name="Author" class="TextBox" id="Author" size="20" value="<?php echo $SettInfo['Author']; ?>" /></td>
1415 </tr><tr style="text-align: left;">
1416 <td style="width: 50%;"><label class="TextBoxLabel" for="Keywords">Insert keywords about this board:</label></td>
1417 <td style="width: 50%;"><input type="text" name="Keywords" class="TextBox" id="Keywords" size="20" value="<?php echo $SettInfo['Keywords']; ?>" /></td>
1418 </tr><tr style="text-align: left;">
1419 <td style="width: 50%;"><label class="TextBoxLabel" for="Description">Insert description about this board:<br /></label></td>
1420 <td style="width: 50%;"><input type="text" name="Description" class="TextBox" id="Description" size="20" value="<?php echo $SettInfo['Description']; ?>" /></td>
1421 </tr></table>
1422 <table style="text-align: left;">
1423 <tr style="text-align: left;">
1424 <td style="width: 100%;">
1425 <input type="hidden" name="act" value="info" style="display: none;" />
1426 <input type="hidden" name="update" value="now" style="display: none;" />
1427 <input type="submit" class="Button" value="Apply" name="Apply_Changes" />
1428 <input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
1429 </td></tr></table>
1430 </form>
1431 </td>
1432 </tr>
1433 <tr class="TableMenuRow4">
1434 <td class="TableMenuColumn4">&#160;</td>
1435 </tr>
1436 </table>
1437 </div>
1438 <?php } if($_POST['act']=="info"&&$_POST['update']=="now"&&$_GET['act']=="info"&&
1439 $_SESSION['UserGroup']!=$Settings['GuestGroup']&&$GroupInfo['HasAdminCP']=="yes") {
1440 $_POST = array_map("rsq", $_POST);
1441 if(!isset($Settings['BoardUUID'])||$Settings['BoardUUID']===null) {
1442 $Settings['BoardUUID'] = rand_uuid("rand"); }
1443 $_POST['board_name'] = htmlspecialchars($_POST['board_name'], ENT_QUOTES, $Settings['charset']);
1444 $_POST['board_name'] = fixbamps($_POST['board_name']);
1445 $_POST['board_name'] = remove_spaces($_POST['board_name']);
1446 $_POST['board_name'] = str_replace("\&#039;", "&#039;", $_POST['board_name']);
1447 if($_POST['board_name']!=$Settings['board_name']&&
1448 $Settings['SQLThemes']=="on") {
1449 $logoquery = sql_pre_query("UPDATE \"".$Settings['sqltable']."themes\" SET \"Logo\"='%s' WHERE \"Logo\"='%s'", array($_POST['board_name'],$Settings['board_name']));
1450 sql_query($logo,$SQLStat); }
1451 $_POST['Author'] = htmlspecialchars($_POST['Author'], ENT_QUOTES, $Settings['charset']);
1452 $_POST['Author'] = fixbamps($_POST['Author']);
1453 $_POST['Author'] = remove_spaces($_POST['Author']);
1454 $_POST['Author'] = str_replace("\&#039;", "&#039;", $_POST['Author']);
1455 $_POST['Keywords'] = htmlspecialchars($_POST['Keywords'], ENT_QUOTES, $Settings['charset']);
1456 $_POST['Keywords'] = fixbamps($_POST['Keywords']);
1457 $_POST['Keywords'] = remove_spaces($_POST['Keywords']);
1458 $_POST['Keywords'] = str_replace("\&#039;", "&#039;", $_POST['Keywords']);
1459 $_POST['Description'] = htmlspecialchars($_POST['Description'], ENT_QUOTES, $Settings['charset']);
1460 $_POST['Description'] = fixbamps($_POST['Description']);
1461 $_POST['Description'] = remove_spaces($_POST['Description']);
1462 $_POST['Description'] = str_replace("\&#039;", "&#039;", $_POST['Description']);
1463 $BoardSettings=$pretext2[0]."\n".
1464 "\$Settings['sqlhost'] = ".null_string($Settings['sqlhost']).";\n".
1465 "\$Settings['sqldb'] = ".null_string($Settings['sqldb']).";\n".
1466 "\$Settings['sqltable'] = ".null_string($Settings['sqltable']).";\n".
1467 "\$Settings['sqluser'] = ".null_string($Settings['sqluser']).";\n".
1468 "\$Settings['sqlpass'] = ".null_string($Settings['sqlpass']).";\n".
1469 "\$Settings['sqltype'] = ".null_string($Settings['sqltype']).";\n".
1470 "\$Settings['board_name'] = ".null_string($_POST['board_name']).";\n".
1471 "\$Settings['idbdir'] = ".null_string($Settings['idbdir']).";\n".
1472 "\$Settings['idburl'] = ".null_string($Settings['idburl']).";\n".
1473 "\$Settings['enable_https'] = ".null_string($Settings['enable_https']).";\n".
1474 "\$Settings['weburl'] = ".null_string($Settings['weburl']).";\n".
1475 "\$Settings['SQLThemes'] = ".null_string($Settings['SQLThemes']).";\n".
1476 "\$Settings['use_gzip'] = ".null_string($Settings['use_gzip']).";\n".
1477 "\$Settings['html_type'] = ".null_string($Settings['html_type']).";\n".
1478 "\$Settings['html_level'] = ".null_string($Settings['html_level']).";\n".
1479 "\$Settings['output_type'] = ".null_string($Settings['output_type']).";\n".
1480 "\$Settings['GuestGroup'] = ".null_string($Settings['GuestGroup']).";\n".
1481 "\$Settings['MemberGroup'] = ".null_string($Settings['MemberGroup']).";\n".
1482 "\$Settings['ValidateGroup'] = ".null_string($Settings['ValidateGroup']).";\n".
1483 "\$Settings['AdminValidate'] = ".null_string($Settings['AdminValidate']).";\n".
1484 "\$Settings['TestReferer'] = ".null_string($Settings['TestReferer']).";\n".
1485 "\$Settings['DefaultTheme'] = ".null_string($Settings['DefaultTheme']).";\n".
1486 "\$Settings['DefaultTimeZone'] = ".null_string($Settings['DefaultTimeZone']).";\n".
1487 "\$Settings['start_date'] = ".null_string($Settings['start_date']).";\n".
1488 "\$Settings['idb_time_format'] = ".null_string($Settings['idb_time_format']).";\n".
1489 "\$Settings['idb_date_format'] = ".null_string($Settings['idb_date_format']).";\n".
1490 "\$Settings['use_hashtype'] = ".null_string($Settings['use_hashtype']).";\n".
1491 "\$Settings['charset'] = ".null_string($Settings['charset']).";\n".
1492 "\$Settings['sql_collate'] = ".null_string($Settings['sql_collate']).";\n".
1493 "\$Settings['sql_charset'] = ".null_string($Settings['sql_charset']).";\n".
1494 "\$Settings['add_power_by'] = ".null_string($Settings['add_power_by']).";\n".
1495 "\$Settings['send_pagesize'] = ".null_string($Settings['send_pagesize']).";\n".
1496 "\$Settings['max_posts'] = ".null_string($Settings['max_posts']).";\n".
1497 "\$Settings['max_topics'] = ".null_string($Settings['max_topics']).";\n".
1498 "\$Settings['max_memlist'] = ".null_string($Settings['max_memlist']).";\n".
1499 "\$Settings['max_pmlist'] = ".null_string($Settings['max_pmlist']).";\n".
1500 "\$Settings['hot_topic_num'] = ".null_string($Settings['hot_topic_num']).";\n".
1501 "\$Settings['qstr'] = ".null_string($Settings['qstr']).";\n".
1502 "\$Settings['qsep'] = ".null_string($Settings['qsep']).";\n".
1503 "\$Settings['file_ext'] = ".null_string($Settings['file_ext']).";\n".
1504 "\$Settings['rss_ext'] = ".null_string($Settings['rss_ext']).";\n".
1505 "\$Settings['js_ext'] = ".null_string($Settings['js_ext']).";\n".
1506 "\$Settings['showverinfo'] = ".null_string($Settings['showverinfo']).";\n".
1507 "\$Settings['vercheck'] = ".null_string($Settings['vercheck']).";\n".
1508 "\$Settings['enable_rss'] = ".null_string($Settings['enable_rss']).";\n".
1509 "\$Settings['enable_search'] = ".null_string($Settings['enable_search']).";\n".
1510 "\$Settings['sessionid_in_urls'] = ".null_string($Settings['sessionid_in_urls']).";\n".
1511 "\$Settings['fixpathinfo'] = ".null_string($OldSettings['fixpathinfo']).";\n".
1512 "\$Settings['fixbasedir'] = ".null_string($OldSettings['fixbasedir']).";\n".
1513 "\$Settings['fixcookiedir'] = ".null_string($OldSettings['fixcookiedir']).";\n".
1514 "\$Settings['fixredirectdir'] = ".null_string($OldSettings['fixredirectdir']).";\n".
1515 "\$Settings['enable_pathinfo'] = ".null_string($Settings['enable_pathinfo']).";\n".
1516 "\$Settings['rssurl'] = ".null_string($Settings['rssurl']).";\n".
1517 "\$Settings['board_offline'] = ".null_string($Settings['board_offline']).";\n".
1518 "\$Settings['VerCheckURL'] = ".null_string($Settings['VerCheckURL']).";\n".
1519 "\$Settings['IPCheckURL'] = ".null_string($Settings['IPCheckURL']).";\n".
1520 "\$Settings['log_http_request'] = ".null_string($Settings['log_http_request']).";\n".
1521 "\$Settings['log_config_format'] = ".null_string($Settings['log_config_format']).";\n".
1522 "\$Settings['BoardUUID'] = ".null_string(base64_encode($Settings['BoardUUID'])).";\n".
1523 "\$Settings['KarmaBoostDays'] = ".null_string($Settings['KarmaBoostDays']).";\n".
1524 "\$Settings['KBoostPercent'] = ".null_string($Settings['KBoostPercent']).";\n".$pretext2[1]."\n".
1525 "\$SettInfo['board_name'] = ".null_string($_POST['board_name']).";\n".
1526 "\$SettInfo['Author'] = ".null_string($_POST['Author']).";\n".
1527 "\$SettInfo['Keywords'] = ".null_string($_POST['Keywords']).";\n".
1528 "\$SettInfo['Description'] = ".null_string($_POST['Description']).";\n".$pretext2[2]."\n".
1529 "\$SettDir['maindir'] = ".null_string($SettDir['maindir']).";\n".
1530 "\$SettDir['inc'] = ".null_string($SettDir['inc']).";\n".
1531 "\$SettDir['logs'] = ".null_string($SettDir['logs']).";\n".
1532 "\$SettDir['archive'] = ".null_string($SettDir['archive']).";\n".
1533 "\$SettDir['misc'] = ".null_string($SettDir['misc']).";\n".
1534 "\$SettDir['sql'] = ".null_string($SettDir['sql']).";\n".
1535 "\$SettDir['admin'] = ".null_string($SettDir['admin']).";\n".
1536 "\$SettDir['sqldumper'] = ".null_string($SettDir['sqldumper']).";\n".
1537 "\$SettDir['mod'] = ".null_string($SettDir['mod']).";\n".
1538 "\$SettDir['themes'] = ".null_string($SettDir['themes']).";\n".$pretext2[3]."\n?>";
1539 $BoardSettingsBak = $pretext.$settcheck.$BoardSettings;
1540 $BoardSettings = $pretext.$settcheck.$BoardSettings;
1541 $fp = fopen("settings.php","w+");
1542 fwrite($fp, $BoardSettings);
1543 fclose($fp);
1544 // cp("settings.php","settingsbak.php");
1545 $fp = fopen("settingsbak.php","w+");
1546 fwrite($fp, $BoardSettingsBak);
1547 fclose($fp); } if($_POST['update']=="now"&&$_GET['act']!=null) {
1548 $profiletitle = " ".$ThemeSet['TitleDivider']." Updating Settings"; ?>
1549 </td></tr>
1550 <tr id="ProfileTitleEnd" class="TableMenuRow4">
1551 <td class="TableMenuColumn4">&#160;</td>
1552 </tr></table></div><?php } ?>
1553 </td></tr>
1554 </table>
1555 <div>&#160;</div>