示例#1
0
$totalResult = array();
list($status, $lasttime, $name, $result) = geco_getheaderinfo($contents);
if ($status) {
    list($status, $races) = geco_getracenames($result);
    if ($status) {
        for ($selection = 0; $selection < $selectioncount; $selection++) {
            if ($selectioncount == 1) {
                list($status, $rankedrunners, $unrankedrunners) = geco_getrunners($result, $course, substr($course, 0, 1));
                /*print_r($rankedrunners);
                  echo '<hr />';
                  print_r($unrankedrunners);
                  echo '<hr />';
                  echo '/'.($status? '1':'0').'*';
                  echo '<hr />';*/
            } else {
                list($status, $rankedrunners, $unrankedrunners) = geco_getrunners($result, $course . (1 + $selection));
            }
            if ($status) {
                foreach ($rankedrunners as $key => $value) {
                    $idrunner = $value["firstName"] . " " . $value["lastName"];
                    if (null == $totalResult[$idrunner]) {
                        $totalResult[$idrunner] = new ShowOResult($value["firstName"] . " " . $value["lastName"], $value["club"]);
                    }
                    $totalResult[$idrunner]->Register($selection, $value["status"], $value["finishTime"], $value["totalPenalties"], $value['rank']);
                }
                foreach ($unrankedrunners as $key => $value) {
                    $idrunner = $value["firstName"] . " " . $value["lastName"];
                    if (null == $totalResult[$idrunner]) {
                        $totalResult[$idrunner] = new ShowOResult($value["firstName"] . " " . $value["lastName"], $value["club"]);
                    }
                    $totalResult[$idrunner]->Register($selection, $value["status"]);
示例#2
0
        print "<ul>";
        for ($i = 0; $i < count($races); $i++) {
            print "<li>" . $races[$i] . "</li>";
        }
        print "</ul>";
        list($status, $rankedrunners, $unrankedrunners) = geco_getrunners($result, "ELITE");
        if ($status) {
            print "RANKED RUNNERS<br>";
            print "<ul>";
            foreach ($rankedrunners as $key => $value) {
                //print("<pre>".print_r($value,true)."</pre>");
                print "<li>" . $value["firstName"] . " " . $value["lastName"] . "<br>";
            }
            print "</ul>";
        }
        list($status, $rankedrunners, $unrankedrunners) = geco_getrunners($result, "ELITE", "EH");
        if ($status) {
            print "RANKED RUNNERS category EH<br>";
            print "<ul>";
            foreach ($rankedrunners as $key => $value) {
                print "<pre>" . print_r($value, true) . "</pre>";
                //print("<li>".$value["firstName"]." ".$value["lastName"]."<br>");
            }
            print "</ul>";
        }
    }
} else {
    print "<br>mauvais decodage<br>";
}
?>
</body>