Skip to content

Commit

Permalink
Small update.
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski committed Jun 17, 2023
1 parent 6d8e3f9 commit 31ecdd4
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 10 deletions.
3 changes: 3 additions & 0 deletions inc/admin/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,9 @@ function add_prefix($tarray) {
$Settings['idb_date_format'] = $_POST['iDBDateFormat'];
$Settings['log_http_request'] = $_POST['iDBHTTPLogger'];
$Settings['log_config_format'] = $_POST['iDBLoggerFormat'];
if($_POST['HTMLType']=="html4") { $_POST['OutPutType'] = "html"; }
if($_POST['HTMLType']=="xhtml10") { $_POST['OutPutType'] = "xhtml"; }
if($_POST['HTMLType']=="xhtml11") { $_POST['OutPutType'] = "xhtml"; }
if($_POST['HTMLType']=="html5") { $_POST['OutPutType'] = "html"; }
if($_POST['HTMLType']=="xhtml5") { $_POST['OutPutType'] = "xhtml"; }
if(!isset($_POST['PassHashType'])) {
Expand Down
4 changes: 4 additions & 0 deletions inc/calendars.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
$calcurtime = new DateTime();
$calcurtime->setTimestamp($defcurtime->getTimestamp());
$calcurtime->setTimezone($usertz);
if(!isset($_GET['caldate'])&&(!isset($_GET['calmonth']) && !isset($_GET['calyear']))) {
$_GET['caldate'] = $calcurtime->format("mY"); }
if(isset($_GET['caldate'])&&!is_numeric($_GET['caldate'])) {
$_GET['caldate'] = $calcurtime->format("mY"); }
if(!isset($_GET['HighligtDay'])) { $_GET['HighligtDay'] = null; }
if(!isset($_GET['calmadd'])) { $_GET['calmadd'] = 0; }
if(!is_numeric($_GET['calmadd'])) { $_GET['calmadd'] = 0; }
Expand Down
17 changes: 13 additions & 4 deletions inc/misc/setcheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,18 @@
if(!isset($_GET['post'])) { $_GET['post'] = null; }
if(!isset($_POST['License'])) { $_POST['License'] = null; }
if(!isset($Settings['enable_https'])) {
if(isset($_SERVER['HTTPS'])) {
if(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=="on") {
$Settings['enable_https'] = "on"; }
else(!isset($_SERVER['HTTPS'])) {
elseif(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=="off") {
$Settings['enable_https'] = "off"; }
elseif(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']!="on"&&$_SERVER['HTTPS']!="off") {
$Settings['enable_https'] = "on"; }
elseif(!isset($_SERVER['HTTPS'])) {
$Settings['enable_https'] = "off"; } }
if($Settings['enable_https']!="on"&&
$ServHTTPS = $Settings['enable_https'];
/*if($Settings['enable_https']!="on"&&
$Settings['enable_https']!="off") {
$Settings['enable_https'] = "off"; }
$Settings['enable_https'] = "off"; }*/
if(!isset($Settings['file_ext'])||
$Settings['file_ext']==null) {
$Settings['file_ext'] = ".php"; }
Expand All @@ -169,6 +174,10 @@
if($Settings['ValidateGroup']==null&&
$Settings['AdminValidate']=="on") {
$Settings['ValidateGroup'] = "Validate"; }
if($Settings['html_type']=="xhtml10") {
$Settings['html_type'] = "xhtml5"; }
if($Settings['html_type']=="xhtml11") {
$Settings['html_type'] = "xhtml5"; }
if($Settings['html_type']=="html4") {
$Settings['html_type'] = "html5"; }
/*if($_GET['debug']!="off"||$_GET['debug']=="on") {
Expand Down
4 changes: 2 additions & 2 deletions inc/versioninfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Copyright 2004-2023 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
Copyright 2004-2023 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
$FileInfo: versioninfo.php - Last Update: 6/17/2023 SVN 977 - Author: cooldude2k $
$FileInfo: versioninfo.php - Last Update: 6/17/2023 SVN 978 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") {
Expand All @@ -27,7 +27,7 @@ function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
return $return_var; }
// Version number and date stuff. :P
$VER1[0] = 0; $VER1[1] = 5; $VER1[2] = 9; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 975; $GitRevN = '$Id$';
$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 978; $GitRevN = '$Id$';
$SVNDay[0] = 4; $SVNDay[1] = 17; $SVNDay[2] = 2022; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
$AltName = "DF2k"; $AltName2 = "DF2k"; $RName = "iDB"; $SFName = "IntDB";
$RFullName = "Internet Discussion Boards"; $AltFullName = "Discussion Forums 2k"; $AltGM2k = "Game Maker 2k";
Expand Down
7 changes: 5 additions & 2 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,12 @@ function idb_output_handler($buffer) { return $buffer; }
$SQLCharset = "utf8"; }
$Settings['charset'] = $_POST['charset']; }
$ServHTTPS = "off";
if(isset($_SERVER['HTTPS'])) { $ServHTTPS=="off"; }
if(isset($_SERVER['HTTPS'])) { $ServHTTPS=="on"; }
if(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=="on") { $ServHTTPS=="on"; }
if(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=="off") { $ServHTTPS=="off"; }
if(!isset($_SERVER['HTTPS'])) { $ServHTTPS=="off"; }
if($ServHTTPS=="on") { $prehost = "https://"; }
if($ServHTTPS!="on") { $prehost = "http://"; }
if($ServHTTPS=="off") { $prehost = "http://"; }
$this_dir = null;
if(dirname($_SERVER['SCRIPT_NAME'])!="."||
dirname($_SERVER['SCRIPT_NAME'])!=null) {
Expand Down
6 changes: 4 additions & 2 deletions setup/html5.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@
header("Content-Language: en");
header("Vary: Accept-Encoding");
// Check if we are on a secure HTTP connection
if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
if(isset($_SERVER['HTTPS'])) { $prehost = "https://";; }
if(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=="on") { $prehost = "https://"; }
if(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=="off") { $prehost = "http://"; }
if(!isset($_SERVER['HTTPS'])) { $prehost = "http://"; }
// Get the board's url
if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {
$BoardURL = $prehost.$_SERVER["HTTP_HOST"].$basedir; }
Expand Down
3 changes: 3 additions & 0 deletions setup/mkconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ function unparse_url($parsed_url) {
echo "<br />Your user name is too big."; }
if ($_POST['AdminPasswords']!=$_POST['ReaPassword']) { $Error="Yes";
echo "<br />Your passwords did not match."; }
if($_POST['HTMLType']=="html4") { $_POST['OutPutType'] = "html"; }
if($_POST['HTMLType']=="xhtml10") { $_POST['OutPutType'] = "xhtml"; }
if($_POST['HTMLType']=="xhtml11") { $_POST['OutPutType'] = "xhtml"; }
if($_POST['HTMLType']=="html5") { $_POST['OutPutType'] = "html"; }
if($_POST['HTMLType']=="xhtml5") { $_POST['OutPutType'] = "xhtml"; }
$_POST['BoardURL'] = htmlentities($_POST['BoardURL'], ENT_QUOTES, $Settings['charset']);
Expand Down
10 changes: 10 additions & 0 deletions setup/preinstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@
if(!isset($Settings['qstr'])) { $Settings['qstr'] = null; }
if(!isset($_POST['SetupType'])) { $_POST['SetupType'] = "install"; }
if(!isset($_GET['debug'])) { $_GET['debug'] = null; }
if(!isset($Settings['enable_https'])) {
if(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=="on") {
$Settings['enable_https'] = "on"; }
elseif(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=="off") {
$Settings['enable_https'] = "off"; }
elseif(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']!="on"&&$_SERVER['HTTPS']!="off") {
$Settings['enable_https'] = "on"; }
elseif(!isset($_SERVER['HTTPS'])) {
$Settings['enable_https'] = "off"; } }
$ServHTTPS = $Settings['enable_https'];
$checklowview = false;
$dayconv = array("year" => 29030400, "month" => 2419200, "week" => 604800, "day" => 86400, "hour" => 3600, "minute" => 60, "second" => 1);
if(!isset($SettDir['inc'])) { $SettDir['inc'] = "inc/"; }
Expand Down

0 comments on commit 31ecdd4

Please sign in to comment.