-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_activity.php
95 lines (72 loc) · 3.25 KB
/
create_activity.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
<?php
session_start();
$_SESSION["company_id"] = 1;
include_once("lib/classes/Activity.class.php");
include_once("lib/classes/Functions.class.php");
if( !empty($_POST) ){
echo "posted";
if(isset($_POST['submit'])){
echo "submitted";
//if image is chosen
$activity = new Activity();
$activity->setTitle($_POST['title']);
$activity->setDescription($_POST['description']);
$activity->setCompanyId($_SESSION['company_id']);
$activity->setUserCount($_POST['user_count']);
$activity->setDates($_POST['dates']);
if($activity->createActivity()){
header("Location: student.php");
}
}
}
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Promising Talent - Nieuwe activiteit</title>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="lib/js/script.js"></script>
<link href='http://fonts.googleapis.com/css?family=Raleway:400,100,200,300,500,600,800,700,900' rel='stylesheet' type='text/css'>
</head>
<body>
<?php include_once("includes/nav.inc.php");?>
<div class="board">
<div class="top_page"><h1 class="title">Maak een nieuwe activiteit aan en spot talent</h1></div>
<div class="dashboard">
<form action="" method="post" enctype="multipart/form-data" id="uploadForm">
<section class="artikel artikel_details">
<div class="field">
<div class="input_label">
<label for="title">Title</label>
<input type="text" class="name" id="title" name="title">
</div>
<div class="input_label">
<label for="description">Description</label>
<textarea class="name" id="description" name="description">
</textarea>
</div>
<div class="input_label">
<label for="user_count">Aantal studenten die kunnen meedoen</label>
<input type="number" class="user_count" id="user_count" name="user_count">
</div>
</div>
</section>
<p id="dateTitle">Voeg de datums toe (meerdere studenten <strong>mogen</strong> op dezelfde datum komen)</p>
<div class="field dates">
<div class="input_label">
<label for="dates">Datum student 1: </label>
<input id="dates" name="dates[]" type="date" />
</div>
</div>
<div class="field field-extra"></div>
</section>
<input class="button button_send" name="submit" type="submit" value="CREËER ACTIVITEIT">
</form>
</div>
</div>
</body>
</html>