diff --git a/ag/clan/c_kampf_anzeige.php b/ag/clan/c_kampf_anzeige.php deleted file mode 100644 index 6d3a738..0000000 --- a/ag/clan/c_kampf_anzeige.php +++ /dev/null @@ -1,60 +0,0 @@ - - - diff --git a/ag/clan/kampf_anzeige.php b/ag/clan/kampf_anzeige.php new file mode 100644 index 0000000..4f9bd76 --- /dev/null +++ b/ag/clan/kampf_anzeige.php @@ -0,0 +1,254 @@ + + + + $row['clanname'], 'id' => $row['clan_id']); + } + return $clans; +} + +function displayChar($char) { + if($char['visible'] < time()) { + echo '
'; + echo '
'; + echo ''; + echo '
'; + if($char['event_char_id'] != $char['winner']) { + echo '
'; + echo ''; + echo '
'; + } + echo '
'; + echo $char['char_name']; + } else { + echo '
???'; + } +} + +function displayHeader($top, $bottom, $challenge) { + $border = 0; + $challenge_id = $challenge['clan_challenge_id']; + $event_id = $challenge['event_id']; + $chars = getEventChars($challenge_id, $event_id); + $clans = getChallengeClans($challenge_id); + + echo ''; + echo ''; + + echo ''; + //erste spalte + echo ''; + //zweite spalte + echo ''; + //dritte spalte + echo ''; + echo ''; + + //obere Teil + echo ''; + //Darstellen der Bilder auf der linken Seite + echo ''; + //Darstellen der Bilder auf der linken Seite + echo ''; + echo ''; + + //untere Teil + echo ''; + //Darstellen der Bilder auf der linken Seite + echo ''; + //Darstellen der Bilder auf der linken Seite + echo ''; + echo ''; + echo '
Clankampf am ...
'.$clans[0]['name'].'VS.'.$clans[1]['name'].'
'; + $width = 100 / $top; + for ($i = 0; $i < $top; $i++) { + echo ''; + } + echo '
'; + if($clans[0]['id'] == $chars[$i]['clan_id']) { + displayChar($chars[$i]); + } + echo '
'; + $max = (count($chars)/2)+$top; + $min = (count($chars)/2); + for ($i = $min; $i < $max; $i++) { + echo ''; + } + echo '
'; + if($clans[1]['id'] == $chars[$i]['clan_id']) { + displayChar($chars[$i]); + } + echo '
'; + $min = $top; + $max = count($chars) / 2; + $width = 100 / $bottom; + for ($i = $min; $i < $max; $i++) { + echo ''; + } + echo '
'; + if($clans[0]['id'] == $chars[$i]['clan_id']) { + displayChar($chars[$i]); + } + echo '
'; + $min = (count($chars)/2)+$top; + $max = count($chars); + for ($i = $min; $i < $max; $i++) { + echo ''; + } + echo '
'; + if($clans[1]['id'] == $chars[$i]['clan_id']) { + displayChar($chars[$i]); + } + echo '
'; +} + +function getColor($row) { + if($row % 2 == 0) { + $color = '#018B8B'; + //$color = '#FFFFFF'; + } else { + $color = '#029393'; + //$color = '#FF00FF'; + } + return $color; +} + +function displayBody($event_id) { + $fight_ids = getEventFightIds($event_id); + $row = 0; + + echo ''; + foreach($fight_ids as $fight_id) { + $event_fight = getEventFight($event_id, $fight_id); + $round_data = getEventFightRoundData($event_id, $event_fight['event_fight_id'], 0); // get participants of fight + $host_char_id = NULL; + $guest_char_id = NULL; + foreach($round_data as $key => $value) { + if($event_fight['host'] == $key) { + $host_char_id = $key; + } else { + $guest_char_id = $key; + } + } + + // Key now lets read out the event_chars ... + + $host_char = getEventChar($event_id, $host_char_id); + $guest_char = getEventChar($event_id, $guest_char_id); + + // TODO: Check if the fight is already "visible" + + echo ''; + echo ''; + echo ''; + $row++; + } + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
'; + echo ''; + echo $host_char['char_name'].''; + echo 'vs'; + echo ''; + echo $guest_char['char_name'].''; + echo '
Clan-EXP: 1337
Clan-Geld: 1337
ELO-Punkte: 1337
'; +} + +function displayOverview($challenge_id, $user) { + $user_clan = getClan($user['clan']); + $challenge = getChallenge($challenge_id); + $clans = getParticipatingClanIDs($challenge_id); + if(!in_array($user['clan'] , $clans)) { + displayErrorMessage(NULL, 'Wollte da jemand schummeln? ;)', displayHistoryBackLink()); + return; + } + if($challenge['calculated'] == FALSE) { + displayErrorMessage(NULL, 'Der Clankampf ist noch nicht soweit!!', displayHistoryBackLink()); + return; + } + + $event_id = $challenge['event_id']; + $event = getEvent($event_id); + if($event['event_type'] != EVENT_CLAN_FIGHT) { + displayErrorMessage(NULL, 'Das Event is garkein Clan-Kampf!!', displayHistoryBackLink()); + return; + } + //TODO: Kampfbeteiligte ermitteln + //$participating_chars = getEventChars($event_id); + + $number_participants = count($participating_chars) / 2; + + switch ($challenge['anzahl_chars']) { + case 3: + //not implemented yet!! + break; + case 4: + //not implemented yet!! + break; + case 5: + displayHeader(2, 3, $challenge); + break; + } + + displayBody($event_id); +} + +switch ($action) { + case 'showsomething': + + break; + default: + displayOverview($challenge_id, $user_ida); + break; +} +?> + + diff --git a/ag/clan/kampf_info.php b/ag/clan/kampf_info.php index e5a42a3..6fb2bd1 100644 --- a/ag/clan/kampf_info.php +++ b/ag/clan/kampf_info.php @@ -6,7 +6,7 @@ * */ -include_once (ROOT_PATH . '/include/defines.inc.php'); +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'); @@ -369,13 +369,14 @@ function displayClanFightMenuWithClanLocked($user) { Herausforderungen - Dein Clan ist leider dezeit Blockiert ( = 86400) { // 24*60*60 - echo 'Voraussetzungen nicht erfüllt!!'; - } else { - echo generateTimerHtml('blubb', $time, 'Blockade beenden'); - } + Dein Clan ist leider + dezeit Blockiert ( = 86400) { // 24*60*60 + echo 'Voraussetzungen nicht erfüllt!!'; + } else { + echo generateTimerHtml('blubb', $time, 'Blockade beenden'); + } ?>) @@ -436,14 +437,20 @@ function displayClanFightMenu($user) { $old_challenge_ids = getHistoricalChallengeIDs($user_clan['id']); ?> + +
- + - - + - + + + + + - + Keine'; + } else { + foreach ($open_challenge_requests as $challenge) { + $requester_clan = getClan($challenge['clan_requester']); + $challenged_clan = getClan($challenge['clan_challenged']); + + //unterscheidung zwischen herausforder und herausgeforderter + if($user_clan['id'] == $challenge['clan_requester']) { + echo ''; + echo ''; + echo ''; + } else { + echo ''; + echo ''; + echo ''; + } + } + } + ?> + + + Keine'; + echo ''; } else { foreach ($open_challenge_ids as $oci) { $participating_clan_ids = getParticipatingClanIDs($oci); @@ -509,8 +510,8 @@ function displayClanFightMenu($user) { if($pci != $user_clan['id']) { $challenged_clan = getClan($pci); echo ''; - echo ''; - echo ''; + echo ''; + echo ''; echo ''; echo ''; } @@ -519,39 +520,39 @@ function displayClanFightMenu($user) { ?> - + Keine'; + echo ''; } 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 ''; + echo ''; //TODO: hier muss javascript fenster aufgerufen werden - echo ''; + echo ''; } } } ?> - + Keine'; + echo ''; } 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 ''; - echo ''; + echo ''; + echo ''; } } } diff --git a/ag/inclu/user-controll.php b/ag/inclu/user-controll.php index 74f244f..3687a54 100644 --- a/ag/inclu/user-controll.php +++ b/ag/inclu/user-controll.php @@ -63,20 +63,6 @@ if ($name AND $passwort) { Clan Beitreten
"; } else { -?> - -Mein Clan
diff --git a/ag/turnier2.php b/ag/turnier2.php index 33c8ed4..559556f 100644 --- a/ag/turnier2.php +++ b/ag/turnier2.php @@ -55,8 +55,8 @@ $turnier_info = mysql_query('SELECT win, char1, char2, id, round, dauer FROM tur $dauer[] = $row['dauer']; if(($pl * $u) + $dauer[0] < time()) { - $char_nic1[]='
'.$char_info1[name]; - $char_nic2[]='
'.$char_info2[name]; + $char_nic1[]='
'.$char_info1['name']; + $char_nic2[]='
'.$char_info2['name']; } else { $char_nic1[]='
???'; $char_nic2[]='
???'; @@ -93,8 +93,8 @@ if(($pl * $max_turnier) + $dauer[0] < time()) { ?>
HerausforderungenHerausforderungen
Clan herausfordern + Clan herausfordern
- - - - - - - - - - Keine'; - } else { - foreach ($open_challenge_requests as $challenge) { - $requester_clan = getClan($challenge['clan_requester']); - $challenged_clan = getClan($challenge['clan_challenged']); - - //unterscheidung zwischen herausforder und herausgeforderter - if($user_clan['id'] == $challenge['clan_requester']) { - echo ''; - echo ''; - echo ''; - } else { - echo ''; - echo ''; - echo ''; - } - } - } - ?> - -
ClanDatumTypAnzahlStatus
'.$challenged_clan['clanname'].''.formatTimestamp($challenge['challenged_time']).''.getFightType($challenge['type']).''.$challenge['anzahl_chars'].'ausstehend (zurückziehen)
'.$requester_clan['clanname'].''.formatTimestamp($challenge['challenged_time']).''.getFightType($challenge['type']).''.$challenge['anzahl_chars'].'annehmen |'; - echo 'ablehnen
-
ClanDatumTypAnzahlStatus
offene Herausforderungen
'.$challenged_clan['clanname'].''.formatTimestamp($challenge['challenged_time']).''.getFightType($challenge['type']).''.$challenge['anzahl_chars'].'ausstehend (zurückziehen)
'.$requester_clan['clanname'].''.formatTimestamp($challenge['challenged_time']).''.getFightType($challenge['type']).''.$challenge['anzahl_chars'].'annehmen |'; + echo 'ablehnen
offene Herausforderungen
Keine
'.$challenged_clan['clanname'].''.anzeigen.' '.$challenged_clan['clanname'].''.anzeigen.''.abbrechen.'
Laufende HerausforderungenLaufende Herausforderungen
Keine
'.$challenged_clan['clanname'].'
'.$challenged_clan['clanname'].''.anzeigen.'
'.anzeigen.'
Beendete HerausforderungenBeendete Herausforderungen
Keine
'.$challenged_clan['clanname'].''.anzeigen.'
'.$challenged_clan['clanname'].''.anzeigen.'
- -
+ +