⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_admin_information.asp

📁 Art2008 CMS是一款具有强大的功能的基于ASP语言的网站管理软件
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file = admin_chk.asp -->
<!--#include file = md5.asp -->
<%
If Not ChkAdmin("ChangePassword") Then
	Call ArtErr("","")
End If

Dim Action
Action = Request("Action")

Select Case Action
Case "information"
	Call information()
Case Else
	Call showmain()
	Call AdminPageEnd()
End Select

call CloseConn() 

Sub information()

dim id,sql,rs,fullname,question,answer,answer1,email,sex,birthyear,birthmonth,birthday,content,tel,depname,photo
id=trim(request("id"))
fullname=htmlencode(request.form("fullname"))
question=htmlencode(request.form("question"))
answer=htmlencode(request.form("answer"))
answer1=md5(trim(request.form("answer")))
sex=htmlencode(request.form("sex"))
birthyear=request.form("birthyear")
birthmonth=request.form("birthmonth")
birthday=request.form("birthday")
email=htmlencode(request.form("email"))
depname=htmlencode(request.form("depname"))
content=htmlencode(request.form("content"))
tel=htmlencode(request.form("tel"))
photo=request.form("photo")
photo=replace(photo,"../","")	
freetime=1
set rs=server.createobject("adodb.recordset")
sql="select * from admin where id="&id
rs.open sql,conn,3,3
rs("content")=content
rs("question")=question
if answer<>rs("answer") then
rs("answer")=answer1
else
rs("answer")=answer1
end if
rs("fullname")=fullname
rs("email")=email
rs("sex")=sex
rs("birthyear")=birthyear
rs("birthmonth")=birthmonth
rs("birthday")=birthday
rs("depname")=depname
rs("tel")=tel
rs("photo")=photo
rs("logins")=rs("logins")+1
rs.update
rs.close:set rs=nothing
call ArtErr("<li>恭喜您!您的资料已经修改成功!</li>","2")

End Sub


Sub showmain()
%><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../images/admin/style.css">
<script LANGUAGE="javascript">
<!--
function FrmAddLink_onsubmit() {

if (document.FrmAddLink.question.value=="")
	{
	  alert("对不起,请您输入提示问题!")
	  document.FrmAddLink.question.focus()
	  return false
	 }
else if (document.FrmAddLink.answer.value=="")
	{
	  alert("对不起,请您输入问题答案!")
	  document.FrmAddLink.answer.focus()
	  return false
	 }
else if (document.FrmAddLink.question.value==document.FrmAddLink.answer.value)
	{
	  alert("为了安全,提示问题与问题答案不应该相同!")
	  document.FrmAddLink.answer.focus()
	  return false
	 }
else if (document.FrmAddLink.fullname.value=="")
	{
	  alert("对不起,请输入您的真实姓名!")
	  document.FrmAddLink.fullname.focus()
	  return false
	 }
else if (document.FrmAddLink.depname.value=="")
	{
	  alert("对不起,请输入您的工作单位!")
	  document.FrmAddLink.depname.focus()
	  return false
	 }
else if (document.FrmAddLink.sex.value=="")
	{
	  alert("对不起,请输入您的性别!")
	  document.FrmAddLink.sex.focus()
	  return false
	 }
else if (document.FrmAddLink.tel.value=="")
	{
	  alert("对不起,请输入您的联系电话!")
	  document.FrmAddLink.tel.focus()
	  return false
	 }
else if (document.FrmAddLink.email.value=="")
	{
	  alert("对不起,请输入您的电子邮件!")
	  document.FrmAddLink.email.focus()
	  return false
	 }
else if (document.FrmAddLink.email.value.indexOf("@",0)== -1||document.FrmAddLink.email.value.indexOf(".",0)==-1)
	  {
	  alert("对不起,您输入的电子邮件有误!")
	  document.FrmAddLink.email.focus()
	  return false
	 }
}

//-->
</script>
<script Language="VBScript" Type="text/vbscript"><!--
function FrontPage_Form1_onsubmit()
  Set theForm = document.FrontPage_Form1

  If (theForm.username.value = "") Then
    MsgBox "请在 用户名 域中输入值。", 0, "有效性验证错误"
    theForm.username.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.username.value) < 2) Then
    MsgBox "在 用户名 域中,请至少输入 2 个字符。", 0, "有效性验证错误"
    theForm.username.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.username.value) > 20) Then
    MsgBox "在 用户名 域中,请最多输入 20 个字符。", 0, "有效性验证错误"
    theForm.username.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.oldpassword.value = "") Then
    MsgBox "请在 旧密码 域中输入值。", 0, "有效性验证错误"
    theForm.oldpassword.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.oldpassword.value) < 4) Then
    MsgBox "在 旧密码 域中,请至少输入 4 个字符。", 0, "有效性验证错误"
    theForm.oldpassword.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.oldpassword.value) > 20) Then
    MsgBox "在 旧密码 域中,请最多输入 20 个字符。", 0, "有效性验证错误"
    theForm.oldpassword.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.password1.value = "") Then
    MsgBox "请在 新密码 域中输入值。", 0, "有效性验证错误"
    theForm.password1.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.password1.value) < 5) Then
    MsgBox "在 新密码 域中,请至少输入 5 个字符。", 0, "有效性验证错误"
    theForm.password1.focus()
    FrontPage_Form1_onsubmit = False

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -