Example #1
0
             $ret .= ",{$br}";
         }
         $ret .= "{\"className\": \"" . $class['Class'] . "\"}";
         $first = false;
     }
     $hash = MD5($ret);
     if (isset($_GET['last_hash']) && $_GET['last_hash'] == $hash) {
         echo "{ \"status\": \"NOT MODIFIED\"}";
     } else {
         echo "{ \"status\": \"OK\", \"classes\" : [{$br}{$ret}{$br}]";
         echo ",{$br} \"hash\": \"" . $hash . "\"}";
     }
 } elseif ($_GET['method'] == 'getclubresults') {
     $currentComp = new Emma($_GET['comp']);
     $club = $_GET['club'];
     $results = $currentComp->getClubResults($_GET['comp'], $club);
     $ret = "";
     $unformattedTimes = false;
     $first = true;
     if (isset($_GET['unformattedTimes']) && $_GET['unformattedTimes'] == "true") {
         $unformattedTimes = true;
     }
     foreach ($results as $res) {
         $time = $res['Time'];
         $status = $res['Status'];
         if ($time == "") {
             $status = 9;
         }
         $cp = $res['Place'];
         if ($status == 9 || $status == 10) {
             $cp = "";