<?php session_start();  ?>

<?php  
if (isset($_POST['confirm'])) 
{
  include("route3.php");
  return;
}
else if (isset($_POST['calculate'])) 
{
  include("route3.php");
  return;
}
else if (isset($_POST['confirmsave'])) 
{
  include("confirm.php");
  return;
}

?>
<p>
<br>

  <a href="http://www.trekescapes.com/">
<img src="images/trek.jpg" width="280" height="111" border="0" /></a>


<br>
</p>

<form id="route" name="route" method="post" action="index.php">
  <p>
  <label>
  <input name="Routing" type="radio" value="return" <?php echo ( ($_POST['Routing']!="oneway")? 'checked="checked"' : "" ) ?> />
    Return</label>
  <br />
  <label>
  <input  name="Routing" type="radio" value="oneway"  <?php echo ( ($_POST['Routing']=="oneway")? 'checked="checked"' : "" ) ?> />
    One-way</label>
  <br />
 <br />
  <label> Number of Passengers: <br />
  <input name="passengers" type="text" value=<?php  echo isset($_POST['passengers'])? '"' . $_POST['passengers'] . '"' : '"1"' ?> size="5" />
  </label><br />
  </p>
  <label> Origin city or IATA airport code <br />
  <input name="destination0" type="text" value= <?php echo '"' . $_POST['destination0'] . '"' ?> size="20" />
  </label>
  <?php 
  include("form.php"); 
  /*<label><br /> Destination city or IATA airport code<br />
  <input name="Destination" type="text" value="" size="20" />
  </label>*/
  
  ?>
  <p>
   
	<input name="AddMultiple" type="submit" value="add more destinations" /> 
	<input name="Remove" type="submit" value="remove destination" />
	<br/>
	<br/>
	 <input name="confirm" type="submit" value="calculate emissions" />
  </p>
</form> 


<hr />
<label>Or enter total distance traveled: </label>
<form id="distance" name="distance" method="post" action="distcalc.php">
<br />
   <input name="distradio" type="radio" value="k" />
    Kilometer</label>
  <br />
  <label>
  <input type="radio" name="distradio" value="m" checked="checked"/>
    Miles</label>
  <br />
 <br />
  <label> Number of Passengers: <br />
  <input name="passengers" type="text" value="1" size="5" />
  </label><br />
  </p>
  <label> Distance :<br />
  <input name="dist" type="text" value="" size="20" />
  </label>
  <br />
  <br />
   <input name="confirm" type="submit" value="calculate emissions" />
</form>
<br>
  <a href="http://www.offsetters.ca">
<img src="http://www.trekescapes.com/offsetting/images/ofsetters-logo.gif" width="250" height="98" border="0" /></a>











