-
Notifications
You must be signed in to change notification settings - Fork 0
/
actualiza_password.asp
54 lines (41 loc) · 1.03 KB
/
actualiza_password.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<%@LANGUAGE="VBSCRIPT" %>
<%
dim usuario
usuario = ""
usuario = session("id")
if len(usuario) = 0 then
response.redirect("login.asp")
end if
dim password
dim password2
dim confirma
password = ""
password2= ""
confirma = ""
password = request.form("password")
password2 = request.form("passwordnueva")
confirma = request.form("confirmapassword")
dim sql
dim db
dim rs
set db = server.createobject("SQLComandos.Comandos")
sql = "select password from usuario where id = " & usuario & " and password = '" & password & "'"
set rs = db.SQLSelect("DBBAECYS",sql)
noexiste = 0
if not rs.eof then
password_dbb = rs("password")
else
noexiste = 1
end if
if password = password_dbb then
else
Response.Redirect("actualizar_password.asp?Error=1")
end if
set rs = nothing
if noexiste = 1 then
else
sql = "update usuario set password = '" & password2 & "' where id = " & usuario & " and password = '" &password & "'"
end if
db.SQLOtras "DBBAECYS",sql
Response.redirect("opciones_datos.asp")
%>