Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
- $FileInfo: sql.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
+ $FileInfo: sql.php - Last Update: 4/8/2022 SVN 947 - Author: cooldude2k $
*/
/* Some ini setting changes uncomment if you need them.
Display PHP Errors */
return $scheme.$user.$pass.$host.$port.$path.$query.$fragment;
}
$OrgBoardURL = $Settings['idburl'];
-$PreBestURL = parse_url($Settings['idburl']);
+if(isset($Settings['idburl'])) {
+$PreBestURL = parse_url($Settings['idburl']); }
$PreServURL = parse_url((isset($_SERVER['HTTPS']) ? "https" : "http") . "://".$_SERVER['HTTP_HOST'].substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/') + 1));
-if($PreBestURL['host']=="localhost.url"&&str_replace("/", "", $PreBestURL['path'])=="localpath") {
+if(isset($PreBestURL['host'])&&$PreBestURL['host']=="localhost.url"&&str_replace("/", "", $PreBestURL['path'])=="localpath") {
$PreBestURL['host'] = "localhost";
$PreBestURL['path'] = $PreServURL['path'];
$Settings['idburl'] = unparse_url($PreBestURL); }
-if($PreBestURL['host']=="localhost.url"&&str_replace("/", "", $PreBestURL['path'])!="localpath") {
+if(isset($PreBestURL['host'])&&$PreBestURL['host']=="localhost.url"&&str_replace("/", "", $PreBestURL['path'])!="localpath") {
$PreBestURL['host'] = $PreServURL['host'];
$Settings['idburl'] = unparse_url($PreBestURL); }
-if($PreBestURL['host']!="localhost.url"&&str_replace("/", "", $PreBestURL['path'])=="localpath") {
+if(isset($PreBestURL['host'])&&$PreBestURL['host']!="localhost.url"&&str_replace("/", "", $PreBestURL['path'])=="localpath") {
$PreBestURL['path'] = $PreServURL['path'];
$Settings['idburl'] = unparse_url($PreBestURL); }
$OrgWebSiteURL = $Settings['weburl'];
-$PreWestURL = parse_url($Settings['weburl']);
-if($PreWestURL['host']=="localhost.url"&&str_replace("/", "", $PreWestURL['path'])=="localpath") {
+if(isset($Settings['idburl'])) {
+$PreWestURL = parse_url($Settings['weburl']); }
+if(isset($PreWestURL['host'])&&$PreWestURL['host']=="localhost.url"&&str_replace("/", "", $PreWestURL['path'])=="localpath") {
$PreWestURL['host'] = $PreServURL['host'];
$PreWestURL['path'] = $PreServURL['path'];
$Settings['weburl'] = unparse_url($PreWestURL); }
-if($PreWestURL['host']=="localhost.url"&&str_replace("/", "", $PreWestURL['path'])!="localpath") {
+if(isset($PreWestURL['host'])&&$PreWestURL['host']=="localhost.url"&&str_replace("/", "", $PreWestURL['path'])!="localpath") {
$PreWestURL['host'] = $PreServURL['host'];
$Settings['weburl'] = unparse_url($PreWestURL); }
-if($PreWestURL['host']!="localhost.url"&&str_replace("/", "", $PreWestURL['path'])=="localpath") {
+if(isset($PreWestURL['host'])&&$PreWestURL['host']!="localhost.url"&&str_replace("/", "", $PreWestURL['path'])=="localpath") {
$PreWestURL['path'] = $PreServURL['path'];
$Settings['weburl'] = unparse_url($PreWestURL); }
if(!isset($Settings['fixbasedir'])) { $Settings['fixbasedir'] = null; }
@ini_set('default_charset', $Settings['charset']); }
$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
$File2Name = $_SERVER['SCRIPT_NAME'];
-$File3Name=str_replace($File1Name, null, $File2Name);
+/*$File3Name=str_replace($File1Name, null, $File2Name);
if ($File3Name=="sql.php"||$File3Name=="/sql.php") {
header('Location: index.php');
- exit(); }
+ exit(); }*/
+$File3Name = basename($_SERVER['SCRIPT_NAME']);
+if ($File3Name=="sql.php"||$File3Name=="/sql.php") {
+ header('Location: index.php');
+ exit(); }
//error_reporting(E_ERROR);
// Check if gzip is on and if user's browser can accept gzip pages
if($_GET['act']=="MkCaptcha"||$_GET['act']=="Captcha") {
$Settings['use_gzip'] = 'off'; }
if($Settings['use_gzip']=="on") {
-if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "gzip")) {
- $GZipEncode['Type'] = "gzip"; } else {
- if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "deflate")) {
- $GZipEncode['Type'] = "deflate"; } else {
- $Settings['use_gzip'] = "off"; $GZipEncode['Type'] = "none"; } } }
+if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "br")&&function_exists('brotli_compress')) {
+ $GZipEncode['Type'] = "brotli"; } else {
+ if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "gzip")) {
+ $GZipEncode['Type'] = "gzip"; } else {
+ if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "deflate")) {
+ $GZipEncode['Type'] = "deflate"; } else {
+ $Settings['use_gzip'] = "off"; $GZipEncode['Type'] = "none"; } } } }
+if($Settings['use_gzip']=="brotli"&&function_exists('brotli_compress')) {
+if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "br")) { $Settings['use_brotli'] = "on";
+ $GZipEncode['Type'] = "brotli"; } else { $Settings['use_gzip'] = "off"; } }
+if($Settings['use_gzip']=="brotli"&&!function_exists('brotli_compress')) { $GZipEncode['Type'] = "gzip"; }
if($Settings['use_gzip']=="gzip") {
if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "gzip")) { $Settings['use_gzip'] = "on";
$GZipEncode['Type'] = "gzip"; } else { $Settings['use_gzip'] = "off"; } }
'gc_probability' => 1,
'gc_divisor' => 100,
'gc_maxlifetime' => 1440,
- 'hash_function' => 1,
- 'hash_bits_per_character' => 6,
+ //'hash_function' => 1,
+ //'hash_bits_per_character' => 6,
'name' => $Settings['sqltable']."sess",
]); }
if(!isset($_SESSION['UserFormID'])) { $_SESSION['UserFormID'] = null; }
'gc_probability' => 1,
'gc_divisor' => 100,
'gc_maxlifetime' => 1440,
- 'hash_function' => 1,
- 'hash_bits_per_character' => 6,
+ //'hash_function' => 1,
+ //'hash_bits_per_character' => 6,
'name' => $Settings['sqltable']."sess",
]); }
if(!isset($_SESSION['UserFormID'])) { $_SESSION['UserFormID'] = null; }
"Forwarded: ".$_SERVER['REMOTE_ADDR']."\r\n".
"X-Real-IP: ".$_SERVER['REMOTE_ADDR']."\r\n".
"X-Forwarded-For: ".$_SERVER['REMOTE_ADDR']."\r\n".
+ "X-Forwarded-Host: ".$URLsTest['host']."\r\n".
+ "X-Forwarded-Proto: ".$URLsTest['scheme']."\r\n".
+ "Board-Unique-ID: ".$Settings['BoardUUID']."\r\n".
"Client-IP: ".$_SERVER['REMOTE_ADDR']."\r\n"
)
);
if(!isset($ThemeSet[$matches[1]])) { $return_text = null; }
return $return_text; }
foreach($ThemeSet AS $key => $value) {
+ if(isset($ThemeSet[$key])) {
$ThemeSet[$key] = preg_replace("/%%/s", "{percent}p", $ThemeSet[$key]);
$ThemeSet[$key] = preg_replace_callback("/%\{([^\}]*)\}T/s", "get_theme_values", $ThemeSet[$key]);
$ThemeSet[$key] = preg_replace_callback("/%\{([^\}]*)\}e/s", "get_env_values", $ThemeSet[$key]);
$ThemeSet[$key] = preg_replace_callback("/%\{([^\}]*)\}i/s", "get_server_values", $ThemeSet[$key]);
$ThemeSet[$key] = preg_replace_callback("/%\{([^\}]*)\}s/s", "get_setting_values", $ThemeSet[$key]);
$ThemeSet[$key] = preg_replace_callback("/%\{([^\}]*)\}t/s", "get_time", $ThemeSet[$key]);
- $ThemeSet[$key] = preg_replace("/\{percent\}p/s", "%", $ThemeSet[$key]); }
+ $ThemeSet[$key] = preg_replace("/\{percent\}p/s", "%", $ThemeSet[$key]); } }
if(!isset($ThemeSet['TableStyle'])) {
$ThemeSet['TableStyle'] = "table"; }
if(isset($ThemeSet['TableStyle'])) {