Re: Logeo de usuario para un banco
| From: | FERNANDO ZAPATA | Date: | Fri, 03 Feb 2006 14:24:59 +0000 |
| Subject: | Re: Logeo de usuario para un banco | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-57672@lists.php.net to get a copy of this message | ||
//instrucciones
haber te mando el codigo q hace esto ... OJO que e usado un tex normal
para q puedas ver que lo q se presiona y lo pone en la caja de
texto... tu le pones a que sea un tipo password.. otra cosa las
imagenes de los botones son 1.jpg,2jpg..etc etc ya tu las generas...
saludos Fernando
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script language="javascript">
function valor_a_texto(numero){
//SOLO LE CONCATENAMOS SIEMPRE Y CUANDO NO SEA MAYOR A 6 CARACTERES DE
LA CONTRASEÑA
if(document.formulario.mitexto.value.length<6){
document.formulario.mitexto.value=document.formulario.mitexto.value+numero;//concatenamos
el numero seleccionado
}
}
</script>
<title>BANCO "NO PAGAMOS INTERESES"</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php
$array_inicial=array(1,2,3,4,5,6,7,8,9,0);//ARRAY INICIAL CON LOS
NOMBRES DE LAS IMAGENES
$array_final=array_rand($array_inicial,10);//ARRAY CHOCOLATEADO
ALEATORIAMENTE :)
//ASIGNAMOS LOS VALORES A LAS VARIABLES $btn1,$btn2...etc etc
$nom_var='btn';
for($i=1;$i<=10;$i++){
${$nom_var.$i}=$array_final[$i-1];//ACA LE DAMOS VALOR A CADA VARIABLE
}
?>
<body>
<table border="1">
<tr>
<td><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="javascript:void(0)"
onClick="javascript:valor_a_texto('<?=$btn1?>')"><img
src="<?=$btn1?>.jpg" border="0"></a></td>
<td><a href="javascript:void(0)"
onClick="javascript:valor_a_texto('<?=$btn2?>')"><img
src="<?=$btn2?>.jpg" border="0"></a></td>
<td><a href="javascript:void(0)"
onClick="javascript:valor_a_texto('<?=$btn3?>')"><img
src="<?=$btn3?>.jpg" border="0"></a></td>
</tr>
<tr>
<td><a href="javascript:void(0)"
onClick="javascript:valor_a_texto('<?=$btn4?>')"><img
src="<?=$btn4?>.jpg" border="0"></a></td>
<td><a href="javascript:void(0)"
onClick="javascript:valor_a_texto('<?=$btn5?>')"><img
src="<?=$btn5?>.jpg" border="0"></a></td>
<td><a href="javascript:void(0)"
onClick="javascript:valor_a_texto('<?=$btn6?>')"><img
src="<?=$btn6?>.jpg" border="0"></a></td>
</tr>
<tr>
<td><a href="javascript:void(0)"
onClick="javascript:valor_a_texto('<?=$btn7?>')"><img
src="<?=$btn7?>.jpg" border="0"></a></td>
<td><a href="javascript:void(0)"
onClick="javascript:valor_a_texto('<?=$btn8?>')"><img
src="<?=$btn8?>.jpg" border="0"></a></td>
<td><a href="javascript:void(0)"
onClick="javascript:valor_a_texto('<?=$btn9?>')"><img
src="<?=$btn9?>.jpg" border="0"></a></td>
</tr>
<tr>
<td><a href="javascript:void(0)"
onClick="javascript:valor_a_texto('<?=$btn10?>')"><img
src="<?=$btn10?>.jpg" border="0"></a></td>
<td colspan="2"><a href="javascript:void(0)"
onClick="javascript:document.formulario.mitexto.value=''"><img
src="limpiar.jpg" border="0"></a></td>
</tr>
</table>
</td>
<td valign="top">
<form name="formulario" method="post" action="">
<input type="text" name="mitexto" readonly="yes"
size="13" maxlength="6">
<input type="button" name="boton" value="enviar">
</form>
</td>
</tr>
</table>
</body>
</html>