-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfetch.php
More file actions
215 lines (182 loc) · 6.71 KB
/
fetch.php
File metadata and controls
215 lines (182 loc) · 6.71 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<!-- SHOWING THE ALL DATA FETCHED FROM DATA BASE -->
<?php
require_once('new.php');
$query="select * from student_data";
$result =mysqli_query($conn , $query);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Student Data Base</title>
<link rel="shortcut icon" href="scorevolt_logo.png">
<style>
table,tr,td{
border: 2px solid black;
text-align:center;
font-size:30px;
}
tr{
background-color: #CADCFC;
}
.head{
font-size:40px;
text-align:center;
font-weight:bold;
color:white;
background-color:#00246B;
}
.button {
display: inline-block;
border-radius: 4px;
position:;
border: none;
color: #FFFFFF;
text-align: center;
font-size: 28px;
padding: 20px;
width: 100px;
transition: all 0.5s;
cursor: pointer;
margin: 5px;
}
.button span {
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
color:white;
}
.button span:after {
content: '\00bb';
position: fixed;
opacity: 0;
top: 0;
right: -20px;
transition: 0.5s;
}
.button:hover span {
padding-right: 25px;
}
.button:hover span:after {
opacity: 1;
right: 0;
}
#myInput {
width: 300px;
background-color: #f8f8f8;
border: 1px solid #ccc;
border-radius: 20px;
padding: 10px;
outline: none;
transition: all 0.3s;
}
#myInput:focus {
border-color: #4CAF50;
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1);
}
body{
background-color:#d5e9f5;
}
.back-button {
position: fixed;
top: 30px;
left: 200px;
background-color: #00246B;
color: #fff;
padding: 20px 40px;
border:3px solid black;
border-radius: 8px;
text-decoration: none;
font-size:20px;
font-weight: bold;
transition: background-color 0.3s;
}
.back-button:hover {
background-color: #CADCFC;
color:black;
}
/* animation */
/* animation */
</style>
</head>
<body>
<a href="http://localhost/uem_student/Uem_student_info.php" class="back-button">← Back To Home</a>
<div align="center"><img src="scorevolt_logo.png" height="120px" ></div>
<h1 align="center" style="font-size:50px ; text-decoration:underline">UEM STUDENT DATA</h1>
<!-- <div align="center" style="height:40px"><span style="font-size:40px">Search :</span><input type="text" name="", id="myInput" placeholder="Enter Enrollment no" onkeyup="searchFun()" size="25" style="font-size:30px" ></div> -->
<div align="center" style="margin-top: 20px;">
<span style="font-size: 40px;">Search:</span>
<input type="text" name="enrollment" id="myInput" placeholder="Enter Enrollment no" onkeyup="searchFun()" style="font-size: 28px; padding: 8px; border: 1px solid #ccc; border-radius: 5px; margin-left: 10px;">
</div>
<br>
<table align="center" id="myTable">
<tr class="head">
<td>Image</td>
<td>Name</td>
<td>Enrollment</td>
<td>sem1</td>
<td>sem2</td>
<td>sem3</td>
<td>sem4</td>
<td>sem5</td>
<td>sem6</td>
<td>sem7</td>
<td>sem8</td>
<td colspan=2>Operations</td>
</tr>
<?php
while ($row=mysqli_fetch_assoc($result)){ //done2 start2
echo "<tr>
<td >"."<img src ='".$row["Image"]."' height='200px' width='200px'>"."</td>
<td>".$row['Name']."</td>
<td>".$row['Enrollment']."</td>
<td>".$row['sem1']."</td>
<td>".$row['sem2']."</td>
<td>".$row['sem3']."</td>
<td>".$row['sem4']."</td>
<td>".$row['sem5']."</td>
<td>".$row['sem6']."</td>
<td>".$row['sem7']."</td>
<td>".$row['sem8']."</td>
<td >
<div class='button' style='vertical-align:middle ; background-color:green'>
<a href='view_prof.php?en=$row[Enrollment] ' ><span>View</span></a>
</div>
</td>
<td >
<div class='button' style='vertical-align:middle ; background-color:blue'>
<a href='update_design.php?en=$row[Enrollment] '><span>Update</span></a>
</div>
<br>
<div class='button' style='vertical-align:middle ; background-color:red'><a href='delete.php?en=$row[Enrollment]' onclick ='return checkdelete()'><span>Delete</span></a></div>
</td>
</tr>
";
}
?> <!-- done2 end -->
</table>
<script>
const searchFun=()=>{
let filter = document.getElementById('myInput').value.toUpperCase();
let myTable=document.getElementById('myTable');
let tr=myTable.getElementsByTagName('tr');
for (var i =0;i<tr.length;i++){
let td=tr[i].getElementsByTagName('td')[2];
if(td){
let textvalue =td.textContent || td.innerHTML;
if (textvalue.toUpperCase().indexOf(filter)>-1){
tr[i].style.display="";
}else{
tr[i].style.display="none";
}
}
}
}
function checkdelete(){
return confirm('Are you Sure You Want to DELETE this Data');
}
</script>
</body>
</html>