"; echo "
maxgala; // Tabelle aufstellen for ($j=1;$j<500;$j++) { $galaxiearray[$j] = 0; // Datumstempel auf 0 setzen $userarray[$j] = "unknown"; } $query = "SELECT g.system, UNIX_TIMESTAMP(CONVERT_TZ(g.last_update, '+00:00', '".$_SESSION['s_timezone_offset']."')) as gtimestamp, DATE_FORMAT(CONVERT_TZ(g.last_update, '+00:00', '".$_SESSION['s_timezone_offset']."'), '%d. %m. %Y - %H:%i:%s') as glastupdate, u.username FROM $dbtablename g LEFT JOIN $utablename u ON (g.user_id=u.id) WHERE g.galaxy='$page' AND g.planet='1'"; $res = mysql_query($query) or die(mysql_error()); while ($line = mysql_fetch_object($res)) { $galaxiearray[$line->system] = $line->gtimestamp; $userarray[$line->system] = utf8_encode($line->username." ".STATUS_ON." ".$line->glastupdate); } echo "\n"; $tablestring = "
1
2
3
4
5
6
7
".USER_GALAXY.": \n"; draw_pagenumbers($page,$maxgala,1,$_SERVER['PHP_SELF'],"page"); echo "
"; for ($j=1;$j<=50;$j++) { $tablestring .= "\n"; for ($i=0;$i<10;$i++) { if ($j+$i*50 == 500) { $tablestring .= "\n"; break; } $title = $userarray[$j+$i*50]; if ($galaxiearray[$j+$i*50] == 0) $tablestring .= "\n"; // noch kein Eintrag elseif ($galaxiearray[$j+$i*50] < (time() - 86400*30)) $tablestring .= "\n"; // 1 Monat und mehr elseif ($galaxiearray[$j+$i*50] < (time() - 86400*14)) $tablestring .= "\n"; // 2-4 Wochen elseif ($galaxiearray[$j+$i*50] < (time() - 86400*7)) $tablestring .= "\n"; // 1-2 Wochen elseif ($galaxiearray[$j+$i*50] < (time() - 86400*4)) $tablestring .= "\n"; // 4-7 Tage elseif ($galaxiearray[$j+$i*50] < (time() - 86400*2)) $tablestring .= "\n"; // 2-4 Tage else $tablestring .= "\n"; } $tablestring .= "\n"; } $tablestring .="
 $page:".($j+$i*50)."$page:".($j+$i*50)."$page:".($j+$i*50)."$page:".($j+$i*50)."$page:".($j+$i*50)."$page:".($j+$i*50)."$page:".($j+$i*50)."
\n"; echo "
$tablestring
"; makefooter(); ?>