<td class="submenu" colspan="2"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td><a href="admincompetitions.php">Competitionindex</a></td> </tr> </table> </td> </tr> <!-- End SUB MENU --> <tr> <td class="searchmenu" colspan="2" style="padding: 5px;"> <table border="0" cellpadding="0" cellspacing="0" width="400"> <tr> <td> <?php $comp = Emma::GetCompetition($_GET['compid']); ?> <form name="form1" action="editComp.php?what=comp&compid=<?php echo $comp['tavid']; ?> " method="post"> <h1 class="categoriesheader">Edit competition</h1> <b>CompetitionID</b><br/> <input type="text" name="id" size="35" disabled="true" value="<?php echo $comp['tavid']; ?> "/><br/> <b>Competitions Name</b><br/> <input type="text" name="name" size="35" value="<?php echo $comp['compName']; ?>
if (!$first) { echo ","; } echo "{\"id\": " . $comp["tavid"] . ", \"name\": \"" . $comp["compName"] . "\", \"organizer\": \"" . $comp["organizer"] . "\", \"date\": \"" . date("Y-m-d", strtotime($comp['compDate'])) . "\""; echo ", \"timediff\": " . $comp["timediff"]; if ($comp["multidaystage"] != "") { echo ", \"multidaystage\": " . $comp["multidaystage"] . ", \"multidayfirstday\": " . $comp["multidayparent"]; } echo "}{$br}"; $first = false; } echo "]}"; } else { if ($_GET['method'] == 'getcompetitioninfo') { $compid = $_GET['comp']; $comp = Emma::GetCompetition($compid); if (isset($comp["tavid"])) { echo "{\"id\": " . $comp["tavid"] . ", \"name\": \"" . $comp["compName"] . "\", \"organizer\": \"" . $comp["organizer"] . "\", \"date\": \"" . date("Y-m-d", strtotime($comp['compDate'])) . "\""; echo ", \"timediff\": " . $comp["timediff"]; if ($comp["multidaystage"] != "") { echo ", \"multidaystage\": " . $comp["multidaystage"] . ", \"multidayfirstday\": " . $comp["multidayparent"]; } echo "}"; } else { echo "{\"id\": " . $_GET["comp"] . "}"; } } elseif ($_GET['method'] == 'getlastpassings') { $currentComp = new Emma($_GET['comp']); $lastPassings = $currentComp->getLastPassings(5); $first = true; $ret = "";