-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
128 lines (123 loc) · 4.07 KB
/
index.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
124
125
126
127
<?php
/*
* HOMEWORK
*
* /homework/index
*
* Copyright (c) 2017-2026 Tanner Babcock.
*/
namespace TBcom;
require_once("../resources/lib/TBcom.php");
require_once("../resources/lib/Log.php");
$hw = new Build\Page("homework.header", "homework.index", "homework.footer");
$hw->init("Tanner Babcock {{CLASS}}", "Homework assignments {{CLASS2}} for Tanner Babcock.", Codes\Home);
$hw->middle->replace("EMAIL", "[email protected]");
if (isset($_GET['c'])) {
switch ($_GET['c']) {
case "wdv341":
$hw->middle->replace("WDV341_SELECT", "display:inline");
$hw->middle->replacea([
"DEFAULT_SELECT" => "display:none",
"WDV321_SELECT" => "display:none",
"WDV221_SELECT" => "display:none",
"WDV205_SELECT" => "display:none",
"WDV131_SELECT" => "display:none",
"WDV101_SELECT" => "display:none"
]);
$hw->header->replace("CLASS", "Intro to PHP");
$hw->header->replace("CLASS2", "for Intro to PHP");
break;
case "wdv321":
$hw->middle->replace("WDV321_SELECT", "display:inline");
$hw->middle->replacea([
"DEFAULT_SELECT" => "display:none",
"WDV341_SELECT" => "display:none",
"WDV221_SELECT" => "display:none",
"WDV205_SELECT" => "display:none",
"WDV131_SELECT" => "display:none",
"WDV101_SELECT" => "display:none"
]);
$hw->header->replace("CLASS", "Advanced JavaScript");
$hw->header->replace("CLASS2", "for Advanced JavaScript");
break;
case "wdv221":
$hw->middle->replace("WDV221_SELECT", "display:inline");
$hw->middle->replacea([
"DEFAULT_SELECT" => "display:none",
"WDV341_SELECT" => "display:none",
"WDV321_SELECT" => "display:none",
"WDV205_SELECT" => "display:none",
"WDV131_SELECT" => "display:none",
"WDV101_SELECT" => "display:none"
]);
$hw->header->replace("CLASS", "Intro to JavaScript");
$hw->header->replace("CLASS2", "for Intro to JavaScript");
break;
case "wdv205":
$hw->middle->replace("WDV205_SELECT", "display:inline");
$hw->middle->replacea([
"DEFAULT_SELECT" => "display:none",
"WDV341_SELECT" => "display:none",
"WDV321_SELECT" => "display:none",
"WDV221_SELECT" => "display:none",
"WDV131_SELECT" => "display:none",
"WDV101_SELECT" => "display:none"
]);
$hw->header->replace("CLASS", "Advanced CSS");
$hw->header->replace("CLASS2", "for Advanced CSS");
break;
case "wdv131":
$hw->middle->replace("WDV131_SELECT", "display:inline");
$hw->middle->replacea([
"DEFAULT_SELECT" => "display:none",
"WDV341_SELECT" => "display:none",
"WDV321_SELECT" => "display:none",
"WDV221_SELECT" => "display:none",
"WDV205_SELECT" => "display:none",
"WDV101_SELECT" => "display:none"
]);
$hw->header->replace("CLASS", "Intro to Photoshop and Fireworks");
$hw->header->replace("CLASS2");
break;
case "wdv101":
$hw->middle->replace("WDV101_SELECT", "display:inline");
$hw->middle->replacea([
"DEFAULT_SELECT" => "display:none",
"WDV341_SELECT" => "display:none",
"WDV321_SELECT" => "display:none",
"WDV221_SELECT" => "display:none",
"WDV205_SELECT" => "display:none",
"WDV131_SELECT" => "display:none"
]);
$hw->header->replace("CLASS", "Intro to HTML and CSS");
$hw->header->replace("CLASS2", "for Intro to HTML and CSS");
break;
default:
$hw->header->append("<center><p class=\"error\">There is no class by that name.</p></center>");
$hw->middle->replacea([
"DEFAULT_SELECT" => "display:inline",
"WDV341_SELECT" => "display:none",
"WDV321_SELECT" => "display:none",
"WDV221_SELECT" => "display:none",
"WDV205_SELECT" => "display:none",
"WDV131_SELECT" => "display:none",
"WDV101_SELECT" => "display:none"
]);
$hw->header->replace("CLASS", "Invalid Class");
$hw->header->replace("CLASS2");
break;
}
}
else {
$hw->middle->replacea([
"WDV341_SELECT" => "display:none",
"WDV321_SELECT" => "display:none",
"WDV221_SELECT" => "display:none",
"WDV205_SELECT" => "display:none",
"WDV131_SELECT" => "display:none",
"WDV101_SELECT" => "display:none"
]);
$hw->header->replace("CLASS", "Fall 2020");
$hw->header->replace("CLASS2");
}
$hw->output();