echo "<td>" . $record->get_fname() . "</td>"; echo "<td>" . $record->get_lname() . "</td>"; echo "<td>" . $record->get_height() . "</td>"; echo "<td>" . $record->get_weight() . "</td>"; echo "<td>" . $record->get_gender() . "</td>"; echo "<td>" . $record->get_dob() . "</td>"; echo "<td>" . $record->get_email() . "</td>"; echo "<td><a onclick=\"subForm('Edit','" . $record->get_playerId() . "')\" href=\"#\">Edit</a>" . " / <a onclick=\"subForm('Delete','" . $record->get_playerId() . "')\" href=\"#\">Delete</a>" . "</td>"; echo "</tr>"; } ?> </tbody> </table> <?php $locDAO = new LocationsDAO(); $regDao = new RegistrationDAO(); $tournaments = $locDAO->getAllTournaments(); ?> <h1>Registration</h1> <!--a href="<//?php echo $_SERVER['PHP_SELF']; ?>?page=registration" >Register</a--> <div class="forms"> <form name="tournamentRegister" action="<?php echo $_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING']; ?> " method="post"> <input type="hidden" name="Action"/> <select name="sTournament" id="sTournament"> <?php foreach ($tournaments as $tournament) {
$teamDAO = new TeamDAO(); $team = $teamDAO->getTeamByCoachId(61); echo 'teamID: ' . $team->get_teamId() . ', Team Name: ' . $team->get_teamName(); echo '<br />'; $playerDAO = new PlayerDAO(); $playerList = $playerDAO->getPlayersByTeamId(20); $iterator = $playerList->getIterator(); echo 'Player List test'; echo '<br />'; while ($iterator->valid()) { $player = $iterator->current(); echo 'PlayerName: ' . $player->get_fname() . ' ' . $player->get_lname() . ',TeamName=' . $player->get_teamName() . ', PlayerId: ' . $player->get_playerId() . ', Email=' . $player->get_email(); echo '<br />'; $iterator->next(); } $locDAO = new LocationsDAO(); $locList = $locDAO->getTournaments("baseball"); $iterator = $locList->getIterator(); echo '<br />'; echo 'Location List test'; echo '<br />'; while ($iterator->valid()) { $loc = $iterator->current(); echo 'TOURNAMENT_NAME: ' . $loc->get_tournamentName(); echo '<br />'; $iterator->next(); } $regDAO = new RegistrationDAO(); $regList = $regDAO->searchRegistrationByTeamId(17); $iterator = $regList->getIterator(); echo '<br />';
<?php require_once "dao/LocationsDAO.php"; $locDAO = new LocationsDAO(); $sportTypes = $locDAO->getAllSporTypes(); ?> <div class="col-md-12"> <h2>Locations/Tournament</h2> <p>Perform a search by entering in a tournament name and/or sport type.The % value can be utilized for a wild card search.</p><br> <div class="forms"> <form class="form" action="<?php echo $_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING']; ?> " method="POST"> <label for="tname">Tournament Name: </label> <input type="text" name="tname" id="tname"/> <!-- <label for="stype">Sport Type: </label> <input type="listbox" name="stype" id="stype"/> --> <label for="stype">Sport Type: </label> <select name="stype" id="stype"> <option value=""></option> <?php foreach ($sportTypes as $sportType) { extract($sportType); echo '<option value="' . $SPORT_TYPE_NAME . '">' . $SPORT_TYPE_NAME . '</option>'; } ?> </select>