Bug in Herausforderung-Anzeige gefixt

Tabellenrand bei NPC-Anzeige entfernt
main
radiskull 13 years ago
parent 38c5d9893b
commit dea2e3753f

@ -109,6 +109,7 @@ function displayShowChallenge($clan_challenge_id, $user) {
$slots = array();
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<input type="hidden" name="as" value=clan/kampf_info> <input
type="hidden" name="action" value="joinchallenge"> <input
@ -192,28 +193,28 @@ function displayShowChallenge($clan_challenge_id, $user) {
}
function displayShowOldChallenge($clan_challenge_id, array $user) {
$user_clan = getClan($user['clan']);
$challenge = getChallenge($clan_challenge_id);
$user_clan = getClan($user['clan']);
$challenge = getChallenge($clan_challenge_id);
$clans = getParticipatingClanIDs($clan_challenge_id);
if(!in_array($user['clan'] , $clans)) {
displayErrorMessage(NULL, 'Wollte da jemand schummeln? ;)', displayHistoryBackLink());
return;
}
if($challenge['calculated'] == FALSE) {
displayErrorMessage(NULL, 'Der Clankampf ist noch nicht soweit!!', displayHistoryBackLink());
return;
displayErrorMessage(NULL, 'Der Clankampf ist noch nicht soweit!!', displayHistoryBackLink());
return;
}
//print_r($challenge);
//print_r($challenge);
// Get the Event
$event_id = $challenge['event_id'];
$event = getEvent($event_id);
if($event['event_type'] != EVENT_CLAN_FIGHT) {
displayErrorMessage(NULL, 'Das Event is garkein Clan-Kampf!!', displayHistoryBackLink());
return;
displayErrorMessage(NULL, 'Das Event is garkein Clan-Kampf!!', displayHistoryBackLink());
return;
}
$fight_ids = getEventFightIds($event_id);
echo '<table>';
echo '<tr><th align="center" width="100">Kampf</th><th>Ansehen</th></tr>';
foreach($fight_ids as $fight_id) {
@ -239,17 +240,17 @@ function displayShowOldChallenge($clan_challenge_id, array $user) {
echo '<tr>';
echo '<td align="center">';
if($host_char['char_id'] !== NULL)
echo displayCharLink($host_char['char_id'], $host_char['char_name']);
echo displayCharLink($host_char['char_id'], $host_char['char_name']);
else
echo $host_char['char_name'];
echo ' vs. ';
echo $host_char['char_name'];
echo ' vs. ';
if($guest_char['char_id'] !== NULL)
echo displayCharLink($guest_char['char_id'], $guest_char['char_name']);
else
echo $guest_char['char_name'];
echo displayCharLink($guest_char['char_id'], $guest_char['char_name']);
else
echo $guest_char['char_name'];
echo '</td>';
echo '<td><a href="event_kampf_anzeige.php?event_id='.$event_id.'&event_fight_id='.$event_fight['event_fight_id'].'" target="_blank">anschauen</a></td>';
echo '</tr>';
echo '</tr>';
}
echo '</table>';
}
@ -333,19 +334,28 @@ function displayClanFightMenu($user) {
<td colspan="3">
<table width="100%" border="1">
<tr>
<th align="center" height="25">Herausforderer</th>
<th align="center" height="25">Clan</th>
<th align="center" height="25">Datum</th>
<th align="center" height="25">Typ</th>
<th align="center" height="25">Anzahl</th>
<th align="center" height="25">Option</th>
<th align="center" height="25">Status</th>
</tr>
<?php
foreach ($open_challenge_requests as $challenge) {
$clan = getClan($challenge['clan_requester']);
echo '<tr><td align ="center">'.$clan['clanname'].'</td><td align ="center">'.formatTimestamp($challenge['challenged_time']).'</td>';
echo '<td align ="center">'.getFightType($challenge['type']).'</td><td align ="center">'.$challenge['anzahl_chars'].'</td>';
echo '<td align ="center"><a href="index.php?as=clan/kampf_info&action=acceptchallenge&clanid='.$clan['id'].'">annehmen</a> |';
echo '<a href="index.php?as=clan/kampf_info&action=q_denychallenge&clanid='.$clan['id'].'">ablehnen</a></td></tr>';
$requester_clan = getClan($challenge['clan_requester']);
$challenged_clan = getClan($challenge['clan_challenged']);
//unterscheidung zwischen herausforder und herausgeforderter
if($user_clan['id'] == $challenge['clan_requester']) {
echo '<tr><td align ="center">'.$challenged_clan['clanname'].'</td><td align ="center">'.formatTimestamp($challenge['challenged_time']).'</td>';
echo '<td align ="center">'.getFightType($challenge['type']).'</td><td align ="center">'.$challenge['anzahl_chars'].'</td>';
echo '<td align ="center">ausstehend</td></tr>';
} else {
echo '<tr><td align ="center">'.$requester_clan['clanname'].'</td><td align ="center">'.formatTimestamp($challenge['challenged_time']).'</td>';
echo '<td align ="center">'.getFightType($challenge['type']).'</td><td align ="center">'.$challenge['anzahl_chars'].'</td>';
echo '<td align ="center"><a href="index.php?as=clan/kampf_info&action=acceptchallenge&clanid='.$requester_clan['id'].'">annehmen</a> |';
echo '<a href="index.php?as=clan/kampf_info&action=q_denychallenge&clanid='.$requester_clan['id'].'">ablehnen</a></td></tr>';
}
}
?>
</table>
@ -356,7 +366,11 @@ function displayClanFightMenu($user) {
</tr>
<?php
if(count($open_challenge_ids) == 0) {
?><td height="20" colspan="2" align="center">Keine</td><?php
?>
<tr>
<td height="20" colspan="2" align="center">Keine</td>
</tr>
<?php
} else {
foreach ($open_challenge_ids as $oci) {
$participating_clan_ids = getParticipatingClanIDs($oci);
@ -372,23 +386,25 @@ function displayClanFightMenu($user) {
}
?>
<tr>
<th height="30" colspan="2" align="center">Beendete Herausforderungen</th>
<th height="30" colspan="2" align="center">Beendete Herausforderungen</th>
</tr>
<tr>
<?php
if(count($old_challenge_ids) == 0) {
?><td height="20" colspan="2" align="center">Keine</td><?php
} else {
if(count($old_challenge_ids) == 0) {
?>
<td height="20" colspan="2" align="center">Keine</td>
<?php
} else {
foreach ($old_challenge_ids as $oci) {
$participating_clan_ids = getParticipatingClanIDs($oci);
foreach ($participating_clan_ids as $pci)
if($pci != $user_clan['id']) {
$challenged_clan = getClan($pci);
echo '<tr>';
echo '<td> '.$challenged_clan['clanname'].'</td>';
echo '<td align="center"><a href="index.php?as=clan/kampf_info&action=showoldchallenge&challenge='.$oci.'">'.anzeigen.'</a></td>';
$participating_clan_ids = getParticipatingClanIDs($oci);
foreach ($participating_clan_ids as $pci)
if($pci != $user_clan['id']) {
$challenged_clan = getClan($pci);
echo '<tr>';
echo '<td> '.$challenged_clan['clanname'].'</td>';
echo '<td align="center"><a href="index.php?as=clan/kampf_info&action=showoldchallenge&challenge='.$oci.'">'.anzeigen.'</a></td>';
echo '</tr>';
}
}
}
}
?>

@ -325,7 +325,7 @@ function displayNPC($action, $task, $charid, $table, $page, $data, $att_ids){
echo '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">'."\n";
echo "\t".'<input type="hidden" name="choose" value="npc"></input>'."\n";
echo "\t".'<input type="hidden" name="charid" value="'.$charid.'"></input>'."\n";
echo "\t".'<table width="80%" border="1">'."\n";
echo "\t".'<table width="80%" border="0">'."\n";
if($action == ACTION_EDIT){
echo "\t".'<input type="hidden" name="action" value="'.ACTION_EDIT.'"></input>'."\n";
if($task == TASK_EDIT) {

Loading…
Cancel
Save