קוד:
<%
Function Encode(sIn)
dim x, y, abfrom, abto
Encode="": ABFrom = ""
For x = 0 To 25: ABFrom = ABFrom & Chr(65 + x): Next
For x = 0 To 25: ABFrom = ABFrom & Chr(97 + x): Next
For x = 0 To 9: ABFrom = ABFrom & CStr(x): Next
abto = Mid(abfrom, 14, Len(abfrom) - 13) & Left(abfrom, 13)
For x=1 to Len(sin): y = InStr(abfrom, Mid(sin, x, 1))
If y = 0 Then
Encode = Encode & Mid(sin, x, 1)
Else
Encode = Encode & Mid(abto, y, 1)
End If
Next
End Function
Function Decode(sIn)
dim x, y, abfrom, abto
Decode="": ABFrom = ""
For x = 0 To 25: ABFrom = ABFrom & Chr(65 + x): Next
For x = 0 To 25: ABFrom = ABFrom & Chr(97 + x): Next
For x = 0 To 9: ABFrom = ABFrom & CStr(x): Next
abto = Mid(abfrom, 14, Len(abfrom) - 13) & Left(abfrom, 13)
For x=1 to Len(sin): y=InStr(abto, Mid(sin, x, 1))
If y = 0 then
Decode = Decode & Mid(sin, x, 1)
Else
Decode = Decode & Mid(abfrom, y, 1)
End If
Next
End Function
Set objCon = Server.Createobject("ADODB.Connection")
objCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("data/db.mdb")
Set objRs = Server.Createobject("ADODB.Recordset")
Set objRs.ActiveConnection = objCon
strSQL = "SELECT * from tbl_Users;"
objRs.CursorType = 2
objRs.LockType = 3
objRs.Open strSQL, objCon
If Request.Querystring("uname") = "" then
fname="empty"
Else
if Asc(Left(Request.Querystring("uname"),1)) > 65 and Asc(Left(Request.Querystring("uname"),1)) < 122 then
fname=Request.Querystring("uname")
Else
fname=Decode(Request.Querystring("uname"))
End If
End If
if Request.Querystring("lname") = "" then
lname="empty"
Else
if Asc(Left(Request.Querystring("lname"),1)) > 65 and Asc(Left(Request.Querystring("lname"),1)) < 122 then
lname=Request.Querystring("lname")
Else
lname=Decode(Request.Querystring("lname"))
End If
End If
if Request.Querystring("size") = "" then
size="empty"
Else
size=Request.Querystring("size")
End If
if Request.Querystring("phone") = "" then
phone="empty"
Else
phone=Request.Querystring("phone")
End If
if Request.Querystring("email") = "" then
email="empty"
Else
email=Request.Querystring("email")
End If
if Request.Querystring("mobile") = "" then
mobile="empty"
Else
mobile=Request.Querystring("mobile")
End If
If Request.Querystring("adress") = "" then
adress="empty"
Else
if Asc(Left(Request.Querystring("adress"),1)) > 65 and Asc(Left(Request.Querystring("adress"),1)) < 122 then
adress=Request.Querystring("adress")
Else
adress=Decode(Request.Querystring("adress"))
End If
End If
If Request.Querystring("coments") = "" then
coments="empty"
Else
if Asc(Left(Request.Querystring("coments"),1)) > 65 and Asc(Left(Request.Querystring("coments"),1)) < 122 then
coments=Request.Querystring("coments")
Else
coments=Decode(Request.Querystring("coments"))
End If
End If
objRs.AddNew
objRs("RegisterDate") = Now()
objRs("firstName") = fname
objRs("lastName") = lname
objRs("SizeGroup") = size
objRs("Phone") = phone
objRs("Email") = email
objRs("Cellular") = mobile
objRs("Address") = adress
objRs("Comments") = coments
objRs.Update
Set objRs = nothing
objCon.Close
Set objCon = nothing
%>
<html>
<head>
<title>ההרשמה התבצעה בהצלחה!</title>
</head>
<body style="padding: 0px; margin: 0px">
<img src="Popup.jpg" border="0" alt="">
</body>
</html>