Dim e As RequestEventArgs = args(0)
Dim wb As New weui
Dim dr As DataRow = DataTables("用户").sqlfind("身份证号='" & e.Cookies("username") & "'")
wb.InsertHTML("<!DOCTYPE html>")
wb.InsertHTML("<html>")
wb.InsertHTML("<head>")
wb.InsertHTML("<meta charset='utf-8'>")
wb.InsertHTML("<meta name='viewport' c />")
wb.InsertHTML("<title></title>")
wb.InsertHTML("<script src='../mui/js/mui.min.js'></script>")
wb.InsertHTML("<link href='../mui/css/mui.css' rel='stylesheet'/>")
wb.InsertHTML("<script Type='text/javascript' charset='utf-8'>mui.init();</script>")
wb.InsertHTML("</head>")
wb.InsertHTML("<body>")
wb.InsertHTML("<header class='mui-bar mui-bar-nav mui-bar-nav-bg'>")
wb.InsertHTML("<a id='icon-menu' class='mui-action-back mui-icon mui-icon-left-nav mui-pull-left'></a>")
wb.InsertHTML("<h1 class='mui-title'>密码修改</h1>")
wb.InsertHTML("</header>")
wb.InsertHTML("<div class='mui-content'>")
wb.InsertHTML("<br>")
If e.PostValues.Count = 0 Then
wb.AddForm("","form1","xgmm.htm")
With wb.AddInputGroup("form1","ipg1")
Dim idfm = .AddInput("username","用户名:","text")
idfm.value= e.Cookies("username")
idfm.readonly = True
Idfm.attribute="style= 'border:none;padding:0px;height:30px;width:auto;margin:0;"
Dim idxm = .AddInput("username","姓 名:","text")
idxm.value= dr("name")
idxm.attribute="style= 'border:none;padding:0px;height:30px;width:auto;margin:0;"
idxm.readonly = True
Dim ymm =.AddInput("ymm","原密码:","password")
ymm.placeholder ="请输入原密码"
ymm.attribute="style= 'border:none;padding:0px;height:30px;width:auto;margin:0;"
Dim xmm =.AddInput("xmm","新密码:","password")
xmm.placeholder ="请输入6位新密码"
xmm.attribute="style= 'border:none;padding:0px;height:30px;width:auto;margin:0;"
End With
With wb.AddButtonGroup("form1","btg1",False)
Dim bt1= .Add("btn1", "确定修改", "submit")
bt1.attribute="style='border:1px solid black;border-radius:40px;padding:0px;width:50%'"
bt1.kind=1
End With
e.WriteString(wb.Build)
Else
If e.PostValues("ymm")<> e.Cookies("password")
With wb.AddMsgPage("","msgpage","修改不成功", "原密码不正确!")
.icon = "Warn" '改变图标
Dim bt1 =.AddButton("btn1","返回")
bt1.Attribute = " style='border:1px solid black;border-radius:20px;padding:0px;width:50%'"
bt1.kind=1
End With
e.WriteString(wb.Build)
Return ""
End If
If e.PostValues("xmm").length<>6
With wb.AddMsgPage("","msgpage","修改不成功", "新密码统一要求应为六位")
.icon = "Warn" '改变图标
Dim bt1= .AddButton("btn1","返回")
bt1.Attribute = " style='border:1px solid black;border-radius:20px;padding:0px;width:50%'"
bt1.kind=1
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")) '生成成功提示页
Dim bt6= .AddButton("btn6","返回","javascript:history.back()")
bt6.Attribute = "style='border:1px solid black;border-radius:20px;padding:0px;width:50%'"
bt6.kind=1
End With
End If
wb.InsertHTML("form1","</div>")
wb.InsertHTML("<script src='../mui/js/mui.min.js'></script>")
wb.InsertHTML("<link href='../mui/css/mui.css' rel='stylesheet'/>")
wb.InsertHTML("<script Type='text/javascript' charset='utf-8'>mui.init();</script>")
e.WriteString(wb.Build)