-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
211 lines (156 loc) · 4.7 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
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
<?
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 = TRUE;
$DEBUG = FALSE;
global $CRLF;
//----DECLARE GLOBAL VARIABLES------------------------------------------------>
// Declare the global error variables.
$lstErrExist = FALSE;
$lstErrMsg = "";
?>
<html>
<head>
<title>Tennis Clubs</title>
<?
/*
Redirect to the current Holbrook homepage. Eventually I need to use this
page to display a list of all clubs and allow the user to choose one to go
into.
*/
?>
<LINK REL=StyleSheet HREF="main.css" TYPE="text/css">
<LINK REL=StyleSheet HREF="metric.css" TYPE="text/css">
<LINK REL=StyleSheet HREF="handheld.css" media="handheld" TYPE="text/css">
<STYLE TYPE="text/css">
#thispg_announce
{
font-size: large;
padding-left: .5em;
height: auto
}
#thispg_maincontent
{
padding-left: .5em;
clear: both
}
TH.ClubListHeadID
{
background-color: #BBBBBB;
width: 1%
}
TH.ClubListHeadNAME
{
background-color: #BBBBBB;
width: 30%
}
TH.ClubListHeadBLURB
{
background-color: #BBBBBB;
}
</STYLE>
</head>
<BODY CLASS='bdyNormal'>
<H1 CLASS='fntNormal'>Tennis Clubs</H1>
<?
//----DECLARE LOCAL VARIABLES------------------------------------------------->
$tblName = 'qryClubDisp';
// Declare array to hold the detail display
//record.
$row = array();
// Return Page. Have to build a string which defines the
//return page from the root due to the index page in the
//HTML root directory and not in the /tennis directory like all
//the other pages are.
$server = $_SERVER['HTTP_HOST'];
$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(!$qryResult = Tennis_OpenViewGenericAuth($tblName, "", "ORDER BY {$tblName}.ClubName", 55))
{
echo "<P>{$lstErrMsg}</P>";
include "INCL_footer.php";
exit;
}
?>
<DIV id="thispg_announce">
<p><font color="#306030">
Welcome to <strong>LakeTennis.COM</strong>. This site is home to several tennis groups
and is oriented specifically to help groups and clubs organize
tennis league play.
</font>
</p>
<p><font color="#306030">
Please select your group or club from the below list. Or simply login
at the bottom of the page to be taken to your specific club.
</font>
</p>
</DIV>
<DIV id="thispg_maincontent">
<hr noshade="noshade" size="5">
<h2 CLASS='fntNormal'>Select Your Club</h2>
<?
//----BUILD THE LIST---------------------------------------------------------->
// Display the in standard
//record-detail-display format.
$out = "{$CRLF}{$CRLF}<TABLE CLASS='ddTable' CELLSPACING='2' CELLPADDING='2'>{$CRLF}";
// Header Row.
$out .= "<THEAD>{$CRLF}";
$out .= "<TR CLASS='ddTblRow'>{$CRLF}";
$out .= "<TH CLASS='ClubListHeadID'><P CLASS='ddSectionTitle'>ID</P></TD>{$CRLF}";
$out .= "<TH CLASS='ClubListHeadNAME'><P CLASS='ddSectionTitle'>Club Name</P></TD>{$CRLF}";
$out .= "<TH CLASS='ClubListHeadBLURB'><P CLASS='ddSectionTitle'>Brief Description</P></TD>{$CRLF}";
$out .= "</TR></THEAD>{$CRLF}";
echo $out;
// Build table body.
$out = "<TBODY>{$CRLF}";
echo $out;
while ($row = mysql_fetch_array($qryResult))
{
if ($row['LobbyShow'] == 1 AND $row['Active'] ==1)
{
$out = "<TR CLASS='ddTblRow'>{$CRLF}";
// Record ID.
$out .= "<TD CLASS='ddTblCellDisplay'><P CLASS='ddFieldData'>{$row['ID']}</P></TD>{$CRLF}";
// Club Name.
$out .= "<TD CLASS='ddTblCellDisplay'><P CLASS='ddFieldData'>";
$out .= "<A HREF='../ClubHome.php?ID={$row['ID']}'>{$row['ClubName']}</A></P></TD>{$CRLF}";
// Lobby Blurb.
$out .= "<TD CLASS='ddTblCellDisplay'><P CLASS='ddFieldData'>";
$out .= "{$row['LobbyBlurb']}</P></TD>{$CRLF}";
// Close out the row.
$out .= "</TR>{$CRLF}{$CRLF}";
echo $out;
}
}
// Close out the table body.
$out = "</TBODY>{$CRLF}{$CRLF}";
// Close out the table.
$out = "</TABLE>{$CRLF}{$CRLF}";
echo $out;
$out = "</DIV>{$CRLF}{$CRLF}";
echo $out;
// Show contact info.
$out = "<BR> <BR>";
$out .= "<p><font size='-1'>";
$out .= "<strong>Contact: </strong>";
$out .= "<a href='mailto:tennis@activeage.com'>Jeffrey Rocchio</a>";
$out .= " (tennis@activeage.com)";
$out .= "</font></p>";
echo $out;
echo Tennis_BuildFooter('NORM', $rtnpg);
?>