Cassini CAPS ELS browse plots at MSSL - page under construction

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="cassiniplots/plots".$sumyearnames[$newyear]."/els_summaryplot_".$yearnames[$newyear].$newdoy.$plotnames[$_POST["plottype"]].".png"; $_SESSION["thisday"]=$newday; $_SESSION["thismonth"]=$newmonth; $_SESSION["thisyear"]=$newyear; $_SESSION["thisplottype"]=$_POST["plottype"]; } else { $filetoplot="cassiniplots/plots04/els_summaryplot_20041820.png"; $_SESSION["thisday"]=30; $_SESSION["thismonth"]=5; $_SESSION["thisyear"]=0; $_SESSION["thisplottype"]=0; } } # If user hits 'Back 6hrs' 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["Back6"])) { if(isset($_POST["day"])) { if($_POST["plottype"]==0) { $newplottype=3; if($_POST["year"]==0 or $_POST["year"]==4) { 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($newdoy==0) { if ($_POST["year"]==1) $newdoy=366; else $newdoy=365; $newyear=$_POST["year"]-1; } else $newyear=$_POST["year"]; $foundmatch=0; $newmonth=0; if($_POST["year"]==0 or $_POST["year"]==4) { 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; } } else { if($_POST["year"]==0 or$_POST["year"]==4) { if($_POST["month"]==0) $newdoy=$_POST["day"]; else $newdoy=$leapaccudays[$_POST["month"]-1]+$_POST["day"]; } else { if($_POST["month"]==0) $doy=$_POST["day"]; else $newdoy=$accudays[$_POST["month"]-1]+$_POST["day"]; } $newday=$_POST["day"]; $newmonth=$_POST["month"]; $newyear=$_POST["year"]; $newplottype=$_POST["plottype"]-1; } $filetoplot="cassiniplots/plots".$sumyearnames[$newyear]."/els_summaryplot_".$yearnames[$newyear].$newdoy.$plotnames[$newplottype].".png"; $_SESSION["thisday"]=$newday; $_SESSION["thismonth"]=$newmonth; $_SESSION["thisyear"]=$newyear; $_SESSION["thisplottype"]=$newplottype; } else { $filetoplot="cassiniplots/plots04/els_summaryplot_20041823.png"; $_SESSION["thisday"]=30; $_SESSION["thismonth"]=5; $_SESSION["thisyear"]=0; $_SESSION["thisplottype"]=3; } } # If user hits 'Forward 6hrs' 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["Forward6"])) { if(isset($_POST["day"])) { if($_POST["plottype"]==3) { $newplottype=0; if($_POST["year"]==0 or $_POST["year"]==4) { 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 or $_POST["year"]==4) { 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 or $_POST["year"]==4) { 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; } } else { if($_POST["year"]==0 or$_POST["year"]==4) { if($_POST["month"]==0) $newdoy=$_POST["day"]; else $newdoy=$leapaccudays[$_POST["month"]-1]+$_POST["day"]; } else { if($_POST["month"]==0) $doy=$_POST["day"]; else $newdoy=$accudays[$_POST["month"]-1]+$_POST["day"]; } $newday=$_POST["day"]; $newmonth=$_POST["month"]; $newyear=$_POST["year"]; $newplottype=$_POST["plottype"]+1; } $filetoplot="cassiniplots/plots".$sumyearnames[$newyear]."/els_summaryplot_".$yearnames[$newyear].$newdoy.$plotnames[$newplottype].".png"; $_SESSION["thisday"]=$newday; $_SESSION["thismonth"]=$newmonth; $_SESSION["thisyear"]=$newyear; $_SESSION["thisplottype"]=$newplottype; } else { $filetoplot="cassiniplots/plots04/els_summaryplot_20041831.png"; $_SESSION["thisday"]=1; $_SESSION["thismonth"]=6; $_SESSION["thisyear"]=0; $_SESSION["thisplottype"]=1; } } # 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"])) { if(isset($_POST["day"])) { if($_POST["year"]==0 or $_POST["year"]==4) { 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 or $_POST["year"]==4) { 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 or $_POST["year"]==4) { 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="cassiniplots/plots".$sumyearnames[$newyear]."/els_summaryplot_".$yearnames[$newyear].$newdoy.$plotnames[$_POST["plottype"]].".png"; $_SESSION["thisday"]=$newday; $_SESSION["thismonth"]=$newmonth; $_SESSION["thisyear"]=$newyear; $_SESSION["thisplottype"]=$_POST["plottype"]; } else { $filetoplot="cassiniplots/plots04/els_summaryplot_20041840.png"; $_SESSION["thisday"]=2; $_SESSION["thismonth"]=6; $_SESSION["thisyear"]=0; $_SESSION["thisplottype"]=0; } } # And finally, if this is the first load, set defaults else { $filetoplot="cassiniplots/plots04/els_summaryplot_20041830.png"; $_SESSION["thisday"]=1; $_SESSION["thismonth"]=6; $_SESSION["thisyear"]=0; $_SESSION["thisplottype"]=0; } ?>
Cassini page
"; ?>