标题:请高手指点,如何修改这系统的默认帐号密码
只看楼主
haohy
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-9-12
结帖率:0
已结贴  问题点数:20 回复次数:4 
请高手指点,如何修改这系统的默认帐号密码
默认的帐号密码为admin 但是我想修改它,找了半天都没找出来在哪修改,请高手们指点,如下后台各个文件源码:

chkadmin文件:
<!--#include file="conn.asp"-->
<%
   dim user,pass
 user=request.form("username")
 pass=request.form("password")
set rs=server.createobject("adodb.recordset")
rs.open "select * from admin where username='"&user&"' and password='"&pass&"'" ,conn,1,1
if rs.eof or rs.bof then
response.write "<script>alert('错!');location.href='index.asp'</script>"
else
if not (rs.bof and rs.eof) then
if pass=rs("password") then
session("pass")=trim(rs("password"))
rs.close
set rs=nothing
response.redirect "order.asp"
 else
  response.write "错"
end if
end if
end if
%
conn文件:
<title>ASP在线订单系统</title><%
   set conn=server.createobject("adodb.connection")
   conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("../@feng.asa")
%>
der文件:
<title>ASP在线订单系统</title><%
 if session("pass")="" then
response.redirect "login.asp"
end if
%>
<!--#include file="conn.asp"-->

<%
 conn.execute("Delete from [order] where id="&Request("id")&" ")
 Response.redirect "order.asp"
%>
index文件:
<title>ASP在线订单系统</title><%
 if session("pass")="" then
response.redirect "login.asp"
else
response.redirect "order.asp"
end if
%>

login文件:
<% if session("pass")<>"" then
response.redirect "order.asp"
end if
%>
<html><head>
<title>ASP在线订单系统管理员登陆</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body>
<div align="center">
  <p> </p>
  <p> </p>
</div>
<form method="post" action="chkadmin.asp">
  <div align="center">
    <table width="443" height="240" border="0">
      <tr>
        <td height="236" background="../User_Bg.jpg"><p align="center"> </p>
          <p align="center"> </p>
          <p align="center"><font size="3">用户名</font>:
              <input type="text" name="username" size=20>
          </p>
          <p align="center"><br>
              <font size="3">密 码</font>:
              <input type="password" name="password" size=20>
          </p>
          <p align="center">                <br>
              <input type="submit" value="登 陆">
              <input type="reset" value="取 消">
          </p></td>
      </tr>
    </table>
    <p><br>
    </p>
  </div>
</form>
</body>
</html>

logout文件:
<% session("pass")=""
response.redirect "../index.asp"
%>
order文件:
<%
 if session("pass")="" then
response.redirect "login.asp"
end if
%>
<!--#include file="conn.asp"-->
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
.style4 {font-size: 14px; }
.style6 {
    font-size: 16px;
    font-family: "黑体";
}
.style7 {font-size: 14px; }
.style8 {
    font-family: Arial, Helvetica, sans-serif;
    color: #FF0000;
}
.style10 {font-family: "黑体"}
a:link {
    text-decoration: none;
}
a:visited {
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
a:active {
    text-decoration: none;
}
.style11 {font-size: 12px; }
-->
</style>

<title>ASP在线订单系统</title><table width="754" height="25" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="236" background="../dh.gif" bgcolor="EEF9FF"><div align="center"></div></td>
    <td width="253" background="../dh.gif" bgcolor="EEF9FF"><div align="center" class="style8">
      <P align=center class="style7"><STRONG>订单列表</STRONG></P>
    </div></td>
    <td width="251" background="../dh.gif" bgcolor="EEF9FF"> </td>
  </tr>
</table>
<TABLE width="753" height="185" border=0 align="center" cellPadding=3 cellSpacing=1  bgcolor="#CCCCCC">
  <TR bgcolor="EEF9FF">
    <TD height="32" align=right bgcolor="#F1F1F1"><div align="center" class="style4">订单ID</div></TD>
    <TD  bgcolor="#F1F1F1"><div align="center" class="style4">数量</div></TD>
    <TD width="10%"  bgcolor="#F1F1F1"><div align="center" class="style4">姓名</div></TD>
    <TD width="15%"  bgcolor="#F1F1F1"><div align="center" class="style4">电话</div></TD>
    <TD width="18%"  bgcolor="#F1F1F1"><div align="center" class="style4">产品</div></TD>
    <TD width="8%"  bgcolor="#F1F1F1"><div align="center" class="style4">邮编</div></TD>
    <TD width="8%"  bgcolor="#F1F1F1"><div align="center" class="style4">邮件</div></TD>
    <TD width="21%"  bgcolor="#F1F1F1"><div align="center" class="style4">下单时间</div></TD>
  </TR>
    <% set rs=server.createobject("adodb.recordset")
    rs.Open "select * from [order] order by date desc",conn,1,3
    if rs.eof then
      response.write "没有订单!"
     end if
 rs.pagesize = 20
if request("page")=""  or isempty(request("page")) then
page = 1
else
page=int(request("page"))
end if
if page>rs.pagecount then
page=rs.pagecount
end if
if not rs.BOF then
Rs.Move Rs.PageSize*(page-1)
end if
i=1
do while not rs.eof and i<=rs.pagesize
%>
  <TR bgcolor="EEF9FF">
    <TD width="11%" height="36" align=right bordercolor="#0066FF"> <div align="center" class="style4"><%=rs("id")%>&nbsp;&nbsp;  <a href="del.asp?id=<%=rs("id")%>">删除</a></div></TD>
    <TD width="5%" align=right bordercolor="#0066FF"><div align="center" class="style4"><%=rs("number")%></div></TD>
    <TD  align=right bordercolor="#0066FF"><div align="center" class="style4"><%=rs("name")%></div></TD>
    <TD align=right bordercolor="#0066FF"><div align="center" class="style4"><%=rs("tel")%></div></TD>
    <TD align=right bordercolor="#0066FF"><div align="center" class="style4"><%=rs("shouji")%></div></TD>
    <TD align=right bordercolor="#0066FF"><div align="center" class="style4"><%=rs("youbian")%>没通</div></TD>
    <TD align=right bordercolor="#0066FF"><div align="center" class="style4"><%=rs("email")%>没通</div></TD>
    <TD align=right bordercolor="#0066FF"><div align="center" class="style11"><%=rs("date")%></div></TD>
  </TR>
    <TR bgcolor="EEF9FF">
    <TD width="11%" height="35"  bordercolor="#0066FF"> </TD>
    <TD colspan="7"  bordercolor="#0066FF"><table width="100%" height="80" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><span class="style4">订购数理:<%=rs("number")%></span></td>
      </tr>
      <tr>
        <td><span class="style4">产品:<%=rs("shouji")%></span></td>
        </tr>
      <tr>
        <td><span class="style4">姓名:<%=rs("name")%></span></td>
      </tr>
      <tr>
        <td><span class="style4">送货地址:<%=rs("address")%></span></td>
      </tr>
      <tr>
        <td><span class="style4">电话</span><span class="style7">:<%=rs("tel")%></span></td>
      </tr>
      <tr>
        <td><span class="style7">其它说明:<%=rs("content")%></span></td>
        </tr>
    </table></TD>
    </TR>
    <%
i=i+1
 rs.MoveNext                                             
 loop
%>
  <TR bgcolor="EEF9FF" background="../dh.gif">
    <TD height="24" colspan="8" align=right><div align="center">
      <%
if rs.recordcount<>0 then
if page-1 mod 10=0 then
        p=(page-1) \ 10
    else
        p=(page-1) \ 10
    end if

    response.write "页次:"& page &"/"& rs.pagecount &"页 每页"& rs.pagesize &" 共"& rs.recordcount &"条记录"&_
                    " 分页:"

    if p*10>0 then response.write "<a href='?keywords="&keywords&"&keywords2="&keywords2&"&xs="&xs&"&page="&p*10&"' title=上十页>[&lt;&lt;]</a>   "
    uming_i=1
    for ii=p*10+1 to P*10+10
           if ii=page then
              response.write "<font color=#ff0000>["+Cstr(ii)+"]</font> "
           else
              response.write "<a href='?keywords="&keywords&"&keywords2="&keywords2&"&xs="&xs&"&page="&ii&"'>["+Cstr(ii)+"]</a>   "
           end if
        if ii=rs.pagecount then exit for
         uming_i=uming_i+1
    next
    if ii<=rs.pagecount and uming_i=11 then response.write "<a href='?keywords="&keywords&"&keywords2="&keywords2&"&xs="&xs&"&page="&ii&"' title=下十页>[&gt;&gt;]</a>   "
response.write("  转页:<input type=text name=page size=2 maxlength=3 class=wenbenkuang> <input type=submit name=Submit value=Go class=go-wenbenkuang>")
end if%>
    </div></TD>
  </TR>
</TABLE>
<table width="757" height="27" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="113" height="27" background="../dh.gif" bgcolor="EEF9FF">
    <p align="center"><font color="#0066FF"><b>
    <a href="http://www.退出返回首页</a></b></font></td>
    <td width="644" background="../dh.gif" bgcolor="EEF9FF">&nbsp;<font color="#0000FF">或者直接关闭此页</font></td>
  </tr>
</table>







搜索更多相关主题的帖子: 帐号 密码 系统 
2010-09-12 15:17
zmh886
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:12
帖 子:238
专家分:1305
注 册:2010-6-2
得分:5 
打开数据库找找。server.mappath("../@feng.asa")

http://www./
2010-09-12 17:50
hebss
Rank: 2
等 级:论坛游民
帖 子:19
专家分:23
注 册:2009-10-12
得分:5 
打开数据库找啊

[url=www.]www.[/url]   [url=www.]www.[/url]
2010-09-13 16:37
dhtjeso
Rank: 1
等 级:新手上路
帖 子:4
专家分:5
注 册:2008-7-3
得分:5 
用mdb软件打开。直接修改就可以了。
2010-09-16 11:36
lele2007
Rank: 5Rank: 5
来 自:广东省深圳
等 级:职业侠客
威 望:6
帖 子:1028
专家分:305
注 册:2007-9-4
得分:5 
没有看到你的Md5文件。好像是没有加密的。。
要不,运行这个试一下。。
<!--#include file="conn.asp"-->
<%conn.execute("update [admin] set password='填写新密码' where username='admin'"):response.write "成功"%>

你有默认的账号和密码。。不能登录后台后直接修改密码吗?

学习编程www.
2010-09-16 15:45



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-320196-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.120709 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved