|
|
@ -58,9 +58,8 @@ function validatePicture($picture) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function displayChar($char) {
|
|
|
|
function displayChar($char) {
|
|
|
|
if($char['visible'] < time()) {
|
|
|
|
if(strtotime($char['visible']) < time()) {
|
|
|
|
echo '<div style="position:relative; top:0px; left:0px;width:75;">';
|
|
|
|
echo '<div style="position:relative; top:0px; left:0px;width:75;">';
|
|
|
|
|
|
|
|
|
|
|
|
if($char['event_char_id'] != $char['winner']) {
|
|
|
|
if($char['event_char_id'] != $char['winner']) {
|
|
|
|
echo '<img src="'.validatePicture($char['char_bild']).'" style="position:absolute; top:0px; left:0px; z-index:1; width:75px;height:75px;border:0px">';
|
|
|
|
echo '<img src="'.validatePicture($char['char_bild']).'" style="position:absolute; top:0px; left:0px; z-index:1; width:75px;height:75px;border:0px">';
|
|
|
|
echo '<img src="../design/bilder/avatare/Lose.gif" style="position:relative; top:0px; left:0px; z-index:2;width:75px;height:75px;border:0px">';
|
|
|
|
echo '<img src="../design/bilder/avatare/Lose.gif" style="position:relative; top:0px; left:0px; z-index:2;width:75px;height:75px;border:0px">';
|
|
|
@ -82,6 +81,8 @@ function displayHeader($top, $bottom, $challenge, $clans) {
|
|
|
|
$challenge_id = $challenge['clan_challenge_id'];
|
|
|
|
$challenge_id = $challenge['clan_challenge_id'];
|
|
|
|
$event_id = $challenge['event_id'];
|
|
|
|
$event_id = $challenge['event_id'];
|
|
|
|
$chars = getEventChars($challenge_id, $event_id);
|
|
|
|
$chars = getEventChars($challenge_id, $event_id);
|
|
|
|
|
|
|
|
$left = $clans[0]['id'];
|
|
|
|
|
|
|
|
$right = $clans[1]['id'];
|
|
|
|
|
|
|
|
|
|
|
|
echo '<table cellpadding="0" cellspacing="0" width="913" height="0" border="'.$border.'">';
|
|
|
|
echo '<table cellpadding="0" cellspacing="0" width="913" height="0" border="'.$border.'">';
|
|
|
|
echo '<tr><th valign="top" height="32" colspan="9" align="center">Clankampf</th></tr>';
|
|
|
|
echo '<tr><th valign="top" height="32" colspan="9" align="center">Clankampf</th></tr>';
|
|
|
@ -100,24 +101,28 @@ function displayHeader($top, $bottom, $challenge, $clans) {
|
|
|
|
//Darstellen der Bilder auf der linken Seite
|
|
|
|
//Darstellen der Bilder auf der linken Seite
|
|
|
|
echo '<td><table width="100%" height="100%" cellpadding="0" cellspacing="0" border="'.$border.'"><tr>';
|
|
|
|
echo '<td><table width="100%" height="100%" cellpadding="0" cellspacing="0" border="'.$border.'"><tr>';
|
|
|
|
$width = 100 / $top;
|
|
|
|
$width = 100 / $top;
|
|
|
|
for ($i = 0; $i < $top; $i++) {
|
|
|
|
$max = 0;
|
|
|
|
echo '<td width="'.$width.'%" valign="middle" align="center">';
|
|
|
|
for ($i = 0; $max != $top; $i++) {
|
|
|
|
if($clans[0]['id'] == $chars[$i]['clan_id']) {
|
|
|
|
if($chars[$i]['clan_id'] == $left) {
|
|
|
|
|
|
|
|
echo '<td width="'.$width.'%" valign="middle" align="center">';
|
|
|
|
displayChar($chars[$i]);
|
|
|
|
displayChar($chars[$i]);
|
|
|
|
|
|
|
|
echo '</td>';
|
|
|
|
|
|
|
|
$max++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</td>';
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</tr></table></td>';
|
|
|
|
echo '</tr></table></td>';
|
|
|
|
//Darstellen der Bilder auf der rechten Seite
|
|
|
|
//Darstellen der Bilder auf der rechten Seite
|
|
|
|
echo '<td><table width="100%" height="100%" cellpadding="0" cellspacing="0" border="'.$border.'"><tr>';
|
|
|
|
echo '<td><table width="100%" height="100%" cellpadding="0" cellspacing="0" border="'.$border.'"><tr>';
|
|
|
|
$max = (count($chars)/2)+$top;
|
|
|
|
$max = 0;
|
|
|
|
$min = (count($chars)/2);
|
|
|
|
$i = 0;
|
|
|
|
for ($i = $min; $i < $max; $i++) {
|
|
|
|
While($max != $top) {
|
|
|
|
echo '<td width="'.$width.'%" valign="middle" align="center">';
|
|
|
|
if($chars[$i]['clan_id'] == $right) {
|
|
|
|
if($clans[1]['id'] == $chars[$i]['clan_id']) {
|
|
|
|
echo '<td width="'.$width.'%" valign="middle" align="center">';
|
|
|
|
displayChar($chars[$i]);
|
|
|
|
displayChar($chars[$i]);
|
|
|
|
|
|
|
|
echo '</td>';
|
|
|
|
|
|
|
|
$max++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</td>';
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</tr></table></td>';
|
|
|
|
echo '</tr></table></td>';
|
|
|
|
echo '</tr>';
|
|
|
|
echo '</tr>';
|
|
|
@ -126,27 +131,36 @@ function displayHeader($top, $bottom, $challenge, $clans) {
|
|
|
|
echo '<tr height = "150">';
|
|
|
|
echo '<tr height = "150">';
|
|
|
|
//Darstellen der Bilder auf der linken Seite
|
|
|
|
//Darstellen der Bilder auf der linken Seite
|
|
|
|
echo '<td><table width="100%" height="100%" cellpadding="0" cellspacing="0" border="'.$border.'"><tr>';
|
|
|
|
echo '<td><table width="100%" height="100%" cellpadding="0" cellspacing="0" border="'.$border.'"><tr>';
|
|
|
|
$min = $top;
|
|
|
|
$used = $top;
|
|
|
|
$max = count($chars) / 2;
|
|
|
|
$max = 0;
|
|
|
|
|
|
|
|
$i = 0;
|
|
|
|
$width = 100 / $bottom;
|
|
|
|
$width = 100 / $bottom;
|
|
|
|
for ($i = $min; $i < $max; $i++) {
|
|
|
|
While($max != ($bottom+$used)) {
|
|
|
|
echo '<td width="'.$width.'%" valign="middle" align="center">';
|
|
|
|
if($chars[$i]['clan_id'] == $left) {
|
|
|
|
if($clans[0]['id'] == $chars[$i]['clan_id']) {
|
|
|
|
if($max >= $used) {
|
|
|
|
displayChar($chars[$i]);
|
|
|
|
echo '<td width="'.$width.'%" valign="middle" align="center">';
|
|
|
|
|
|
|
|
displayChar($chars[$i]);
|
|
|
|
|
|
|
|
echo '</td>';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$max++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</td>';
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</tr></table></td>';
|
|
|
|
echo '</tr></table></td>';
|
|
|
|
//Darstellen der Bilder auf der rechten Seite
|
|
|
|
//Darstellen der Bilder auf der rechten Seite
|
|
|
|
echo '<td><table width="100%" height="100%" cellpadding="0" cellspacing="0" border="'.$border.'"><tr>';
|
|
|
|
echo '<td><table width="100%" height="100%" cellpadding="0" cellspacing="0" border="'.$border.'"><tr>';
|
|
|
|
$min = (count($chars)/2)+$top;
|
|
|
|
$max = 0;
|
|
|
|
$max = count($chars);
|
|
|
|
$i = 0;
|
|
|
|
for ($i = $min; $i < $max; $i++) {
|
|
|
|
While($max != ($bottom+$used)) {
|
|
|
|
echo '<td width="'.$width.'%" valign="middle" align="center">';
|
|
|
|
if($chars[$i]['clan_id'] == $right) {
|
|
|
|
if($clans[1]['id'] == $chars[$i]['clan_id']) {
|
|
|
|
if($max >= $used) {
|
|
|
|
displayChar($chars[$i]);
|
|
|
|
echo '<td width="'.$width.'%" valign="middle" align="center">';
|
|
|
|
|
|
|
|
displayChar($chars[$i]);
|
|
|
|
|
|
|
|
echo '</td>';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$max++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</td>';
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</tr></table></td>';
|
|
|
|
echo '</tr></table></td>';
|
|
|
|
echo '</tr>';
|
|
|
|
echo '</tr>';
|
|
|
@ -195,7 +209,7 @@ function displayBody($challenge, $clans, $user) {
|
|
|
|
$guest_char = getEventChar($event_id, $guest_char_id);
|
|
|
|
$guest_char = getEventChar($event_id, $guest_char_id);
|
|
|
|
|
|
|
|
|
|
|
|
// Check if the fight is already "visible"
|
|
|
|
// Check if the fight is already "visible"
|
|
|
|
if($event_fight['visible'] < time()) {
|
|
|
|
if(strtotime($event_fight['visible']) < time()) {
|
|
|
|
echo '<tr><td width="45%" height="15" valign="middle" bgcolor="'.getColor($row).'" align="right">';
|
|
|
|
echo '<tr><td width="45%" height="15" valign="middle" bgcolor="'.getColor($row).'" align="right">';
|
|
|
|
echo '<a href="../event_kampf_anzeige.php?event_id='.$event_id.'&event_fight_id='.$event_fight['event_fight_id'].'">';
|
|
|
|
echo '<a href="../event_kampf_anzeige.php?event_id='.$event_id.'&event_fight_id='.$event_fight['event_fight_id'].'">';
|
|
|
|
echo $host_char['char_name'].'</a>';
|
|
|
|
echo $host_char['char_name'].'</a>';
|
|
|
@ -206,7 +220,7 @@ function displayBody($challenge, $clans, $user) {
|
|
|
|
echo $guest_char['char_name'].'</a>';
|
|
|
|
echo $guest_char['char_name'].'</a>';
|
|
|
|
echo '</td></tr>';
|
|
|
|
echo '</td></tr>';
|
|
|
|
$row++;
|
|
|
|
$row++;
|
|
|
|
} else if($event_fight['starting'] < time()) {
|
|
|
|
} else if(strtotime($event_fight['starting']) < time()) {
|
|
|
|
//has it started?
|
|
|
|
//has it started?
|
|
|
|
echo '<tr><td width="45%" height="15" valign="middle" bgcolor="'.getColor($row).'" align="right">';
|
|
|
|
echo '<tr><td width="45%" height="15" valign="middle" bgcolor="'.getColor($row).'" align="right">';
|
|
|
|
echo $host_char['char_name'].'</td>';
|
|
|
|
echo $host_char['char_name'].'</td>';
|
|
|
@ -216,7 +230,7 @@ function displayBody($challenge, $clans, $user) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if($challenge['enddate'] < time()) {
|
|
|
|
if(strtotime($challenge['enddate']) < time() ) {
|
|
|
|
//sieger rausfinden
|
|
|
|
//sieger rausfinden
|
|
|
|
if($clans[0]['points'] > $clans[0]['points']) {
|
|
|
|
if($clans[0]['points'] > $clans[0]['points']) {
|
|
|
|
$winner = $clans[0]['name'];
|
|
|
|
$winner = $clans[0]['name'];
|
|
|
|