include("plotconf.inc"); include("plot.inc"); if($warnings == "1") { error_reporting(E_ALL); } else { error_reporting(E_ERROR); } ?> if(shouldrun($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) { $drawmode = "GD"; } else { $drawmode = "CSS"; } if(isset($HTTP_POST_VARS["button"])) { // save data from the POST setcookie ("atlasprefs", "", time() - 36000000); setcookie ("atlasprefs", "$HTTP_POST_VARS[shape]:$HTTP_POST_VARS[color]:$HTTP_POST_VARS[size]:$HTTP_POST_VARS[earthimage]:$HTTP_POST_VARS[cssdot]:$HTTP_POST_VARS[seldrawmode]", time() + 36000000, $cookiepath); $setshape = $HTTP_POST_VARS["shape"]; $setcolor = $HTTP_POST_VARS["color"]; $setsize = $HTTP_POST_VARS["size"]; $setearthimage = $HTTP_POST_VARS["earthimage"]; $setcssdot = $HTTP_POST_VARS["cssdot"]; $setseldrawmode = $HTTP_POST_VARS["seldrawmode"]; if($setseldrawmode == "1") { $drawmode = "GD"; } else { $drawmode = "CSS"; } } elseif(isset($HTTP_COOKIE_VARS["atlasprefs"]) && validcookie($HTTP_COOKIE_VARS["atlasprefs"])) { // get data from the cookie @list($setshape, $setcolor, $setsize, $setearthimage, $setcssdot, $setseldrawmode) = split(":", $HTTP_COOKIE_VARS["atlasprefs"]); } else { $setshape = "Diamond"; $setsize = "3"; $setcolor = "red"; $setearthimage = $earthimages[$defaultimage]; $setcssdot = "reddot.gif"; if(shouldrun($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) { $setseldrawmode = 1; } else { $setseldrawmode = 0; } // override old cookie if there is post data if(isset($HTTP_POST_VARS["seldrawmode"])) { $setsetdrawmode = $HTTP_POST_VARS["seldrawmode"]; } } ?> # START HTML ?>