0 ORDER BY monster DESC LIMIT 1"); } if ($mosaicinfo = mysql_fetch_array($mosaics)) { $extra = '&imageType=edr&sentEdrid='.$edrid.'&sentMosaicid='.$mosaicinfo['mosaicid'].'&sentSiteid='.$mosaicinfo['siteid'].'&offMosaic=1'; } } $extra .= '&path='.$_GET['path']; } else if ($imageType == 'recent') { $roverinfo = mysql_fetch_array(mysql_query("SELECT a,earthstart,marsstart FROM rover WHERE folder='".$location."'")); $latesttime = @mysql_result(mysql_query("SELECT adddate FROM edr WHERE a='".$roverinfo['a']."' ORDER BY adddate DESC LIMIT 1"),0); $earlytime = $latesttime - 3600*12; $edrs = mysql_query("SELECT c,e,adddate FROM edr WHERE a='".$roverinfo['a']."' AND adddate >= '".$earlytime."' AND adddate <= '".$latesttime."' ORDER BY c ASC"); $resultNum = mysql_num_rows($edrs); if ($resultNum > 0) { $hours = ceil((time()-$latesttime)/3600); $strHours = ($hours == 1) ? 'hour' : 'hours'; $strSites = ""; $edrNum = 0; $siteArray = array(); while($edr = mysql_fetch_array($edrs)) { settype($edr['c'],"int"); if ($edrNum == 0) { $firstSol = $edr['c']; } if ($edrNum == ($resultNum-1)) { $lastSol = $edr['c']; } $edrNum++; settype($edr['e'],"int"); $addSite = true; for($i=0;$i 1) ? 'sites' : 'site'; $fullSiteStr = 'Images from '.$siteStr.' #'.$strSites; $firstdate = round((($firstSol-$roverinfo['marsstart']-88753)/88753)*88776+$roverinfo['earthstart'],0); $lastdate = round((($lastSol-$roverinfo['marsstart']-88753)/88753)*88776+$roverinfo['earthstart'],0); $firstDay = gmdate("j",$firstdate); $lastDay = gmdate("j",$lastdate); $firstMonth = gmdate("M",$firstdate); $lastMonth = gmdate("M",$lastdate); if ($lastDay != $firstDay) { if ($lastMonth != $firstMonth) { $dateEnding = "-".$lastMonth." ".$lastDay; } else { $dateEnding = "-".$lastDay; } } else { $dateEnding = ""; } $fullDateStr = $firstMonth." ".$firstDay.$dateEnding.", 2004"; $newCaption = "Most recent images\n"; $newCaption .= "(received ".$hours." ".$strHours." ago)\n"; $newCaption .= $fullSiteStr."\n"; $newCaption .= "(Multiple cameras)\n"; $newCaption .= $fullDateStr; $newCaption = urlencode($newCaption); $extra = '&imageType=recent&recImageCount='.$resultNum.'&recentCaption='.$newCaption; } } $flashVars = 'location='.$location.$extra; ?>

Credits About Us Site Map About Us