|
|
@ -237,11 +237,61 @@ if($raumname !== NULL){
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function displayClanFightOptions($data) {
|
|
|
|
|
|
|
|
$colspan = 2;
|
|
|
|
|
|
|
|
$desc_array = array('minimale Anzahl an Clanmitgliedern um kämpfen zu können', 'maximale Anzahl an Herausforderungen',
|
|
|
|
|
|
|
|
'maximale Anzahl von Offlinecharakteren die angemeldet werden dürfen', 'maximalen Clankämpfe pro Tag', 'Kampfdauer pro Einzelkampf in Davy Back',
|
|
|
|
|
|
|
|
'Kampfdauer pro Einzelkampf in Survival', 'Modifikator G für die Clan-Exp Verteilungsformel');
|
|
|
|
|
|
|
|
$define_array = array('MIN_MEMBERS', 'MAX_OPEN_REQUESTS', 'MAX_LEADER_ASSIGNED_CHARS', 'CLANFIGHTS_MAX_FIGHTS_PER_24H', 'DURATION_DAVY_BACK_FIGHT',
|
|
|
|
|
|
|
|
'DURATION_SURVIVAL_FIGHT', 'CLAN_EXP_FAKTOR_G');
|
|
|
|
|
|
|
|
$value_array = array(MIN_MEMBERS, MAX_OPEN_REQUESTS, MAX_LEADER_ASSIGNED_CHARS, CLANFIGHTS_MAX_FIGHTS_PER_24H, DURATION_DAVY_BACK_FIGHT, DURATION_SURVIVAL_FIGHT,
|
|
|
|
|
|
|
|
CLAN_EXP_FAKTOR_G);
|
|
|
|
|
|
|
|
$change = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//data überprüfen
|
|
|
|
|
|
|
|
$i = 0;
|
|
|
|
|
|
|
|
$log = null;
|
|
|
|
|
|
|
|
if($data != null) {
|
|
|
|
|
|
|
|
foreach ($data as $key => $value) {
|
|
|
|
|
|
|
|
if($value != null && is_numeric($value) && $value != $value_array[$i]) {
|
|
|
|
|
|
|
|
setDefine($key, $value);
|
|
|
|
|
|
|
|
$log .= $key.'('.$value_array[$i].' auf '.$value.') ';
|
|
|
|
|
|
|
|
$change = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$i++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if($log != null) {
|
|
|
|
|
|
|
|
logaction('Die Clankampf-Optionen wurden geändert: '.$log);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">'."\n";
|
|
|
|
|
|
|
|
echo "\t".'<input type="hidden" name="choose" value="clan"></input>'."\n";
|
|
|
|
|
|
|
|
echo "\t".'<input type="hidden" name="action" value="clanfights"></input>'."\n";
|
|
|
|
|
|
|
|
echo "\t".'<table width="50%" border="0">'."\n";
|
|
|
|
|
|
|
|
echo "\t".'<tr><th colspan="'.$colspan.'" align="center"><h1>Clankampf-Optionen</h1></th></tr>'."\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($change) {
|
|
|
|
|
|
|
|
echo "\t\t".'<tr><td>'.$desc_array[$i].'</td><td style="text-align:center"></td>Änderungen übernommen!</tr>'."\n";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for($i = 0;$i<count($value_array);$i++){
|
|
|
|
|
|
|
|
echo "\t\t".'<tr><td>'.$desc_array[$i].'</td><td style="text-align:center"><input name="data['.$define_array[$i].']" value="'.
|
|
|
|
|
|
|
|
(($data[$define_array[$i]] != null && is_numeric($data[$define_array[$i]]))?$data[$define_array[$i]]:$value_array[$i]).'"></input></td></tr>'."\n";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "\t".'<tr><td colspan="'.$colspan.'" style="text-align:center"><input type="submit" value="speichern"></td></tr>'."\n";
|
|
|
|
|
|
|
|
echo "\t".'<tr><td colspan="'.$colspan.'" style="text-align:center"><a href="'.$_SERVER['PHP_SELF'].'?choose=clan">Zum Clanmenu</a></td></tr>'."\n";
|
|
|
|
|
|
|
|
echo "\t".'</table>'."\n";
|
|
|
|
|
|
|
|
echo '</form>'."\n";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function displayGeneralOptions($ccfee) {
|
|
|
|
function displayGeneralOptions($ccfee) {
|
|
|
|
$change = false;
|
|
|
|
$change = false;
|
|
|
|
if($ccfee != null && $ccfee != CLAN_CREATION_FEE) {
|
|
|
|
if($ccfee != null && $ccfee != CLAN_CREATION_FEE) {
|
|
|
|
if(is_numeric($ccfee)) {
|
|
|
|
if(is_numeric($ccfee)) {
|
|
|
|
setDefine('CLAN_CREATION_FEE', $ccfee);
|
|
|
|
setDefine('CLAN_CREATION_FEE', $ccfee);
|
|
|
|
|
|
|
|
logaction('Clangebühr wurde von '.CLAN_CREATION_FEE.' auf '.$ccfee.' geändert.');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
?>
|
|
|
@ -250,7 +300,7 @@ function displayGeneralOptions($ccfee) {
|
|
|
|
name="action" value="general">
|
|
|
|
name="action" value="general">
|
|
|
|
<table width="50%">
|
|
|
|
<table width="50%">
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<th colspan="2" align="center"><h1>Übersicht</h1></th>
|
|
|
|
<th colspan="2" align="center"><h1>Clan-Optionen</h1></th>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
<?php if($change === TRUE) {?>
|
|
|
|
<?php if($change === TRUE) {?>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
@ -282,7 +332,13 @@ function displayClanOptions() {
|
|
|
|
<table>
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td><a
|
|
|
|
<td><a
|
|
|
|
href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=clan&action=general">Clanoptionen
|
|
|
|
href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=clan&action=general">Clan-Optionen
|
|
|
|
|
|
|
|
bearbeiten</a>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td><a
|
|
|
|
|
|
|
|
href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=clan&action=clanfights">Clankampf-Optionen
|
|
|
|
bearbeiten</a>
|
|
|
|
bearbeiten</a>
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
@ -300,7 +356,7 @@ function displayClanOptions() {
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function displayClanMenu($action, $raumid, $raumname, $staerke, $verteidigung, $glueck, $ausdauer, $geschwindigkeit, $info, $level, $ccfee) {
|
|
|
|
function displayClanMenu($action, $raumid, $raumname, $staerke, $verteidigung, $glueck, $ausdauer, $geschwindigkeit, $info, $level, $ccfee, $data) {
|
|
|
|
switch ($action) {
|
|
|
|
switch ($action) {
|
|
|
|
case 'editrooms':
|
|
|
|
case 'editrooms':
|
|
|
|
displayEditOrCreateClanRoom($action, $raumid, $raumname, $staerke, $verteidigung, $glueck, $ausdauer, $geschwindigkeit, $info, $level);
|
|
|
|
displayEditOrCreateClanRoom($action, $raumid, $raumname, $staerke, $verteidigung, $glueck, $ausdauer, $geschwindigkeit, $info, $level);
|
|
|
@ -317,6 +373,9 @@ function displayClanMenu($action, $raumid, $raumname, $staerke, $verteidigung, $
|
|
|
|
case 'general':
|
|
|
|
case 'general':
|
|
|
|
displayGeneralOptions($ccfee);
|
|
|
|
displayGeneralOptions($ccfee);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'clanfights':
|
|
|
|
|
|
|
|
displayClanFightOptions($data);
|
|
|
|
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
displayClanOptions();
|
|
|
|
displayClanOptions();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|