-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditTeachCourse.php
More file actions
103 lines (103 loc) · 3.15 KB
/
editTeachCourse.php
File metadata and controls
103 lines (103 loc) · 3.15 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
100
101
102
103
<?php
include "link.php";
$name = $_SESSION["name"];
?>
<script type="text/javascript">
var compare = {
name:'<?php echo $name?>'
};
</script>
<form method="post" action="insertCourse.php" onsubmit="return submitTeachCourseForm();">
<label>courseName</label>
<input id="courseName" name="courseName" type="text" value="" class="input-xlarge"
onblur="validateNonEmpty(this,document.getElementById('courseNameHelp'));">
<span class="help-block" id="courseNameHelp"></span>
<label>teacherName</label>
<input id="teacherName" name="teacherName" type="text" value=<?php echo $name?> class="input-xlarge"
onblur="update(this, compare.name,document.getElementById('teacherNameHelp'));">
<span class="help-block" id="teacherNameHelp"></span>
<label>classroom</label>
<input id="classroom" name="classroom" type="text" value="" class="input-xlarge"
onblur="validateNonEmpty(this,document.getElementById('classroomHelp'));">
<span class="help-block" id="classroomHelp"></span>
<label>capacity</label>
<input id="capacity" name="capacity" type="text" value="" class="input-xlarge"
onblur="validateCapacity(this,document.getElementById('capacityHelp'));">
<span class="help-block" id="capacityHelp"></span>
<label>credit</label>
<select name="credit" onblur="validateNonEmpty(this,document.getElementById('creditHelp'));">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<span class="help-block" id="creditHelp"></span>
<label>department</label>
<select name="department">
<?php
$query = "SELECT * FROM department";
$result = $mysqli->query($query);
while ($row = $result->fetch_assoc()){
echo"<option>";
echo $row['department'];
echo"</option>";
}
?>
</select>
<span class="help-block" id="departmentHelp"></span>
<label>grade</label>
<select name="grade">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select>
<span class="help-block" id="gradeHelp"></span>
<label>obligatory</label>
<select name="obligatory">
<option>Yes</option>
<option>No</option>
</select>
<span class="help-block" id="obligatoryHelp"></span>
<label>courseYear</label>
<select name="courseYear">
<?php
for($i = 2012; $i <= 2112; $i ++)echo "<option>$i</option>";
?>
</select>
<span class="help-block" id="courseYearHelp"></span>
<label>courseTime1</label>
<span class="help-block"></span>
<select name="select0">
<?php
for($i = 1; $i <= 5; $i ++)echo "<option>$i</option>";
?>
</select>
<select id="courseTime1" name="select1[]" multiple>
<?php
for($i = 'A'; $i <= "L"; $i ++)echo "<option>$i</option>";
?>
<option>X</option>
<option>Y</option>
</select>
<span class="help-block" id="courseTime1Help"></span>
<label>courseTime2</label>
<select name="select2">
<?php
for($i = 1; $i <= 5; $i ++)echo "<option>$i</option>";
?>
</select>
<select name="select3[]" multiple>
<?php
for($i = 'A'; $i <= "L"; $i ++)echo "<option>$i</option>";
?>
<option>X</option>
<option>Y</option>
</select>
<div>
<button class="btn btn-primary">Create Course</button>
</div>
</form>