X-Git-Url: https://git.llucax.com/z.facultad/75.43/tp1.git/blobdiff_plain/764dbe45b22d409208b2f7deb4c5c6c344dcb85a..refs/heads/master:/src/admin.creditos.php diff --git a/src/admin.creditos.php b/src/admin.creditos.php index b75275b..4294ab4 100644 --- a/src/admin.creditos.php +++ b/src/admin.creditos.php @@ -15,7 +15,6 @@ require_once 'lib/admin.forms.php'; require_once 'lib/admin.util.php'; marco_cabecera('Asignación de créditos'); -admin_check(); // Si llenó el formulario if (isset($_POST['admin_cred']) and isset($_POST['admin_cred_user']) @@ -23,25 +22,25 @@ if (isset($_POST['admin_cred']) and isset($_POST['admin_cred_user']) { if (check_numero($_POST['admin_cred']) and check_asociado($_POST['admin_cred_user']) - and check_password($u = new Usuario($_POST['admin_cred_user']), - $_POST['admin_cred_pass'])) + and check_password($_SESSION['user'], $_POST['admin_cred_pass'])) { + $u = new Usuario($_POST['admin_cred_user']); $u->addCreditos($_POST['admin_cred']); ok('Se agregaron '.$_POST['admin_cred'].' créditos al usuario ' .$u->getNombre().' '.$u->getApellido()); - admin_form_creditos(Usuario::getAll(), $u->getId(),$_POST['admin_cred']); + admin_form_creditos(Usuario::getSocios(), $u->getId(),$_POST['admin_cred']); } else { - admin_form_creditos(Usuario::getAll(), $_POST['admin_cred_user'], + admin_form_creditos(Usuario::getSocios(), $_POST['admin_cred_user'], $_POST['admin_cred']); } } else // Si no llenó el formulario { - admin_form_creditos(Usuario::getAll()); + admin_form_creditos(Usuario::getSocios()); } -marco_pie('Leandro Lucarella', 'llucare@fi.uba.ar'); +marco_pie('Leandro Lucarella', 'llucare@fi.uba.ar', 'img/luca.png'); ?> \ No newline at end of file