// This program is free software. You can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License. // // $Id: GUI_group_admin.php,v 1.10 2010/03/14 20:56:11 manolis Exp $ // //************************************************************************ if (!L_auth::isAdmin($userID)) { echo "go away"; return; } require_once dirname(__FILE__) . '/CL_area.php'; $areaID = makeSane($_GET['areaID'], 1); $pilotsList = array(); $pilotsID = array(); list($pilotsList, $pilotsID) = getPilotList(); list($takeoffs, $takeoffsID) = getTakeoffList(); list($countriesCodes, $countriesNames) = getCountriesList(); if ($_REQUEST["addTakeoffForm"]) { // form submitted $takeoffToAdd = $_POST['takeoff_select'] + 0; $query = "INSERT INTO {$areasTakeoffsTable}\t(areaID,takeoffID) VALUES ({$areaID},{$takeoffToAdd})"; // echo $query; $res = $db->sql_query($query); if ($res <= 0) { echo "Problem in inserting takeoff to area"; } else { echo "Takeoff added to area<br>"; } } else { // form not submitted
<tr> <td><p> <label> <input name="add_pilot_id" type="text" id="add_pilot_id" /> </label> pilotID to add </p> <p> <label> <input name="Add pilot" type="button" id="Add pilot" value="Add pilot" onclick="javascript:addClubPilot();"/> </label> </p> <p><strong>Pilots in the club </strong></p> <?php //echo "<BR>"; //open_inner_table("Administer CLub/League",730,"icon_home.gif"); echo "<tr><td>"; list($pilots, $pilotsID) = getPilotList($clubID); $i = 0; foreach ($pilots as $pilotName) { $pilotID = $pilotsID[$i++]; echo "<div id='pl_{$pilotID}'>{$pilotName} ({$pilotID}) : <a href='javascript:removeClubPilot(\"{$pilotID}\");'>Remove pilot</a></div>"; } ?> </td> <td><p> <label></label> </p> </td> </tr> </table>