<?php require_once './initSmarty.php'; require_once './datos.php'; try { session_start(); if (isset($_SESSION['usuario'])) { if (es_admin()) { $smarty->assign('nombreUsuario', get_nombre_usuario()); $smarty->assign('clientes', get_clientes()); $smarty->assign('admin', es_admin()); if (isset($_GET['montoNegativo'])) { $smarty->assign('montoNegativo', true); } if (isset($_GET['ctaDestino'])) { $smarty->assign('existeCtaDestino', true); } $smarty->display('deposito.tpl.html'); } else { header('location: ./main.php'); } } else { header('location: ./index.php'); } } catch (Exception $ex) { echo $ex->getMessage(); }
function listar_clientes($usuario, $password) { require_once '../dao/clienteDAO.php'; return get_clientes($usuario, $password); }