<?php
/**
 * The productf management
 *
 * @package EMLOG
 * @link https://www.emlog.net
 */

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

require_once 'globals.php';
//require_once '../init.php';

$orderModel = new Order_Model();
$Sort_Model = new Sort_Model();
$User_Model = new User_Model();
$MediaSort_Model = new MediaSort_Model();
$Template_Model = new Template_Model();

$sta_cache = $CACHE->readCache('sta');
$user_cache = $CACHE->readCache('user');
$action = Input::getStrVar('action');


if (empty($action)) {

    $db = Database::getInstance();
    $db_prefix = DB_PREFIX;
    $sql = "select * from " . DB_PREFIX . "user where uid=" . UID;
    $user = $db->once_fetch_array($sql);
    $user_id = UID;
    $log = $db->fetch_all("select * from {$db_prefix}balance_log where user_id={$user_id} order by id desc limit 10");

    include View::getUserView('_header');
    require_once View::getUserView('balance');
    include View::getUserView('_footer');
    View::output();
}

