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

Loading…
Cancel
Save