@ -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,6 +562,8 @@ function displayClanFightMenu($user) {
<?php
}
if(!isClanLocked($user_ida['clan'])) {
switch($action) {
case 'challengeclan':
displayChallengeClan($user_ida, $challangedclan_id);
@ -535,4 +601,13 @@ switch($action) {
default:
displayClanFightMenu($user_ida);
}
} else {
switch($action) {
case 'showoldchallenge':
displayShowOldChallenge($clan_challange_id, $user_ida);
break;
default:
displayClanFightMenuWithClanLocked($user_ida);
}
}
?>