-
Notifications
You must be signed in to change notification settings - Fork 17
/
View_Scores.php
94 lines (83 loc) · 3.4 KB
/
View_Scores.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
<?php
$msg="";
$opr="";
if(isset($_GET['opr']))
$opr=$_GET['opr'];
if(isset($_GET['rs_id']))
$id=$_GET['rs_id'];
if($opr=="del")
{
$del_sql=mysql_query("DELETE FROM stu_score_tbl WHERE ss_id=$id");
if($del_sql)
$msg="<div style='background-color: white;padding: 20px;border: 1px solid black;margin-bottom: 25px;''>"
. "<span class='p_font'>"
. "1 Record Deleted... !"
. "</span>"
. "</div>";
else
$msg="Could not Delete :".mysql_error();
}
echo $msg;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/style_view.css" />
<title>Untitled Document</title>
</head>
<body>
<div class="btn_pos">
<form method="post">
<input type="text" name="searchtxt" class="input_box_pos form-control" placeholder="Search name.." />
<div class="btn_pos_search">
<input type="submit" class="btn btn-primary btn-large" value="Search"/>
<a href="?tag=score_entry"><input type="button" class="btn btn-large btn-primary" value="Register new" name="butAdd"/></a>
</div>
</form>
</div><br><br>
<br />
<div class="table_margin">
<table class="table table-bordered">
<thead>
<tr>
<th style="text-align: center;">No</th>
<th style="text-align: center;">Students ID </th>
<th style="text-align: center;">Faculties ID</th>
<th style="text-align: center;">Subject ID </th>
<th style="text-align: center;">Mid term</th>
<th style="text-align: center;">Final</th>
<th style="text-align: center;">Note</th>
<th style="text-align: center;" colspan="2">Operation</th>
</tr>
</thead>
<?php
$key="";
if(isset($_POST['searchtxt']))
$key=$_POST['searchtxt'];
if($key !="")
$sql_sel=mysql_query("SElECT * FROM stu_score_tbl WHERE stu_id like '%$key%' ");
else
$sql_sel=mysql_query("SELECT * FROM stu_score_tbl");
$i=0;
while($row=mysql_fetch_array($sql_sel)){
$i++;
?>
<tr>
<td><?php echo $i;?></td>
<td><?php echo $row['stu_id'];?></td>
<td><?php echo $row['faculties_id'];?></td>
<td><?php echo $row['sub_id'];?></td>
<td><?php echo $row['miderm'];?></td>
<td><?php echo $row['final'];?></td>
<td><?php echo $row['note'];?></td>
<td align="center"><a href="?tag=score_entry&opr=upd&rs_id=<?php echo $row['ss_id'];?>"><img style="-webkit-box-shadow: 0px 0px 0px 0px rgba(50, 50, 50, 0.75);-moz-box-shadow: 0px 0px 0px 0px rgba(50, 50, 50, 0.75);box-shadow: 0px 0px 0px 0px rgba(50, 50, 50, 0.75);" src="picture/update.png" height="20" alt="Update" /></a></td>
<td align="center"><a href="?tag=view_scores&opr=del&rs_id=<?php echo $row['ss_id'];?>"><img style="-webkit-box-shadow: 0px 0px 0px 0px rgba(50, 50, 50, 0.75);-moz-box-shadow: 0px 0px 0px 0px rgba(50, 50, 50, 0.75);box-shadow: 0px 0px 0px 0px rgba(50, 50, 50, 0.75);" src="picture/delete.jpg" height="20" alt="Delete" /></a></td>
</tr>
<?php
}
?>
</table>
</div>
</body>
</html>