-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathedit_department.php
executable file
·62 lines (60 loc) · 1.54 KB
/
edit_department.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
<?php
require_once 'core/init.php';
if(!loggedIn()){
die();
}
if(!Input::exists('get')){
die();
}
else{
$dep = new Department();
$departments = $dep->getInfo(Input::get('did'));
?>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/edit_department.js"></script>
<form id="edit_department" method="post">
<legend>Edit Details</legend>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<th>Department ID</th>
<td><input type='hidden' name='id' value='<?php echo Input::get('did'); ?>'><?php echo Input::get('did'); ?></td>
</tr>
<tr>
<th>Name</th>
<td><input type="text" placeholder="Name of Department" value="<?php echo $dep->getDepName(); ?>" name="name"/></td>
</tr>
<tr>
<th>No. of Course(s)</th>
<td>
<?php
$cors = new Course();
$courses = $cors->getInfobyDept(Input::get('did'));
echo $courses->num_rows;
?>
</td>
</tr>
<tr>
<th>No. of Teacher(s)</th>
<td>
<?php
$t = new Teacher();
$teachers = $t->getInfobyDept(Input::get('did'));
echo $teachers->num_rows;
?>
</td>
</tr>
<tr>
<td>
<input type="submit" value=" Save " class="btn btn-success" name = "submit" />
</td>
<td>
<input type="button" class="btn btn-danger" value="Cancel" onClick="save_edit_dep()"; />
</td>
</tr>
</tbody>
</table>
</form>
<?php
}
?>