<?php
/**
 * @var bool $SUCCESS
 * @var Datalist $DATA
 * @var string $TYPE
 */

$PAGE = 'upload';

$FORM   = new DataForm($_POST, $TYPE);

if($FORM->isSubmitted()) {
    $FORM->validate();
    if($FORM->isValid()) {
        $SUCCESS = $FORM->upload($DATA, $TYPE);
    }
}

?>

<!-- Begin Page Content -->
<div class="container-fluid">
    <div>
        <?php
        include('../views/upload_form.php');
        if(isset($SUCCESS)){
            print("Fájl feltöltve!");
        }else{
            print("Fájl feltöltése sikertelen!");
        }
        ?>
    </div>

</div>
<!-- /.container-fluid -->

</div>
<!-- End of Main Content -->