Dim e As RequestEventArgs = args(0)
Dim wb As New weui
Dim dr As DataRow = DataTables("用户").sqlfind("身份证号='" & e.Cookies("username") & "'")
If e.PostValues.Count = 0 Then
wb.AddPageTitle("","pageheader","内江市教务系统","密码修改")
wb.AddForm("","form1","xgmm.htm")
With wb.AddInputGroup("form1","ipg1")
Dim idfm = .AddInput("username","户名:","text")
idfm.value= e.Cookies("username")
idfm.readonly = True
Dim idxm = .AddInput("username","姓名:","text")
idxm.value= dr("name")
idxm.readonly = True
.AddInput("ymm","原密码:","password").placeholder ="请输入原密码"
.AddInput("xmm","密码:","password").placeholder ="请输入新密码"
End With
With wb.AddButtonGroup("form1","btg1",False)
.Add("btn1", "确定", "submit")
.Add("btn2", "退出").Attribute = " "onc lick='hist ory.go(-1)'"
"
End With
e.WriteString(wb.Build)
Else
If e.PostValues("ymm")<> e.Cookies("password")
With wb.AddMsgPage("","msgpage","修改不成功", "原密码不正确!")
.icon = "Warn" '改变图标
.AddButton("btn1","返回").Attribute = ""
End With
e.WriteString(wb.Build)
Return ""
End If
If e.PostValues("xmm").length<>6
With wb.AddMsgPage("","msgpage","修改不成功", "新密码统一要求应为六位")
.icon = "Warn" '改变图标
.AddButton("btn1","返回").Attribute = ""
End With
e.WriteString(wb.Build)
Return ""
End If
dr("password")=e.PostValues("xmm")
wb.AppendCookie("password",e.postvalues("xmm"))
dr.save()
With wb.AddMsgPage("","msgpage","密码改成为", "请记住你修改的新密码为:" & e.postvalues("xmm")) '生成成功提示页
.AddButton("btn6","返回","javascript:history.back()")'.Attribute = ""
End With
e.WriteString(wb.Build)
End If