// Pagename V4.0 include ("_code-header-nologin.php"); include ("_header.php"); include ("_leftbar.php"); if ($emerdisablesubscribepages == 1) { echo "
Subscriptions currently unavailable
"; echo "Subscriptions are temporarily unavailable. Please refer to postings at the physical tournament site. We apologize for the inconvenience.
"; include("_rightbar.php"); include("_footer.php"); exit(); } ?> extract(su_pv($_GET, array("tournid"))); if (!is_numeric($tournid)) $tournid = NULL; //extract(su_preparegeneralinfo($GLOBALS['swconn'], $tournid)); //$lowdate = su_currentdbdate(); $lowdate = su_stamptotext(time() - (1 * 24 * 60 * 60), 'dbdate'); $highdate = su_stamptotext(time() + (6 * 24 * 60 * 60), 'dbdate'); //echo "LOW: $lowdate -- HIGH: $highdate"; su_setdbglobal($GLOBALS['swconn']); $allowtourn = su_gra("SELECT l.tournid FROM sw_tournaments t, sw_live_status l WHERE t.tournid = l.tournid AND t.seasonid = " . $reference_current_seasonid . " AND (l.subscribeplanned = 1 OR l.schemplanned = 1 OR l.resultsplanned = 1)", $GLOBALS['swconn']); $livestatus = su_gra("SELECT t.tournid, l.subscribeplanned, l.subscribeopen, l.schemplanned, l.resultsplanned, l.subscribejudges FROM sw_tournaments t, sw_live_status l WHERE t.tournid = l.tournid AND t.seasonid = " . $reference_current_seasonid, $GLOBALS['swconn']); $nextweek = su_gra("SELECT l.tournid, t.tournname, t.tournstartdate, t.tournenddate, s.stateabbr FROM sw_states s, sw_tournaments t, sw_live_status l WHERE t.stateid = s.stateid AND t.tournid = l.tournid AND t.seasonid = " . $reference_current_seasonid . " AND (l.subscribeplanned = 1 OR l.schemplanned = 1 OR l.resultsplanned = 1) AND t.tournstartdate < '$highdate' AND t.tournenddate >= '$lowdate' ORDER BY t.tournname", $GLOBALS['swconn']); $future = su_gra("SELECT l.tournid, t.tournname, t.tournstartdate, t.tournenddate, s.stateabbr FROM sw_states s, sw_tournaments t, sw_live_status l WHERE t.stateid = s.stateid AND t.tournid = l.tournid AND t.seasonid = " . $reference_current_seasonid . " AND (l.subscribeplanned = 1 OR l.schemplanned = 1 OR l.resultsplanned = 1) AND t.tournstartdate >= '$highdate' AND t.tournenddate >= '$lowdate' ORDER BY t.tournstartdate, t.tournname", $GLOBALS['swconn']); $sharestatus = su_gra("SELECT t.tournid, r.sharepublic FROM sw_tournaments t, sw_reg_tournstatus r WHERE t.tournid = r.tournid AND t.seasonid = " . $reference_current_seasonid, $GLOBALS['swconn']); //if ($approved == 1 && in_array($tournid, $allowtourn)) if (in_array($tournid, $allowtourn) && $livestatus[$tournid]['subscribeopen'] == 1 && is_numeric($tournid)) { $tourninfo = su_gr("SELECT tournname, tourntype FROM sw_tournaments WHERE tournid = $tournid", $GLOBALS['swconn']); $tournname = $tourninfo['tournname']; $tourntype = $tourninfo['tourntype']; ?>echo $tournname; ?>
su_showtourninfobar_nodb($GLOBALS['swconn'], true, $tournid, NULL); // This is needed here -- no su_connectutility above. su_setdbreglocal($GLOBALS['swconn'], $tournid); //$groupingarray = su_gra("SELECT groupingid, groupingname FROM to_groupings ORDER BY groupingname", $GLOBALS['swconn']); //$groupingarray = su_gra("SELECT g.groupingid, g.groupingname FROM to_groupings g, to_events e WHERE e.eventtype = 'debate' AND e.eventid = g.eventid ORDER BY g.groupingname", $GLOBALS['swconn']); if ($tournid == 2744 || $tournid == 3742) $judgearray = su_gra("SELECT judgeid, judgename, judgetypeid FROM to_judges WHERE judgetypeid = 2 OR judgetypeid = 6 ORDER BY judgename", $GLOBALS['swconn']); else $judgearray = su_gra("SELECT judgeid, judgename, judgetypeid FROM to_judges ORDER BY judgename", $GLOBALS['swconn']); //$jtarray = su_gra("SELECT judgetypeid, judgetypename FROM to_judgetypes", $GLOBALS['swconn']); echo "Subscribe
"; // Can use to disable competitor subscriptions //if ($tourntype != 'BROWARD') { ?> } // not broward /*Subscribe to judge alerts
su_makebuttonlink("Subscribe to judge alerts", "c-subscribe-process.php?mode=judge&judgeid=0&tournid=$tournid"); ?>
*/ ?> // This is the code to subscribe judges individually if ($livestatus[$tournid]['subscribejudges'] == 1) { $subjudges = array(); if (su_kount($judgearray) > 0) { foreach ($judgearray as $judgeid => $thisjudge) { $judgename = $thisjudge['judgename']; if ($tournid != 3050 || $thisjudge['judgetypeid'] == 1) { if (strlen($judgename) > 0) { $subjudges[$judgeid] = $judgename; } } } } ?> } ?>About this service
You may use this feature to receive email or SMS text message updates on the pairings/schedule updates of a competitor during tournaments that offer email/SMS coverage and/or updates of judge assignments. These messages will be sent at the discretion of the tournament administration following the pairing/creation of new competition rounds. At certain tournaments, live results may also be sent to subscribers.
} else { ?>Live coverage
The managers of the following tournaments have indicated that they will offer live coverage.
if (su_kount($nextweek) > 0) { foreach ($nextweek as $curtournid => $curtourn) { if ($curtournid == 4967 || $curtournid == 5921) continue; $isfirst = true; extract($curtourn); echo "$tournname ($stateabbr) - " . su_getdaterangestr($tournstartdate, $tournenddate) . "";
echo "
";
if ($livestatus[$curtournid]['subscribeopen'] == 1)
{
if (!$isfirst) echo " -- ";
echo "Subscribe";
$isfirst = false;
}
elseif ($livestatus[$curtournid]['subscribeplanned'] == 1)
{
if (!$isfirst) echo " -- ";
echo "Subscriptions not open yet";
$isfirst = false;
}
if ($livestatus[$curtournid]['schemplanned'] == 1)
{
if (!$isfirst) echo " -- ";
echo "Schematics";
$isfirst = false;
}
if ($livestatus[$curtournid]['resultsplanned'] == 1)
{
if (!$isfirst) echo " -- ";
echo "Results";
$isfirst = false;
}
if ($sharestatus[$curtournid] == 1)
{
if (!$isfirst) echo " -- ";
echo "Information";
$isfirst = false;
}
echo "
"; echo "
IN THE FUTURE
"; echo "| Date(s) | Tournament | Information | Subscribe | Schematics | Live results | "; foreach ($future as $curtournid => $curtourn) { extract($curtourn); echo "
| " . su_getdaterangestr($tournstartdate, $tournenddate) . " | "; echo "$tournname ($stateabbr) | "; echo "Information | "; echo ""; if ($livestatus[$curtournid]['subscribeplanned'] == 1) { if ($livestatus[$curtournid]['subscribeopen'] == 1) echo "Subscribe"; else echo "Not open yet"; } else { echo " "; } echo " | "; echo ""; if ($livestatus[$curtournid]['schemplanned'] == 1) echo "Planned"; else echo " "; echo " | "; echo ""; if ($livestatus[$curtournid]['resultsplanned'] == 1) echo "Planned"; else echo " "; echo " | "; echo "
Phillipsburg NJFL Tournament (Oct. 26, 2013)
//West by Southwest Day 1 (Oct. 26, 2013)
//West by Southwest Day 2 (Oct. 27, 2013)
//OHSSL State Final (Mar. 1-2, 2013)
//Sharen B. Althoff Rotary Invitational (Jan. 18-19, 2013 - Wooster, OH)
//The Laird Lewis Invitational (Jan. 4-5, 2013 - Charlotte, NC)
?> //Subscriptions are not active for any upcoming tournaments.
?>
} if (is_numeric($tournid)) su_printsubscriberules($tournid); ?> include("_rightbar.php"); include("_footer.php"); ?>