Mars Express browse plots at MSSL

0) $newday=$newdoy-$leapaccudays[$newmonth-1]; else $newday=$newdoy; } else { do { if($newdoy<=$accudays[$newmonth]) $foundmatch=1; $newmonth=$newmonth+1; } while ($foundmatch==0); $newmonth=$newmonth-1; if ($newmonth > 0) $newday=$newdoy-$accudays[$newmonth-1]; else $newday=$newdoy; } $filetoplot1=$elsloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb1/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb1_".$plotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $filetoplot2=$elsloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb2/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb2_".$plotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $filetoplot3=$elsloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb3/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb3_".$plotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $filetoplot4=$elsloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb4/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb4_".$plotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $imafiletoplot1=$imaloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb1/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb1_ima_".$imaplotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $imafiletoplot2=$imaloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb2/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb2_ima_".$imaplotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $imafiletoplot3=$imaloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb3/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb3_ima_".$imaplotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $imafiletoplot4=$imaloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb4/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb4_ima_".$imaplotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $_SESSION["thisday"]=$newday; $_SESSION["thismonth"]=$newmonth; $_SESSION["thisyear"]=$newyear; $_SESSION["thisplottype"]=$_POST["plottype"]; $_SESSION["thisperiodtype"]=$_POST["periodtype"]; } else { $filetoplot1="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/els/wholeorbit/2007/orb1/mexdata_17dec07_orb1_an04.png"; $filetoplot2="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/els/wholeorbit/2007/orb2/mexdata_17dec07_orb2_an04.png"; $filetoplot3="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/els/wholeorbit/2007/orb3/mexdata_17dec07_orb3_an04.png"; $filetoplot4="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/els/wholeorbit/2007/orb4/mexdata_17dec07_orb4_an04.png"; $imafiletoplot1="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/ima/wholeorbit/2007/orb1/mexdata_17dec07_orb1_ima_sum.png"; $imafiletoplot2="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/ima/wholeorbit/2007/orb2/mexdata_17dec07_orb2_ima_sum.png"; $imafiletoplot3="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/ima/wholeorbit/2007/orb3/mexdata_17dec07_orb3_ima_sum.png"; $imafiletoplot4="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/ima/wholeorbit/2007/orb4/mexdata_17dec07_orb4_ima_sum.png"; $_SESSION["thisday"]=17; $_SESSION["thismonth"]=12; $_SESSION["thisyear"]=3; $_SESSION["thisplottype"]=0; $_SESSION["thisperiodtype"]=$_POST["periodtype"]; } } # If user hits 'Forward one day' then we use this code - the default on the # end is for when the user chooses this option without having set the # form up for themself first elseif(isset($_POST["Forward"])) { $wantplot=1; if(isset($_POST["day"])) { if($_POST["year"]==0 || $_POST["year"]==4 || $_POST["year"]==8) { if($_POST["month"]==0) $doy=$_POST["day"]; else $doy=$leapaccudays[$_POST["month"]-1]+$_POST["day"]; } else { if($_POST["month"]==0) $doy=$_POST["day"]; else $doy=$accudays[$_POST["month"]-1]+$_POST["day"]; } $newdoy=$doy+1; if($_POST["year"]==0 || $_POST["year"]==4 || $_POST["year"]==8) { if($newdoy==367) { $newdoy=1; $newyear=$_POST["year"]+1; } else $newyear=$_POST["year"]; } else { if($newdoy==366) { $newdoy=1; $newyear=$_POST["year"]+1; } else $newyear=$_POST["year"]; } $foundmatch=0; $newmonth=0; if($_POST["year"]==0 || $_POST["year"]==4 || $_POST["year"]==8) { do { if($newdoy<=$leapaccudays[$newmonth]) $foundmatch=1; $newmonth=$newmonth+1; } while ($foundmatch==0); $newmonth=$newmonth-1; if ($newmonth > 0) $newday=$newdoy-$leapaccudays[$newmonth-1]; else $newday=$newdoy; } else { do { if($newdoy<=$accudays[$newmonth]) $foundmatch=1; $newmonth=$newmonth+1; } while ($foundmatch==0); $newmonth=$newmonth-1; if ($newmonth > 0) $newday=$newdoy-$accudays[$newmonth-1]; else $newday=$newdoy; } $filetoplot1=$elsloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb1/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb1_".$plotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $filetoplot2=$elsloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb2/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb2_".$plotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $filetoplot3=$elsloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb3/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb3_".$plotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $filetoplot4=$elsloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb4/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb4_".$plotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $imafiletoplot1=$imaloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb1/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb1_ima_".$imaplotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $imafiletoplot2=$imaloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb2/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb2_ima_".$imaplotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $imafiletoplot3=$imaloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb3/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb3_ima_".$imaplotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $imafiletoplot4=$imaloc[$_POST["periodtype"]].$yearnames[$newyear]."/orb4/mexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_orb4_ima_".$imaplotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $_SESSION["thisday"]=$newday; $_SESSION["thismonth"]=$newmonth; $_SESSION["thisyear"]=$newyear; $_SESSION["thisplottype"]=$_POST["plottype"]; $_SESSION["thisperiodtype"]=$_POST["periodtype"]; } else { $filetoplot1="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/els/wholeorbit/2007/orb1/mexdata_19dec07_orb1_an04.png"; $filetoplot2="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/els/wholeorbit/2007/orb2/mexdata_19dec07_orb2_an04.png"; $filetoplot3="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/els/wholeorbit/2007/orb3/mexdata_19dec07_orb3_an04.png"; $filetoplot4="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/els/wholeorbit/2007/orb4/mexdata_19dec07_orb4_an04.png"; $imafiletoplot1="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/ima/wholeorbit/2007/orb1/mexdata_19dec07_orb1_ima_sum.png"; $imafiletoplot2="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/ima/wholeorbit/2007/orb2/mexdata_19dec07_orb2_ima_sum.png"; $imafiletoplot3="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/ima/wholeorbit/2007/orb3/mexdata_19dec07_orb3_ima_sum.png"; $imafiletoplot4="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/ima/wholeorbit/2007/orb4/mexdata_19dec07_orb4_ima_sum.png"; $_SESSION["thisday"]=19; $_SESSION["thismonth"]=11; $_SESSION["thisyear"]=3; $_SESSION["thisplottype"]=0; $_SESSION["thisperiodtype"]=0; } } else { $wantplot=1; //if a link was clicked in the Available Data page the values will be passed in the url if(isset($_REQUEST[day]) && isset($_REQUEST[month]) && isset($_REQUEST[year])) { $_SESSION["thisday"]=$_REQUEST["day"]; $_SESSION["thismonth"]=$_REQUEST["month"]-1; $_SESSION["thisyear"]=$_REQUEST["year"]; $filetoplot1=$elsloc[$_REQUEST["periodtype"]].$yearnames[$_REQUEST["year"]]."/orb1/mexdata_".$daynames[$_REQUEST["day"]-1].$monthnames[$_REQUEST["month"]-1].$yearnames[$_REQUEST["year"]]."_orb1_".$plotnames[$_REQUEST["plottype"]].$period[$_REQUEST["periodtype"]].".png"; $filetoplot2=$elsloc[$_REQUEST["periodtype"]].$yearnames[$_REQUEST["year"]]."/orb2/mexdata_".$daynames[$_REQUEST["day"]-1].$monthnames[$_REQUEST["month"]-1].$yearnames[$_REQUEST["year"]]."_orb2_".$plotnames[$_REQUEST["plottype"]].$period[$_REQUEST["periodtype"]].".png"; $filetoplot3=$elsloc[$_REQUEST["periodtype"]].$yearnames[$_REQUEST["year"]]."/orb3/mexdata_".$daynames[$_REQUEST["day"]-1].$monthnames[$_REQUEST["month"]-1].$yearnames[$_REQUEST["year"]]."_orb3_".$plotnames[$_REQUEST["plottype"]].$period[$_REQUEST["periodtype"]].".png"; $filetoplot4=$elsloc[$_REQUEST["periodtype"]].$yearnames[$_REQUEST["year"]]."/orb4/mexdata_".$daynames[$_REQUEST["day"]-1].$monthnames[$_REQUEST["month"]-1].$yearnames[$_REQUEST["year"]]."_orb4_".$plotnames[$_REQUEST["plottype"]].$period[$_REQUEST["periodtype"]].".png"; $imafiletoplot1=$imaloc[$_REQUEST["periodtype"]].$yearnames[$_REQUEST["year"]]."/orb1/mexdata_".$daynames[$_REQUEST["day"]-1].$monthnames[$_REQUEST["month"]-1].$yearnames[$_REQUEST["year"]]."_orb1_ima_".$imaplotnames[$_REQUEST["plottype"]].$period[$_REQUEST["periodtype"]].".png"; $imafiletoplot2=$imaloc[$_REQUEST["periodtype"]].$yearnames[$_REQUEST["year"]]."/orb2/mexdata_".$daynames[$_REQUEST["day"]-1].$monthnames[$_REQUEST["month"]-1].$yearnames[$_REQUEST["year"]]."_orb2_ima_".$imaplotnames[$_REQUEST["plottype"]].$period[$_REQUEST["periodtype"]].".png"; $imafiletoplot3=$imaloc[$_REQUEST["periodtype"]].$yearnames[$_REQUEST["year"]]."/orb3/mexdata_".$daynames[$_REQUEST["day"]-1].$monthnames[$_REQUEST["month"]-1].$yearnames[$_REQUEST["year"]]."_orb3_ima_".$imaplotnames[$_REQUEST["plottype"]].$period[$_REQUEST["periodtype"]].".png"; $imafiletoplot4=$imaloc[$_REQUEST["periodtype"]].$yearnames[$_REQUEST["year"]]."/orb4/mexdata_".$daynames[$_REQUEST["day"]-1].$monthnames[$_REQUEST["month"]-1].$yearnames[$_REQUEST["year"]]."_orb4_ima_".$imaplotnames[$_REQUEST["plottype"]].$period[$_REQUEST["periodtype"]].".png"; } else{ # And finally, if this is the first load, set defaults $filetoplot1="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/els/wholeorbit/2007/orb1/mexdata_18dec07_orb1_an04.png"; $filetoplot2="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/els/wholeorbit/2007/orb2/mexdata_18dec07_orb2_an04.png"; $filetoplot3="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/els/wholeorbit/2007/orb3/mexdata_18dec07_orb3_an04.png"; $filetoplot4="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/els/wholeorbit/2007/orb4/mexdata_18dec07_orb4_an04.png"; $imafiletoplot1="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/ima/wholeorbit/2007/orb1/mexdata_18dec07_orb1_ima_sum.png"; $imafiletoplot2="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/ima/wholeorbit/2007/orb2/mexdata_18dec07_orb2_ima_sum.png"; $imafiletoplot3="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/ima/wholeorbit/2007/orb3/mexdata_18dec07_orb3_ima_sum.png"; $imafiletoplot4="http://www.mssl.ucl.ac.uk/missions/mex/dailyplots/ima/wholeorbit/2007/orb4/mexdata_18dec07_orb4_ima_sum.png"; $_SESSION["thisday"]=18; $_SESSION["thismonth"]=11; $_SESSION["thisyear"]=3; $_SESSION["thisplottype"]=0; $_SESSION["thisperiodtype"]=0; } } ?>
Mars Express
"; #if we are not displaying the orbit plot, then also show the ima plot(s) if(!isset($_POST["Orbit"])) { print "
"; print "\"No"; } print "
"; print "\"No"; #if we are not displaying the orbit plot, then also show the ima plot(s) if(!isset($_POST["Orbit"])) { print "
"; print "\"No"; } print "
"; print "\"No"; #if we are not displaying the orbit plot, then also show the ima plot(s) if(!isset($_POST["Orbit"])) { print "
"; print "\"No"; } print "
"; print "\"No"; #if we are not displaying the orbit plot, then also show the ima plot(s) if(!isset($_POST["Orbit"])) { print "
"; print "\"No"; } } else { $plottype = $_POST['plottype']; $periodtype = $_POST['periodtype']; include "mex_times.php"; }?>