-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathschedule.aspx
93 lines (81 loc) · 2.82 KB
/
schedule.aspx
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
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage1.master" AutoEventWireup="true" CodeFile="schedule.aspx.cs" Inherits="schedule" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Stylesheets" runat="Server">
<link href="timetablestyle.css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="Server">
<div class="menu_nav">
<ul>
<li><a href="home.aspx">Home</a></li>
<li><a href="schedule.aspx">Schedule</a></li>
<li><a href="Messages.aspx">Messages</a></li>
<li><a href="user.aspx"><%=((ELearn.User)Session["user"]).username %></a></li>
<li><a href="logout.aspx">Logout</a></li>
</ul>
<div class="clr"></div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<%
//Session.Add("userType", "staff");
List<List<string>> schedule = null;
if (((string)Session["userType"]).Equals("student"))
schedule = ((Student)Session["user"]).GetSchedule();
else if (((string)Session["userType"]).Equals("teacher"))
schedule = ((Teacher)Session["user"]).GetSchedule();
else if (((string)Session["userType"]).Equals("staff"))
{
schedule = new List<List<string>>(5);
for (int i = 0; i < 5; ++i)
schedule.Add(new List<string>());
}
else Response.Redirect("Default.aspx");
%>
<table width="80%" align="center">
<div id="head_nav">
<tr>
<th>Time</th>
<th>saturday</th>
<th>sunday</th>
<th>monday</th>
<th>tuesday</th>
<th>wednesday</th>
<th>thursday</th>
</tr>
</div>
<tr>
<th>10:00 - 11:00</th>
<%foreach (string entry in schedule[0])
{%>
<td><%=entry%></td>
<%} %>
</tr>
<tr>
<th>11:00 - 12:00</td>
<%foreach (string entry in schedule[1])
{%>
<td><%=entry%></td>
<%} %>
</tr>
<tr>
<th>12:00 - 01:00</td>
<%foreach (string entry in schedule[2])
{%>
<td><%=entry%></td>
<%} %>
</tr>
<tr>
<th>01:00 - 02:00</td>
<%foreach (string entry in schedule[3])
{%>
<td><%=entry%></td>
<%} %>
</tr>
<tr>
<th>02:00 - 03:00</td>
<%foreach (string entry in schedule[4])
{%>
<td><%=entry%></td>
<%} %>
</tr>
</table>
</asp:Content>