|
|
|
@ -6,11 +6,15 @@
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
include_once (ROOT_PATH . '/include/defines.inc.php');
|
|
|
|
|
include_once(ROOT_PATH.'/include/clan.inc.php');
|
|
|
|
|
include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php');
|
|
|
|
|
include_once(ROOT_PATH.'/include/parse.inc.php');
|
|
|
|
|
include_once(ROOT_PATH.'/include/char.inc.php');
|
|
|
|
|
|
|
|
|
|
defineIfNotDefined('DENY_CHALLENGE', 1);
|
|
|
|
|
defineIfNotDefined('WITHDRAW_CHALLENGE', 2);
|
|
|
|
|
|
|
|
|
|
//Get-Section
|
|
|
|
|
if(isset($_GET['action'])) {
|
|
|
|
|
$action = $_GET['action'];
|
|
|
|
@ -50,8 +54,8 @@ function displayChallengeClan($user, $clan_id) {
|
|
|
|
|
displayErrorMessage(NULL, $result, displayHistoryBackLink());
|
|
|
|
|
exit;
|
|
|
|
|
} else {
|
|
|
|
|
displayErrorMessage(NULL, 'Clan erfolgreich herausgefordert!', displayHistoryBackLink());
|
|
|
|
|
exit;
|
|
|
|
|
echo 'Clan wurde erfolgreich herausgefordert.<br><br>';
|
|
|
|
|
echo '<a href="index.php?as=clan/kampf_info">weiter</a>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -62,10 +66,10 @@ function displayChallengeAccepted($user, $clan_id) {
|
|
|
|
|
}
|
|
|
|
|
acceptChallengeRequest($clan_id, $user);
|
|
|
|
|
echo 'Herausforderung wurde angenommen!<br><br>';
|
|
|
|
|
echo '<a href="index.php?as=clan/kampf_info">zurück</a>';
|
|
|
|
|
echo '<a href="index.php?as=clan/kampf_info">weiter</a>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function displayDenyChallenge($clan_id) {
|
|
|
|
|
function displayDenyChallenge($clan_id, $type) {
|
|
|
|
|
if(!is_numeric($clan_id)) {
|
|
|
|
|
displayErrorMessage(NULL, 'Wollte da jemand schummeln? ;)', displayHistoryBackLink());
|
|
|
|
|
return;
|
|
|
|
@ -73,7 +77,11 @@ function displayDenyChallenge($clan_id) {
|
|
|
|
|
?>
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<?php if($type == DENY_CHALLENGE) {?>
|
|
|
|
|
<th colspan="2">Herausforderung wirklich ablehnen?</th>
|
|
|
|
|
<?php } else {?>
|
|
|
|
|
<th colspan="2">Herausforderung wirklich zurückziehen?</th>
|
|
|
|
|
<?php }?>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="center"><?php echo '<a href="index.php?as=clan/kampf_info&action=denychallenge&clanid='.$clan_id.'">ja</a>';?>
|
|
|
|
@ -262,7 +270,7 @@ function displayJoinChallenge($user, $clan_challenge_id, $char_id, $slot) {
|
|
|
|
|
exit;
|
|
|
|
|
} else {
|
|
|
|
|
echo 'Der Charakter wurde erfoglreich angemeldet.<br><br>';
|
|
|
|
|
echo '<a href="index.php?as=clan/kampf_info">zurück</a>';
|
|
|
|
|
echo '<a href="index.php?as=clan/kampf_info">weiter</a>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -281,7 +289,7 @@ function displayLeaveChallenge($user, $clan_challenge_id, $char_id) {
|
|
|
|
|
exit;
|
|
|
|
|
} else {
|
|
|
|
|
echo 'Der Charakter wurde erfoglreich abgemeldet.<br><br>';
|
|
|
|
|
echo '<a href="index.php?as=clan/kampf_info">zurück</a>';
|
|
|
|
|
echo '<a href="index.php?as=clan/kampf_info">weiter</a>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -349,7 +357,7 @@ function displayClanFightMenu($user) {
|
|
|
|
|
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>';
|
|
|
|
|
echo '<td align ="center">ausstehend (<a href="index.php?as=clan/kampf_info&action=q_withdrawchallenge&clanid='.$requester_clan['id'].'">zurückziehen</a>)</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>';
|
|
|
|
@ -422,7 +430,10 @@ switch($action) {
|
|
|
|
|
displayChallengeAccepted($user_ida, $inquirychallenge_clanid);
|
|
|
|
|
break;
|
|
|
|
|
case 'q_denychallenge':
|
|
|
|
|
displayDenyChallenge($inquirychallenge_clanid);
|
|
|
|
|
displayDenyChallenge($inquirychallenge_clanid, DENY_CHALLENGE);
|
|
|
|
|
break;
|
|
|
|
|
case 'q_withdrawchallenge':
|
|
|
|
|
displayDenyChallenge($inquirychallenge_clanid, WITHDRAW_CHALLENGE);
|
|
|
|
|
break;
|
|
|
|
|
case 'denychallenge':
|
|
|
|
|
denyChallengeRequest($inquirychallenge_clanid, $user_ida);
|
|
|
|
|