|
|
@ -6,37 +6,15 @@
|
|
|
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
|
|
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
defineIfNotDefined('TURNIER_ANFAENGER_GEBUEHR', 10000);
|
|
|
|
function displayTournamentOptions($action, $klein, $wochen) {
|
|
|
|
defineIfNotDefined('TURNIER_WOCHEN_GEBUEHR', 50000);
|
|
|
|
if($action == 'checktnmt') {
|
|
|
|
|
|
|
|
if(is_numeric($_REQUEST['minlevel']) && is_numeric($_REQUEST['maxlevel'])) {?>
|
|
|
|
function displayTournamentOptions() {
|
|
|
|
<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') {
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<form method="POST">
|
|
|
|
<form method="POST">
|
|
|
|
<input type="hidden" name="choose" value="tournament">
|
|
|
|
<input type="hidden" name="choose" value="tournament"> <input
|
|
|
|
<input type="hidden" name="action" value="checktnmt">
|
|
|
|
type="hidden" name="action" value="checktnmt">
|
|
|
|
<table width="80%">
|
|
|
|
<table width="80%">
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<th colspan="2"><h1 style="text-align: center">Übersicht</h1></th>
|
|
|
|
<th colspan="2"><h1 style="text-align: center">Übersicht</h1></th>
|
|
|
@ -138,31 +116,48 @@ function displayTournamentOptions($action, $klein, $wochen) {
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
<?php
|
|
|
|
<?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'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$change = FALSE;
|
|
|
|
function displayCheckTournament($minlvl, $maxlvl, $fusion, $special, $gain, $random, $name, $anzahl) {
|
|
|
|
if($klein !== NULL || $wochen !== null) {
|
|
|
|
if(is_numeric($minlvl) && is_numeric($maxlvl)) {?>
|
|
|
|
if($klein !== NULL && $klein != $fee_klein) {
|
|
|
|
<table width="80%">
|
|
|
|
$change = TRUE;
|
|
|
|
<tr>
|
|
|
|
mysql_query('UPDATE turnier_gebuehr SET gebuehr = '.$klein.' WHERE art = \'klein\'');
|
|
|
|
<th colspan="2" style="text-align: center">Turnier wirklich starten?</th>
|
|
|
|
$fee_klein = $klein;
|
|
|
|
</tr>
|
|
|
|
}
|
|
|
|
<tr>
|
|
|
|
if($wochen !== NULL && $wochen != $fee_wochen) {
|
|
|
|
<td style="text-align: center"><a
|
|
|
|
$change = TRUE;
|
|
|
|
href="<?php echo $GLOBALS['URL_TO_TURNIER'].'?fusion='.$fusion.'&special='.
|
|
|
|
mysql_query('UPDATE turnier_gebuehr SET gebuehr = '.$wochen.' WHERE art = \'wochen\'');
|
|
|
|
$special.'&minlevel='.$minlvl.'&maxlevel='.$maxlvl.'&gain='.$gain.'&randomize='.
|
|
|
|
$fee_wochen = $wochen;
|
|
|
|
$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 != TURNIER_ANFAENGER_GEBUEHR) {
|
|
|
|
|
|
|
|
$change = TRUE;
|
|
|
|
|
|
|
|
setDefine('TURNIER_ANFAENGER_GEBUEHR', $klein);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if($wochen !== NULL && $wochen != TURNIER_WOCHEN_GEBUEHR) {
|
|
|
|
|
|
|
|
$change = TRUE;
|
|
|
|
|
|
|
|
setDefine('TURNIER_WOCHEN_GEBUEHR', $wochen);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
<form method="get">
|
|
|
|
<form method="get">
|
|
|
|
<input type="hidden" name="choose" value="tournament"> <input
|
|
|
|
<input type="hidden" name="choose" value="tournament"> <input
|
|
|
|
type="hidden" name="action" value="fee">
|
|
|
|
type="hidden" name="action" value="fee">
|
|
|
@ -181,7 +176,8 @@ function displayTournamentOptions($action, $klein, $wochen) {
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td align="left">Anmeldegebühr:</td>
|
|
|
|
<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>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
@ -190,7 +186,8 @@ function displayTournamentOptions($action, $klein, $wochen) {
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td align="left">Anmeldegebühr:</td>
|
|
|
|
<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>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
@ -211,15 +208,30 @@ function displayTournamentOptions($action, $klein, $wochen) {
|
|
|
|
</table>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
<?php
|
|
|
|
<?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>
|
|
|
|
<table>
|
|
|
|
|
|
|
|
<?php if($GLOBALS['URL_TO_TURNIER'] !== null) { ?>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td><a
|
|
|
|
<td><a
|
|
|
|
href="<?php $_SERVER['PHP_SELF'] ?>?choose=tournament&action=tnmt">Turnier
|
|
|
|
href="<?php $_SERVER['PHP_SELF'] ?>?choose=tournament&action=tnmt">Turnier
|
|
|
|
starten</a>
|
|
|
|
starten</a>
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<?php }?>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td><a
|
|
|
|
<td><a
|
|
|
|
href="<?php $_SERVER['PHP_SELF'] ?>?choose=tournament&action=fee">
|
|
|
|
href="<?php $_SERVER['PHP_SELF'] ?>?choose=tournament&action=fee">
|
|
|
@ -231,7 +243,8 @@ function displayTournamentOptions($action, $klein, $wochen) {
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</table>
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
?>
|