Venus 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; } $filetoplot=$elsloc[$_POST["periodtype"]].$yearnames[$newyear]."/vexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_".$plotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $imafiletoplot=$imaloc[$_POST["periodtype"]].$yearnames[$newyear]."/vexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_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 { $filetoplot="http://www.mssl.ucl.ac.uk/missions/vex/newdailyplots/els/wholeorbit/2006/vexdata_30jun06_an11.png"; $imafiletoplot="http://www.mssl.ucl.ac.uk/missions/vex/newdailyplots/ima/wholeorbit/2006/vexdata_30jun06_ima_sum.png"; $_SESSION["thisday"]=30; $_SESSION["thismonth"]=5; $_SESSION["thisyear"]=0; $_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"]==2 || $_POST["year"]==6) { 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"]==2 || $_POST["year"]==6) { 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"]==2 || $_POST["year"]==6) { 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; } $filetoplot=$elsloc[$_POST["periodtype"]].$yearnames[$newyear]."/vexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_".$plotnames[$_POST["plottype"]].$period[$_POST["periodtype"]].".png"; $imafiletoplot=$imaloc[$_POST["periodtype"]].$yearnames[$newyear]."/vexdata_".$daynames[$newday-1].$monthnames[$newmonth].$yearnames[$newyear]."_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 { $filetoplot="http://www.mssl.ucl.ac.uk/missions/vex/newdailyplots/els/wholeorbit/2006/vexdata_02jul06_an11.png"; $imafiletoplot="http://www.mssl.ucl.ac.uk/missions/vex/newdailyplots/ima/wholeorbit/2006/vexdata_02jul06_ima_sum.png"; $_SESSION["thisday"]=2; $_SESSION["thismonth"]=6; $_SESSION["thisyear"]=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"]; $filetoplot=$elsloc[$_REQUEST["periodtype"]].$yearnames[$_REQUEST["year"]]."/vexdata_".$daynames[$_REQUEST["day"]-1].$monthnames[$_REQUEST["month"]-1].$yearnames[$_REQUEST["year"]]."_".$plotnames[$_REQUEST["plottype"]].$period[$_REQUEST["periodtype"]].".png"; $imafiletoplot=$imaloc[$_REQUEST["periodtype"]].$yearnames[$_REQUEST["year"]]."/vexdata_".$daynames[$_REQUEST["day"]-1].$monthnames[$_REQUEST["month"]-1].$yearnames[$_REQUEST["year"]]."_ima_".$imaplotnames[$_REQUEST["plottype"]].$period[$_REQUEST["periodtype"]].".png"; } else{ # And finally, if this is the first load, set defaults $filetoplot="http://www.mssl.ucl.ac.uk/missions/vex/newdailyplots/els/wholeorbit/2006/vexdata_01jul06_an11.png"; $imafiletoplot="http://www.mssl.ucl.ac.uk/missions/vex/newdailyplots/ima/wholeorbit/2006/vexdata_01jul06_ima_sum.png"; $_SESSION["thisday"]=1; $_SESSION["thismonth"]=6; $_SESSION["thisyear"]=0; $_SESSION["thisplottype"]=0; $_SESSION["thisperiodtype"]=0; } } ?>
Venus Express
"; #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 "times.php"; } ?>