-
Notifications
You must be signed in to change notification settings - Fork 1
/
root.php
200 lines (158 loc) · 3.92 KB
/
root.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?php
// This page drives the routing to various content - almost everying on the site is actually served through a 404 page.
include_once ("includes/block_conn_open.php");
$strPath = substr($_SERVER['REQUEST_URI'],1);
$arrPath = explode("/",$strPath);
$strPageTitle = "Massive Report > Data";
$strMenuGroup = "";
$strMode = $arrPath[0];
$strMessage = "";
$intThisYear = 2019;
switch ($strMode) {
case "about":
// About this site
include ("includes/block_about.php");
break;
case "blog":
// Meta blog
include("blog/index.php");
break;
case "browse":
//Browse categories
$strPageTitle .= " > Browse";
$strCategory = $arrPath[1];
switch ($strCategory) {
case "freeagents":
$strPageTitle .= " > Free Agents";
include ("includes/browse_freeagents.php");
break;
case "opponents":
$strPageTitle .= " > Opponents";
include ("includes/browse_opponents.php");
break;
case "players":
$strPageTitle .= " > Players";
include ("includes/browse_players_v2.php");
break;
case "games":
$strPageTitle .= " > Games";
include ("includes/browse_games_v2.php");
break;
case "roster":
if(isset($_GET['date'])){
$inputDate = $_GET['date'];
} else {
$inputDate = date("Y-m-d");
}
$strPageTitle .= " > Roster";
include ("includes/browse_roster.php");
break;
default:
// Generic browse
break;
}
break;
case "changelog":
// Site changelog
include ("includes/block_changelog.php");
break;
case "date":
// This Day in History
include ("includes/block_date_i.php");
break;
case "game":
// Game record
if(count($arrPath)==1){
} else {
$intGameID = $arrPath[1];
}
include ("includes/block_game.php");
break;
case "opponent":
// Opponent summaries
$strPageTitle .= " > Opponent";
if(count($arrPath)==1){
$intOpponentID = 12;
} else {
$intOpponentID = $arrPath[1];
$strQueryString = $_SERVER["QUERY_STRING"];
}
include ("includes/block_opponent.php");
break;
case "player":
// Player profile
$strPageTitle .= " > Player";
$boolTabs = TRUE;
if(count($arrPath)==1){
} else {
$intPlayerID = $arrPath[1];
}
include ("includes/block_player_v3.php");
break;
case "season":
// Season summaries
$strPageTitle .= " > Season";
$boolTabs = TRUE;
if(count($arrPath)==2){
$intSeason = $arrPath[1];
} else {
$intSeason = date('Y');
}
include ("includes/block_season_v2.php");
break;
case "static":
// Static pages
$strCategory = $arrPath[1];
switch ($strCategory) {
case "opener":
include ("includes/static_attendance-opener.php");
break;
}
case "visualize":
// Visualizations
$strCategory = $arrPath[1];
switch ($strCategory) {
case "attendance":
include ("includes/visualize_attendance.php");
break;
case "chase":
include ("includes/visualize_chase.php");
break;
case "chase_mls":
include ("includes/visualize_chase_mls.php");
break;
case "combinations":
include ("includes/visualize_combinations.php");
break;
case "roster":
include ("includes/visualize_roster.php");
break;
case "standings":
include ("includes/visualize_standings.php");
break;
case "standings-usl":
include ("includes/visualize_standings_usl.php");
break;
default:
// Generic browse
break;
}
break;
default:
// Home page
break;
}
include ("includes/block_header.php");
if(isset($longPageContent)){
print $longPageContent;
} else {
?>
<h1>Coming Soon</h1>
<p>Sorry, you've reached a part of the site that isn't ready yet. Please check back soon, as we are continually adding new features.</p>
<?php
}
if(isset($strJavascript)){
include ("javascript/".$strJavascript);
}
include ("includes/block_footer.php");
?>