<?php
    
    global $tpl , $db , $page , $error;

    if( core::POST() )
    {
        alternatywy::edit( $_REQUEST , core::$i->id , ( empty( $_FILES['image']['name'] ) ? false : $_FILES['image'] ) );
    }

    $tpl->assign(array(
        'data' => alternatywy::get( core::$i->id )
    ));
    
    admin::$i->on();

?>