'; $cnt=0; foreach (glob("*_lighthouses.php") as $filename) { if (strpos(($filename . "*"), (str_replace(" ", "_", strtolower($def)) . '_lighthouses.php*')) === false) { $cnt++; $newidea=str_replace("_", " ", str_replace("_lighthouses.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; } $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 ... echo 'Australian Lighthouses - RJM Programming - July, 2015<' . 'script type="text/javascript"> function after() { document.getElementById("submit").click(); document.getElementById("' .$iname . '").style.display="inline"; }

' . selcreate("Australian") . ' Lighthouses ... Thanks to Wikipedia

'; // For each table ... $tbits=explode('", str_replace("", "", $preabits[$iij])); for ($iijj=1; $iijj"; 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=str_replace("'", "`", $altis); $titleis=str_replace("'", "`", $titleis); 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 Lighthouse ... 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($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) . "~]"; // 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
" . $altis . ", " . $titleis . $imgbit . "
" . $ourform . $ourscript . "\n if (1 == 1) { setTimeout(after, 2000); } \n } \n
"; ?>