-
Notifications
You must be signed in to change notification settings - Fork 0
/
student_all.php
123 lines (101 loc) · 3.36 KB
/
student_all.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
<?php
session_start();
if(!isset($_SESSION['rno'])){
header("location: index.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Pending Assignments</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style >
.navbar{
position: sticky;
}
</style>
</head>
<body onload="validity()">
<!-- <script>
function validity()
{
var dt=new Date();
if(dt.getDay()==6 || dt.getDay()==0)
{document.getElementById("up").disabled=true;
document.getElementById("sub").disabled=true;
}
}
</script>
-->
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a href="index.php"><div class="navbar-brand" >The Rising Institute</div></a>
</div>
<ul class="nav navbar-nav">
<li class="active" style="padding-left: 20px"><a href="student_all.php">All Assignments</a></li>
<li ><a href="student_submission.php">My submission</a></li>
<li ><a href="assignment_submission.php">Submit Assignment</a></li>
<li><a href="#">Discussion Forum</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li style="padding-right: 10px"><a href="logout.php"><span class="glyphicon glyphicon-log-out"></span>Logout</a></li>
</ul>
</div>
</nav>
<div class="container">
<h2 class="text-center">All Assignment</h2>
<table class="table table-hover">
<thead>
<tr>
<th class="text-center">Assignment ID</th>
<th class="text-center">Topic</th>
<th class="text-center">Teacher ID</th>
<th class="text-center">Details</th>
</tr>
</thead>
<tbody>
<?php
$servername="-";
$username="-";
$password="-";
$dbname="-";
$conn=new mysqli($servername,$username,$password,$dbname);
if($conn->connect_error){
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM assignments a,students s,faculty f WHERE a.class=s.class and a.tid=f.uid and s.id='".$_SESSION['rno']."'";
$result = $conn->query($sql);
if($result === FALSE) {
die(mysql_error());
}
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()){
?>
<tr>
<td class="text-center"><?php echo $row['q_id']?></td>
<td class="text-center"><?php echo $row['assignment_name']?></td>
<td class="text-center"><?php echo $row['name']?></td>
<td class="text-center"><a href="teacher_upload/<?php echo $row['Address'] ?> " target="_blank" class="btn btn-info btn-sm">View</a></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
<script >
function showWait() {
document.getElementById("wait").style="display:inline; height: 5%; width: 5%;position: relative;";
}
function hideWait(){
document.getElementById("wait").style="display:none";
}
</script>
</body>
</html>