All pastes #508090 Raw Edit

Miscellany

public php v1 · immutable
·published 2007-05-24 21:22 UTC
rendered paste body
<?phpinclude_once("class/error/adminError.php");include_once("TemplatePower/class.TemplatePower.inc.php");include_once("class/include/autocargaClases.php");$tpl = new TemplatePower("templates/login.html");$tpl->prepare();if (isset($_GET["recuperar"]) || isset($_POST["btnRecuperar"])){        if (isset($_POST["btnRecuperar"])){        $usuario = new class_usuarios_usuario();        $email = trim($_POST["txtEmail"]);                $registro = $usuario->recuperarContrasena($email);                if ($registro["estado"]){            $tpl->newBlock("Avisos");            $tpl->assign("aviso", $registro["mensajes"]);            echo $registro["mensajes"];            $tpl->newBlock("inicio");        }else{            $tpl->newBlock("Avisos");            $tpl->assign("aviso", $registro["mensajes"]);            $tpl->newBlock("recuperar");            $tpl->assign("Email", $email);        }          unset($usuario);    }else{            if (isset($_GET["recuperar"])){            $tpl->newBlock("recuperar");        }     }    }else{    if (isset($_POST["btnGuardar"])){                $apodoEmail = trim($_POST["txtApodoEmail"]);        $contrasena = trim($_POST["txtContrasena"]);                $usuario = new class_usuarios_usuario();        $registro = $usuario->iniciarSesion($apodoEmail, $contrasena);                if ($registro["estado"]){            header("Location: myhome.html");        }else{           $tpl->newBlock("Avisos");            $tpl->assign("aviso", $registro["mensajes"]);            $tpl->newBlock("formulario");            $tpl->assign("Contrasena", $contrasena);            $tpl->assign("ApodoEmail", $apodoEmail);            echo $registro["mensajes"];        }        unset($usuario);    }else{        $tpl->newBlock("formulario");    }    }$tpl->printToScreen();?>