<?php


/**
 * @var string $action
 * @var object $CACHE
 */

require_once '../user/globals.php';

if (empty($action)) {


    emDirect('./order.php');




    include View::getUserView('header');
    require_once(View::getUserView('index'));
    include View::getUserView('footer');
    View::output();
}

if ($action == 'upload_cover') {
    $Media_Model = new Media_Model();
    $ret = uploadCropImg();
    $Media_Model->addMedia($ret['file_info']);
    Output::ok($ret['file_info']['file_path']);
}