diff --git a/ag/clan/kampf_info.php b/ag/clan/kampf_info.php new file mode 100644 index 0000000..edacfd6 --- /dev/null +++ b/ag/clan/kampf_info.php @@ -0,0 +1,158 @@ +
'; + echo displayHistoryBackLink(); +} + +function displayDenyChallenge($clan_id) { + if(!is_numeric($clan_id)) { + displayErrorMessage(NULL, 'Wollte da jemand schummeln? ;)', displayHistoryBackLink()); + exit; + } + ?> + + + + + + + + +
Herausforderung wirklich ablehnen?
ja';?>nein';?>
+ +
+ + + + + + + + + + + + + + + '; + } + ?> +
Herausforderungen
Clan herausfordern +
+ +
+
+ + + + + + + + + '; + echo ''; + echo ''; + } + ?> +
HerausfordererDatumTypAnzahlOption
'.$clan['clanname'].''.formatTimestamp($challenge['challenged_time']).''.getFightType($challenge['type']).''.$challenge['anzahl_chars'].'annehmen |'; + echo 'ablehnen
+
offene Herausforderungen
'.$cllng.'
+
\ No newline at end of file diff --git a/ag/inclu/user-controll.php b/ag/inclu/user-controll.php index 9f7ceea..9add7ef 100644 --- a/ag/inclu/user-controll.php +++ b/ag/inclu/user-controll.php @@ -80,6 +80,7 @@ if ($name AND $passwort) { $clan_009 = " Mein Clan
+ Clan Kämpfe
Clan Markt
Clan Item Nutzung
Geld Spenden
diff --git a/ag/include/clan.inc.php b/ag/include/clan.inc.php index c750279..66cf04c 100644 --- a/ag/include/clan.inc.php +++ b/ag/include/clan.inc.php @@ -186,7 +186,18 @@ function fireMember($user, $member){ } } - +/** + * + * Return all Clans with their id and name. + * + */ +function getAllClans() { + $qry = mysql_query('SELECT id,clanname FROM clan;'); + while ($result = mysql_fetch_assoc($qry)) { + $clans[] = $result; + } + return $clans; +} function joinClan($user, $clanid){ // last chance to lock the clan if in the old situation it was having to few members ;) isClanLocked($clanid); // we only require the calculation not the result! diff --git a/ag/include/kampf/lose2.php b/ag/include/kampf/lose2.php index f1c3321..fb262f9 100644 --- a/ag/include/kampf/lose2.php +++ b/ag/include/kampf/lose2.php @@ -9,37 +9,43 @@ ####################KAIOKEN-LOSE SPIELER 1 if($technick1['type'] == 'lose2') { -$k_mp[0] = $k_mp[0] - $technick1['mp']; -if($k_mp[0] < 0) { -$schaden_1 = 'Schwächen fehlgeschlagen'; -$k_mp[0] = 0; -} else { -if($technick1['starke'] >= mt_rand(1,100)) { -$schaden_1 = 'Schwächen'; -$k_mp[1] = ($k_mp2[1] / 100) * 20; -} else { -$schaden_1 = 'Schwächen fehlgeschlagen'; -} -} -$aktion_AV1[$x] = 'nein'; + $k_mp[0] = $k_mp[0] - $technick1['mp']; + if($k_mp[0] < 0) { + $schaden_1 = 'Schwächen fehlgeschlagen'; + $k_mp[0] = 0; + } else { + if($technick1['starke'] >= mt_rand(1,100)) { + $schaden_1 = 'Schwächen'; + $k_mp[1] -= $k_mp2[1] * 0.8; + if($k_mp[1] < 0) { + $k_mp[1] = 0; + } + } else { + $schaden_1 = 'Schwächen fehlgeschlagen'; + } + } + $aktion_AV1[$x] = 'nein'; } ####################KAIOKEN-LOSE SPIELER 2 if($technick2['type'] == 'lose2') { -$k_mp[1] = $k_mp[1] - $technick2['mp']; -if($k_mp[1] < 0) { -$schaden_2 = 'Schwächen fehlgeschlagen'; -$k_mp[1] = 0; -} else { + $k_mp[1] = $k_mp[1] - $technick2['mp']; + if($k_mp[1] < 0) { + $schaden_2 = 'Schwächen fehlgeschlagen'; + $k_mp[1] = 0; + } else { -if($technick2['starke'] >= mt_rand(1,100)) { -$schaden_2 = 'Schwächen'; -$k_mp[0] = ($k_mp1[1] / 100) * 20; -} else { -$schaden_2 = 'Schwächen fehlgeschlagen'; + if($technick2['starke'] >= mt_rand(1,100)) { + $schaden_2 = 'Schwächen'; + $k_mp[0] -= $k_mp1[1] * 0.8; + if($k_mp[0] < 0) { + $k_mp[0] = 0; + } + } else { + $schaden_2 = 'Schwächen fehlgeschlagen'; -} -} -$aktion_AV2[$x] = 'nein'; + } + } + $aktion_AV2[$x] = 'nein'; } ?> diff --git a/ag/include/usergroup.inc.php b/ag/include/usergroup.inc.php index c5e3104..2db34e5 100644 --- a/ag/include/usergroup.inc.php +++ b/ag/include/usergroup.inc.php @@ -39,8 +39,7 @@ function getUserGroups($user) { $i = 0; while ($result = mysql_fetch_assoc($qry)) { - $groups[$i] = array("gruppen_id" => $result['gruppen_id'], "gruppen_name" => $result['gruppen_name']); - $i++; + $groups[] = array("gruppen_id" => $result['gruppen_id'], "gruppen_name" => $result['gruppen_name']); } return $groups;