Example #1
0
        if ($s_id == $CONF['defaultStartType']) {
            $is_type_sel = "selected";
        } else {
            $is_type_sel = "";
        }
        echo "<option {$is_type_sel} value={$s_id}>" . $s_type . "</option>\n";
    }
    ?>
      </select></td>
      <td  valign="top">&nbsp;</td>
    </tr>
	<?php 
    if ($CONF['NAC']['clubPerFlight']) {
        list($flightNacID, $defaultPilotNacClubID) = NACclub::getPilotClub($userID);
        $NACName = $CONF_NAC_list[$flightNacID]['name'];
        $NACclub = NACclub::getClubName($flightNacID, $defaultPilotNacClubID);
        ?>
		<tr>
            <td>
			<div align="right" class="styleItalic">
				<?php 
        echo _MEMBER_OF;
        ?>
 <strong><?php 
        echo $NACName;
        ?>
</strong>
            </div>
			</td>
            
            <td colspan=2>
} else {
    $takeoffLegend = _ALL_TAKEOFFS;
    $allTakeoffDisplay = 1;
}
# Martin Jursa, 22.05.2007
$showNacClubSelection = !empty($CONF_use_NAC) && empty($dontShowNacClubSelection);
if ($showNacClubSelection) {
    $nacClubLegend = _ALL_NACCLUBS;
    if (!empty($forceNacId)) {
        $nacid = $forceNacId;
    }
    # just to make sure
    if ($nacid) {
        if ($nacclubid) {
            require_once dirname(__FILE__) . "/CL_NACclub.php";
            $nacClubLegend = NACclub::getClubName($nacid, $nacclubid);
            if ($nacClubLegend == '') {
                $nacclubid = 0;
                $nacClubLegend = _ALL_NACCLUBS;
            }
        }
    }
}
if ($op == "list_pilots" && $comp) {
    $isCompDisplay = 1;
} else {
    $isCompDisplay = 0;
}
$arrDownImg = leoHtml::img("icon_arrow_left.gif", 0, 0, '', '', 'icons1');
?>
 echo "</select>";
 echo '<font color="#FF2222">***</font>';
 foreach ($CONF_NAC_list as $NACid => $NAC) {
     if ($NAC['description']) {
         echo "<div style='background:#d0d0d0; padding:10px; ' >" . $NAC['description'] . "</div> ";
     }
 }
 echo "<div id='mID' style='display:" . ($pilot['NACid'] == 0 ? "none" : "inline") . "'> ";
 $memberid_readonly = in_array('NACmemberID', $readonly_fields) ? 'readonly' : '';
 echo "<span style='white-space:nowrap'>" . _MemberID . ": <input size='5' type='text' name='NACmemberID' value='" . $pilot['NACmemberID'] . "' {$memberid_readonly}  /></span> ";
 echo '<font color="#FF2222">***</font>';
 echo "<div id='mIDselect' style='display:" . ($memberid_readonly ? "block" : "none") . "'> ";
 echo "[&nbsp;<a href='#' onclick=\"setID();return false;\">" . _EnterID . "</a>&nbsp;]";
 echo "</div>";
 echo "<div align=left id='mClubSelect' style='display:" . ($CONF_NAC_list[$pilot['NACid']]['use_clubs'] ? "block" : "none") . "' >" . _Club . " ";
 $NACclub = NACclub::getClubName($pilot['NACid'], $pilot['NACclubID']);
 if ($CONF_NAC_list[$pilot['NACid']]['club_change_period_active'] || $CONF_NAC_list[$pilot['NACid']]['add_to_club_period_active'] && !$pilot['NACclubID'] || L_auth::isAdmin($userID) || L_auth::isModerator($userID)) {
     $showChangeClubLink = "inline";
 } else {
     $showChangeClubLink = "none";
 }
 echo "<div id=\"mClubLink\" style=\"display: {$showChangeClubLink}\">[ <a href='#' onclick=\"setClub();return false;\">" . _Select_Club . "</a> ]</div>";
 /*
 
                 echo "[ <a href='#' onclick=\"setClub();return false;\">"._Select_CLub."</a> ]";
             } else {
                 echo "";
             }
 */
 echo "<br><input  type='hidden' name='NACclubID' value='" . $pilot['NACclubID'] . "' /> ";
 echo "<input  type='text' size='50' name='NACclub' value='" . $NACclub . "' readonly /></div> ";
</div></td>
  </tr>
  <tr> 
    <td valign="top" bgcolor="#E9EDF5"><div align="right"><?php 
echo _Last_Name;
?>
</div></td>
    <td valign="top" bgcolor="#F9F9F9"> <?php 
echo $pilot['LastName'];
?>
    </td>
    <td>&nbsp;</td>
    <td colspan="2" valign="top" bgcolor="#F5F2EB"><div align="left">
	<?php 
if ($CONF_use_NAC) {
    echo "<strong>" . _Club . ":</strong> " . NACclub::getClubName($pilot['NACid'], $pilot['NACclubID']);
}
?>
</div></td>
  </tr>
  <tr> 
    <td valign="top" bgcolor="#E9EDF5"><div align="right"><?php 
echo _COUNTRY;
?>
</div></td>
    <td valign="top" bgcolor="#F9F9F9"> <?php 
echo getNationalityDescription($pilot['countryCode']);
?>
    </td>
    <td>&nbsp;</td>
    <td colspan="2" rowspan="8" valign="top"><?php 
			// $flightNacID=24;
		}
		?>
		<tr>
            <td>
			<fieldset class="legendBox ">
			<legend><? echo _MEMBER_OF ?></legend>
			<div align="left">
				<? $NACName= $CONF_NAC_list[$flightNacID]['name']; ?>
                <strong><? echo $NACName ?></strong>
            </div>
			</fieldset>	
			</td>
            
            <td>
  			<?	$NACclub=NACclub::getClubName($flightNacID,$flight->NACclubID);	?>
				<fieldset class="legendBox legend2">
				<legend><? echo _Club ?></legend>
				<div align="left">
				<input name="NACclub" id="NACclub" type="text" size="60" value="<?php 
echo $NACclub;
?>
">
                <input name="NACclubID" id="NACclubID" type="hidden" value="<?php 
echo $flight->NACclubID;
?>
">
				<input name="NACid" id="NACid" type="hidden" value="<?php 
echo $flightNacID;
?>
">