-
Notifications
You must be signed in to change notification settings - Fork 0
/
logandtest.php
169 lines (82 loc) · 2.56 KB
/
logandtest.php
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html>
<html>
<head>
<title>Your Music-Decision</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript">
</script>
<link rel="stylesheet" type="text/css" href="logstyle.css">
</head>
<body style="background-image: url(background.jpg)">
<div id="header">
<h1>Angemeldet auf Party :
<?php
require 'connection.php';
$dbname;
if (isset($_POST["inbutt"])||isset($_POST["logout"])) {
$dbname = $_GET["var"];
echo $dbname."<hr>"."</h1>";
}
else{
$dbname = $_POST["logtext"];
echo $dbname."<hr>"."</h2>";
}
echo "</div>";
echo "<div id='rest'";
if (isset($_POST["inbutt"])) {
$dbname = $_GET["var"];
$wunsch = $_POST["intext"];
$interpret = $_POST["ininterpret"];
$datum = date("Y-m-d H:i:s");
//$dbname = $_GET["var"];
echo $wunsch." wurde in ".$dbname." gespeichert"."<br>";
$sql = "INSERT INTO $dbname(Wunsch, Datum,Interpret) VALUES (:wunsch, :datum, :interpret)";
$stmt = $dbh->prepare($sql);
$stmt-> bindValue(':wunsch',$wunsch);
$stmt-> bindValue(':interpret',$interpret);
$stmt->bindValue(':datum',$datum);
$stmt->execute();
}
echo "<h2>Your Music Choice</h2>";
echo "Trage hier deine Musikwünsche ein : <br><br>";
echo "<form action='logandtest.php?var=$dbname' method='post'>
<input type='text' name='intext' value='Wunsch'class= 'inpdes' >
<input type='text' name='ininterpret' value='Interpret' class='inpdes'>
<input type='submit' name='inbutt' class='inbutt'>
</form>";
?>
<br>
<b>oder</b> schau dir auf "Votesite" die Wünsche an und bewerte sie :
<br> <br>
<?php
if (isset($_POST["inbutt"])||isset($_POST["logout"])) {
$dbname = $_GET["var"];
//echo $dbname."<hr>"."</h1>";
}
else{
$dbname = $_POST["logtext"];
}
echo "
<form action='vote.php?var=$dbname' method='post'>
<input type='submit' name='votebutt' value='votesite' class='inbutt'>
</form>
";
?>
</div>
<br>
<b>oder</b> bist du der DJ und willst die Wünsche deiner Gäste geordnet sehen ? :<br> <br>
<form action="djlog.php" method="post">
<input type="submit" name="djbutt" class="inbutt" value="DJ Button">
</form>
<br>
<br>
<hr>
<div class="footer">
<p><b>oder</b> du meldest dich ab : <br></p>
<form action='main.php' method='post'>
<input type='submit' name='logout' value='logout' id="backbutt" class="inbutt">
</form>
</div>
</body>
</html>