OSDN Git Service

Add files via upload
authorKazuki Suzuki Przyborowski <kazuki.przyborowski@gmail.com>
Wed, 12 Sep 2018 23:40:08 +0000 (18:40 -0500)
committerGitHub <noreply@github.com>
Wed, 12 Sep 2018 23:40:08 +0000 (18:40 -0500)
inc/admin/forums.php
inc/html5.php
inc/members.php
inc/profilemain.php
inc/versioninfo.php
setup/html5.php
setup/presetup.php
setup/setup.php

index 06e2a2f..367887a 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2017 iDB Support - http://idb.berlios.de/
     Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: forums.php - Last Update: 01/26/2017 SVN 810 - Author: cooldude2k $
+    $FileInfo: forums.php - Last Update: 09/12/2018 SVN 871 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="forums.php"||$File3Name=="/forums.php") {
@@ -343,7 +343,7 @@ sql_free_result($cr); ?>
        </select></td>
 </tr><tr style="text-align: left;">
        <td style="width: 50%;"><label class="TextBoxLabel" for="RedirectURL">Insert Redirect URL for redirect forum:</label></td>
-       <td style="width: 50%;"><input type="url" name="RedirectURL" class="TextBox" id="RedirectURL" size="20" value="http://" /></td>
+       <td style="width: 50%;"><input type="url" name="RedirectURL" class="TextBox" id="RedirectURL" size="20" value="" /></td>
 </tr><tr style="text-align: left;">
        <td style="width: 50%;"><label class="TextBoxLabel" for="InSubForum">In SubForum:</label></td>
        <td style="width: 50%;"><select size="1" class="TextBox" name="InSubForum" id="InSubForum">
@@ -422,6 +422,7 @@ sql_free_result($fr); ?>
 </table>
 </div>
 <?php } if($_POST['act']=="addforum"&&$_POST['update']=="now"&&$_GET['act']=="addforum") {
+if($_POST['RedirectURL']=="") { $_POST['RedirectURL'] = "http://"; }
 $_POST['ForumName'] = stripcslashes(htmlspecialchars($_POST['ForumName'], ENT_QUOTES, $Settings['charset']));
 //$_POST['ForumName'] = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['ForumName']);
 $_POST['ForumName'] = remove_spaces($_POST['ForumName']);
@@ -724,6 +725,7 @@ $ShowForum=sql_result($preresult,0,"ShowForum");
 $ForumType=sql_result($preresult,0,"ForumType");
 $InSubForum=sql_result($preresult,0,"InSubForum");
 $RedirectURL=sql_result($preresult,0,"RedirectURL");
+if($RedirectURL=="http://") { $RedirectURL = ""; }
 $RedirectTimes=sql_result($preresult,0,"Redirects");
 $NumberViews=sql_result($preresult,0,"NumViews");
 $ForumDescription=sql_result($preresult,0,"Description");
@@ -871,6 +873,7 @@ sql_free_result($fr); ?>
 </div>
 <?php } } } if($_POST['act']=="editforum"&&$_POST['update']=="now"&&$_GET['act']=="editforum"&&
        isset($_POST['id'])) {
+if($_POST['RedirectURL']=="") { $_POST['RedirectURL'] = "http://"; }
 $_POST['ForumName'] = stripcslashes(htmlspecialchars($_POST['ForumName'], ENT_QUOTES, $Settings['charset']));
 //$_POST['ForumName'] = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['ForumName']);
 $_POST['ForumName'] = remove_spaces($_POST['ForumName']);
index 255ad77..9061d0f 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2017 iDB Support - http://idb.berlios.de/
     Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: html5.php - Last Update: 01/26/2017 SVN 810 - Author: cooldude2k $
+    $FileInfo: html5.php - Last Update: 09/12/2018 SVN 871 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="html5.php"||$File3Name=="/html5.php") {
@@ -214,6 +214,10 @@ ob_start("idb_suboutput_handler"); ?>
 <?php } $iWrappers['METATAGS'] = ob_get_clean(); 
 ob_start("idb_suboutput_handler"); ?>
 <script type="text/javascript" src="<?php echo url_maker($exfilejs['javascript'],$Settings['js_ext'],null,$Settings['qstr'],$Settings['qsep'],$prexqstrjs['javascript'],$exqstrjs['javascript']); ?>"></script>
+<script type="text/javascript">
+ var tzname=Intl.DateTimeFormat().resolvedOptions().timeZone;
+ document.cookie = "getusertz="+tzname;
+</script>
 <?php echo "\n"; $iWrappers['JAVASCRIPT'] = ob_get_clean(); 
 ob_start("idb_suboutput_handler"); ?>
 <link rel="Start" href="<?php echo $AltBoardURL.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>" title="<?php echo $Settings['board_name'].$idbpowertitle; ?>" />
index 9b6d581..0f4439a 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2017 iDB Support - http://idb.berlios.de/
     Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: members.php - Last Update: 09/12/2018 SVN 869 - Author: cooldude2k $
+    $FileInfo: members.php - Last Update: 09/12/2018 SVN 871 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="members.php"||$File3Name=="/members.php") {
@@ -1310,6 +1310,9 @@ $_SESSION['ViewingTitle'] = "Signing up";
 $_SESSION['ExtraData'] = "currentact:".$_GET['act']."; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;";
 $UFID = rand_uuid("rand");
 $_SESSION['UserFormID'] = $UFID;
+$gettzinfofromjs = $Settings['DefaultTimeZone'];
+if(isset($_COOKIE['getusertz']) && in_array($_COOKIE['getusertz'], DateTimeZone::listIdentifiers())) {
+   $gettzinfofromjs = $_COOKIE['getusertz']; }
 // http://www.tutorialspoint.com/php/php_function_timezone_identifiers_list.htm
 $timezone_identifiers = DateTimeZone::listIdentifiers();
 //$timezone_identifiers = timezone_identifiers_list();
@@ -1427,7 +1430,7 @@ for ($i=0; $i < count($timezone_identifiers); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['africa']); $i++) {
-    if($Settings['DefaultTimeZone']==$zonelist['africa'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['africa'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['africa'][$i][1]."\">".str_replace("_", " ", $zonelist['africa'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -1436,7 +1439,7 @@ for ($i=0; $i < count($zonelist['africa']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['america']); $i++) {
-    if($Settings['DefaultTimeZone']==$zonelist['america'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['america'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['america'][$i][1]."\">".str_replace("_", " ", $zonelist['america'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -1445,7 +1448,7 @@ for ($i=0; $i < count($zonelist['america']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['antarctica']); $i++) {
-    if($Settings['DefaultTimeZone']==$zonelist['antarctica'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['antarctica'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['antarctica'][$i][1]."\">".str_replace("_", " ", $zonelist['antarctica'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -1454,7 +1457,7 @@ for ($i=0; $i < count($zonelist['antarctica']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['arctic']); $i++) {
-    if($Settings['DefaultTimeZone']==$zonelist['arctic'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['arctic'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['arctic'][$i][1]."\">".str_replace("_", " ", $zonelist['arctic'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -1462,7 +1465,7 @@ for ($i=0; $i < count($zonelist['arctic']); $i++) {
 <optgroup label="Asia">
 <?php
 for ($i=0; $i < count($zonelist['asia']); $i++) {
-    if($Settings['DefaultTimeZone']==$zonelist['asia'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['asia'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['asia'][$i][1]."\">".str_replace("_", " ", $zonelist['asia'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -1471,7 +1474,7 @@ for ($i=0; $i < count($zonelist['asia']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['atlantic']); $i++) {
-    if($Settings['DefaultTimeZone']==$zonelist['atlantic'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['atlantic'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['atlantic'][$i][1]."\">".str_replace("_", " ", $zonelist['atlantic'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -1480,7 +1483,7 @@ for ($i=0; $i < count($zonelist['atlantic']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['australia']); $i++) {
-    if($Settings['DefaultTimeZone']==$zonelist['australia'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['australia'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['australia'][$i][1]."\">".str_replace("_", " ", $zonelist['australia'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -1489,7 +1492,7 @@ for ($i=0; $i < count($zonelist['australia']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['europe']); $i++) {
-    if($Settings['DefaultTimeZone']==$zonelist['europe'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['europe'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['europe'][$i][1]."\">".str_replace("_", " ", $zonelist['europe'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -1498,7 +1501,7 @@ for ($i=0; $i < count($zonelist['europe']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['indian']); $i++) {
-    if($Settings['DefaultTimeZone']==$zonelist['indian'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['indian'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['indian'][$i][1]."\">".str_replace("_", " ", $zonelist['indian'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -1507,7 +1510,7 @@ for ($i=0; $i < count($zonelist['indian']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['pacific']); $i++) {
-    if($Settings['DefaultTimeZone']==$zonelist['pacific'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['pacific'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['pacific'][$i][1]."\">".str_replace("_", " ", $zonelist['pacific'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -1516,7 +1519,7 @@ for ($i=0; $i < count($zonelist['pacific']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['etcetera']); $i++) {
-    if($Settings['DefaultTimeZone']==$zonelist['etcetera'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['etcetera'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['etcetera'][$i][1]."\">".str_replace("_", " ", $zonelist['etcetera'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -1531,10 +1534,10 @@ for ($i=0; $i < count($zonelist['etcetera']); $i++) {
 </select></td>
 </tr><tr>
        <td style="width: 30%;"><label class="TextBoxLabel" for="Website">Insert your Website:</label></td>
-       <td style="width: 70%;"><input type="url" class="TextBox" name="Website" size="20" value="http://" id="Website" /></td>
+       <td style="width: 70%;"><input type="url" class="TextBox" name="Website" size="20" value="" id="Website" /></td>
 </tr><tr>
        <td style="width: 30%;"><label class="TextBoxLabel" for="Avatar">Insert a URL for Avatar:</label></td>
-       <td style="width: 70%;"><input type="url" class="TextBox" name="Avatar" size="20" value="http://" id="Avatar" /></td>
+       <td style="width: 70%;"><input type="url" class="TextBox" name="Avatar" size="20" value="" id="Avatar" /></td>
 </tr><tr>
        <td style="width: 30%;"><label class="TextBoxLabel" title="Store userinfo as a cookie so you dont need to login again." for="storecookie">Store as cookie?</label></td>
        <td style="width: 70%;"><select id="storecookie" name="storecookie" class="TextBox">
@@ -1636,7 +1639,10 @@ require($SettDir['inc']."captcha.php"); }
 <tr class="TableRow3">
 <td class="TableColumn3">
 <table style="width: 100%; height: 25%; text-align: center;">
-<?php if (pre_strlen($_POST['Password'])>"60") { $Error="Yes";  ?>
+<?php if (pre_strlen($_POST['Password'])>"60") { $Error="Yes";  
+if($_POST['Website']=="") { $_POST['Website'] = "http://"; }
+if($_POST['Avatar']=="") { $_POST['Avatar'] = "http://"; }
+?>
 <tr>
        <td><span class="TableMessage">
        <br />Your password is too big.<br />
index 7f03a0e..699b505 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2017 iDB Support - http://idb.berlios.de/
     Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: profilemain.php - Last Update: 09/12/2018 SVN 869 - Author: cooldude2k $
+    $FileInfo: profilemain.php - Last Update: 09/12/2018 SVN 871 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="profilemain.php"||$File3Name=="/profilemain.php") {
@@ -311,6 +311,7 @@ if ($Pre1Avatar=="http://"||$Pre1Avatar==null||
        strtolower($Pre1Avatar)=="noavatar") {
 $Pre1Avatar=$ThemeSet['NoAvatar'];
 $User1AvatarSize=$ThemeSet['NoAvatarSize']; }
+if($User1Avatar=="http://") { $User1Avatar = ""; }
 $AvatarSize1=explode("x", $User1AvatarSize);
 $AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
 ?>
@@ -377,6 +378,7 @@ $AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
 if($_POST['update']=="now") {
 if($_POST['Avatar']!=null&&$_POST['AvatarSizeW']!=null&&$_POST['AvatarSizeH']!=null&&
        $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
+    if($_POST['Avatar']=="") { $_POST['Avatar'] = "http://"; }
        if (!filter_var($_POST['Avatar'], FILTER_VALIDATE_URL)&&($_POST['Avatar']!="http://"||$_POST['Avatar']!="https://")) { $Error="Yes";  ?>
 <div class="TableMessage" style="text-align: center;">Your avatar url is not a valid web url.<br />&nbsp;</div>
        <?php }
@@ -718,6 +720,7 @@ $User1Interests=sql_result($result,$i,"Interests");
 $User1Title=sql_result($result,$i,"Title");
 $User1Website=sql_result($result,$i,"Website"); 
 $User1Website = urlcheck($User1Website);
+if($User1Website=="http://") { $User1Website = ""; }
 $User1Gender=sql_result($result,$i,"Gender");
 $User1TimeZone=sql_result($result,$i,"TimeZone");
 $User1DateFormat=sql_result($result,$i,"DateFormat");
@@ -1019,6 +1022,7 @@ if($_POST['act']=="profile"&&
        $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
        if(preg_match("/([0-9]{4})\-([0-9]{2})\-([0-9]{2})/", $_POST['EventDay'])) { $_POST['EventDay'] = preg_replace("/([0-9]{4})\-([0-9]{2})\-([0-9]{2})/", "$2/$3/$1", $_POST['EventDay']); }
        $Error = "No";
+    if($_POST['Website']=="") { $_POST['Website'] = "http://"; }
        if (!filter_var($_POST['Website'], FILTER_VALIDATE_URL)&&($_POST['Website']!="http://"||$_POST['Website']!="https://")) { $Error="Yes";  ?>
 <div class="TableMessage" style="text-align: center;">Your website url is not a valid web url.<br />&nbsp;</div>
        <?php }
index df3c5bb..2c47bc6 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2017 iDB Support - http://idb.berlios.de/
     Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: versioninfo.php - Last Update: 09/12/2018 SVN 870 - Author: cooldude2k $
+    $FileInfo: versioninfo.php - Last Update: 09/12/2018 SVN 871 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") {
@@ -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] = 4; $VER1[2] = 9; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
-$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 870;
+$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 871;
 $SVNDay[0] = 9; $SVNDay[1] = 12; $SVNDay[2] = 2018; $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";
index 248ce55..255dd09 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2017 iDB Support - http://idb.berlios.de/
     Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: html5.php - Last Update: 01/26/2017 SVN 810 - Author: cooldude2k $
+    $FileInfo: html5.php - Last Update: 09/12/2018 SVN 871 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="xhtml10.php"||$File3Name=="/xhtml10.php") {
@@ -211,6 +211,10 @@ if(strpos($_SERVER['HTTP_USER_AGENT'], "msie") &&
 <?php } echo "\n"; ?>
 
 <script type="text/javascript" src="<?php echo url_maker($exfilejs['javascript'],$Settings['js_ext'],null,$Settings['qstr'],$Settings['qsep'],$prexqstrjs['javascript'],$exqstrjs['javascript']); ?>"></script>
+<script type="text/javascript">
+ var tzname=Intl.DateTimeFormat().resolvedOptions().timeZone;
+ document.cookie = "getusertz="+tzname;
+</script>
 <?php echo "\n";
 if($ThemeSet['CSSType']=="import") { ?>
 <style type="text/css">
index bba9405..d19150c 100644 (file)
@@ -12,7 +12,7 @@
     Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
     iDB Installer made by Game Maker 2k - http://idb.berlios.net/
 
-    $FileInfo: presetup.php - Last Update: 01/26/2017 SVN 810 - Author: cooldude2k $
+    $FileInfo: presetup.php - Last Update: 09/12/2018 SVN 871 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="presetup.php"||$File3Name=="/presetup.php") {
index 042bb21..fa88952 100644 (file)
@@ -12,7 +12,7 @@
     Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
     iDB Installer made by Game Maker 2k - http://idb.berlios.net/
 
-    $FileInfo: setup.php - Last Update: 09/12/2018 SVN 869 - Author: cooldude2k $
+    $FileInfo: setup.php - Last Update: 09/12/2018 SVN 871 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="setup.php"||$File3Name=="/setup.php") {
@@ -68,6 +68,9 @@ fclose($fp);
 $fp = fopen("./settingsbak.php","w+");
 fwrite($fp, $BoardSettings);
 fclose($fp);
+$gettzinfofromjs = date_default_timezone_get();
+if(isset($_COOKIE['getusertz']) && in_array($_COOKIE['getusertz'], DateTimeZone::listIdentifiers())) {
+   $gettzinfofromjs = $_COOKIE['getusertz']; }
 // http://www.tutorialspoint.com/php/php_function_timezone_identifiers_list.htm
 $timezone_identifiers = DateTimeZone::listIdentifiers();
 //$timezone_identifiers = timezone_identifiers_list();
@@ -279,7 +282,7 @@ if(!function_exists('hash')&&!function_exists('hash_algos')) { ?>
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['africa']); $i++) {
-    if(date_default_timezone_get()==$zonelist['africa'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['africa'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['africa'][$i][1]."\">".str_replace("_", " ", $zonelist['africa'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -288,7 +291,7 @@ for ($i=0; $i < count($zonelist['africa']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['america']); $i++) {
-    if(date_default_timezone_get()==$zonelist['america'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['america'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['america'][$i][1]."\">".str_replace("_", " ", $zonelist['america'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -297,7 +300,7 @@ for ($i=0; $i < count($zonelist['america']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['antarctica']); $i++) {
-    if(date_default_timezone_get()==$zonelist['antarctica'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['antarctica'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['antarctica'][$i][1]."\">".str_replace("_", " ", $zonelist['antarctica'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -306,7 +309,7 @@ for ($i=0; $i < count($zonelist['antarctica']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['arctic']); $i++) {
-    if(date_default_timezone_get()==$zonelist['arctic'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['arctic'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['arctic'][$i][1]."\">".str_replace("_", " ", $zonelist['arctic'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -314,7 +317,7 @@ for ($i=0; $i < count($zonelist['arctic']); $i++) {
 <optgroup label="Asia">
 <?php
 for ($i=0; $i < count($zonelist['asia']); $i++) {
-    if(date_default_timezone_get()==$zonelist['asia'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['asia'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['asia'][$i][1]."\">".str_replace("_", " ", $zonelist['asia'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -323,7 +326,7 @@ for ($i=0; $i < count($zonelist['asia']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['atlantic']); $i++) {
-    if(date_default_timezone_get()==$zonelist['atlantic'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['atlantic'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['atlantic'][$i][1]."\">".str_replace("_", " ", $zonelist['atlantic'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -332,7 +335,7 @@ for ($i=0; $i < count($zonelist['atlantic']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['australia']); $i++) {
-    if(date_default_timezone_get()==$zonelist['australia'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['australia'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['australia'][$i][1]."\">".str_replace("_", " ", $zonelist['australia'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -341,7 +344,7 @@ for ($i=0; $i < count($zonelist['australia']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['europe']); $i++) {
-    if(date_default_timezone_get()==$zonelist['europe'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['europe'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['europe'][$i][1]."\">".str_replace("_", " ", $zonelist['europe'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -350,7 +353,7 @@ for ($i=0; $i < count($zonelist['europe']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['indian']); $i++) {
-    if(date_default_timezone_get()==$zonelist['indian'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['indian'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['indian'][$i][1]."\">".str_replace("_", " ", $zonelist['indian'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -359,7 +362,7 @@ for ($i=0; $i < count($zonelist['indian']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['pacific']); $i++) {
-    if(date_default_timezone_get()==$zonelist['pacific'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['pacific'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['pacific'][$i][1]."\">".str_replace("_", " ", $zonelist['pacific'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>
@@ -368,7 +371,7 @@ for ($i=0; $i < count($zonelist['pacific']); $i++) {
 <?php
 $optsel="";
 for ($i=0; $i < count($zonelist['etcetera']); $i++) {
-    if(date_default_timezone_get()==$zonelist['etcetera'][$i][1]) { $optsel = " selected=\"selected\""; }
+    if($gettzinfofromjs==$zonelist['etcetera'][$i][1]) { $optsel = " selected=\"selected\""; }
     echo "<option".$optsel." value=\"".$zonelist['etcetera'][$i][1]."\">".str_replace("_", " ", $zonelist['etcetera'][$i][0])."</option>\n"; 
     $optsel=""; }
 ?>