<%@ LANGUAGE=VBScript %> <% Response.Buffer = True IF Session("Common_Access") < 1 THEN 'msgbox "Invalid User Name OR Password",48,"Warning" Response.Clear 'error logon warning Response.Redirect "default.asp" END IF vcur_pw = Request.Form("cur_passwd") vnew_pw = Request.Form("new_passwd") vre_pw = Request.Form("re_passwd") vemail = Request.Form("email_n") Set IndustryNetSQL = Server.CreateObject("ADODB.Connection") IndustryNetSQL.Open "thaiindustry", "tinhosting", "tinhosting" sql = "SELECT * FROM usermember " & _ "WHERE UserName = '"& session("UserName") &"'" Set RS = IndustryNetSQL.Execute(sql) vUserPasswd = RS("UserPasswd") vUser_session = session("UserName") %> <% IF vnew_pw <> vre_pw THEN msg0 = "Warning" msg1 = "

re-password must same as new password

" & _ "

Retry, Cancel" ELSEIF vnew_pw = vcur_pw THEN msg0 = "Warning" msg1 = "

New password must change

" & _ "

Retry, Cancel" ELSEIF ucase(vemail) <> ucase(RS("UserEmail")) THEN msg0 = "Warning" msg1 = "

Email must same Register Email

" & _ "

Retry, Cancel" ELSEIF ucase(vcur_pw) <> ucase(vUserPasswd) THEN msg0 = "Warning" msg1 = "

Invalid Current Password

" & _ "

Retry, Cancel" ELSE sql1 = "UPDATE usermember "& _ "SET UserPasswd = '"& vnew_pw & "', " & _ " UserConfirm = '"& 1 & "' " & _ "WHERE UserName = '"& session("UserName") & "' " Set RS = IndustryNetSQL.Execute(sql1) sql = "select * from usermember " & _ "where username = '"& session("UserName") & "' " Set RS = IndustryNetSQL.Execute(sql) vUserName = RS("UserName") vPasswd = RS("UserPasswd") msg0 = "" msg1 = "

Change Password Completed

" &_ "User Name" & _ " " & vUserName & "" &_ "Password" &_ " " & vPasswd & "" END IF %> Welcome to Thai Industry Network

 

 

<%= FormatDateTime (date, vbLongDate) %>

User Member <%=RS("FName")& " " %><%=RS("LName")& " " %>
Change Password
<%=msg0%>
<%=msg1%>
<% RS.close IndustryNetSQL.close %>