function onTheClock($leagueID)
{
    $r["draftOrder"] = nextDraftOrder($leagueID);
    debug("draft order = " . $r["draftOrder"]);
    $season = getSeason();
    $next = getSingleton("fch_league_membership", "teamDisplayName", " WHERE leagueID = {$leagueID} and status = \"active\" and season = \"{$season}\" and draftOrder = " . $r["draftOrder"]);
    $r["gmName"] = $next;
    debug("draft order = " . $next);
    $next = getSingleton("fch_league_membership", "userID", " WHERE leagueID = {$leagueID} and status = \"active\" and season = \"{$season}\" and draftOrder = " . $r["draftOrder"]);
    $r["userID"] = $next;
    $next = getSingleton("fch_leagues", "draftStatus", " WHERE id = {$leagueID} and season = \"{$season}\"");
    $r["draftStatus"] = $next;
    // BREAKS DRAFT
    //debug("On the clock ID: " . $r["userID"] . " Team = " . $r["gmName"]);
    $r["adminID"] = getSingleton("fch_leagues", "admin_user", " WHERE id = {$leagueID} and season = \"{$season}\"");
    if (intval($r["adminID"]) == intval(getUserID())) {
        $r["isAdmin"] = true;
    } else {
        $r["isAdmin"] = false;
    }
    $r["lastPickDisplay"] = getFullDraftList($leagueID, $userID, "last");
    $r["thisUserID"] = getUserID();
    $r["overallPick"] = getSingleton("fch_draft", "max(overallPick)", " where leagueID = {$leagueID}");
    if ($r["overallPick"] == "") {
        $r["overallPick"] = 1;
    }
    return $r;
}
</td>
         <td><?php 
echo $roster_g;
?>
 / <?php 
echo $limit_g;
?>
</td>
         </td>
      </tr>
   </table>
   <h3>Draft Log</h3>
   <a href="#" onclick="manualRefresh(); return false;">Refresh</a>
   <div style="width:230px;height:400px;line-height:3em;overflow:auto;padding:5px;" id = "runningList">
      <?php 
echo getFullDraftList($leagueID, $userID, "all");
?>

  </div>

    <div id = "debugSlot"></div>
    <div id = "notes">Note: withdrawn or skipped re-picks won't appear until this page is refreshed (or you make a pick).</div>
</div>


<div id = "fch_main" >

 <div id="tlkio" data-theme="http://fantasycollegehockey.com/joomla/templates/tx_zenith/css/responsive.css" data-channel="FantasyCollegeHockey-Draft-<?php 
echo $leagueID;
?>
" style="width:100%;height:350px;"></div><script async src="http://tlk.io/embed.js" type="text/javascript"></script>
<?php

define('_JEXEC', 1);
define('JPATH_BASE', realpath(dirname(__FILE__) . '/'));
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';
$app = JFactory::getApplication('site');
$user = JFactory::getUser();
require_once "fch-lib.php";
require_once "config.php";
echo getFullDraftList(leagueHandlerNoUI(null, getUserID()), getUserID(), "all");
//echo json_encode(onTheClock(leagueHandlerNoUI(null, getUserID())));