<?php 
	require "models/rivermedia.php";
	$rivermedia = new RIVERMEDIA;
	$rivermedia->auth();
	$rivermedia->edit_event();
?>
        <form class="form-horizontal" role="form" method="post" action="javascript:void(0);">
          <div class="form-group">
            <label  class="col-sm-2 control-label" for="edit_event_name">Event</label>
            <div class="col-sm-10">
              <input type="edit_event_name" class="form-control" id="edit_event_name" value="<?php echo $_SESSION['edit_event'][0]; ?>"/>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label" for="edit_event_year" >Year</label>
            <div class="col-sm-10">
              <select name="edit_event_year" id="edit_event_year" class="form-control">
              <?php
              $thisdate = getdate(date("U"));
              $startYear = 2010;
              $thisYear = $thisdate[year];
              $i = 0;
              for ($i = $startYear; $i <= $thisYear; $i++) {
              ?>
              <option value="<?php echo $i; ?>"<?php if ($i == $_SESSION['edit_event'][1]) {echo " selected";}; ?>><?php echo $i; ?></option>
              <?php
              };
              ?>
              </select>
            </div>
          </div>
        </form>
        <div id="hidden_message"><?php echo $_SESSION['edit_event'][2] ?></div>
<?php
unset($_SESSION['edit_event']);
?>