End If
ConPassWord=KS.S("ConPassWord")
IF PassWord<>ConPassWord then
Call KS.AlertHistory("设置失败:\n\n两次输入密码不一致,请重新输入!","-1")
Response.End
End If
PassWord =MD5(KS.R(Request.form("PassWord")),16)
Set UserRS=Server.CreateObject("ADODB.RECORDSET")
UserRS.Open "Select * From KS_Admin",Conn,1,3
UserRS.AddNew
UserRS("UserName")=UserName
UserRS("PrUserName")=UserName
UserRS("PassWord")=PassWord
UserRS("Sex")="男"
UserRS("Description")="科汛系统安装分配的超级管理员"
UserRS("SuperTF")=1
UserRS("Locked")=0
UserRS("LastLoginIP")=KS.GetIP
UserRS("LoginTimes")=0
UserRS("LastLoginTime")=Now
UserRS("LastLogoutTime")=Now
UserRS("AddDate")=Now
UserRS("PowerList")=1
UserRS("ModelPower")="11111111111111111111"
UserRS.Update
UserRS.Close
Set UserRS=Nothing
Conn.Execute("Update KS_User Set GroupID=4 where username=''" & PreUserName & "''")
KS.DelCaches(KS.SiteSN)
response.write "<div align=''center''>恭喜,后台管理员设置成功!<br><a href=""" & KS.Setting(89) & "login.asp"">进入后台</a> | <a href=""?action=Del"">删除Key文件</a></div>"
End Sub
Sub EditSave()
Dim UserName,password,conpassword
UserName=KS.S("UserName")
IF UserName="" then
Call KS.AlertHistory("设置失败:\n\n没有输入管理账号,请输入!","-1")
Response.End
End If
Conn.Execute("Update KS_Admin Set UserName=''" & UserName & "'' Where Supertf=''1''")
PassWord=KS.S("PassWord")
IF PassWord<>"" then
IF Len(PassWord)<6 then
Call KS.AlertHistory("设置失败:\n\n密码不能少于6位,请重新输入!","-1")
Response.End
End If
ConPassWord=KS.S("ConPassWord")
IF PassWord<>ConPassWord then
Call KS.AlertHistory("设置失败:\n\n两次输入密码不一致,请重新输入!","-1")
Response.End
End If
PassWord =MD5(KS.R(Request.form("PassWord")),16)
Conn.Execute("Update KS_Admin Set [password]=''" & password & "'' Where Supertf=''1''")
End If
response.write "<div align=''center''>恭喜,后台管理员修改成功!<br><a href=""" & KS.Setting(89) & "login.asp"">进入后台</a> | <a href=""?action=Del"">删除Key文件</a></div>"
End Sub
Sub EditSN()
Dim RS:Set RS=Server.CreateObject("ADODB.RECORDSET")