1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
<?php
case 'del':
if(isset($_POST['submit']) AND "Clanwar löschen" == $_POST['submit'])
{
}
else
{
$formular = new HTML('form');
$formular->addAttribut('method', 'post');
$formular->addAttribut('action', 'index.php?section=admin'.
'&site=clanwar'.
'&action=add');
$formular->addAttribut('class', 'formular');
$überschrift = new HTML('p');
$überschrift->addInhalt('Clanwar löschen');
$formular->addInhalt($überschrift);
$liste = new HTML('ol');
$eintrag = new HTML('li');
$label = new HTML('label');
$label->addAttribut('for', 'cw');
$label->addInhalt('Clanwar');
$select = new HTML('select');
$select->addAttribut('name', 'clanwar');
$select->addAttribut('id', 'cw');
$default = new HTML('option');
$default->addAttribut('value', '0');
$default->addAttribut('selected');
$sql = "SELECT
ID,
Gegner,
Datum,
FROM
clanwar
ORDER BY
Datum DESC;";
$cwqry = new Query($sql);
if($cwqry->error())
{
die("<pre>".$cwqry->getError()."</pre>\n");
}
while($row = $cwqry->fetch())
{
$option = new HTML('option');
$option->addAttribut('value', $row['ID']);
$option->addInhalt('('.$row['Datum'].')'.$row['Gegner']);
$select->addInhalt($option);
}
$eintrag->addInhalt($label);
$eintrag->addInhalt($select);
$liste->addInhalt($eintrag);
$eintrag = new HMTL('li');
$submit = new HTMLempty('input');
$submit->addAttribut('type', 'submit');
$submit->addAttribut('name', 'submit');
$submit->addAttribut('value', 'Clanwar löschen');
$reset = new HTMLempty('input');
$reset->addAttribut('type', 'reset');
$reset->addAttribut('name', 'submit');
$reset->addAttribut('value', 'Daten zurücksetzen');
$sessid = new HTMLempty('input');
$sessid->addAttribut('type', 'hidden');
$sessid->addAttribut('name', session_name());
$sessid->addAttribut('value', session_id());
$eintrag->addInhalt($submit);
$eintrag->addInhalt($reset);
$eintrag->addInhalt($sessid);
$liste->addInhalt($eintrag);
$formular->addInhalt($liste);
$formular->ausgeben();
}
break;
?>
|