Ver Mensaje Individual
  #4 (permalink)  
Antiguo 22/04/2005, 14:26
Avatar de Muzztein
Muzztein
 
Fecha de Ingreso: agosto-2002
Ubicación: Hangar 18
Mensajes: 1.703
Antigüedad: 22 años, 8 meses
Puntos: 16
checa esto


<%
Function codigo_veri(rut)
tur=strreverse(rut)
mult = 2

for i = 1 to len(tur)
if mult > 7 then mult = 2 end if

suma = mult * mid(tur,i,1) + suma
mult = mult +1
next

valor = 11 - (suma mod 11)


if valor = 11 then
codigo_veri = "0"


elseif valor = 10 then
codigo_veri = "k"

else
codigo_veri = valor
end if
end function


paso = codigo_veri(13069666)
response.write paso

%>