$title="Canada's most-played Junior Tour & the Road to College Golf run exclusively by PGA Professionals.";
$description="Maple leaf junior golf tour is Canada's only national junior tour run exclusively by PGA of Canada Professionals";
$keywords="canada canadian junior golf tour national cpga professionals pga professional golfers association tournaments";
$sec="home";
$page="home";
include "common.inc.php";
head();
$i=0;
ticker();
$r=mysqliQuery("SELECT * FROM features WHERE active=1 AND image_1920x768_jpg!='' AND from_date<=CURDATE() AND to_date>=CURDATE() ORDER BY sort DESC LIMIT 8");
$features=mysqli_num_rows($r);
if ($features) {
?>
$i=0;
while($feature=mysqli_fetch_assoc($r)) {
?>
$i++;
}
?>
if ($features>1) {
?>
for($i=0; $i<$features; $i++) {
?>
>
}
?>
}
?>
if ($features>1) {
?>
}
}
$rows=6;
$upcoming="";
$recent="";
$row_count=array();
$r=mysqliQuery("SELECT t.id, t.start_date, t.end_date, t.entry_fee, t.kids_event, t.national_interest, t.tournaments_id, g.label as course, c.city, c.province, p.show_tee_times FROM tournaments as t LEFT JOIN tournaments as t2 ON (t.id=t2.tournaments_id) LEFT JOIN tournament_page as p ON (p.tournaments_id=t.id), golf_course_extras as g, companies as c WHERE t.year='%s' AND t2.id IS NULL AND t.status='active' AND g.id=t.golf_course_extras_id AND c.id=g.companies_id ORDER BY ABS(DATEDIFF(CURDATE(),t.start_date)), province", $config['season']);
print mysqliError();
$events=mysqli_num_rows($r);
$now=strtotime('now');
if ($events) {
while($event=mysqli_fetch_assoc($r)) {
$start_date=strtotime($event['start_date']);
$end_date=strtotime($event['end_date']);
if ($end_date<$now) $when='recent'; else $when='upcoming';
if ($event['national_interest']) $prov='National';
else if ($event['province']=="NB" || $event['province']=="NS" || $event['province']=="NL" || $event['province']=="PE") $prov="ATL";
else $prov=$event['province'];
if ($event['tournaments_id']) $tour='Both'; else if ($event['kids_event']) $tour="Mini"; else $tour="Junior";
$row_count[$when][$prov][$tour]++;
$sub_count[$when]++;
$sub_count[$prov]++;
$sub_count[$tour]++;
ob_start();
?>
$rows) print ' style="display:none;"';?>>
dates($start_date, $end_date); ?>
if (!$event['kids_event']) { ?>
Junior Tour
} ?>
if ($event['kids_event'] || $event['tournaments_id']) { ?>
Mini Tour
} ?>
if ($event['show_tee_times'] && $when=='upcoming') {
?>
Tee Times
} else if ($start_date>$now) {
?>
Register
}
?>
Warning: Undefined variable $event in
/home/tgc1tj2yfgbk/domains/dev.maplejt.com/html/index.php on line
92
Warning: Trying to access array offset on null in
/home/tgc1tj2yfgbk/domains/dev.maplejt.com/html/index.php on line
92
,
Warning: Undefined variable $event in
/home/tgc1tj2yfgbk/domains/dev.maplejt.com/html/index.php on line
92
Warning: Trying to access array offset on null in
/home/tgc1tj2yfgbk/domains/dev.maplejt.com/html/index.php on line
92
$event_html=ob_get_contents();
ob_end_clean();
$display_count=$row_count[$when]['National']['Both'];
if ($prov!='National') {
$display_count+=$row_count[$when][$prov]['Both'];
if ($tour!='Both') $display_count+=$row_count[$when][$prov][$tour];
}
if ($tour!='Both') $display_count+=$row_count[$when]['National'][$tour];
if ($display_count<=$rows) {
$html[$when].=$event_html;
}
}
?>
if ($html['upcoming']) {
?>
Warning: Undefined variable $html in
/home/tgc1tj2yfgbk/domains/dev.maplejt.com/html/index.php on line
113
Warning: Trying to access array offset on null in
/home/tgc1tj2yfgbk/domains/dev.maplejt.com/html/index.php on line
113
All Upcoming
}
if ($html['recent']) {
?>
Warning: Undefined variable $html in
/home/tgc1tj2yfgbk/domains/dev.maplejt.com/html/index.php on line
120
Warning: Trying to access array offset on null in
/home/tgc1tj2yfgbk/domains/dev.maplejt.com/html/index.php on line
120
All Completed
}
?>
Filter events by province:
All
foreach(array('BC','AB','SK','MB','ON','ATL') as $prov) {
if ($sub_count[$prov]) { ?>
Warning: Undefined variable $prov in /home/tgc1tj2yfgbk/domains/dev.maplejt.com/html/index.php on line 133
}
}
?>
Filter events by tour:
All
foreach(array('Junior','Mini') as $tour) {
if ($sub_count[$tour]) { ?>
Warning: Undefined variable $tour in /home/tgc1tj2yfgbk/domains/dev.maplejt.com/html/index.php on line 140
}
}
?>
}
?>
if ($promos>2) {
?>
}
foot();
?>