-
Notifications
You must be signed in to change notification settings - Fork 0
/
clubhome.php
349 lines (258 loc) · 8.22 KB
/
clubhome.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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<?
session_start();
set_include_path("./tennis");
include_once('INCL_Tennis_Functions_Session.php');
include_once('INCL_Tennis_DBconnect.php');
include_once('INCL_Tennis_Functions.php');
include_once('INCL_Tennis_Functions_Metrics.php');
include_once('INCL_Tennis_Functions_QUERIES.php');
Session_Initalize();
$DEBUG = FALSE;
//$DEBUG = TRUE;
//----DECLARE GLOBAL VARIABLES------------------------------------------------>
global $CRLF;
// Declare the global error variables.
$lstErrExist = FALSE;
$lstErrMsg = "";
//----DECLARE LOCAL VARIABLES------------------------------------------------->
$tblName = 'qryClubDisp';
$row = array();
$server = $_SERVER['HTTP_HOST'];
$clubID = 0;
//----GET QUERY STRING DATA--------------------------------------------------->
if (array_key_exists('ID', $_GET)) $clubID = $_GET['ID'];
//----SET CLUB ID------------------------------------------------------------->
if (!$clubID) { $clubID = $_SESSION['clubID']; }
if (!$clubID)
{
echo "<P>ERROR, Not Signed Into A Valid Club.</P>";
include "INCL_footer.php";
exit;
}
$_SESSION['clubID'] = $clubID;
//----GET-SET RETURN PAGE----------------------------------------------->
//$rtnpg = "http://{$server}/ClubHome.php?ID={$_SESSION['clubID']}";
$rtnpg = "http://{$server}/ClubHome.php";
$_SESSION['RtnPg'] = $rtnpg;
//----CONNECT TO MYSQL-------------------------------------------------->
$link = Tennis_DBConnect();
if ($lstErrExist == TRUE)
{
echo "<P>{$lstErrMsg}</P>";
include "INCL_footer.php";
exit;
}
//----OPEN CLUB TABLE, PULLING UERS RIGHTS WITH IT----------------------->
if(!Tennis_GetSingleRecord($row, $tblName, $clubID))
{
echo "<P>{$lstErrMsg}</P>";
include "INCL_footer.php";
exit;
}
//----MAKE PAGE HEADER--------------------------------------------------->
$out = "<HTML><HEAD>{$CRLF}";
$out .= "<TITLE>{$row['ClubName']}</TITLE>{$CRLF}";
$out .= "<LINK REL=StyleSheet HREF='main.css' TYPE='text/css'>{$CRLF}";
$out .= "<LINK REL=StyleSheet HREF='metric.css' TYPE='text/css'>{$CRLF}";
?>
<STYLE TYPE="text/css">
#thispg_Bar
{
font-size: small;
background: #AAAA44;
width: 20em;
float: right;
height: auto;
padding-left: .1em;
margin-left: 1em;
border: solid
}
#thispg_announce
{
padding-left: .5em;
height: auto
}
#thispg_maincontent
{
padding-left: .5em;
clear: both
}
#thispg_footer
{
padding-left: .5em;
height: auto
}
</STYLE>
</head>
<BODY CLASS=bdyNormal>
<?
//----MAKE CLUB HOME PAGE------------------------------------------------>
$out .= "<H1 CLASS=fntNormal>{$row['ClubName']}</H1>";
$out .= "<DIV id='thispg_announce'>";
$out .= "<P>{$CRLF}";
$out .= $row['Descript'];
$out .= $CRLF;
$out .= "</P>{$CRLF}";
$out .= "</DIV>";
echo $out;
$out = "";
?>
<DIV id="thispg_maincontent">
<hr noshade="noshade" size="5">
<h2 CLASS=fntNormal>Useful Links</h2>
<table id="Table3" border="0" cellpadding="3" cellspacing="1" width="100%">
<tbody><tr>
<td align="right" valign="bottom" width="65">
</td>
<td align="left" bgcolor="#dcdcdc" valign="bottom" width="40%"><font size="+1"> <strong>Link</strong>
</font>
</td>
<td align="left" bgcolor="#dcdcdc" valign="bottom"><font size="+1"> <strong>Description</strong>
</font>
</td>
</tr>
<tr>
<td align="right" valign="top" width="65">
</td>
<td align="left" valign="top" width="40%">
<a href="./tennis/listPerson_PhoneList.php">
Club Phone List</a>
</td>
<td align="left" valign="top"><strong>Club Phone List.</strong><br>
This link will show a page that lists all our club members and their phone numbers.
You have to be a club member to view this list.<br>
</td>
</tr>
<tr>
<td align="right" valign="top" width="65">
</td>
<td align="left" valign="top" width="40%">
<a href="./tennis/listSeries.php">
League History</a>
</td>
<td align="left" valign="top"><strong>League History.</strong><br>
This link will display a list of all current and prior series and leagues
we have participated in, with links to their roster-grids.<br>
</td>
</tr>
<?
/*
//====BUILD A LIST OF ALL ACTIVE SERIES FOR CLUB====================>
// The database needs to be modified so there is an indicator for the
//series on if to display it here or not.
//OR better yet, implement a list of links kind of like sharepoint so
//that this list can be whatever the club owner wants it to be
// Open series table.
if(!$qryResult = Tennis_OpenViewGeneric("series", "WHERE series.ClubID={$clubID}", "ORDER BY series.Sort, series.ShtName"))
{
echo "<P>{$lstErrMsg}</P>";
include 'tennis/INCL_footer.php';
exit;
}
// Build the list.
while ($row = mysql_fetch_array($qryResult))
{
$out = "<tr>{$CRLF}";
$out .= "<td align='right' valign='top' width='65'>{$CRLF}";
$out .= " {$CRLF}";
$out .= "</td>{$CRLF}";
$out .= "<td align='left' valign='top' width='40%'>{$CRLF}";
$out .= "<a href='./tennis/listSeriesRoster.php?ID={$row['ID']}'>{$row['ShtName']}</a><BR>{$CRLF}";
$out .= "</td>{$CRLF}";
$out .= "<td align='left' valign='top'>{$CRLF}";
$out .= "<STRONG>{$row['LongName']}</STRONG><BR>{$CRLF}";
$out .= "{$row['Description']}<BR>{$CRLF}";
$out .= "</td>{$CRLF}";
$out .= "</TR>{$CRLF}{$CRLF}";
echo $out;
}
//if (strlen($out) > 3) echo $out;
//====END BUILD SERIES LIST=========================================<
*/
?>
<tr>
<td align="right" valign="top" width="65">
</td>
<td align="left" valign="top">
<a href="http://national.usta.com/">Tennis Link</a>
</td>
<td align="left" valign="top"><strong>Tennis Link.</strong><br>
The "My Teams" feature allows you to quickly track the activity of your
favorite teams without having to enter the team number every time you visit the
site. Add as many teams as you wish. Click on Help for instructions.<br>
</td>
</tr>
<tr>
<td align="right" valign="top" width="65">
</td>
<td align="left" valign="top" width="40%">
<a href="http://nctennis.com/">North Carolina USTA Page</a>
</td>
<td align="left" valign="top"><strong>NC Tennis Web site.</strong><br>
Home page for North Carolina chapter of the USTA.<br>
</td>
</tr>
<tr>
<td align="right" valign="top" width="65">
</td>
<td align="left" valign="top" width="40%">
<a href="http://www.lakenormantennis.org">Lake Norman Tennis Home</a>
</td>
<td align="left" valign="top"><strong>Lake Norman Tennis Association.</strong><br>
Home page for Lake Norman tennis. Ladders, tournaments, etc.<br>
</td>
</tr>
<tr>
<td align="right" valign="top" width="65">
</td>
<td align="left" valign="top" width="40%">
<a href="http://www.usta.com/USTA/Global/Active/Custom%20Pages/Leagues/1237_NTRP.aspx">
USTA Rating Guidelines and Process</a>
</td>
<td align="left" valign="top"><strong>General Characteristics of
Various NTRP Playing Levels.</strong><br>
The page on USTA site that contain the description of the
ratings, guidelines for how to rate yourself and the process
for self-rating.<br>
</td>
</tr>
<tr>
<td align="right" valign="top" width="65">
</td>
<td align="left" valign="top" width="40%">
<a href="http://www.usta.com/Membership/Default.aspx">
Become USTA Member</a>
</td>
<td align="left" valign="top"><strong>How do I get a USTA Number?</strong><br>
The page on USTA site that allows you to sign up to become a USTA member.
You must be a USTA member to register to play on a team.
</td>
</tr>
</tbody></table>
<hr noshade="noshade" size="5">
</DIV>
<?
//----MAKE FOOTER ------------------------------------------------------------>
$out = "<DIV id='thispg_footer'>{$CRLF}";
$out .= $row['HomePgFoot'];
$out .= $CRLF;
if($DEBUG)
{
$out .= "<BR>";
$out .= "Server: http://" .$_SERVER['HTTP_HOST'];
$out .= "<BR>";
$out .= "Page: " .$_SERVER['PHP_SELF'];
$out .= "<BR>";
$out .= "value of rtnpg = {$rtnpg}";
}
$out .= "</DIV>{$CRLF}";
echo $out;
echo Tennis_BuildFooter('NORM', $rtnpg);
?>