Make your own free website on Tripod.com
INGRESE LOS DIGITOS DE SU BOLETO:
HTMLBLOCK1; } else //pagina secundaria { if ((strlen ($_POST['indextxt1'])<5) Or !is_numeric ($_POST['indextxt1'])) { print "

Error: Ingrese un numero de 5 digitos

"; } else { $num_boleto=htmlentities ($_POST['indextxt1']); //numero ingresado print "

USTED INGRESÓ: ".$num_boleto; $num_boleto_separado = chunk_split ($num_boleto, 1," "); //insercion de espacios para formar array $array_boleto=explode (" ", $num_boleto_separado); //creacion de array usando " " como delimitador $sum_array_boleto= array_sum ($array_boleto); //suma del array $num_doscifras= chunk_split ($sum_array_boleto, 1, " "); $array_doscifras= explode (" ", $num_doscifras); $sum_array_doscifras= array_sum ($array_doscifras); print "

LA SUMA DE DIGITOS ES:".$sum_array_boleto; print "
LA PRIMER LETRA DEL NOMBRE DE LA PERSONA QUE LO AMA ES: "; switch ($sum_array_boleto) //para imprimir la letra correspondiente { case $sum_array_boleto > 27: //resetea (si la suma de digitos es mayor que las letras disponibles) $sum_array_boleto=$sum_array_boleto-28; case $sum_array_boleto < 15: print chr ($sum_array_boleto +64); break; case 15: //para incluir la letra Ñ print "Ñ"; break; case $sum_array_boleto > 15: print chr ($sum_array_boleto +63); break; } print "

LA SUMA A UN DIGITO ES: ".$sum_array_doscifras; print "
LA PRIMER LETRA DE LA DEL NOMBRE DE LA PERSONA QUE LO AMA ES: ".chr ($sum_array_doscifras + 64); print "

"; print "

Codigo Fuente
"; print "

Programa Ejemplo

"; } } include ("piedepag.inc"); ?>