XFL – Hosted Events

\n”;
print “

\n”;
print ” Year: “;
// Will need to uncomment in 2012 to show past years results
while ($row = mysql_fetch_array($result_years, MYSQL_ASSOC))
{
$result_year = $row[“year”];
print “$result_year ::”;
}
// print “Debug: $cur_year \n”;
print “

\n”;
print “

$year

\n”;
print “

Event Lake Date Results News Photos

\n”;

// get the rows from the table
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$cnt = $cnt + 1;
$LakeID = $row[“lakeid”];
// $Lake = $row[“Lake”];
$Year = $row[“year”];
$data = $row[“data”];
$tdate = $row[“date”];
$event_name = $row[“event”];
$url = “./index.php?page=story&article=$newsid”;
$title = $row[“title”];
$Lake = $row[“lake”];
$type = $row[“type”];

// check to see if there is a row with type of news… if so show link
// check to see if there is a row with type of results… if so show link
// check to see if there is a row with type of pics… if so show link
$query1 = “SELECT type FROM hosted_events where Year = ‘$year’ and lakeid = ‘$LakeID’ and type = ‘news'”;
$result1 = mysql_query($query1) or die(“Have Post Query failed”);
$number_rows1 = mysql_num_rows($result1);

$tmp = rawurlencode($event_name);

if ($cnt%2)
{
$color=$bgcolor4;
}
else
{
$color=$bgcolor2;
}

print “

\n”;
if ($number_rows1 > 0)
{
// print “

$event_name

\n”;
print “

$event_name

\n”;
print ”

$Lake

\n”;
print ”

$tdate

\n”;
print ”

Results

\n”;
print ”

News

\n”;
print ”

Photos

\n”;
print “

\n”;
}
else
{
// print “

$event_name

\n”;
print “

$event_name

\n”;
print ”

$Lake

\n”;
print ”

$tdate

\n”;

print ”

Results

\n”;
print ”

Photos

\n”;
print “

\n”;

}
}
print “\n”;
print “

\n”;
print “\n”;
mysql_close($link);

?>