|
|
|
@ -6,37 +6,15 @@
|
|
|
|
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
?>
|
|
|
|
|
<?php
|
|
|
|
|
function displayTournamentOptions($action, $klein, $wochen) {
|
|
|
|
|
if($action == 'checktnmt') {
|
|
|
|
|
if(is_numeric($_REQUEST['minlevel']) && is_numeric($_REQUEST['maxlevel'])) {?>
|
|
|
|
|
<table width="80%">
|
|
|
|
|
<tr>
|
|
|
|
|
<th colspan="2" style="text-align: center">Turnier wirklich starten?</th>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="text-align: center">
|
|
|
|
|
<a href="<?php echo $GLOBALS['URL_TO_TURNIER'].'?fusion='.$_POST['fusion'].'&special='.
|
|
|
|
|
$_POST['special'].'&minlevel='.$_POST['minlevel'].'&maxlevel='.$_POST['maxlevel'].'&gain='.$_POST['gain'].'&randomize='.
|
|
|
|
|
$_POST['randomize'].'&name='.$_POST['name'].'&anzahl='.$_POST['anzahl'];?>"
|
|
|
|
|
target="_blank">Turnier starten!</a>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="text-align: center">
|
|
|
|
|
<a href="<?php echo $_SERVER['PHP_SELF'].'?choose=tournament&action=tnmt'; ?>">Doch nicht</a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<?php
|
|
|
|
|
} else {
|
|
|
|
|
echo 'Keine gültige Eingabe von Min. oder Max. Level<br>';
|
|
|
|
|
echo '<a href="'.$_SERVER['PHP_SELF'].'?choose=tournament&action=tnmt">Zurück</a>';
|
|
|
|
|
}
|
|
|
|
|
} elseif($action == 'tnmt') {
|
|
|
|
|
|
|
|
|
|
defineIfNotDefined('TURNIER_ANFAENGER_GEBUEHR', 10000);
|
|
|
|
|
defineIfNotDefined('TURNIER_WOCHEN_GEBUEHR', 50000);
|
|
|
|
|
|
|
|
|
|
function displayTournamentOptions() {
|
|
|
|
|
?>
|
|
|
|
|
<form method="POST">
|
|
|
|
|
<input type="hidden" name="choose" value="tournament">
|
|
|
|
|
<input type="hidden" name="action" value="checktnmt">
|
|
|
|
|
<input type="hidden" name="choose" value="tournament"> <input
|
|
|
|
|
type="hidden" name="action" value="checktnmt">
|
|
|
|
|
<table width="80%">
|
|
|
|
|
<tr>
|
|
|
|
|
<th colspan="2"><h1 style="text-align: center">Übersicht</h1></th>
|
|
|
|
@ -139,27 +117,44 @@ function displayTournamentOptions($action, $klein, $wochen) {
|
|
|
|
|
</table>
|
|
|
|
|
</form>
|
|
|
|
|
<?php
|
|
|
|
|
} else if($action == 'fee') {
|
|
|
|
|
$qry = mysql_query('SELECT * FROM turnier_gebuehr;');
|
|
|
|
|
while ($fee = mysql_fetch_assoc($qry)) {
|
|
|
|
|
if($fee['art'] == 'wochen') {
|
|
|
|
|
$fee_wochen = $fee['gebuehr'];
|
|
|
|
|
} else if($fee['art'] == 'klein') {
|
|
|
|
|
$fee_klein = $fee['gebuehr'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function displayCheckTournament($minlvl, $maxlvl, $fusion, $special, $gain, $random, $name, $anzahl) {
|
|
|
|
|
if(is_numeric($minlvl) && is_numeric($maxlvl)) {?>
|
|
|
|
|
<table width="80%">
|
|
|
|
|
<tr>
|
|
|
|
|
<th colspan="2" style="text-align: center">Turnier wirklich starten?</th>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="text-align: center"><a
|
|
|
|
|
href="<?php echo $GLOBALS['URL_TO_TURNIER'].'?fusion='.$fusion.'&special='.
|
|
|
|
|
$special.'&minlevel='.$minlvl.'&maxlevel='.$maxlvl.'&gain='.$gain.'&randomize='.
|
|
|
|
|
$random.'&name='.$name.'&anzahl='.$anzahl;?>"
|
|
|
|
|
target="_blank">Turnier starten!</a>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="text-align: center"><a
|
|
|
|
|
href="<?php echo $_SERVER['PHP_SELF'].'?choose=tournament&action=tnmt'; ?>">Doch
|
|
|
|
|
nicht</a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<?php
|
|
|
|
|
} else {
|
|
|
|
|
echo 'Keine gültige Eingabe von Min. oder Max. Level<br>';
|
|
|
|
|
echo '<a href="'.$_SERVER['PHP_SELF'].'?choose=tournament&action=tnmt">Zurück</a>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function displayEditFee($klein, $wochen) {
|
|
|
|
|
$change = FALSE;
|
|
|
|
|
if($klein !== NULL || $wochen !== null) {
|
|
|
|
|
if($klein !== NULL && $klein != $fee_klein) {
|
|
|
|
|
if($klein !== NULL && $klein != TURNIER_ANFAENGER_GEBUEHR) {
|
|
|
|
|
$change = TRUE;
|
|
|
|
|
mysql_query('UPDATE turnier_gebuehr SET gebuehr = '.$klein.' WHERE art = \'klein\'');
|
|
|
|
|
$fee_klein = $klein;
|
|
|
|
|
setDefine('TURNIER_ANFAENGER_GEBUEHR', $klein);
|
|
|
|
|
}
|
|
|
|
|
if($wochen !== NULL && $wochen != $fee_wochen) {
|
|
|
|
|
if($wochen !== NULL && $wochen != TURNIER_WOCHEN_GEBUEHR) {
|
|
|
|
|
$change = TRUE;
|
|
|
|
|
mysql_query('UPDATE turnier_gebuehr SET gebuehr = '.$wochen.' WHERE art = \'wochen\'');
|
|
|
|
|
$fee_wochen = $wochen;
|
|
|
|
|
setDefine('TURNIER_WOCHEN_GEBUEHR', $wochen);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
@ -181,7 +176,8 @@ function displayTournamentOptions($action, $klein, $wochen) {
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="left">Anmeldegebühr:</td>
|
|
|
|
|
<td><input type="text" name="klein" value=<?php echo $fee_klein;?>>
|
|
|
|
|
<td><input type="text" name="klein"
|
|
|
|
|
value=<?php echo ($klein == null)?TURNIER_ANFAENGER_GEBUEHR:$klein;?>>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
@ -190,7 +186,8 @@ function displayTournamentOptions($action, $klein, $wochen) {
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="left">Anmeldegebühr:</td>
|
|
|
|
|
<td><input type="text" name="wochen" value=<?php echo $fee_wochen;?>>
|
|
|
|
|
<td><input type="text" name="wochen"
|
|
|
|
|
value=<?php echo ($wochen == null)?TURNIER_WOCHEN_GEBUEHR:$wochen;?>>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
@ -211,15 +208,30 @@ function displayTournamentOptions($action, $klein, $wochen) {
|
|
|
|
|
</table>
|
|
|
|
|
</form>
|
|
|
|
|
<?php
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function displayTournamentMenu($action, $klein, $wochen, $minlvl, $maxlvl, $fusion, $special, $gain, $random, $name, $anzahl) {
|
|
|
|
|
switch ($action) {
|
|
|
|
|
case 'checktnmt':
|
|
|
|
|
displayCheckTournament($minlvl, $maxlvl, $fusion, $special, $gain, $random, $name, $anzahl);
|
|
|
|
|
break;
|
|
|
|
|
case 'tnmt':
|
|
|
|
|
displayTournamentOptions();
|
|
|
|
|
break;
|
|
|
|
|
case 'fee':
|
|
|
|
|
editFee($klein, $wochen);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
?>
|
|
|
|
|
<table>
|
|
|
|
|
<?php if($GLOBALS['URL_TO_TURNIER'] !== null) { ?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><a
|
|
|
|
|
href="<?php $_SERVER['PHP_SELF'] ?>?choose=tournament&action=tnmt">Turnier
|
|
|
|
|
starten</a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php }?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><a
|
|
|
|
|
href="<?php $_SERVER['PHP_SELF'] ?>?choose=tournament&action=fee">
|
|
|
|
@ -234,4 +246,5 @@ function displayTournamentOptions($action, $klein, $wochen) {
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|