forked from OvidiuRusu/TW
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudentindex.php
More file actions
75 lines (75 loc) · 2.7 KB
/
studentindex.php
File metadata and controls
75 lines (75 loc) · 2.7 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
<!DOCTYPE html>
<?php
session_start();
include('connection.php');
if (!isset($_SESSION['username']) || empty($_SESSION['username'])) {
exit();
}
$username = $_SESSION['username'];
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Student Index</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<h1><img src="images/oamlogo3.png" alt="" />Online <span style="font-weight:bold; color:#73868C;">Assignment</span> Manager</h1>
</div>
<div id="container">
<ul id="nav">
<li><a href="index.html">Logout</a></li>
<li><a href="#"><?php echo $username ?></a></li>
</ul>
<div id="contentleft">
<ul id="nav2" style="margin-left: 100px">
<li><a href="studentindex.php" style="color: #000;">Active Courses</a></li>
</ul>
<?php
$result = mysql_query("SELECT materie.Nume AS n, student_materie.StartDate AS d FROM materie JOIN student_materie ON materie.IdMaterie=student_materie.IdMaterie
JOIN student ON student_materie.IdStudent=student.IdStudent
JOIN account ON student.IdAccount=account.IdAccount
WHERE account.Username = '$username' AND student_materie.Status='In Curs'");
while($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo '<div class="coursebox">
<h3><a href="studentcourse.php?name=',$line["n"],'">',$line["n"],'</a><h3>
<h4>Facultatea de Informatica</h4>
<h4>Started: ' ,$line["d"],'<h4>
</div>';
}
?>
</div>
<div id="contentright">
<h2>Assignments Deadlines</h2>
<table>
<thead>
<tr>
<th>Course</th>
<th>Name</th>
<th>Due Date</th>
</tr>
</thead>
<tbody>
<?php
$result = mysql_query("SELECT assignment.Titlu AS titlu, assignment.DueDate AS due, assignment.Path AS path, materie.Nume AS name
FROM assignment JOIN materie ON assignment.IdMaterie = materie.IdMaterie WHERE assignment.DueDate < '2015-03-19';");
while($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo '<tr>
<td>',$line["name"],'</td>
<td><a href="',$line["path"],'"><strong>',$line["titlu"],'</strong></a></td>
<td width = 70px;>',$line["due"],'</td>
</tr>';
}
?>
</tbody>
</table>
</div>
<!-- <div id="footer">
<div id="bottomlinks">
<a href="index.html">homepage</a> | <a href="mailto:tacutanu.vlad@gmail.com">contact</a> | <a href="images/sitemap.png"> sitemap</a> | © 2015 Mitocariu Emilian • Rusu Ovidiu • Stoian Sorin • Tacutanu Vlad
</div> -->
</div>
</body>
</html>