论坛: 网站建设 标题: 大家帮我看看这段代码里面有没有用户名和密码! 复制本贴地址    
作者: xiaolelv [xiaolelv]    论坛用户   登录
<!--#include file="config.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="format.asp"-->
<!--#include file="error.asp"-->
<!--#include file="lib/nav.asp"-->
<!--#include file="lib/incjs.asp"-->
<!--#include file="lib/adminmenu.asp"-->
<!--#include file="lib/adminfoot.asp"-->
<!--#include file="lib/adminadmin_body.asp"-->
<title><%=webname%>-管理员选项</title>
<%
dim founderr,errmsg
founderr=false
errmsg=""

if session("adminlogin")<>sessionvar then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你尚未登录,或者超时了!请<a href='admin.asp'>重新登录</a>!"
  call diserror()
  response.end
else
if request.form("MM_insert") then

if request.form("action")="modpass" then
dim adminname,oldpwd,adminpwd,confirm
adminname=trim(replace(request.form("adminname"),"'",""))
oldpwd=trim(replace(request.form("oldpwd"),"'",""))
adminpwd=trim(replace(request.form("adminpwd"),"'",""))
confirm=trim(replace(request.form("confirm"),"'",""))
if adminname="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须输入管理员名称!"
end if
if oldpwd="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须输入旧的管理员密码!"
end if
if adminpwd="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须输入新的管理员密码!"
end if
if adminpwd<>confirm then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你两次输入的管理员密码不相同!"
end if
if founderr then
  call diserror()
  response.end
else
openadmin
sql="select * from admin where admin_name='"&adminname&"' and admin_password='"&oldpwd&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if rs.eof then
errmsg=errmsg+"<br>"+"<li>管理员名称或密码错误!"
call diserror()
response.end
else
rs("admin_password")=adminpwd
rs.update
rs.close
set rs=nothing
end if
end if
end if
if request.form("action")="newadmin" then
adminname=trim(replace(request.form("adminname"),"'",""))
adminpwd=trim(replace(request.form("adminpwd"),"'",""))
confirm=trim(replace(request.form("confirm"),"'",""))
if adminname="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须输入管理员名称!"
end if
if adminpwd="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须输入管理员密码!"
end if
if adminpwd<>confirm then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你两次输入的管理员密码不相同!"
end if
if founderr then
  call diserror()
  response.end
else
openadmin
sql="select * from admin"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
rs("admin_name")=adminname
rs("admin_password")=adminpwd
rs.update
rs.close
set rs=nothing
response.redirect "admin_admin.asp?action=admin"
end if
end if
if request.form("action")="editadmin" then
if request.Form("id")="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须指定操作的对象!"
else
  if not isInteger(request.form("id")) then
    founderr=true
    errmsg=errmsg+"<br>"+"<li>非法的文章分类id参数。"
  end if
end if
adminname=trim(replace(request.form("adminname"),"'",""))
adminpwd=trim(replace(request.form("adminpwd"),"'",""))
confirm=trim(replace(request.form("confirm"),"'",""))
if adminname="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须输入管理员名称!"
end if
if adminpwd="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须输入管理员密码!"
end if
if adminpwd<>confirm then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你两次输入的管理员密码不相同!"
end if
if founderr then
  call diserror()
  response.end
else
openadmin
sql="select * from admin where admin_id="&request.form("id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs("admin_name")=adminname
rs("admin_password")=adminpwd
rs.update
rs.close
set rs=nothing
response.redirect "admin_admin.asp?action=admin"
end if
end if
if request.form("action")="deladmin" then
if request.Form("id")="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须指定操作的对象!"
else
  if not isInteger(request.form("id")) then
    founderr=true
    errmsg=errmsg+"<br>"+"<li>非法的文章分类id参数。"
  end if
end if
if founderr then
  call diserror()
  response.end
else
openadmin
sql="select * from admin where admin_id="&request.form("id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.delete
rs.close
set rs=nothing
response.redirect "admin_admin.asp?action=admin"
end if
end if

end if

call admin_nav()
call adminadmin_body()
call adminendpage()
end if
%>

地主 发表时间: 04-07-30 11:49

回复: shenke410 [shenke410]   论坛用户   登录
没有用户名和密码!!!
具体的数据都放在数据库的admin表里面!

B1层 发表时间: 04-07-30 12:38

回复: lqfrla [lqfrla]   论坛用户   登录
这里怎么会有呢

B2层 发表时间: 04-07-30 12:58

回复: xiaolelv [xiaolelv]   论坛用户   登录
是ADMIN。ASP数据库吗!请问我用什么方式能打开!

B3层 发表时间: 04-07-30 13:00

回复: zhaoyh603 [zhaoyh603]   论坛用户   登录
当然是access了

B4层 发表时间: 04-07-30 16:08

回复: uncracker [uncracker]   论坛用户   登录
数据库的链接一般在conn.asp里面,里面应该有数据库的真实路径
用很多东西都可以打开access数据库,但是要修改,就需要装MS access

B5层 发表时间: 04-07-30 22:40

论坛: 网站建设

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号