OSDN Git Service

Small bug fix to php notices and warnings.
authorKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Mon, 16 May 2016 13:03:10 +0000 (08:03 -0500)
committerKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Mon, 16 May 2016 13:03:10 +0000 (08:03 -0500)
inc/calendars.php
inc/endpage.php
inc/groupsetup.php
inc/html5.php
inc/misc/sql/mysqli.php
inc/misc/sql/sqlite.php
inc/versioninfo.php

index f0521c5..42c13e9 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2015 iDB Support - http://idb.berlios.de/
     Copyright 2004-2015 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: calendars.php - Last Update: 09/10/2015 SVN 803 - Author: cooldude2k $
+    $FileInfo: calendars.php - Last Update: 05/16/2016 SVN 806 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="calendars.php"||$File3Name=="/calendars.php") {
@@ -52,7 +52,7 @@ $backcalm = $_GET['calmadd'] - 1;
 $calmcount = abs($_GET['calmadd']);
 $getcurmonth = $usercurtime->format("m");
 $getcuryear = $usercurtime->format("y");
-$getcurtmsp = mktime(0, 0, 0, $getcmonth, 1, $getcyear);
+$getcurtmsp = mktime(0, 0, 0, $getcurmonth, 1, $getcuryear);
 $getnextmsp = mktime(0, 0, 0, ($getcurmonth + $nextcalm), 1, $getcuryear);
 $nexmonthnum = date("m", $getnextmsp);
 $nexyearnum = date("Y", $getnextmsp);
@@ -88,6 +88,7 @@ $calmounthaddd = $tmpcalmadd; }
 $MyRealMonthNum1 = $usercurtime->format("m");
 $MyRealYear = $usercurtime->format("Y");
 // Count the Days in this month
+if(!isset($calmounthaddd)) { $calmounthaddd = 0; }
 $MyTimeStamp = $utccurtime->getTimestamp() + $calmounthaddd;
 //$calcurtime->setTimestamp($defcurtime->getTimestamp()+$calmounthaddd);
 $calcurtime->setDate($_GET['calyear'], $_GET['calmonth'], 1);
index 30535cb..40b174a 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2015 iDB Support - http://idb.berlios.de/
     Copyright 2004-2015 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: endpage.php - Last Update: 08/18/2015 SVN 797 - Author: cooldude2k $
+    $FileInfo: endpage.php - Last Update: 05/16/2016 SVN 806 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="endpage.php"||$File3Name=="/endpage.php") {
@@ -22,6 +22,7 @@ if($_GET['time']=="show"||$_GET['time']==true) {
 $MyDST = $usercurtime->format("P");
 $MyTimeNow = $usercurtime->format($_SESSION['iDBTimeFormat']);
 $MyFullTimeNow = $usercurtime->format($_SESSION['iDBDateFormat'].", ".$_SESSION['iDBTimeFormat']);
+if(!isset($TimeSign)) { $TimeSign = ""; }
 $endpagevar=$endpagevar."<br />The time now is <span class=\"ctimenow\" title=\"".$MyFullTimeNow."\">".$MyTimeNow."</span> ".$ThemeSet['LineDivider']." All times are UTC ".$TimeSign." ".$MyDST; }
 function execution_time($starttime) {
 list($uetime, $etime) = explode(" ", microtime());
index 1583af7..220563c 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2015 iDB Support - http://idb.berlios.de/
     Copyright 2004-2015 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: groupsetup.php - Last Update: 08/18/2015 SVN 797 - Author: cooldude2k $
+    $FileInfo: groupsetup.php - Last Update: 05/16/2016 SVN 806 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="groupsetup.php"||$File3Name=="/groupsetup.php") {
@@ -120,6 +120,8 @@ $gidquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."groups\" WHE
 $gidresult=sql_query($gidquery,$SQLStat);
 $_SESSION['UserGroupID']=sql_result($gidresult,0,"id"); 
 sql_free_result($gidresult); }
+if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
+ $levnum = 0; }
 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
 $levquery = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."levels\" WHERE \"id\"=%i LIMIT 1", array($ChkUsrLevelID));
 $levresult=sql_query($levquery,$SQLStat);
@@ -360,7 +362,9 @@ header("Content-Type: text/plain; charset=".$Settings['charset']);
 sql_free_result($gruresult); sql_free_result($levresult); sql_free_result($mempreresult); $urlstatus = 503;
 ob_clean(); echo "Sorry could not load all group data in database.\nContact the board admin about error."; 
 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); } }
-sql_free_result($gruresult); sql_free_result($levresult);
+sql_free_result($gruresult);
+if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) {
+ sql_free_result($levresult); }
 if($GroupInfo['CanViewBoard']=="no") { 
 header("Content-Type: text/plain; charset=".$Settings['charset']); 
 ob_clean(); echo "Sorry you can not view the board."; $urlstatus = 503;
index 0233591..571c28e 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2015 iDB Support - http://idb.berlios.de/
     Copyright 2004-2015 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: html5.php - Last Update: 08/19/2015 SVN 801 - Author: cooldude2k $
+    $FileInfo: html5.php - Last Update: 05/16/2016 SVN 806 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="xhtml10.php"||$File3Name=="/xhtml10.php") {
@@ -90,9 +90,9 @@ if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {
        if($Settings['qstr']=="/") { 
        $AltBoardURL = preg_replace("/\/$/","",$BoardURL); } }
 // Get the html level
-if($Settings['html_level']!="Strict") {
+/*if($Settings['html_level']!="Strict") {
        if($Settings['html_level']!="Transitional") {
-               $Settings['html_level'] = "Transitional"; } }
+               $Settings['html_level'] = "Transitional"; } }*/
 // HTML Document Starts
 ob_start("idb_suboutput_handler");
 if($XHTML5===false) { ?>
index c4c9512..211939a 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2015 iDB Support - http://idb.berlios.de/
     Copyright 2004-2015 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: mysqli.php - Last Update: 08/18/2015 SVN 797 - Author: cooldude2k $
+    $FileInfo: mysqli.php - Last Update: 05/16/2016 SVN 806 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="mysqli.php"||$File3Name=="/mysqli.php") {
@@ -98,6 +98,7 @@ if ($check===false) {
     output_error("SQL Error: ".sql_error(),E_USER_ERROR);
        return false; }
 $trow = mysqli_fetch_array($result);
+if(!isset($trow[$field])) { $trow[$field] = null; }
 $retval = $trow[$field]; 
 return $retval; }
 // Free Results :P
index 2b698d4..e50fe46 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2015 iDB Support - http://idb.berlios.de/
     Copyright 2004-2015 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: sqlite.php - Last Update: 08/18/2015 SVN 797 - Author: cooldude2k $
+    $FileInfo: sqlite.php - Last Update: 05/16/2016 SVN 806 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="sqlite.php"||$File3Name=="/sqlite.php") {
@@ -86,6 +86,7 @@ if ($check===false) {
     output_error("SQL Error: ".sql_error(),E_USER_ERROR);
        return false; }
 $trow = sqlite_fetch_array($result);
+if(!isset($trow[$field])) { $trow[$field] = null; }
 $retval = $trow[$field]; 
 return $retval; }
 // Free Results :P
index e1778d8..2cc920b 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2015 iDB Support - http://idb.berlios.de/
     Copyright 2004-2015 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: versioninfo.php - Last Update: 05/02/2016 SVN 805 - Author: cooldude2k $
+    $FileInfo: versioninfo.php - Last Update: 05/16/2016 SVN 806 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") {
@@ -27,8 +27,8 @@ function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
        return $return_var; }
 // Version number and date stuff. :P
 $VER1[0] = 0; $VER1[1] = 4; $VER1[2] = 8; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
-$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 805;
-$SVNDay[0] = 5; $SVNDay[1] = 2; $SVNDay[2] = 2016; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
+$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 806;
+$SVNDay[0] = 5; $SVNDay[1] = 16; $SVNDay[2] = 2016; $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 = "DF2k Team";
 $VerCheckName = "iDB"; $AltVerCheckName = "DF2k"; $AltiDBHome = "http://df2k.gamemaker2k.org/";