19c19 < $ilongs = ""; 25c25 < $jlongs = ""; 31,32d30 < $morestuff=""; < $onload=""; 39d36 < $helper="//www.rjmprogramming.com.au/PHP/sun_information.php"; 42,119d38 < if (isset($_GET['latd'])) { < if (file_exists("../../sun_information.php")) { < $curlcmd="curl http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/../../sun_information.php?latd="; < $helper="//" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/../../sun_information.php?noxwrite=now&mv=y&latd="; < } else if (file_exists("../sun_information.php")) { < $curlcmd="curl http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/../sun_information.php?latd="; < $helper="//" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/../sun_information.php?noxwrite=now&mv=y&latd="; < } else if (file_exists("sun_information.php")) { < $curlcmd="curl http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/sun_information.php?latd="; < $helper="//" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/sun_information.php?noxwrite=now&mv=y&latd="; < } else { < $curlcmd="curl http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . "/sun_information.php?latd="; < $helper="//" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . "/sun_information.php?noxwrite=now&mv=y&latd="; < } < $this_lat=abs(urldecode($_GET['latd'])); < if (isset($_GET['latm'])) $this_lat+=(urldecode($_GET['latm']) / 60.0); < if (isset($_GET['lats'])) $this_lat+=(urldecode($_GET['lats']) / 3600.0); < if (strpos(urldecode($_GET['latd']), "-") !== false) $this_lat=(0.0 - $this_lat); < $curlcmd.=urlencode($this_lat); < $helper.=urlencode($this_lat); < if (isset($_GET['place'])) { < $curlcmd.="%20" . str_replace("+","%20",urlencode($_GET['place'])); < $helper.="&place=" . str_replace("+","%20",urlencode($_GET['place'])); < } < $this_long=-999.0; < if (isset($_GET['longd'])) $this_long=abs(urldecode($_GET['longd'])); < if (isset($_GET['longm'])) $this_long+=(urldecode($_GET['longm']) / 60.0); < if (isset($_GET['longs'])) $this_long+=(urldecode($_GET['longs']) / 3600.0); < if (isset($_GET['longd'])) { < if (strpos(urldecode($_GET['longd']), "-") !== false) $this_long=(0.0 - $this_long); < $helper.="&longd=" . urlencode($this_long); < } < if (!file_exists(dirname(__FILE__) . "/sun_angle_data.txt") || $this_lat != 0.0) { < exec($curlcmd); < //sleep(1); < } < } else if (isset($_POST['latd'])) { < if (file_exists("../../sun_information.php")) { < $curlcmd="curl http://" . $_SERVER['SERVER_NAME'] . ":" . explode("#",explode("?",$_SERVER['SERVER_PORT'] . str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/../../sun_information.php?latd="; < $helper="//" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/../../sun_information.php?noxwrite=now&mv=y&latd="; < } else if (file_exists("../sun_information.php")) { < $curlcmd="curl http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/../sun_information.php?latd="; < $helper="//" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/../sun_information.php?noxwrite=now&mv=y&latd="; < } else if (file_exists("sun_information.php")) { < $curlcmd="curl http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/sun_information.php?latd="; < $helper="//" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/sun_information.php?noxwrite=now&mv=y&latd="; < } else { < $curlcmd="curl http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . "/sun_information.php?latd="; < $helper="//" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . "/sun_information.php?noxwrite=now&mv=y&latd="; < } < $this_lat=abs(urldecode($_POST['latd'])); < if (isset($_POST['latm'])) $this_lat+=(urldecode($_POST['latm']) / 60.0); < if (isset($_POST['lats'])) $this_lat+=(urldecode($_POST['lats']) / 3600.0); < if (strpos(urldecode($_POST['latd']), "-") !== false) $this_lat=(0.0 - $this_lat); < $curlcmd.=urlencode($this_lat); < $helper.=urlencode($this_lat); < if (isset($_POST['place'])) { < $curlcmd.="%20" . str_replace("+","%20",urlencode($_POST['place'])); < $helper.="&place=" . str_replace("+","%20",urlencode($_POST['place'])); < } < $this_long=-999.0; < if (isset($_POST['longd'])) $this_long=abs(urldecode($_POST['longd'])); < if (isset($_POST['longm'])) $this_long+=(urldecode($_POST['longm']) / 60.0); < if (isset($_POST['longs'])) $this_long+=(urldecode($_POST['longs']) / 3600.0); < if (isset($_POST['longd'])) { < if (strpos(urldecode($_POST['longd']), "-") !== false) $this_long=(0.0 - $this_long); < $helper.="&longd=" . urlencode($this_long); < } < if (!file_exists(dirname(__FILE__) . "/sun_angle_data.txt") || $this_lat != 0.0) exec($curlcmd); < } else { < if (file_exists("../../sun_information.php")) { < < < < $ilatd = ""; < $ilats = ""; 121,147c40 < < < $curlcmd="curl http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/../../sun_information.php?latd=27.9861&longd=86.9230"; < $helper="//" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/../../sun_information.php?noxwrite=now&mv=y&latd=27.9861&longd=86.9230"; < } else if (file_exists("../sun_information.php")) { < $curlcmd="curl http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/../sun_information.php?latd=27.9861&longd=86.9230"; < $helper="//" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/../sun_information.php?noxwrite=now&mv=y&latd=27.9861&longd=86.9230"; < } else if (file_exists("sun_information.php")) { < $curlcmd="curl http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/sun_information.php?latd=27.9861&longd=86.9230"; < $helper="//" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . explode("#",explode("?",str_replace("sun_angle_now_at.php","",str_replace("sun_angle_now_at.php","",$_SERVER['REQUEST_URI'])))[0])[0] . "/sun_information.php?noxwrite=now&mv=y&latd=27.9861&longd=86.9230"; < } else { < $curlcmd="curl http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . "/sun_information.php?latd=27.9861&longd=86.9230"; < $helper="//" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . "/sun_information.php?noxwrite=now&mv=y&latd=27.9861&longd=86.9230"; < } < if (isset($_POST['place'])) { < $curlcmd.="&place=" . str_replace("+","%20",urlencode($_POST['place'])); < $helper.="&place=" . str_replace("+","%20",urlencode($_POST['place'])); < } < if (isset($_GET['place'])) { < $curlcmd.="&place=" . str_replace("+","%20",urlencode($_GET['place'])); < $helper.="&place=" . str_replace("+","%20",urlencode($_GET['place'])); < } < if (!file_exists(dirname(__FILE__) . "/sun_angle_data.txt")) { < exec($curlcmd); < //sleep(1); < } < } --- > exec("curl http://www.timeanddate.com/worldclock/sunearth.html > " . dirname(__FILE__) . "/sun_angle_data.txt"); 159,170c52 < if (strpos($cont, "Transit Time: ") === false) unlink(dirname(__FILE__) . "/sun_angle_data.txt"); < if (strpos($cont, "Transit Time: ") !== false) { < $sibits=explode("Transit Time: ", $cont); < $morestuff=" (Transit Time: " . str_replace(" GMT","",trim(explode(" latitude ",$sibits[1])[0])) . ")"; < //$morestuff=" (Transit Time:|" . explode("<",$sibits[1])[0] . "|)"; < if (strpos($sibits[0], " UTC ") !== false) { < if (trim(explode(" UTC ",$sibits[0])[1]) != "") { < $morestuff.=" for: " . trim(explode(" UTC ",$sibits[0])[1]) . ""; < $onload=" onload=\"document.getElementById('ttc').click(); \" "; < } < } < } --- > unlink(dirname(__FILE__) . "/sun_angle_data.txt"); 259c141 < echo ''; --- > echo ''; 413,437d294 < < < < if (document.getElementById('ttc')) { < var latminus=""; < var longminus=""; < if (('' + latd.value).indexOf('-') != -1) latminus='-'; < if (('' + longd.value).indexOf('-') != -1) longminus='-'; < document.getElementById('ttc').href=('' + document.getElementById('ttc').href).replace('latd=','latd=' + latminus + eval( eval(('' + latd.value).replace('-','')) + eval(('' + latm.value)) / 60.0 + eval(('' + lats.value)) / 3600.0) + '&xd='); < document.getElementById('ttc').href=('' + document.getElementById('ttc').href).replace('longd=','longd=' + longminus + eval( eval(('' + longd.value).replace('-','')) + eval(('' + longm.value)) / 60.0 + eval(('' + longs.value)) / 3600.0) + '&xd='); < document.getElementById('ttcnw').href=('' + document.getElementById('ttcnw').href).replace('latd=','latd=' + latminus + eval( eval(('' + latd.value).replace('-','')) + eval(('' + latm.value)) / 60.0 + eval(('' + lats.value)) / 3600.0) + '&xd='); < document.getElementById('ttcnw').href=('' + document.getElementById('ttcnw').href).replace('longd=','longd=' + longminus + eval( eval(('' + longd.value).replace('-','')) + eval(('' + longm.value)) / 60.0 + eval(('' + longs.value)) / 3600.0) + '&xd='); < //document.getElementById('morestuff').style.marginTop='-200px'; < //document.getElementById('morestuff').style.zIndex='9'; < document.getElementById('morestuff').style.display='block'; < document.getElementById('morestuff').src=document.getElementById('ttc').href; < document.getElementById('sandg').style.display='none'; < document.getElementById('mydodah').style.display='none'; < block='hidden'; < document.getElementById('ttc').click(); < } < < < < 446d302 < if (document.getElementById('nnspan')) { document.getElementById('nnspan').innerHTML=''; } 463,473c319 < < if (document.getElementById('ttc')) { < var latminus=""; < var longminus=""; < if (('' + latd.value).indexOf('-') != -1) latminus='-'; < if (('' + longd.value).indexOf('-') != -1) longminus='-'; < document.getElementById('ttc').href=('' + document.getElementById('ttc').href).replace('latd=','latd=' + latminus + eval( eval(('' + latd.value).replace('-','')) + eval(('' + latm.value)) / 60.0 + eval(('' + lats.value)) / 3600.0) + '&xd='); < document.getElementById('ttc').href=('' + document.getElementById('ttc').href).replace('longd=','longd=' + longminus + eval( eval(('' + longd.value).replace('-','')) + eval(('' + longm.value)) / 60.0 + eval(('' + longs.value)) / 3600.0) + '&xd='); < document.getElementById('ttcnw').href=('' + document.getElementById('ttcnw').href).replace('latd=','latd=' + latminus + eval( eval(('' + latd.value).replace('-','')) + eval(('' + latm.value)) / 60.0 + eval(('' + lats.value)) / 3600.0) + '&xd='); < document.getElementById('ttcnw').href=('' + document.getElementById('ttcnw').href).replace('longd=','longd=' + longminus + eval( eval(('' + longd.value).replace('-','')) + eval(('' + longm.value)) / 60.0 + eval(('' + longs.value)) / 3600.0) + '&xd='); < } --- > 514,533d359 < if (document.getElementById('ttc')) { < var latminus=""; < var longminus=""; < if (('' + latis).indexOf('-') != -1) latminus='-'; < if (('' + longis).indexOf('-') != -1) longminus='-'; < document.getElementById('ttc').href=('' + document.getElementById('ttc').href).replace('latd=','latd=' + latminus + eval( eval(('' + latis).replace('-',''))) + '&xd='); < document.getElementById('ttc').href=('' + document.getElementById('ttc').href).replace('longd=','longd=' + longminus + eval( eval(('' + longis).replace('-',''))) + '&xd='); < document.getElementById('ttcnw').href=('' + document.getElementById('ttcnw').href).replace('latd=','latd=' + latminus + eval( eval(('' + latis).replace('-',''))) + '&xd='); < document.getElementById('ttcnw').href=('' + document.getElementById('ttcnw').href).replace('longd=','longd=' + longminus + eval( eval(('' + longis).replace('-',''))) + '&xd='); < //document.getElementById('morestuff').style.marginTop='-200px'; < //document.getElementById('morestuff').style.zIndex='9'; < if (document.getElementById('morestuff')) { < document.getElementById('morestuff').src=document.getElementById('ttc').href; < } < document.getElementById('sandg').style.display='none'; < document.getElementById('mydodah').style.display='none'; < block='hidden'; < document.getElementById('ttc').click(); < } < 577,578c403 < //osg.style.display = block; < osg.style.visibility = block; --- > osg.style.display = 'block'; 580,581c405 < //omyh2.style.display = block; < omyh2.style.visibility = block; --- > omyh2.style.display = 'block'; 593d416 < 598c421 < echo "\n" . ' mya.innerHTML = "Earth Noon Sun Angle Today for ' . $_GET['place'] . ' in ' . $_GET['country'] . ' is " + degreesuffix(xourang) + ""; '; --- > echo "\n" . ' mya.innerHTML = "Earth Noon Sun Angle Today for ' . $_GET['place'] . ' in ' . $_GET['country'] . ' is " + xourang + " degrees"; '; 600c423 < echo "\n" . ' mya.innerHTML = "Earth Noon Sun Angle Today for ' . $_POST['place'] . ' in ' . $_POST['country'] . ' is " + degreesuffix(xourang) + ""; '; --- > echo "\n" . ' mya.innerHTML = "Earth Noon Sun Angle Today for ' . $_POST['place'] . ' in ' . $_POST['country'] . ' is " + xourang + " degrees"; '; 602c425 < echo "\n" . ' mya.innerHTML = "Earth Noon Sun Angle Today for Latitude,Longitude below is " + degreesuffix(xourang) + ""; '; --- > echo "\n" . ' mya.innerHTML = "Earth Noon Sun Angle Today for Latitude,Longitude below is " + xourang + " degrees"; '; 616,631c439 < //if (document.URL.indexOf("&nowo=") == -1) window.open("https://maps.google.com/maps?saddr=" + latis + "," + longis + "&daddr=" + talis + "," + gnolis, "_blank", "left=120,top=330,width=830,height=430"); < if (document.URL.indexOf("&nowo=") == -1) window.open("https://maps.google.com/maps?saddr=" + talis + "," + gnolis + "&daddr=" + latis + "," + longis, "_blank", "left=120,top=330,width=830,height=430"); < } < } < < < <