Wikipedia List Webpage Containing Latitude and Longitude Makeover



" . $errmsg . "



Wiki" . "pedia 'List of' Concept 'of/in/on' Country webpage URL:    0) { location.href=document.URL.split('#')[0].split('?')[0] + '?wikipediaurl=' + encodeURIComponent(ov); } \" type='button' value='Makeover'>
"; } function capsall($inid) { $retvs=explode(" ",str_replace("_"," ",$inid)); $sofar=strtoupper(substr($retvs[0],0,1)) . strtolower(substr($retvs[0],1)); for ($ii=1; $ii= 5 && sizeof(explode("_of_",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))) >= 3 && strpos(strtolower($getwikiurl), "list_o" . "f_") !== false && strpos(strtolower($getwikiurl), "wikip" . "edia.org") !== false) { $wcont=@file_get_contents($getwikiurl); if (strpos($wcont,"E",str_replace("<" . explode("<" . "?" . "php", substr($extratempcont,1))[0], "", $extratempcont))[0] . "?" . ">\n"; $ucountry=explode("_of_",explode("?",explode("#",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))[0])[0])[-1 + sizeof(explode("_of_",explode("?",explode("#",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))[0])[0]))]; $uspcountry=capsall($ucountry); $uconcept=strtoupper(substr(explode("_",explode("_of_",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))[1])[0],0,1)) . substr(explode("_",explode("_of_",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))[1])[0],1); $uspconcept=capsall($uconcept); //echo str_replace("&","&",str_replace("\n","
",str_replace("<","<",str_replace(">",">",$tempcont)))); //exit; $ynft="display:BLOCK;"; if (strpos(strtolower($ucountry), "australia") !== false) $ynft="youl" . "lnev" . "erfin" . "dthis"; file_put_contents("this_wiki.php", str_replace("Wate" . "rfalls",$uspconcept, str_replace($ynft,"display:NONE;", str_replace('"Aust' . 'ralia"','"' . $uspcountry . '"', str_replace("_waterf" . "alls.php",strtolower("_" . $uconcept) . ".php", str_replace("austr" . "alia_water" . "falls.php",strtolower($ucountry . "_" . $uconcept) . ".php", str_replace("Aust" . "ralia Water" . "falls",$uspcountry . " " . $uspconcept, str_replace("aust" . "ralia_water" . "falls.php",strtolower($ucountry . "_" . $uconcept) . ".php", str_replace("https://en.wik" . "ipedia.o" . "rg/wiki/List_of_w" . "aterfalls_of_Au" . "stralia",$getwikiurl, $tempcont))))))))); header("Location: ./this_wiki.php?rand=" . rand()); exit; } else if (strpos($wcont,"' E<") !== false || strpos($wcont,"' W<") !== false) { $delim="/"; if (strpos(dirname(__FILE__), $delim) === false) $delim=substr("\\",0.1); $extratempcont=file_get_contents(dirname(__FILE__) . $delim . "template_wiki.php"); $tempcont=explode("?" . ">",str_replace("<" . explode("<" . "?" . "php", substr($extratempcont,1))[0], "", $extratempcont))[1] . "?" . ">\n"; $ucountry=explode("_of_",explode("?",explode("#",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))[0])[0])[-1 + sizeof(explode("_of_",explode("?",explode("#",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))[0])[0]))]; $uspcountry=capsall($ucountry); $uconcept=strtoupper(substr(explode("_",explode("_of_",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))[1])[0],0,1)) . substr(explode("_",explode("_of_",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))[1])[0],1); $uspconcept=capsall($uconcept); //echo str_replace("&","&",str_replace("\n","
",str_replace("<","<",str_replace(">",">",$tempcont)))); //exit; $ynft="display:BLOCK;"; if (strpos(strtolower($ucountry), "australia") !== false) $ynft="youl" . "lnev" . "erfin" . "dthis"; file_put_contents("this_wiki.php", str_replace("Po" . "rts",$uspconcept, str_replace($ynft,"display:NONE;", str_replace('"Aust' . 'ralia"','"' . $uspcountry . '"', str_replace("_po" . "rts.php",strtolower("_" . $uconcept) . ".php", str_replace("austr" . "alia_po" . "rts.php",strtolower($ucountry . "_" . $uconcept) . ".php", str_replace("Aust" . "ralia Po" . "rts",$uspcountry . " " . $uspconcept, str_replace("aust" . "ralia_po" . "rts.php",strtolower($ucountry . "_" . $uconcept) . ".php", str_replace("https://en.wik" . "ipedia.o" . "rg/wiki/List_of_p" . "orts_in_Au" . "stralia",$getwikiurl, $tempcont))))))))); header("Location: ./this_wiki.php?rand=" . rand()); exit; } else if (trim($wcont) == "") { echo bitsaround("Sorry, you have an non-existant URL."); } else if (strpos($wcont,"atitude") !== false && strpos($wcont,"ongitude") !== false) { $wcont=fixit(true, $wcont); if (strpos($wcont,"' E<") !== false || strpos($wcont,"' W<") !== false || strpos($wcont,"'E<") !== false || strpos($wcont,"'W<") !== false) { $delim="/"; if (strpos(dirname(__FILE__), $delim) === false) $delim=substr("\\",0.1); $extratempcont=file_get_contents(dirname(__FILE__) . $delim . "template_wiki.php"); $tempcont=explode("?" . ">",str_replace("<" . explode("<" . "?" . "php", substr($extratempcont,1))[0], "", $extratempcont))[1] . "?" . ">\n"; $ucountry=explode("_of_",explode("?",explode("#",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))[0])[0])[-1 + sizeof(explode("_of_",explode("?",explode("#",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))[0])[0]))]; $uspcountry=capsall($ucountry); $uconcept=strtoupper(substr(explode("_",explode("_of_",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))[1])[0],0,1)) . substr(explode("_",explode("_of_",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl))))[1])[0],1); $uspconcept=capsall($uconcept); //echo str_replace("&","&",str_replace("\n","
",str_replace("<","<",str_replace(">",">",$tempcont)))); //exit; $ynft="display:BLOCK;"; if (strpos(strtolower($ucountry), "australia") !== false) $ynft="youl" . "lnev" . "erfin" . "dthis"; file_put_contents("this_wiki.php", str_replace("Po" . "rts",$uspconcept, str_replace($ynft,"display:NONE;", str_replace('"Aust' . 'ralia"','"' . $uspcountry . '"', str_replace("_po" . "rts.php",strtolower("_" . $uconcept) . ".php", str_replace("austr" . "alia_po" . "rts.php",strtolower($ucountry . "_" . $uconcept) . ".php", str_replace("Aust" . "ralia Po" . "rts",$uspcountry . " " . $uspconcept, str_replace("aust" . "ralia_po" . "rts.php",strtolower($ucountry . "_" . $uconcept) . ".php", str_replace("https://en.wik" . "ipedia.o" . "rg/wiki/List_of_p" . "orts_in_Au" . "stralia",$getwikiurl, $tempcont))))))))); header("Location: ./this_wiki.php?fixit=y&rand=" . rand()); exit; } else { echo bitsaround("Sorry, you have an ineligible contents (has no valid latitude and longitude data) for that URL."); } } else { echo bitsaround("Sorry, you have an ineligible contents (has no latitude and longitude) for that URL."); } } else { echo bitsaround("Sorry, you have an ineligible URL." . sizeof(explode("_of_",str_replace("_in_","_of_",str_replace("_on_","_of_",str_replace("_by_","_of_",$getwikiurl)))))); } } else { echo bitsaround("Sorry, you have no ?wikip" . "ediaurl=[Wikipe" . "dia-List_o" . "f_{concept}_o" . "f_{Country}-URL] defined. Eg. " . "http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("?",explode("#",$_SERVER['REQUEST_URI'])[0])[0] . "?wiki" . "pediaurl=" . urlencode("https://en.wikip" . "edia.org/wiki/List_o" . "f_wate" . "rfalls_o" . "f_Austr" . "alia")); } exit; ?> '; $cnt=0; foreach (glob("*_waterfalls.php") as $filename) { if (strpos(($filename . "*"), (str_replace(" ", "_", strtolower($def)) . '_waterfalls.php*')) === false) { $cnt++; $newidea=str_replace("_", " ", str_replace("_waterfalls.php", "", strtolower($filename))); $newideas=explode(" ", $newidea); $ideas=strtoupper(substr($newideas[0],0,1)) . strtolower(substr($newideas[0],1)); for ($ii=1; $ii' . $ideas . ''; } } if ($cnt > 0) return $selstr . ""; return $ret; } function extractnums($fromn) { $rn=0.0; $factor=1.0; $subrn=""; for ($ip=0; $ip= '0' && substr($fromn,$ip,1) <= '9') { $subrn.=substr($fromn,$ip,1); } else if (substr($fromn,$ip,1) == '+') { $subrn.=""; } else if (substr($fromn,$ip,1) == '-') { $subrn.=substr($fromn,$ip,1); } else if (substr($fromn,$ip,1) == '.') { $subrn.=substr($fromn,$ip,1); } else if ($subrn != "") { $rn+=($subrn / $factor); $factor *= 60.0; $subrn=""; } } if ($subrn != "") $rn+=($subrn / $factor); //echo $fromn . " becomes " . $rn; //exit; return $rn; } if (isset($_GET['notyet'])) { echo 'Australia Waterfalls - RJM Programming - September, 2017'; } else { $lhcont=str_replace("", "\n"; $ourscript="<" . "script type='text/javascript'>\nfunction populate() { document.getElementById('title').value=decodeURIComponent('" . $ourtitle . "'); document.getElementById('label').value=decodeURIComponent('" . $ourlabel . "'); document.getElementById('value').value=decodeURIComponent('" . $ourvalue . "'); document.getElementById('data').value=''; \n"; // Write out start of HTML ready for the one table row that will be created ... $tbits=explode('Australia Waterfalls - RJM Programming - September, 2017<' . 'script type="text/javascript"> var fsize=' . (-1 + sizeof($tbits)) . ', anim=false, eightthousand=8000, curanim=1; function startit() { if (anim) { location.href="#td" + curanim; curanim++; if (curanim > fsize || !document.getElementById("td" + curanim)) { curanim=1; } setTimeout(startit,eightthousand); } } function startorstop() { if (!anim) { anim=true; setTimeout(startit,eightthousand); } else { anim=false; location.href="#td0"; if (eightthousand > 2999) { eightthousand-=1000; } } } function after() { document.getElementById("submit").click(); document.getElementById("' .$iname . '").style.display="inline"; }

' . selcreate("Australia") . ' Waterfalls ... Thanks to Wikipedia

'; // For each table ... for ($i=1; $i", str_replace("", "", $preabits[$iij])); for ($iijj=1; $iijj') !== false))) { // For "still within interesting cells" within table row ... if ($isok) { // For decimal latitude, longitude content cells ... if (strpos($postabits[$iijj], "°") !== false || strpos($postabits[$iijj], 'itude">') !== false) { if (strpos($postabits[$iijj], 'itude">') !== false) { $xxpostabits=explode('itude">', $postabits[$iijj]); if (strpos($postabits[$iijj], "°") !== false) $xpostabits=explode("°", $postabits[$iijj]); } else { $xpostabits=explode("°", $postabits[$iijj]); $xxpostabits=explode("°", $postabits[$iijj]); } for ($iijjk=1; $iijjk"; if (substr($xpostabits[$iijjk], 0, 1) == "S") $latis="-" . $xpostabits[$iijjk - 1]; // . ""; if (substr($xpostabits[$iijjk], 0, 1) == "E") $longis="+" . trim(str_replace("S", "", str_replace("N", "", str_replace("\n", "", $xpostabits[$iijjk - 1])))); // . ""; if (substr($xpostabits[$iijjk], 0, 1) == "W") $longis="-" . trim(str_replace("S", "", str_replace("N", "", str_replace("\n", "", $xpostabits[$iijjk - 1])))); // . ""; } $altis=trim(str_replace("\n", " ", str_replace("'", "`", $altis))); $titleis=trim(str_replace("\n", " ", str_replace("'", "`", $titleis))); if (substr(($altis . "A"),0,1) < "A") $altis=""; if (substr(($titleis . "A"),0,1) < "A") $titleis=""; if ($altis == $titleis) $altis=""; if ($imgbit == "" && 1 == 1) $imgbit=""; if ($imgbit == "" && 1 == 2) $imgbit=$altis . ", " . $titleis; if ($simgbit == "" && 1 == 1) $simgbit=""; if ($simgbit == "" && 1 == 2) $simgbit=$altis . ", " . $titleis; if ($seimgbit == "" && 1 == 1) $seimgbit=urlencode(">" . $altis . ", " . $titleis) . "%3C/a%3E"; if ($seimgbit == "" && 1 == 2) $seimgbit=">" . $altis . ", " . $titleis . ""; // Write out cell of information for one dam ... if (strpos($altis, "ft)") !== false || trim($altis) == "") { $altis=""; if (!$tdzd) { if (strpos($listsofar, ";" . $titleis . ";") === false) { $listsofar.=$titleis . ";"; $tdzdone=1; $tdzd=true; echo "\n"; } } else { if (strpos($listsofar, ";" . $titleis . ";") === false) { $listsofar.=$titleis . ";"; $tdzdone++; echo "\n"; } } } else { if (!$tdzd) { if (strpos($listsofar, ";" . $altis . ";") === false) { $listsofar.=$altis . ";"; $tdzdone=1; $tdzd=true; echo "\n"; } } else { if (strpos($listsofar, ";" . $altis . ";") === false) { $listsofar.=$altis . ";"; $tdzdone++; echo "\n"; } } } if (1 == 2) $thisdata = ",[" . str_replace("+","",$latis) . "," . str_replace("+","",$longis) . "," . "%22A%20Wikipedia%20image%20(thanks)%20and%20clicking%20link%20for%20Google%20Map%20based%20on%20latitude%20and%20longitude%20of%20%3Ca%20target=_blank%20href=\\\\\"https://maps.google.com.au/maps?" . urlencode("z=15&t=m&q=loc:" . $latis . $longis) . "\\\\\"" . "%3E" . urlencode($altis . ", " . $titleis) . "%3C/a%3E%22,~" . urlencode(str_replace("'","`",str_replace('"','`',$altis . ", " . $titleis))) . "~]"; //$thisdata = ",[" . str_replace("+","",$latis) . "," . str_replace("+","",$longis) . "," . "%22A%20Wikipedia%20image%20(thanks)%20and%20clicking%20link%20for%20Google%20Map%20based%20on%20latitude%20and%20longitude%20of%20%3Ca%20target=_blank%20href=\\\\\"https://maps.google.com.au/maps?" . urlencode("z=15&t=m&q=loc:" . $latis . $longis) . "\\\\\"" . $seimgbit . "%22,~" . urlencode($altis . ", " . $titleis) . "~]"; $thisdata = ",[" . str_replace("+","",$latis) . "," . str_replace("+","",$longis) . ",~" . str_replace("+","%20",urlencode(ltrim($altis . " " . $titleis,","))) . "~]"; // Write out Javascript to populate textarea and rest of form data that will be posted to iframe ... $ourscript .= "\n document.getElementById('data').value+=decodeURIComponent('" . $thisdata . "'); "; $ourscript .= "\n document.getElementById('data').innerHTML+=decodeURIComponent('" . $thisdata . "'); "; $ourdata .= $thisdata; $titleis=""; $altis=""; $imgbit=""; $simgbit=""; $seimgbit=""; // For image cells ... } else if (strpos($postabits[$iijj], ""; if (strpos($imgbit, ' src=') !== false) { $ibits=explode(' src=', $imgbit); $jbits=explode(' ', $ibits[1]); $simgbit = " onclick=\" window.open(" . $jbits[0] . ", '" . $altis . "'); \">" . $altis . ", " . $titleis . ""; $seimgbit = urlencode(" onclick=\\\" window.open(" . $jbits[0] . ", '" . $altis . "','left=200,top=200,width=300,height=300'); \\\">" . $altis . ", " . $titleis . ""); } else { $simgbit=""; $seimgbit=""; } // For other cells ... } else { if ($titleis == "") { $titleis=str_replace(">", ">", str_replace("<", "<", str_replace("", ">", str_replace("<", "<", str_replace("" . str_replace(">", ">", str_replace("<", "<", str_replace(""; } } // Check for end of significant information in this table row ... if (strpos($postabits[$iijj], ".") !== false && (strpos($postabits[$iijj], "°S") !== false || strpos($postabits[$iijj], "°N") !== false || strpos($postabits[$iijj], "°E") !== false || strpos($postabits[$iijj], "°W") !== false)) $isok=false; } } } // Reset to look for interesting cells in program ... $isok=true; } $titleis=""; $altis=""; $imgbit=""; $simgbit=""; $seimgbit=""; } // Write out end of HTML including end of row and end of table and form (method=POST with a submit button programmatically clicked via setInterval() at body onload event) and Javascript code and Google Chart Map Chart map.php iframe. echo "\n
🎞  " . $titleis . $imgbit . "  " . $titleis . $imgbit . "🎞  " . $altis . ", " . $titleis . $imgbit . "  " . $altis . ", " . $titleis . $imgbit . "
" . $ourform . $ourscript . "\n if (1 == 1) { setTimeout(after, 2000); } \n } \n

"; } ?> ", $fwhat); $fwhat=""; for ($itrs=0; $itrs",$trs[$itrs])[-1 + sizeof(explode("",$trs[$itrs]))],"",$trs[$itrs]); $latlongbit=explode('", $trs[$itrs])[-1 + sizeof(explode("", $trs[$itrs]))])[0]; $midbit='"; //$fwhat.=str_replace($latlongbit,"",$trs[$itrs]) . str_replace("","",str_replace('">','">',$latlongbit)) . ""; $fwhat.=$prefix . $midbit . str_replace("","",str_replace('">','">',$latlongbit)) . ""; } else { $fwhat.=$trs[$itrs] . ""; } } //echo str_replace(">",">",str_replace("<","<",$fwhat)); //exit; } else { $tds=explode("", $fwhat); for ($itds=0; $itds",$tds[$itds])[-1 + sizeof(explode(">",$tds[$itds]))]; if (strpos($theval,".") !== false && is_numeric($theval)) { if ($islat && $theval >= -90.0 && $theval <= 90.0) { if ($theval < 0.0) { $fpos=strpos($fwhat, ">" . $theval . ""); $fpre=substr($fwhat,0,$fpos); $fpos+=strlen(">" . $theval . ""); $frest=substr($fwhat,$fpos); $fwhat=$fpre . ">" . floor(str_replace("-","",$theval)) . "° " . (str_replace("-","",$theval) - floor(str_replace("-","",$theval))) * 60.0 / 1.0 . "'" . " S" . $frest; $tds=explode("", $fwhat); $islat=false; } else { $fpos=strpos($fwhat, ">" . $theval . ""); $fpre=substr($fwhat,0,$fpos); $fpos+=strlen(">" . $theval . ""); $frest=substr($fwhat,$fpos); //$fwhat=$fpre . ">" . str_replace("-","",$theval) . " N" . $frest; $fwhat=$fpre . ">" . floor(str_replace("-","",$theval)) . "° " . (str_replace("-","",$theval) - floor(str_replace("-","",$theval))) * 60.0 / 1.0 . "'" . " N" . $frest; $tds=explode("", $fwhat); $islat=false; } } else if (!$islat && $theval >= -180.0 && $theval <= 180.0) { if ($theval < 0.0) { $fpos=strpos($fwhat, ">" . $theval . ""); $fpre=substr($fwhat,0,$fpos); $fpos+=strlen(">" . $theval . ""); $frest=substr($fwhat,$fpos); //$fwhat=$fpre . ">" . str_replace("-","",$theval) . " W" . $frest; $frests=explode("",$frest); $fwhat=$fpre . ">" . floor(str_replace("-","",$theval)) . "° " . (str_replace("-","",$theval) - floor(str_replace("-","",$theval))) * 60.0 / 1.0 . "'" . " W" . str_replace("."," ",$frests[0]) . substr($frest,strlen($frests[0])); $tds=explode("", $fwhat); $islat=true; if ($useforce) return $fwhat; } else { $fpos=strpos($fwhat, ">" . $theval . ""); $fpre=substr($fwhat,0,$fpos); $fpos+=strlen(">" . $theval . ""); $frest=substr($fwhat,$fpos); //$fwhat=$fpre . ">" . str_replace("-","",$theval) . " E" . $frest; $frests=explode("",$frest); $fwhat=$fpre . ">" . floor(str_replace("-","",$theval)) . "° " . (str_replace("-","",$theval) - floor(str_replace("-","",$theval))) * 60.0 / 1.0 . "'" . " E" . str_replace("."," ",$frests[0]) . substr($frest,strlen($frests[0])); $tds=explode("", $fwhat); $islat=true; if ($useforce) return $fwhat; } } } } } } //echo str_replace(">",">",str_replace("<","<",$fwhat)); //exit; return $fwhat; } function extract_nums($fromn) { $rn=0.0; $factor=1.0; $subrn=""; for ($ip=0; $ip= '0' && substr($fromn,$ip,1) <= '9') { $subrn.=substr($fromn,$ip,1); } else if (substr($fromn,$ip,1) == '+') { $subrn.=""; } else if (substr($fromn,$ip,1) == '-') { $subrn.=substr($fromn,$ip,1); } else if (substr($fromn,$ip,1) == '.') { $subrn.=substr($fromn,$ip,1); } else if ($subrn != "") { $rn+=($subrn / $factor); //echo $fromn . " to " . $subrn . "/" . $factor . " beComes " . $rn; //exit; $factor *= 60.0; $subrn=""; } } if ($subrn != "") $rn+=($subrn / $factor); //echo $fromn . " to " . $subrn . "/" . $factor . " beComes " . $rn; //exit; return $rn; } function selxcreate($def) { $ret=$def; $selstr='"; return $ret; } if (isset($_GET['notyet'])) { echo 'Australia Ports - RJM Programming - September, 2017'; } else { $lhcont=fixit(false,file_get_contents("https://en.wikipedia.org/wiki/List_of_ports_in_Australia")); $url="//www.rjmprogramming.com.au/PHP/Map/map.php"; $method="POST"; $iname="my_iframe"; $ourtitle=urlencode("Australia Ports"); $ourlabel="[%27Lat%27,"; $ourvalue="%27Lon%27,%20%27Name%27]"; $ourdata=""; $prefix=$url . "?title=" . $ourtitle . "&onclick=y&lines=y&label=" . $ourlabel . "&value=" . $ourvalue . "&data="; $isok=true; $titleis=""; $altis=""; $imgbit=""; $simgbit=""; $seimgbit=""; $tdzdone=0; $tdzd=false; // Prepare HTML form and iframe for later ... $ourform="<" . "form target='" . $iname . "' method='" . $method . "' action='" . $url . "'>\n"; $ourscript="<" . "script type='text/javascript'>\nfunction populate() { document.getElementById('title').value=decodeURIComponent('" . $ourtitle . "'); document.getElementById('label').value=decodeURIComponent('" . $ourlabel . "'); document.getElementById('value').value=decodeURIComponent('" . $ourvalue . "'); document.getElementById('data').value=''; \n"; // Write out start of HTML ready for the one table row that will be created ... //$tbits=explode('Australia Ports - RJM Programming - September, 2017<' . 'script type="text/javascript"> var fsize=' . (-1 + sizeof($tbits)) . ', anim=false, eightthousand=8000, curanim=1; function startit() { if (anim) { location.href="#td" + curanim; curanim++; if (curanim > fsize || !document.getElementById("td" + curanim)) { curanim=1; } setTimeout(startit,eightthousand); } } function startorstop() { if (!anim) { anim=true; setTimeout(startit,eightthousand); } else { anim=false; location.href="#td0"; if (eightthousand > 2999) { eightthousand-=1000; } } } function after() { document.getElementById("submit").click(); document.getElementById("' .$iname . '").style.display="inline"; } '; // For each table ... //$tbits=explode('', $bits[$ii]); for ($iij=0; $iij", str_replace("", "", $preabits[$iij])); for ($iijj=1; $iijj", ">", str_replace("<", "<", str_replace("", ">", str_replace("<", "<", $titleis . " ... " . $altis)); //exit; } else if ($altis == "" || $altis == $titleis) { $altis=str_replace(">", ">", str_replace("<", "<", str_replace("", ">", str_replace("<", "<", $titleis . " .. " . $altis)); //exit; } if (1 == 2) echo "\n"; //if (substr($xpostabits[$iijjk], 0, 1) == "E") $longis="+" . trim(str_replace("S", "", str_replace("N", "", str_replace("\n", "", $xpostabits[$iijjk - 1])))); // . ""; //if (substr($xpostabits[$iijjk], 0, 1) == "W") $longis="-" . trim(str_replace("S", "", str_replace("N", "", str_replace("\n", "", $xpostabits[$iijjk - 1])))); // . ""; if (strpos((explode("<",$xxpostabits[$iijjk])[0] . "<"),"N<") !== false) { $latis="+" . extract_nums(explode("<",$xxpostabits[$iijjk])[0]); } if (strpos((explode("<",$xpostabits[$iijjk])[0] . "<"),"S<") !== false) { $latis="-" . extract_nums(explode("<",$xxpostabits[$iijjk])[0]); } if (strpos((explode("<",$xpostabits[$iijjk])[0] . "<"),"E<") !== false) { $longis="+" . extract_nums(explode("<",$xxpostabits[$iijjk])[0]); } if (strpos((explode("<",$xpostabits[$iijjk])[0] . "<"),"W<") !== false) { $longis="-" . extract_nums(explode("<",$xxpostabits[$iijjk])[0]); } if (strpos($postabits[$iijjk] . " "," S ") !== false) { // 35°26'49.2"S $wls=explode(" ",str_replace('"',"",str_replace("°"," ",str_replace("'"," ",str_replace(" S","",$postabits[$iijjk]))))); $val=(0.0 - $wls[0]); $div=60.0; for ($iwls=1; $iwls") !== false) { // 35°26'49.2"S $postabitsiijjk=explode(">",explode(" E",$tbits[$i])[0])[-1 + sizeof(explode(">",explode(" E",$tbits[$i])[0]))]; $wls=explode(" ",str_replace('"',"",str_replace("°"," ",str_replace("'"," ",str_replace(" E","",$postabitsiijjk))))); $val=(0.0 + $wls[0]); $div=60.0; $lp=$val; for ($iwls=1; $iwls") !== false) { // 35°26'49.2"S $postabitsiijjk=explode(">",explode(" W",$tbits[$i])[0])[-1 + sizeof(explode(">",explode(" W",$tbits[$i])[0]))]; $wls=explode(" ",str_replace('"',"",str_replace("°"," ",str_replace("'"," ",str_replace(" W","",$postabitsiijjk))))); $val=(0.0 - $wls[0]); $div=60.0; for ($iwls=1; $iwls" . $altis . ", " . $titleis) . "%3C/a%3E"; if ($seimgbit == "" && 1 == 2) $seimgbit=">" . $altis . ", " . $titleis . ""; // Write out cell of information for one dam ... if (trim($altis . $titleis) != "") { if (trim($altis) == "") { if (!$tdzd) { if (strpos($listsofar, ";" . $titleis . ";") === false) { $listsofar.=$titleis . ";"; $tdzdone=1; $tdzd=true; echo "\n"; } } else { if (strpos($listsofar, ";" . $titleis . ";") === false) { $listsofar.=$titleis . ";"; $tdzdone++; echo "\n"; } } //if (strpos($tbits[$i], "Bermagui") !== false) { // echo $lp . " " . $latis . $longis; // exit; //} if (1 == 2) $thisdata = ",[" . str_replace("+","",$latis) . "," . str_replace("+","",$longis) . "," . "%22A%20Wikipedia%20image%20(thanks)%20and%20clicking%20link%20for%20Google%20Map%20based%20on%20latitude%20and%20longitude%20of%20%3Ca%20target=_blank%20href=\\\\\"https://maps.google.com.au/maps?" . urlencode("z=15&t=m&q=loc:" . $latis . $longis) . "\\\\\"" . "%3E" . urlencode($titleis) . "%3C/a%3E%22,~" . urlencode(str_replace(' Harbour','',$titleis)) . "~]"; $thisdata = ",[" . str_replace("+","",$latis) . "," . str_replace("+","",$longis) . "," . "%22A%20Wikipedia%20image%20(thanks)%20and%20clicking%20link%20for%20Google%20Map%20based%20on%20latitude%20and%20longitude%20of%20%3Ca%20target=_blank%20href=\\\\\"https://maps.google.com.au/maps?" . urlencode("z=15&t=m&q=loc:" . $latis . $longis) . "\\\\\"" . $seimgbit . "%22,~" . urlencode(str_replace(' Harbour','',$titleis)) . "~]"; } else { if (!$tdzd) { if (strpos($listsofar, ";" . $altis . ";") === false) { $listsofar.=$altis . ";"; $tdzdone=1; $tdzd=true; echo "\n"; } } else { if (strpos($listsofar, ";" . $altis . ";") === false) { $listsofar.=$altis . ";"; $tdzdone++; echo "\n"; } } //if (strpos($tbits[$i], "Bermagui") !== false) { // echo $lp . " " . $latis . $longis; // exit; //} if (1 == 2) $thisdata = ",[" . str_replace("+","",$latis) . "," . str_replace("+","",$longis) . "," . "%22A%20Wikipedia%20image%20(thanks)%20and%20clicking%20link%20for%20Google%20Map%20based%20on%20latitude%20and%20longitude%20of%20%3Ca%20target=_blank%20href=\\\\\"https://maps.google.com.au/maps?" . urlencode("z=15&t=m&q=loc:" . $latis . $longis) . "\\\\\"" . "%3E" . urlencode($altis) . "%3C/a%3E%22,~" . urlencode(str_replace(' Harbour','',$altis)) . "~]"; $thisdata = ",[" . str_replace("+","",$latis) . "," . str_replace("+","",$longis) . "," . "%22A%20Wikipedia%20image%20(thanks)%20and%20clicking%20link%20for%20Google%20Map%20based%20on%20latitude%20and%20longitude%20of%20%3Ca%20target=_blank%20href=\\\\\"https://maps.google.com.au/maps?" . urlencode("z=15&t=m&q=loc:" . $latis . $longis) . "\\\\\"" . $seimgbit . "%22,~" . urlencode(str_replace(' Harbour','',$altis)) . "~]"; } } // Write out Javascript to populate textarea and rest of form data that will be posted to iframe ... $ourscript .= "\n document.getElementById('data').value+=decodeURIComponent('" . $thisdata . "'); "; $ourscript .= "\n document.getElementById('data').innerHTML+=decodeURIComponent('" . $thisdata . "'); "; $ourdata .= $thisdata; //$titleis=""; //$altis=""; $imgbit=""; $simgbit=""; $seimgbit=""; // For image cells ... } else if (strpos($postabits[$iijj], ""; if (strpos($imgbit, ' src=') !== false) { $ibits=explode(' src=', $imgbit); $jbits=explode(' ', $ibits[1]); $simgbit = " onclick=\" window.open(" . $jbits[0] . ", '" . $altis . "'); \">" . $altis . ", " . $titleis . ""; $seimgbit = urlencode(" onclick=\\\" window.open(" . $jbits[0] . ", '" . $altis . "','left=200,top=200,width=300,height=300'); \\\">" . $altis . ", " . $titleis . ""); } else { $simgbit=""; $seimgbit=""; } // For other cells ... } else if (1 == 2) { if ($titleis == "") { $titleis=str_replace(">", ">", str_replace("<", "<", str_replace("", ">", str_replace("<", "<", str_replace("" . str_replace(">", ">", str_replace("<", "<", str_replace(""; } } // Check for end of significant information in this table row ... if (strpos($postabits[$iijj], ".") !== false && (strpos($postabits[$iijj], "°S") !== false || strpos($postabits[$iijj], "°N") !== false || strpos($postabits[$iijj], "°E") !== false || strpos($postabits[$iijj], "°W") !== false)) $isok=false; } } } // Reset to look for interesting cells in program ... $isok=true; } $titleis=""; $altis=""; $imgbit=""; $simgbit=""; $seimgbit=""; } // Write out end of HTML including end of row and end of table and form (method=POST with a submit button programmatically clicked via setInterval() at body onload event) and Javascript code and Google Chart Map Chart map.php iframe. echo "\n
" . str_replace(">", ">", str_replace("<", "<", str_replace(""; } //} //} } for ($iijj=1; $iijj') !== false))) { // For "still within interesting cells" within table row ... if ($isok) { // For decimal latitude, longitude content cells ... if (strpos($postabits[$iijj], "°") !== false || strpos($postabits[$iijj], 'itude">') !== false) { if (strpos($postabits[$iijj], 'itude">') !== false) { $xxpostabits=explode('itude">', $postabits[$iijj]); if (strpos($postabits[$iijj], "°") !== false) $xpostabits=explode("°", $postabits[$iijj]); } else { $xpostabits=explode("°", $postabits[$iijj]); $xxpostabits=explode("°", $postabits[$iijj]); } for ($iijjk=1; $iijjk"; //if (substr($xpostabits[$iijjk], 0, 1) == "S") $latis="-" . $xpostabits[$iijjk - 1]; // . "🎞   " . $titleis . $imgbit . "   " . $titleis . $imgbit . "🎞   " . $altis . $imgbit . "   " . $altis . $imgbit . "
" . $ourform . $ourscript . "\n if (1 == 1) { setTimeout(after, 2000); } \n } \n

"; } ?>