@ -358,6 +358,70 @@ function getFightType($id) {
}
}
function displayClanFightMenuWithClanLocked($user) {
$user_clan = getClan($user['clan']);
$active_clan_challange_ids = getActiveChallengeIDs($user_clan['id']);
$old_challenge_ids = getHistoricalChallengeIDs($user_clan['id']);
?>
< div align = "center" >
< table width = "100%" border = "1" >
< tr >
< th height = "30" colspan = "3" align = "center" > Herausforderungen< / th >
< / tr >
< tr >
< th height = "30" colspan = "3" align = "center" > Dein Clan ist leider dezeit Blockiert ( <?php
$time = getClanLockedTime($user['clan']);
if($time >= 86400) { // 24*60*60
echo 'Voraussetzungen nicht erfü llt!!';
} else {
echo generateTimerHtml('blubb', $time, '< a href = \'\' > Blockade beenden< / a > ');
}
?>)< / th >
< / tr >
< tr >
< th height = "30" colspan = "3" align = "center" > Laufende Herausforderungen< / th >
< / tr >
<?php
if(count($active_clan_challange_ids) == 0) {
echo '< td height = "20" colspan = "3" align = "center" > Keine< / td > ';
} else {
foreach ($active_clan_challange_ids as $acci) {
$participating_clan_ids = getParticipatingClanIDs($acci);
foreach ($participating_clan_ids as $pci)
if($pci != $user_clan['id']) {
$challenged_clan = getClan($pci);
echo '< tr > < td align = "center" > '.$challenged_clan['clanname'].'< / td > ';
//TODO: hier muss javascript fenster aufgerufen werden
echo '< td align = "center" > < a href = "index.php?as=clan/kampf_info&action=showoldchallenge&challenge='.$acci.'" > '.anzeigen.'< / a > < / td > < / tr > ';
}
}
}
?>
< tr >
< th height = "30" colspan = "3" align = "center" > Beendete Herausforderungen< / th >
< / tr >
< tr >
<?php
if(count($old_challenge_ids) == 0) {
echo '< td height = "20" colspan = "3" align = "center" > Keine< / td > ';
} 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 > < td > '.$challenged_clan['clanname'].'< / td > ';
echo '< td align = "center" > < a href = "index.php?as=clan/kampf_info&action=showoldchallenge&challenge='.$oci.'" > '.anzeigen.'< / a > < / td > < / tr > ';
}
}
}
?>
< / tr >
< / table >
< / div >
<?php
}
function displayClanFightMenu($user) {
$user_clan = getClan($user['clan']);
$clans_tmp = getClanFightCapableClanIds();
@ -498,41 +562,52 @@ function displayClanFightMenu($user) {
<?php
}
switch($action) {
case 'challengeclan':
displayChallengeClan($user_ida, $challangedclan_id);
break;
case 'acceptclanchallenge':
displayChallengeAccepted($user_ida, $inquirychallenge_clanid);
break;
case 'q_denyclanchallenge':
displayDenyChallenge($inquirychallenge_clanid, DENY_CHALLENGE);
break;
case 'q_withdrawclanchallenge':
displayDenyChallenge($inquirychallenge_clanid, WITHDRAW_CHALLENGE);
break;
case 'denychallenge':
denyChallenge($type, $inquirychallenge_clanid, $user_ida);
break;
case 'showchallenge':
displayShowChallenge($clan_challange_id, $user_ida);
break;
case 'showoldchallenge':
displayShowOldChallenge($clan_challange_id, $user_ida);
break;
case 'joinchallenge':
displayJoinChallenge($user_ida, $clan_challange_id, $char_id, $slot);
break;
case 'leavechallenge':
displayLeaveChallenge($user_ida, $clan_challange_id, $char_id);
break;
case 'q_cancelclanchallenge':
displayCancelChallenge($user_ida, $clan_challange_id);
break;
case 'cancelchallenge':
cancelThisChallenge($user_ida, $clan_challange_id);
break;
default:
displayClanFightMenu($user_ida);
if(!isClanLocked($user_ida['clan'])) {
switch($action) {
case 'challengeclan':
displayChallengeClan($user_ida, $challangedclan_id);
break;
case 'acceptclanchallenge':
displayChallengeAccepted($user_ida, $inquirychallenge_clanid);
break;
case 'q_denyclanchallenge':
displayDenyChallenge($inquirychallenge_clanid, DENY_CHALLENGE);
break;
case 'q_withdrawclanchallenge':
displayDenyChallenge($inquirychallenge_clanid, WITHDRAW_CHALLENGE);
break;
case 'denychallenge':
denyChallenge($type, $inquirychallenge_clanid, $user_ida);
break;
case 'showchallenge':
displayShowChallenge($clan_challange_id, $user_ida);
break;
case 'showoldchallenge':
displayShowOldChallenge($clan_challange_id, $user_ida);
break;
case 'joinchallenge':
displayJoinChallenge($user_ida, $clan_challange_id, $char_id, $slot);
break;
case 'leavechallenge':
displayLeaveChallenge($user_ida, $clan_challange_id, $char_id);
break;
case 'q_cancelclanchallenge':
displayCancelChallenge($user_ida, $clan_challange_id);
break;
case 'cancelchallenge':
cancelThisChallenge($user_ida, $clan_challange_id);
break;
default:
displayClanFightMenu($user_ida);
}
} else {
switch($action) {
case 'showoldchallenge':
displayShowOldChallenge($clan_challange_id, $user_ida);
break;
default:
displayClanFightMenuWithClanLocked($user_ida);
}
}
?>