<?php
///////////////////////////////////////////////
///   SceneryDatabase v2.1 by php-mods.eu   ///
///            Author php-mods.eu           ///
///           Packed at 29/08/2012          ///
///     Copyright (c) 2012, php-mods.eu     ///
///////////////////////////////////////////////

?>
<h3><?php echo SITE_NAME; ?> Add Scenery</h3>
<?php Template::Show('scenery/scenery_menu.tpl'); ?>

<form action="<?php echo SITE_URL; ?>/index.php/scenery/sceneryaddc" method="post">
<?php
$pilotid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid);
?>
<table width="70%" border="1" cellpadding="1" cellspacing="0" align="center">
  <tr>
    <td width="50%">ICAO:</td>
    <td width="50%"><input type="text" name="icao" id="icao" /></td>
  </tr>
    <tr>
    <td width="50%">Photo (450 x 282):</td>
    <td width="50%"><input type="text" name="photo" id="photo" /></td>
  </tr>
  <tr>
    <td>FS Version:</td>
    <td><select name="fsvers">
<option value="FSX">FSX</option>
<option value="FS2004">FS2004</option>
<option value="FSX/FS2004">FSX/FS2004</option>
<option value="X-Plane 10">X-Plane 10</option>    </select></td>
  </tr>
  <tr>
    <td>Scenery Type:</td>
    <td><select name="type">
    <option value="1">Airport</option>
    <option value="2">AFCAD</option>
    <option value="3">Other</option>
    </select></td>
  </tr>
  <tr>
    <td>Payware/Freeware:</td>
    <td><select name="payfree">
    <option value="1">Freeware</option>
    <option value="2">Payware</option>
    </select>
    <input type="hidden" name="uploadedby" id="uploadedby" value="<?php echo $userinfo->pilotid; ?>" />
    <input type="hidden" name="uploaded" id="uploaded" value="<?php echo date('d/m/y'); ?>" /></td>
  </tr>
  <tr>
    <td>Country:</td>
    <td><select name="country">
		<?php
			foreach($countries as $countryCode=>$countryName)
			{
				if(Vars::POST('location') == $countryCode)
					$sel = 'selected="selected"';
				else	
					$sel = '';
					
				echo '<option value="'.$countryName.'" '.$sel.'>'.$countryName.'</option>';
			}
		?>
		</select></td>
  </tr>
  <tr>
  <td>Descritpion:</td>
  <td><textarea cols="40" rows="5" id="description" name="description"></textarea></td>
  </tr>
  <tr>
  <td>Link:</td>
  <td><input type="text" name="link" id="link" /></td>
  </tr>
    <tr>
  <td>Author/Creator:</td>
  <td><input type="text" name="author" id="author" /></td>
  </tr>
  <tr>
    <td colspan="2"><center><input type="submit" value="Submit Scenery" /></center></td>
  </tr>
</table>
</form><br />