From 6dea5125559533f7bc663231e926e0172de6faaf Mon Sep 17 00:00:00 2001 From: radiskull Date: Thu, 8 Dec 2011 00:13:01 +0000 Subject: [PATCH] Clean code xD --- ag/clan/kampf_anzeige.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/ag/clan/kampf_anzeige.php b/ag/clan/kampf_anzeige.php index e0cd835..524e410 100644 --- a/ag/clan/kampf_anzeige.php +++ b/ag/clan/kampf_anzeige.php @@ -115,14 +115,13 @@ function displayHeader($top, $bottom, $challenge, $clans) { echo ''; $max = 0; $i = 0; - While($max != $top) { + for ($i = 0; $max != $top; $i++) { if($chars[$i]['clan_id'] == $right) { echo ''; $max++; } - $i++; } echo '
'; displayChar($chars[$i]); echo '
'; echo ''; @@ -131,36 +130,34 @@ function displayHeader($top, $bottom, $challenge, $clans) { echo ''; //Darstellen der Bilder auf der linken Seite echo ''; - $used = $top; + $showed = $top; $max = 0; $i = 0; $width = 100 / $bottom; - While($max != ($bottom+$used)) { + for ($i = 0; $max != ($bottom+$showed); $i++) { if($chars[$i]['clan_id'] == $left) { - if($max >= $used) { + if($max >= $showed) { echo ''; } $max++; } - $i++; } echo '
'; displayChar($chars[$i]); echo '
'; //Darstellen der Bilder auf der rechten Seite echo ''; $max = 0; $i = 0; - While($max != ($bottom+$used)) { + for ($i = 0; $max != ($bottom+$showed); $i++) { if($chars[$i]['clan_id'] == $right) { - if($max >= $used) { + if($max >= $showed) { echo ''; } $max++; } - $i++; } echo '
'; displayChar($chars[$i]); echo '
'; echo '';