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