-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd.php
More file actions
99 lines (93 loc) · 3.27 KB
/
Copy pathadd.php
File metadata and controls
99 lines (93 loc) · 3.27 KB
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
<?php
session_start();
//TODO Check if user has 30 points
if(!(isset($_SESSION['user']))){
header('location: index.php');
}
include_once 'database/database_infos.php';
include_once 'database/Database.php';
?>
<!DOCTYPE html>
<html>
<head>
<?php include_once 'includes/head.php'; ?>
</head>
<body>
<?php
include_once 'resources/form_controller.php';
include_once 'resources/navigation.php';
?>
<div class="container">
<div class="col-md-12">
<h1>Fragen hinzufügen</h1>
<p>
Du hast genügend Punkte ereicht um ein Teil unserer Community
zu werden. Von nun an hast du die Möglichkeit eigene Fragen zu
unseren Kategorien hinzuzufügen. <br> Wir wünschen dir
viel Spass! <br> <span class="grey">Wir werden deine Frage so
schnell wie möglich überprüfen und freigeben.</span>
</p>
<hr>
</div>
<div class="row">
<form action="resources/addQuestion.php" method="POST"
id="addQuestion">
<div id="questions">
<div class="col-md-4">
<label for="sel1">Thema</label> <select class="form-control"
name="category">
<?php foreach ($categories as $category){?>
<option value = <?php echo $category->__get("categoryID")?>><?php echo $category->__get("category");?></option>
<?php }?>
</select>
</div>
<div id="1">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<label for="question" class="titleQuestion">Frage:</label> <input
type="text" class="form-control question" name="question1">
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
<label for="answer1">Antwort:</label><input type="radio"
name="option1" class="optionRight" autocomplete="off"><input
type="text" class="form-control" id = "answer1" name="answer1-1">
</div>
<div class="col-md-6">
<label for="answer2">Antwort:</label><input type="radio"
name="option1" class="optionRight" autocomplete="off"><input
type="text" class="form-control answer" id = "answer2" name="answer1-2">
</div>
<div class="col-md-6">
<label for="answer3">Antwort:</label><input type="radio"
name="option1" class="optionRight" autocomplete="off"><input
type="text" class="form-control answer" id = "answer3" name="answer1-3">
</div>
<div class="col-md-6">
<label for="answer4">Antwort:</label><input type="radio"
name="option1" class="optionRight" autocomplete="off"> <input
type="text" class="form-control answer" id = "answer4" name="answer1-4">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<button type="submit" class="btn btn-default col-md-12"
id="btnSubmit">Hinzufügen</button>
</div>
</form>
<hr />
<button class="btn btn-default col-md-12" id="AddQuestionBtn">Weitere
Frage hinzufügen</button>
</div>
</div>
<script src="js/add.js"></script>
<hr />
<?php include_once 'resources/footer.php';?>
</body>
</html>