Viewing file: Busca_usuario_encriptado.php (3.52 KB) -rw-rw-r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- http://www.lawebdelprogramador.com -->
<html>
<head>
<title>Ejemplo de formulario con estilos</title>
<?
include ("../frames/conn.php");
if ($_REQUEST['usuario']){
// ejemplo:
//http://papyrefb2.net/frames/enlace.php?enlace=aHR0cDovLzk4LjE1OC4xNzkuMjU0L25ld2xpYnJvcy8xNzE5OC03NjIuemlw&ID=17198
//echo $_REQUEST['usuario']."<br>";
$enlace=hasta($enlace,"=","&");
echo $enlace."<br>";
$enlace=hasta($_REQUEST['usuario'],"%3D","%26");
//echo $enlace."<br>";
$usucript= new Encriptor();
echo $usucript->decrypt("aHR0cDovLzk4LjE1OC4xNzkuMjU0L25ld2xpYnJvcy8xNzE5OC03NjIuemlw");
echo "<br>->";
echo base64_decode("aHR0cDovLzk4LjE1OC4xNzkuMjU0L25ld2xpYnJvcy8xNzE5OC03NjIuemlw");
print_r($usucript);
die();
}
?>
<style type="text/css">
BODY {
font-family: Arial;
font-size: 0.8em;
}
/* Estable el formato para todos los div's */
div {
clear: both;
}
/* Determina los div's que el contenido es centrado. Hereda "clear: both;" */
.form_center {
text-align:center;
}
/* Para los input's alineados */
.form_input_align {
float:left;
border:1px solid;
margin-left:0.2em;
}
/* Para los input's centrados */
.form_input_center {
border:1px solid;
}
/* Para los label's alineados */
.form_label_align {
float:left;
width:50%;
text-align:right;
}
/* indicamos una pequeña separación en cada label, input, select y textarea */
label, input, select, textarea {
margin-bottom:0.3em;
}
/* Unicamente funciona con Firefox
Determina el formato cuando se selecciona un cuadro de texto */
input:focus, select:focus, textarea:focus {
background-color: #c6d3ff;
}
/* Determina el formato de los comentarios */
.form_comment {
color: #808080;
}
/* Determina el formato de los comentarios centrados */
.form_comment_center {
text-align:center;
color: #808080;
}
/* Determina el formato de los botones */
.button {
padding: 0em 0.5em 0em 0.5em;
}
/* Determina el formato del marco */
fieldset {
border: 1px solid #808080;
padding: 0.5em 0.5em 0.5em 0.5em;
}
/* Determina el formato del titulo del marco */
legend {
color: #808080;
}
</style>
</head>
<body>
<h1 style="font-size:1em">Formulario </h1>
<form name="form1" method="get" enctype="application/x-www-form-urlencoded" target="_self">
<!-- generamos un recuadro -->
<fieldset>
<!-- titulo del recuadro -->
<legend>enlace:</legend>
?>
<input type="submit" name="submit">
<input type="reset" name="reset">
<input type="hidden" name="dale" value="si">
<input name="usuario" value="">
</fieldset>
</form>
<?php
function hasta($ccadena,$vdesde,$vhasta)
{
$ccadena="<vacio>".$ccadena;
if (!$ccadena=strstr($ccadena,$vdesde)){
return(null);
}
## ahora, contamos hasta desde $desde
## hasta el caracter $vhasta
$ccadena=substr($ccadena,strlen($vdesde));
$c="";
$a=0;
$b="";
while(!strstr($c,$vhasta)) {
$b=substr($ccadena,$a,1);
$c=$c.$b;
$a++;
}
return(substr($c,0,(strlen($c)-(strlen($vhasta)))));
}
?>
|