示例#1
0
<?php

if (isset($_SESSION['id'], $_SESSION['user'], $_SESSION['email'])) {
    if ($_POST) {
        include 'core/models/class.Cuenta.php';
        $cuentas = new Cuenta();
        $cuentas->EditUser();
    } else {
        $ruta = 'uploads/avatar/' . $_SESSION['id'] . '.' . $_SESSION['ext'];
        if (file_exists($ruta)) {
            $ruta = $ruta;
        } else {
            $ruta = 'uploads/avatar/user.png';
        }
        $template = new Smarty();
        $template->assign('image', $ruta);
        $template->display('cuenta/cuenta.tpl');
    }
} else {
    header('location:?view=login');
}