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

📄 gbadmin_cp.asp

📁 功能强大的一个b/s工作站
💻 ASP
字号:
<!--#include file="CONFIG.ASP" -->
<!--#include file="CONN.ASP" -->
<!--#include file="FORMAT.ASP" -->
<!--#include file="error.ASP" -->
<!--#include file="lib/gbadmincp.ASP" -->
<!--#include file="lib/gbfooter.asp" -->
<link rel="stylesheet" href="<%=themepath%>/gbstyle.css" type="text/css">
<%
if request.cookies("NGB")("adminname")="" or request.cookies("NGB")("adminpwd")="" then
response.redirect "admin.asp"
else

dim founderr,errmsg
founderr=false
errmsg=""

if request("cp")<>"yes" then
  call admin_cp()
else
  if trim(replace(request.form("adminname"),"'",""))="" then
    founderr=true
	errmsg=errmsg+"<br>"+"<li>你没有填写管理员名称。"
  end if
  if trim(replace(request.form("adminpwd"),"'",""))="" then
    founderr=true
	errmsg=errmsg+"<br>"+"<li>你没有填写管理员密码。"
  end if
  if trim(replace(request.form("newpwd"),"'",""))="" then
    founderr=true
	errmsg=errmsg+"<br>"+"<li>你没有填写新密码。"
  end if
  if trim(replace(request.form("newpwd2"),"'",""))="" then
    founderr=true
	errmsg=errmsg+"<br>"+"<li>你没有填写确认新密码选项。"
  end if
  if trim(replace(request.form("newpwd2"),"'",""))<>trim(replace(request.form("newpwd"),"'","")) then
    founderr=true
	errmsg=errmsg+"<br>"+"<li>你两次输入的密码不一致。"
  end if
  if founderr then
    call diserror()
	response.end
  else
    opengb
    sql="select * from admin"
    set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,1,3
    if trim(replace(request.form("adminname"),"'",""))=rs("admin_name") and trim(replace(request.form("adminpwd"),"'",""))=rs("admin_password") then
	  rs("admin_password")=trim(replace(request.form("newpwd"),"'",""))
	  rs.update
	  rs.close
	  set rs=nothing
	  response.write "<P class=messagetext>Update Success!<a href='index.asp'>返回首页</a>"
	else
	  errmsg=errmsg+"<br>"+"<li>管理员名称或旧密码错误。"
      call diserror()
      response.end
	end if
  end if
end if
end if
%>

⌨️ 快捷键说明

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