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:
|
<?php
session_start();
?>
<link rel="stylesheet" href="style.css">
<?php
if(!isset($_SESSION["Username"]))
{
echo "<br><font color="red"><b>Du bist nicht eingeloggt!</b></font><br><br></a>";
include("Login.htm");
exit;
}
?>
<?php
include ("Datenbank.php");
$user = $_SESSION['Username'];
$id = $_GET['id'];
$pferd = $_GET['pferd'];
if($_POST['flag'] == 1)
{
mysql_query("DELETE FROM `Trainer´ WHERE id='$id'");
echo "<h1>Training beendet</h1>Du hast $pferd aufgegeben und an den Besitzer zurückgegeben.";
include("TrainerLesen.php");
}
if(!$_POST['flag'])
{
?>
<html>
<head>
<title></title>
</head>
<body>
<br><h1>Auftrag ablehnen</h1>
Möchtest du dieses Pferd wirklich nicht mehr trainieren? Bereits gewonnene Fortschritte gehen verloren und du bekommst kein Geld für deine bisherige Arbeit.<br><br><br>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" style="display: inline;">
<input type="hidden" name="flag" value="1">
<input type="submit" id="button" value="Ja" style="width: 100px;"></form> <input type="submit" id="button" value="Nein" style="width: 100px;" onClick="self.location.href='TrainerLesen.php'">
<?php
}
?>
</body>
</html>
|