OSDN Git Service

Small update.
authorKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Thu, 21 Dec 2017 09:00:48 +0000 (03:00 -0600)
committerKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Thu, 21 Dec 2017 09:00:48 +0000 (03:00 -0600)
inc/navbar.php
install.php
setup/license.php
setup/mkconfig.php
setup/presetup.php
setup/setup.php
sql.php

index f914960..38c4cdb 100644 (file)
@@ -69,10 +69,10 @@ $NavBarCurDate = $NavBarCurMonth.$NavBarCurYear;
        if($GroupInfo['CanEditProfile']=="yes") { ?>
 <a href="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Profile</a><?php echo $ThemeSet['LineDivider']; } 
                if($GroupInfo['CanPM']=="yes") { ?>
-<a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=view&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>" title="<?php echo "You have ".$PMNumber." new messages."; ?>">MailBox</a><?php echo $ThemeSet['LineDivider']; ?><?php } } ?>
+<a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=view&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>" title="<?php echo "You have ".$PMNumber." new messages."; ?>">MailBox</a><?php echo $ThemeSet['LineDivider']; ?><?php } } if($File3Name!="install.php"&&$File3Name!="/install.php") { ?>
 <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Members</a><?php echo $ThemeSet['LineDivider']; ?>
 <a href="<?php echo url_maker($exfile['calendar'],$Settings['file_ext'],"act=view&caldate=".$NavBarCurDate,$Settings['qstr'],$Settings['qsep'],$prexqstr['calendar'],$exqstr['calendar']); ?>">Calendar</a><?php if(isset($Settings['weburl'])) { echo $ThemeSet['LineDivider']; ?>
-<a href="<?php echo $Settings['weburl']; ?>">Homepage</a><?php } ?>&nbsp;</span>
+<a href="<?php echo $Settings['weburl']; ?>">Homepage</a><?php } ?>&nbsp;</span>
 </td></tr>
 </table></div>
 <div class="DivNavBar">&nbsp;</div>
index 0cb3467..7fd4692 100644 (file)
@@ -149,6 +149,14 @@ if($_GET['act']=="README"||$_GET['act']=="ReadME") { $_GET['act']="readme"; }
 if($_GET['act']=="readme"||$_GET['act']=="ReadMe") {
 header("Content-Type: text/plain; charset=".$Settings['charset']);
 require("README"); fix_amp(null); die(); }
+if($_GET['act']=="LICENSE"||$_GET['act']=="License") { $_GET['act']="license"; }
+if($_GET['act']=="license"||$_GET['act']=="BSD") {
+header("Content-Type: text/plain; charset=".$Settings['charset']);
+require("LICENSE"); fix_amp(null); die(); }
+if($_GET['act']=="TOS"||$_GET['act']=="ToS") { $_GET['act']="tos"; }
+if($_GET['act']=="tos"||$_GET['act']=="terms") {
+header("Content-Type: text/plain; charset=".$Settings['charset']);
+require("TOS"); fix_amp(null); die(); }
 $Settings['board_name'] = "Installing ".$RName; 
 function get_theme_values($matches) {
        global $ThemeSet;
@@ -176,13 +184,13 @@ $Error = null; $_GET['time'] = false;
 <div class="Table1Border">
 <?php if($ThemeSet['TableStyle']=="div") { ?>
 <div class="TableRow1">
-<span style="font-weight: bold; text-align: left;"><?php echo $ThemeSet['TitleIcon']; ?><a href="Install.php">Install <?php echo $VerInfo['iDB_Ver_Show']; ?> </a></span>
+<span style="font-weight: bold; text-align: left;"><?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker("install",".php","act=Part1","&","=",null,null); ?>">Install <?php echo $VerInfo['iDB_Ver_Show']; ?> </a></span>
 </div>
 <?php } ?>
 <table class="Table1">
 <?php if($ThemeSet['TableStyle']=="table") { ?>
 <tr class="TableRow1">
-<td class="TableColumn1"><span style="font-weight: bold; text-align: left;"><?php echo $ThemeSet['TitleIcon']; ?><a href="Install.php">Install <?php echo $VerInfo['iDB_Ver_Show']; ?> </a></span>
+<td class="TableColumn1"><span style="font-weight: bold; text-align: left;"><?php echo $ThemeSet['TitleIcon']; ?><a href="<?php echo url_maker("install",".php","act=Part1","&","=",null,null); ?>">Install <?php echo $VerInfo['iDB_Ver_Show']; ?> </a></span>
 </td>
 </tr><?php } ?>
 <tr class="TableRow2">
@@ -231,13 +239,13 @@ if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
 if ($_GET['act']=="Part4"&&$_POST['act']=="Part4") {
    require($SetupDir['setup'].'mkconfig.php'); } } } }
 if ($Error=="Yes") { ?>
-<br />Install Failed with errors. <a href="install.php?act=view">Click here</a> to restart install. &lt;_&lt;
+<br />Install Failed with errors. <a href="<?php echo url_maker("install",".php","act=Part1","&","=",null,null); ?>">Click here</a> to restart install. &lt;_&lt;
 <br /><br />
 </td>
 </tr>
 <?php } ?>
 <tr class="TableRow4">
-<td class="TableColumn4">&nbsp;<a href="install.php?act=ReadMe">Readme.txt</a>&nbsp;</td>
+<td class="TableColumn4">&nbsp;<a href="<?php echo url_maker("install",".php","act=ReadMe","&","=",null,null); ?>">Readme.txt</a>&nbsp;|&nbsp;<a href="<?php echo url_maker("install",".php","act=License","&","=",null,null); ?>">License.txt</a>&nbsp;</td>
 </tr>
 </table></div>
 <div>&nbsp;</div>
index 514b918..78a97a3 100644 (file)
@@ -23,7 +23,7 @@ if(!isset($SetupDir['convert'])) { $SetupDir['convert'] = "setup/convert/"; }
 ?>
 <tr class="TableRow3">
 <td class="TableColumn3">
-<form style="display: inline;" method="post" id="install" action="install.php?act=Part2">
+<form style="display: inline;" method="post" id="install" action="<?php echo url_maker("install",".php","act=Part2","&","=",null,null); ?>">
 <table style="text-align: left;">
 <tr style="text-align: left;">
        <td style="width: 50%;"><label class="TextBoxLabel" for="LicenseBox">License - Please read fully and check 'I agree' box ONLY if you agree to license</label><br />
index 30f6641..1cb55ef 100644 (file)
@@ -77,7 +77,18 @@ header("Pragma: private, no-cache, no-store, must-revalidate, pre-check=0, post-
 header("Date: ".$utccurtime->format("D, d M Y H:i:s")." GMT");
 header("Last-Modified: ".$utccurtime->format("D, d M Y H:i:s")." GMT");
 header("Expires: ".$utccurtime->format("D, d M Y H:i:s")." GMT");
-session_start();
+if (version_compare(phpversion(), '7.0', '<')) { session_start(); } else {
+session_start([
+    'use_trans_sid' => false,
+    'use_cookies' => true,
+    'use_only_cookies' => true,
+    'gc_probability' => 1,
+    'gc_divisor' => 100,
+    'gc_maxlifetime' => 1440,
+    'hash_function' => 1,
+    'hash_bits_per_character' => 6,
+    'name' => $_POST['tableprefix']."sess",
+]); }
 //@register_shutdown_function("session_write_close");
 if (pre_strlen($_POST['AdminPasswords'])<"3") { $Error="Yes";
 echo "<br />Your password is too small."; }
index 762167d..bba9405 100644 (file)
@@ -30,7 +30,7 @@ if($Error!="Yes") {
 ?>
 <tr class="TableRow3">
 <td class="TableColumn3">
-<form style="display: inline;" method="post" id="install" action="install.php?act=Part3">
+<form style="display: inline;" method="post" id="install" action="<?php echo url_maker("install",".php","act=Part3","&","=",null,null); ?>">
 <table style="text-align: left;">
 <tr style="text-align: left;">
        <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseUserName">Insert Database User Name:</label></td>
index 0247045..b04b7ce 100644 (file)
@@ -133,7 +133,7 @@ for ($i=0; $i < count($timezone_identifiers); $i++) {
     }
 }
 ?>
-<form style="display: inline;" method="post" id="install" action="install.php?act=Part4">
+<form style="display: inline;" method="post" id="install" action="<?php echo url_maker("install",".php","act=Part4","&","=",null,null); ?>">
 <table style="text-align: left;">
 <tr style="text-align: left;">
        <td style="width: 50%;"><label class="TextBoxLabel" for="NewBoardName">Insert Board Name:</label></td>
diff --git a/sql.php b/sql.php
index f0960c7..216127b 100644 (file)
--- a/sql.php
+++ b/sql.php
@@ -79,7 +79,7 @@ if(!isset($Settings['showverinfo'])) {
        $Settings['showverinfo'] = "on"; }
 if(!isset($Settings['sqldb'])) {
 header("Content-Type: text/plain; charset=UTF-8");
-header('Location: install.php'); }
+header('Location: install.php?act=Part1'); }
 if(!isset($Settings['fixpathinfo'])) {
        $Settings['fixpathinfo'] = "off"; }
 if($Settings['fixpathinfo']=="off") {
@@ -133,7 +133,7 @@ if(!in_array("ini_set", $disfunc)) {
 @ini_set('default_charset', $Settings['charset']); }
 //session_save_path($SettDir['inc']."temp/");
 if(!isset($Settings['sqldb'])) { 
-if(file_exists("install.php")) { header('Location: install.php'); die(); } 
+if(file_exists("install.php")) { header('Location: install.php?act=Part1'); die(); } 
 if(!file_exists("install.php")) { header("Content-Type: text/plain; charset=UTF-8");
 echo "403 Error: Sorry could not find install.php\nTry uploading files again and if that dose not work try download iDB again."; die(); } }
 if(isset($Settings['sqldb'])) { 
@@ -453,7 +453,18 @@ if(!isset($_SESSION['CheckCookie'])) {
 if(isset($_COOKIE['SessPass'])&&isset($_COOKIE['MemberName'])) {
 session_set_save_handler("sql_session_open", "sql_session_close", "sql_session_read", "sql_session_write", "sql_session_destroy", "sql_session_gc");
 session_name($Settings['sqltable']."sess");
-session_start();
+if (version_compare(phpversion(), '7.0', '<')) { session_start(); } else {
+session_start([
+    'use_trans_sid' => false,
+    'use_cookies' => true,
+    'use_only_cookies' => true,
+    'gc_probability' => 1,
+    'gc_divisor' => 100,
+    'gc_maxlifetime' => 1440,
+    'hash_function' => 1,
+    'hash_bits_per_character' => 6,
+    'name' => $Settings['sqltable']."sess",
+]); }
 if(!isset($_SESSION['UserFormID'])) { $_SESSION['UserFormID'] = null; }
 $iDBSessCloseDB = false;
 $_SESSION['ShowActHidden'] = "no";
@@ -462,7 +473,18 @@ require($SettDir['inc'].'prelogin.php');
 session_write_close(); } }
 session_set_save_handler("sql_session_open", "sql_session_close", "sql_session_read", "sql_session_write", "sql_session_destroy", "sql_session_gc");
 session_name($Settings['sqltable']."sess");
-session_start();
+if (version_compare(phpversion(), '7.0', '<')) { session_start(); } else {
+session_start([
+    'use_trans_sid' => false,
+    'use_cookies' => true,
+    'use_only_cookies' => true,
+    'gc_probability' => 1,
+    'gc_divisor' => 100,
+    'gc_maxlifetime' => 1440,
+    'hash_function' => 1,
+    'hash_bits_per_character' => 6,
+    'name' => $Settings['sqltable']."sess",
+]); }
 if(!isset($_SESSION['UserFormID'])) { $_SESSION['UserFormID'] = null; }
 $iDBSessCloseDB = true;
 output_reset_rewrite_vars();