Clean code xD

main
radiskull 13 years ago
parent d06da00865
commit 6dea512555

@ -115,14 +115,13 @@ function displayHeader($top, $bottom, $challenge, $clans) {
echo '<td><table width="100%" height="100%" cellpadding="0" cellspacing="0" border="'.$border.'"><tr>';
$max = 0;
$i = 0;
While($max != $top) {
for ($i = 0; $max != $top; $i++) {
if($chars[$i]['clan_id'] == $right) {
echo '<td width="'.$width.'%" valign="middle" align="center">';
displayChar($chars[$i]);
echo '</td>';
$max++;
}
$i++;
}
echo '</tr></table></td>';
echo '</tr>';
@ -131,36 +130,34 @@ function displayHeader($top, $bottom, $challenge, $clans) {
echo '<tr height = "150">';
//Darstellen der Bilder auf der linken Seite
echo '<td><table width="100%" height="100%" cellpadding="0" cellspacing="0" border="'.$border.'"><tr>';
$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 '<td width="'.$width.'%" valign="middle" align="center">';
displayChar($chars[$i]);
echo '</td>';
}
$max++;
}
$i++;
}
echo '</tr></table></td>';
//Darstellen der Bilder auf der rechten Seite
echo '<td><table width="100%" height="100%" cellpadding="0" cellspacing="0" border="'.$border.'"><tr>';
$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 '<td width="'.$width.'%" valign="middle" align="center">';
displayChar($chars[$i]);
echo '</td>';
}
$max++;
}
$i++;
}
echo '</tr></table></td>';
echo '</tr>';

Loading…
Cancel
Save