-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_course.php
150 lines (127 loc) · 5.15 KB
/
create_course.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
<?php //access controlling
session_start();
if( !isset($_SESSION['signed_in']) ) { //session not set
header('location:index.php');
exit();
}else if( !$_SESSION['signed_in'] ){ //session set, but not signed_in
header('location:index.php');
exit();
}else if( substr($_SESSION['username'], -1) != "D" ){ //session set, but not for HR
header('location:index.php');
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Create Course</title>
<link rel="stylesheet" href="css/styles_header.css">
<link rel="stylesheet" href="css/styles_footer.css">
<link rel="stylesheet" href="css/styles_create_course.css">
<link rel="stylesheet" href="css/subnav.css">
<link rel="stylesheet" href="css/navpannel.css">
<script src="js/jquery-3.3.1.js"></script>
<script src="js/insert_module.js" type="text/javascript"></script>
<script src="js/create_course_buttons.js" type="text/javascript"></script>
<script src="js/subnav.js" type="text/javascript"></script>
</head>
<?php
include_once("inc/header.php");
include_once("inc/navpannel.php");
$index = trim($_SESSION['username']);
include_once("inc/subnavstaff.php");
?>
<input type = "hidden" name = "index" id = "index" value=<?php echo $index ?>>
<body>
<?php include_once("inc/header.php"); ?>
<?php include_once("inc/navpannel.php"); ?>
<?php include_once("dbOperations/create_course_trades_db.php"); ?>
<div class = "added_php">
<?php include_once("dbOperations/create_course_lecturers_db.php"); ?>
</div>
<div class="confirmBox">
<div class="message"></div>
<span class="button yes">Yes</span>
<span class="button no">No</span>
</div>
<div class = "basic_data">
<h5>Create a New Course</h5>
<form action="dbOperations/create_course_db.php " method = "post" id = "data_c">
<label>Course Name</label><br>
<input type="text" id="name" name="name" placeholder="Enter Course Name"><br>
<label>Number of Students</label><br>
<input type="number" id="student_count" name="student_count" placeholder ="Enter Number of Students"><br>
<label>Duration (Months)</label><br>
<input type="number" id="duration" name="duration" placeholder = "Enter Number of Months"><br>
<label>Trade</label><br>
<input list="trades" placeholder="Enter Trade Field" id = "trade">
<datalist id="trades">
<?php
while($row = mysqli_fetch_assoc($trades)){
?>
<option>
<?php echo($row['trade']); ?>
</option>
<?php
}
?>
</datalist>
<br>
<label>Course Type</label><br>
<select id = "course_type" name="course_type" class = "values">
<option value = "" selected>Select Course Type</option>
<option value="full" >Full</option>
<option value="part">Part</option>
</select>
<br>
<label>Type</label><br>
<select id = "type" name="type" class = "values">
<option value = "" selected>Select Type</option>
<option value="NVQ" >NVQ</option>
<option value="NON-NVQ">NON-NVQ</option>
</select>
<br>
<label>Accredit Level</label><br>
<select id = "accredit_level" name="accredit_level" class = "values">
<option value = "" selected>Select Accredit Level</option>
<option value=1 >1</option>
<option value=2 >2</option>
<option value=3 >3</option>
<option value=4 >4</option>
<option value=5 >5</option>
<option value="certificate">Certificate</option>
<option value="diploma">Diploma</option>
</select>
</form><br>
<label>Medium</label><br>
<select id = "medium" name="medium" class = "values">
<option value = "" selected>Select Medium</option>
<option value="english" >English</option>
<option value="sinhala">Sinhala</option>
</select><br>
<label>Required Qulification </label><br>
<input type="text" id="required_qualification" name="required_qualification" placeholder="Enter Required Qualifications"><br>
<br>
<label>Description </label><br>
<input type="text" id="des" name="description" placeholder="Enter a Description"><br>
<br>
</form>
</div>
<div class="container_modules">
<nav class="modules">
<ul id="que_list">
</ul>
</nav>
</div>
<div class="container_buttons">
<button type="submit" name="cancel" class="assign_button" id="cancel">Cancel</button>
<button type="submit" name="new-question" class="assign_button" id="new-question">Add New Module</button>
<button type="submit" name="complete" class="assign_button" id="done">Create Course</button>
</div>
<div class = "footer">
<?php include_once("inc/footer.php"); ?>
</div>
</body>
</html>