-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathedit_student.php
executable file
·128 lines (125 loc) · 5.09 KB
/
edit_student.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
<?php
require_once 'core/init.php';
if(!loggedIn()){
die();
}
if(!Input::exists('get')){
die();
}
else{
$t = new Student();
$tt = $t->getInfo(Input::get('sid'));
?>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/edit_student.js"></script>
<form id="edit_student" method="post">
<legend>Edit Details</legend>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<th>Scholar Number</th>
<td><input type='hidden' name='scholar_no' value='<?php echo Input::get('sid'); ?>'><?php echo Input::get('sid'); ?></td>
</tr>
<tr>
<th>Name</th>
<td><?php echo $t->getName(); ?></td>
</tr>
<tr>
<th>Department</th>
<td>
<select name="department">
<option value="" selected>Department</option>
<?php
$dep = new Department();
$departments = $dep->getAllDepartment();
while($department = $departments->fetch_object()){
?>
<option value="<?php echo $department->dept_id; ?>" <?php echo (($t->getDep()==$department->dept_id)?'selected':''); ?>><?php echo $department->name; ?></option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<th>Sem</th>
<td><?php echo $t->getSemester(); ?></td>
</tr>
<tr>
<th>Mobile</th>
<td>
<input type="text" maxlength="10" name="mobile" class="form-control" placeholder="student\'s mobile number" value="<?php echo $t->getMobile(); ?>" />
</td>
</tr>
<tr>
<th>Parent's<br/>Mobile</th>
<td><input type="text" maxlength="10" name="parents_mobile" class="form-control" placeholder="parent\'s mobile number" value="<?php echo $t->getParentsMobile(); ?>" /></td>
</tr>
<tr>
<th>Regular <br/> Courses</th>
<td>
<textarea name="courses" class="form-control" placeholder="Regular Courses"><?php echo $t->getCourses(); ?></textarea>
</td>
</tr>
<tr>
<th>Load <br/> Courses</th>
<td>
<textarea name="courses_load" class="form-control" placeholder="Load Courses"><?php echo $t->getCoursesLoad(); ?></textarea>
</td>
</tr>
<tr>
<th>Total Credit Scored</th>
<td><input type="text" maxlength="10" name="total_score" class="form-control" placeholder="total score" value="<?php echo $t->getTotalScore(); ?>" /></td>
</tr>
<tr>
<th>Total Credit Point</th>
<td><input type="text" maxlength="10" name="max_score" class="form-control" placeholder="max score" value="<?php echo $t->getMaxScore(); ?>" /></td>
</tr>
<tr>
<th>Home<br/>Address</th>
<td>
<textarea name="home_address" class="form-control" placeholder="Home Address"><?php echo $t->getHomeAddress(); ?></textarea>
</td>
</tr>
<tr>
<th>Hostel<br/>Address</th>
<td>
<textarea name="hostel_address" class="form-control" placeholder="Hostel Address"><?php echo $t->getHostelAddress(); ?></textarea>
</td>
</tr>
<tr>
<th>Payment</th>
<td><?php echo (($t->getPayment())?'Completed':'Not Completed'); ?></td>
</tr>
<tr>
<th>Approved</th>
<td>
<select name="approved" class="form-control">
<option value="0" <?php echo (($t->getApproved()=='0')?'selected':''); ?>>Not Approved</option>
<option value="1" <?php echo (($t->getApproved()=='1')?'selected':''); ?>>Approved</option>
</select>
</td>
</tr>
<tr>
<th>Blocked</th>
<td>
<select name="blocked" class="form-control">
<option value="0" <?php echo (($t->getBlocked()=='0')?'selected':''); ?>>Not Blocked</option>
<option value="1" <?php echo (($t->getBlocked()=='1')?'selected':''); ?>>Blocked</option>
</select>
</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_s()"; />
</td>
</tr>
</tbody>
</table>
</form>
<?php
}
?>