0"; $query = "SELECT u.username,p.*,DATE_FORMAT(CONVERT_TZ(p.last_stats_update, '+00:00', '".$_SESSION['s_timezone_offset']."'), '%d. %m. %Y - %H:%i:%s') as last_stats_update, a.allyname, a.diplomatic_status as dipl_status FROM $playertable p LEFT JOIN $allytable a ON (p.alliance_id = a.id) LEFT JOIN $utablename u ON (p.user_id = u.id) WHERE p.$rank > 0 $order LIMIT ".(($page-1)*$_SESSION['s_statspage']).",".$_SESSION['s_statspage']; } if ($_GET['show'] == "ally") { $checked2 = "selected"; $gesamtquery = "SELECT count(*) as anzahl FROM $allytable WHERE rank > 0"; $query = "SELECT a.*,DATE_FORMAT(CONVERT_TZ(last_update, '+00:00', '".$_SESSION['s_timezone_offset']."') , '%d. %m. %Y - %H:%i:%s') as last_update FROM $allytable a LEFT JOIN $utablename u ON (a.user_id = u.id) WHERE $rank > 0 $order LIMIT ".(($page-1)*$_SESSION['s_statspage']).",".$_SESSION['s_statspage']; } } $res = mysql_query($gesamtquery) or die(mysql_error()); $line = mysql_fetch_object($res); $anzahl = $line->anzahl; $select1 = ''; echo '
'."\n"; echo ''."\n"; if ($_GET['show'] == "player") { echo ''."\n"; echo '
'.STATS_TBLHEAD.' '.$select1.'
'."\n"; if ($anzahl > $_SESSION['s_statspage']) draw_pagenumbers($page,$anzahl,$_SESSION['s_statspage'],$_SERVER['PHP_SELF']."?show=".$_GET['show']."&typ=$rank&how=$how","page"); echo "
\n"; echo ''."\n"; echo ' '; if ($_SESSION['s_diplomatic']) { echo ''; } echo "\n"; } else { echo ''."\n"; echo '
'.STATS_RANK.' '.STATS_PLAYERNAME.' '.STATS_ALLYNAME.' '.STATS_SCORE.' '.STATS_FLEET.' ('.STATS_RANK.') '.STATS_RESEARCH.' ('.STATS_RANK.') 
'.STATS_TBLHEAD.' '.$select1.'
'."\n"; if ($anzahl > $_SESSION['s_statspage']) draw_pagenumbers($page,$anzahl,$_SESSION['s_statspage'],$_SERVER['PHP_SELF']."?show=".$_GET['show']."&typ=$rank&how=$how","page"); echo "
\n"; echo ''."\n"; echo ''; if ($_SESSION['s_diplomatic']) { echo ''; } echo " \n"; } $res = mysql_query($query) or die(mysql_error()); $i = 0; while ($line = mysql_fetch_object($res)) { if ($_GET['show'] == "player") { switch ($line->diplomatic_status) { case "neutral": $diplomatic_class = "neutral"; break; case "boycott": $diplomatic_class = "boycott"; break; case "nap": $diplomatic_class = "nap"; break; case "ally": $diplomatic_class = "ally"; break; case "war": $diplomatic_class = "war"; break; case "own": $diplomatic_class = "own"; break; case "wing": $diplomatic_class = "wing"; break; case "nothing": $diplomatic_class = ""; break; } $update_text = (empty($line->username)) ? utf8_encode(STATS_UPDATE).": " : $line->username." @ "; echo ''; if (!empty($line->allyname)) { echo ''; } else { echo ""; } echo ' '; if ($_SESSION['s_diplomatic']) { echo ''. ''. ''. ''. ''. ''. ''. ''. ''. ''. ''. '
'.STATS_RANK.' '.STATS_ALLYNAME.' '.STATS_MEMBERS.' '.STATS_SCORE.' '.STATS_FLEET.' '.STATS_RESEARCH.' 
last_stats_update.'")\'>'.$line->$rank.' '.$line->playername.''.$line->allyname.' '.number_format($line->points,0,",",".").' '.(($rank == "rank") ? "" : "(".$line->rank.") ").' '.number_format($line->fpoints,0,",",".").' '.(($rank == "frank") ? "" : "(".$line->frank.") ").' '.number_format($line->rpoints,0,",",".").' '.(($rank == "rrank") ? "" : "(".$line->rrank.") ").' options'. '
').utf8_encode(STATS_CHANGE_PLAYER_STATUS).htmlentities('close
'. '').utf8_encode(STATS_NEUTRAL).htmlentities('
'. '').utf8_encode(STATS_BOYCOTT).htmlentities('
'. '').utf8_encode(STATS_NAP).htmlentities('
'. '').utf8_encode(STATS_ALLIED).htmlentities('
'. '').utf8_encode(STATS_WAR).htmlentities('
'. '').utf8_encode(STATS_OWN).htmlentities('
'. '').utf8_encode(STATS_WING).htmlentities('
'. '').utf8_encode(STATS_NOTHING).htmlentities('
 
') .utf8_encode(STATS_DELETE).htmlentities('
' ).'\')" />'; } echo "\n"; } else { // Alliances switch ($line->diplomatic_status) { case "neutral": $diplomatic_class = "neutral"; break; case "boycott": $diplomatic_class = "boycott"; break; case "nap": $diplomatic_class = "nap"; break; case "ally": $diplomatic_class = "ally"; break; case "war": $diplomatic_class = "war"; break; case "own": $diplomatic_class = "own"; break; case "wing": $diplomatic_class = "wing"; break; case "nothing": $diplomatic_class = ""; break; } $update_text = (empty($line->username)) ? utf8_encode(STATS_UPDATE).": " : $line->username." @ "; if ($rank == "members") { echo 'last_update.'")\' class="bg_'.$diplomatic_class.'">'.$line->rank.''; } else { echo 'last_update.'")\' class="bg_'.$diplomatic_class.'">'.$line->$rank.''; } echo ' '.$line->allyname.' '.$line->members.''; if ($line->points > 0) { echo ''.number_format($line->points,0,",",".").' '.(($rank == "rank") ? "" : "(".$line->rank.") ").''; } else { echo ''.number_format($line->points,0,",",".").' '.(($rank == "rank") ? "" : "(".$line->rank.") ").''; } if ($line->fpoints > 0) { echo ''.number_format($line->fpoints,0,",",".").' '.(($rank == "frank") ? "" : "(".$line->frank.") ").''; } else { echo ''.number_format($line->fpoints,0,",",".").' '.(($rank == "frank") ? "" : "(".$line->frank.") ").''; } if ($line->rpoints > 0) { echo ''.number_format($line->rpoints,0,",",".").' '.(($rank == "rrank") ? "" : "(".$line->rrank.") ").''; } else { echo ''.number_format($line->rpoints,0,",",".").' '.(($rank == "rrank") ? "" : "(".$line->rrank.") ").''; } if ($_SESSION['s_diplomatic']) { echo ' close'. '').utf8_encode(STATS_CHANGE_ALLIANCE_STATUS).htmlentities('close'. '').utf8_encode(STATS_CHANGE_ALLIANCE_STATUS_HINT).htmlentities(''. ''. '').utf8_encode(STATS_NEUTRAL).htmlentities(''. ''. '').utf8_encode(STATS_BOYCOTT).htmlentities(''. ''. '').utf8_encode(STATS_NAP).htmlentities(''. ''. '').utf8_encode(STATS_ALLIED).htmlentities(''. ''. '').utf8_encode(STATS_WAR).htmlentities(''. ''. '').utf8_encode(STATS_OWN).htmlentities(''. ''. '').utf8_encode(STATS_WING).htmlentities(''. ''. '').utf8_encode(STATS_NOTHING).htmlentities(''. ' '. '') .utf8_encode(STATS_DELETE).htmlentities(''. '' ).'\')" />'; } } $i++; } echo "\n"; ?>