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

?>
<h3> Edit Scenery</h3>
<form id="form" action="<?php echo adminaction('/scenery/SceneryEdit/');?>" method="post">
<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" value="<?php echo $syner->icao; ?>" /><input type="hidden" name="id" id="id" value="<?php echo $syner->id; ?>" /></td>
  </tr>
  <tr>
  <td>Image: (450 x 282)</td>
  <td><input type="text" name="photo" id="photo" value="<?php echo $syner->photo; ?>" /></td>
  </tr>
  <tr>
    <td>FS Version:</td>
    <td><select name="fsvers">
    <option value="FS2004" <?php if ($syner->fsvers == 'FS2004') echo 'selected="selected"' ; ?>>FS2004</option>
    <option value="FSX" <?php if ($syner->fsvers == 'FSX') echo 'selected="selected"' ; ?>>FSX</option>
    <option value="FS2004/FSX" <?php if ($syner->fsvers == 'FS2004/FSX') echo 'selected="selected"' ; ?>>FS2004/FSX</option>
    <option value="X Plane 10" <?php if ($syner->fsvers == 'X Plane 10') echo 'selected="selected"' ; ?>>X Plane 10</option>
    </select></td>
  </tr>
  <tr>
    <td>Scenery Type:</td>
    <td><select name="type">
    <option value="1"  <?php if ($syner->type == '1') echo 'selected="selected"' ; ?>>Airport</option>
    <option value="2"  <?php if ($syner->type == '2') echo 'selected="selected"' ; ?>>AFCAD</option>
    <option value="3"  <?php if ($syner->type == '3') echo 'selected="selected"' ; ?>>Other</option>
    </select></td>
  </tr>
  <tr>
    <td>Payware/Freeware:</td>
    <td><select name="payfree">
    <option value="1"  <?php if ($syner->payfree == '1') echo 'selected="selected"' ; ?>>Freeware</option>
    <option value="2"  <?php if ($syner->payfree == '2') echo 'selected="selected"' ; ?>>Payware</option>
    </select></td>
  </tr>
  <tr>
    <td>Country:</td>
    <td><select name="country">
			<?php
			foreach($countries as $countryCode=>$countryName)
			{
				if($syner->country == $countryName)
					$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"><?php echo $syner->description; ?></textarea></td>
  </tr>
  <tr>
  <td>Link:</td>
  <td><input type="text" name="link" id="link" value="<?php echo $syner->link; ?>" /></td>
  </tr>
    <tr>
  <td>Author/Creator:</td>
  <td><input type="text" name="author" id="author" value="<?php echo $syner->author; ?>" /></td>
  </tr>
  <tr>
    <td colspan="2"><center><input type="submit" value="Edit Scenery" /></center></td>
  </tr>
</table>
</form>
<br />