<?php

  if( $_POST['Action'] == 'New' ){

    $Action     = $_POST['Action'];
    $Menu       = $_POST['Menu'];
    $Item       = $_POST['Item'];
    $Next       = $_POST['Next'];

  }elseif( $Action == 'Edit' ){

    $Next         = $ItemIn[Id];
    $ItemId       = $ItemIn[Id];
    $Menu         = $ItemIn[Fk_Menu];
    $ItemTitle    = $ItemIn[Title];
    $ItemUrl      = $ItemIn[Url];

  }
?>

  <li class="ui-state-default ItemBox">
    <?php echo $ItemSel[Item]; ?>
    <input type="hidden" name="Items[]" value="<?php echo $Next; ?>" />
    <input type="hidden" name="Item[<?php echo $Next; ?>][Action]" value="<?php echo $Action; ?>" />
    <input type="hidden" name="Item[<?php echo $Next; ?>][Id]" value="<?php echo $Next; ?>" />
    <input type="hidden" name="Item[<?php echo $Next; ?>][Menu]" value="<?php echo $Menu; ?>" />
    <input type="hidden" name="Item[<?php echo $Next; ?>][ItemId]" value="<?php if( $Action == 'Edit' ){ echo $ItemId; } ?>" />

    <div class="row">

      <!-- Title -->
      <div class="col-sm-4">
        <input autocomplete="off" placeholder="Titulo" date-required="true" class="form-control" name="Item[<?php echo $Next; ?>][Title]" value="<?php echo $ItemTitle; ?>" />
      </div>
      <!-- End Title -->

      <!-- Url -->
      <div class="col-sm-8">
        <input autocomplete="off" placeholder="Url" date-required="true" class="form-control" name="Item[<?php echo $Next; ?>][Url]" value="<?php echo $ItemUrl; ?>" />
      </div>
      <!-- End Url -->

      <button type="button" style="position: absolute;right: 3px;top: 3px;" class="btn btn-sm btn-danger DelSec">
        <i class="fa fa-times"></i>
      </button>

    </div>

  </li>
