-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit-student.php
More file actions
179 lines (121 loc) · 6.15 KB
/
Copy pathedit-student.php
File metadata and controls
179 lines (121 loc) · 6.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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<?php
session_start();
include("connect/connect.php");
if(!$_SESSION['u_id']){
header('Location:index.php?status=2');
}else{
?>
<?php
if(isset($_GET['id'])){
$s_id = $_GET['id'];
$sql = "SELECT * FROM student WHERE s_id = '$s_id'";
$result = mysqli_query($conn,$sql);
$row = mysqli_fetch_array($result);
}
?>
<!DOCTYPE html>
<html lang="en">
<?php
include_once("component/header.php");
?>
<body class="s1" >
<!-- begin #page-loader -->
<div id="page-loader" class="fade show"><span class="spinner"></span></div>
<!-- end #page-loader -->
<!-- begin #page-container -->
<div id="page-container" class="page-container fade page-sidebar-fixed page-header-fixed">
<?php
include_once('component/navbar2.php')
?>
<?php
include_once('component/slidebar2.php')
?>
<!-- begin #content -->
<div id="content" class="content">
<!-- begin page-header -->
<h1 class="page-header s12">ระบบบริหารจัดการห้องสมุด<small> โรงเรียนยุพราชวิทยาลัย</small></h1>
<!-- end page-header -->
<!-- begin panel -->
<div class="panel panel-inverse">
<div class="panel-heading ">
<h4 class="panel-title">ระบบบริหารจัดการห้องสมุด</h4>
<div class="panel-heading-btn">
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger" data-click="panel-remove"><i class="fa fa-times"></i></a>
</div>
</div>
<div class="panel-body">
<h3>ระบบเเก้ไขนักเรียน</h3>
<hr>
<form action="process/edit-studentact.php" method="post" enctype="multipart/form-data">
<div class="form-group row m-b-15">
<label class="col-form-label col-md-2">ไอดีนักเรียน</label>
<div class="col-md-10">
<input type="text" class="form-control m-b-5" placeholder="ชื่อ" name="s_id" id="s_id" value="<?php echo $row['s_id'] ?>" readonly>
</div>
</div>
<div class="form-group row m-b-15">
<label class="col-form-label col-md-2">คำนำหน้าชื่อ</label>
<div class="col-md-10">
<select class="form-control" name="s_fname" id="s_fname">
<option><?php echo $row['s_fname'] ?></option>
<option>เด็กชาย</option>
<option>เด็กหญิง</option>
<option>นาย</option>
<option>นางสาว</option>
</select>
</div>
</div>
<div class="form-group row m-b-15">
<label class="col-form-label col-md-2">ชื่อ</label>
<div class="col-md-10">
<input type="text" class="form-control m-b-5" placeholder="ชื่อ" name="s_name" id="s_name" value="<?php echo $row['s_name'] ?>">
</div>
</div>
<div class="form-group row m-b-15">
<label class="col-form-label col-md-2">สกุล</label>
<div class="col-md-10">
<input type="text" class="form-control m-b-5" placeholder="สกุล" name="s_lname" id="s_lname" value="<?php echo $row['s_lname'] ?>">
</div>
</div>
<div class="form-group row m-b-15">
<label class="col-form-label col-md-2">เลขประจำตัว</label>
<div class="col-md-10">
<input type="text" class="form-control m-b-5" placeholder="เลขประจำตัว" name="s_sid" id="s_sid" value="<?php echo $row['s_sid'] ?>">
</div>
</div>
<div class="form-group row m-b-15">
<label class="col-form-label col-md-2">รูปภาพปัจจุบัน</label>
<div class="col-md-10">
<img src="upload/<?php echo $row['s_pic'] ?>" class="img-fluid" width="10%" alt="" srcset="">
</div>
</div>
<div class="form-group row m-b-15">
<label class="col-form-label col-md-2">รูปภาพ</label>
<div class="col-md-10">
<input type="file" class="form-control m-b-5" placeholder="รูปภาพ" name="s_pic" id="s_pic" onchange="readURL(this)" value="<?php echo $row['s_pic'] ?>">
</div>
</div>
<input type="submit" class="btn btn-green" style="color: white;font-weight:unset" name="submit" value="แก้ไขนักเรียน">
</form>
</div>
</div>
<!-- end panel -->
</div>
<!-- end #content -->
<?php
include_once("component/footer.php");
?>
<!-- begin scroll to top btn -->
<a href="javascript:;" class="btn btn-icon btn-circle btn-success btn-scroll-to-top fade" data-click="scroll-top"><i class="fa fa-angle-up"></i></a>
<!-- end scroll to top btn -->
</div>
<!-- end page container -->
<?php
include_once("component/jslink.php");
?>
</body>
</html>
<?php }?>