找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 40|回复: 0

ASP语句!万分火急!!!

[复制链接]
发表于 2009-9-15 00:24:14 | 显示全部楼层 |阅读模式 IP:江苏扬州
<%
  Dim MasterName,MasterPW
  Dim ActionTxt
  MasterName="admin"    '管理员账号
  MasterPW="888000"    '管理员密码
  ActionTxt=Request.QueryString("action")
  Select Case ActionTxt
    Case "LoginForm"
        Call LoginForm
    Case "Login"
        Call Login
    Case "UserList"
        Call UserList
    Case "DelO"
        Call DelO
    Case Else
        Call LoginForm
  End Select
  
  Sub LoginForm
    Response.Write("<div style='width:200px; font-size:12px; text-align:left; margin-top:100px; padding:30px 35px 10px 70px; border:1px #FF0000 solid;'>")
    Response.Write("<form name='LogForm' action='Admin.asp?action=Login' method='post'>")
    Response.Write("<div style='padding-left:30px; font-weight:bold;'>-= 管理登陆 =-</div><br>")
    Response.Write("账 号:<input type='text' name='U_Name' style='width:100px;' /><br>")
    Response.Write("密 码:<input type='password' name='mima' style='width:65px;' /><br><br>")
    Response.Write("<div style='padding-left:50px;'><input type='submit' name='submit' value='登陆管理' /></div>")
    Response.Write("</form>")
    Response.Write("</div>")
  End Sub
  
  Sub Login
    Dim M_Name,M_PW
    M_Name=Trim(Request.Form("U_Name"))
    M_PW=Trim(Request.Form("mima"))
    If M_Name=MasterName And M_PW=MasterPW Then
        Session("MasterLogin")=M_Name
        Call UserList
    Else
        Response.Write("管理帐号或密码错误!")
    End If
  End Sub
  
  Sub CheckLogin
    If IsNull(Session("MasterLogin")) or Session("MasterLogin")="" Then
        Response.Write("请先登陆!")
        Response.End()
    End If
  End Sub
  
  Sub UserList
    Dim conn,Str,Rs
    Call CheckLogin  '验证是否登陆
    Set conn=Server.CreateObject("adodb.Connection")
    Str= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("DB/DataBase.mdb")
    conn.Open Str
    Set Rs=conn.execute("Select * From [Login] ORDER BY KeyID DESC")
    If not Rs.bof And not Rs.eof Then
        Response.Write("<table width='600' border='1' cellpadding='2' cellspacing='0'>")
        Response.Write("<tr style='font-weight:bold;'>")
        Response.Write("<td width='20%'>用户名</td>")
        Response.Write("<td width='15%'>验证码</td>")
        Response.Write("<td width='20%'>登陆IP</td>")
        Response.Write("<td width='25%'>注册时间</td>")
        Response.Write("<td width='20%'>操作</td>")
        Response.Write("</tr>")
        Do While not Rs.eof
          Response.Write("<tr>")
          Response.Write("<td>"&Rs("UserName")&"</td>")
          Response.Write("<td>"&Rs("PassWord")&"</td>")
          Response.Write("<td>"&Rs("IPaddress")&"</td>")
          Response.Write("<td>"&Rs("AddTime")&"</td>")
          Response.Write("<td><a href='Admin.asp?action=DelO&RID="&Rs("KeyID")&"'>删除</a></td>")
          Response.Write("</tr>")
          Rs.MoveNext
        Loop
        Response.Write("</table>")
    Else
        Response.Write("暂无任何信息!")
    End If
    Rs.Close
    Response.Write("<div style='width:600px; text-align:right; margin-top:30px;'><a href='Admin.asp?action=Logout'>退出登陆</a></div>")
  End Sub
  
  Sub DelO
    Dim conn,Str,Rs,RecordID
    Call CheckLogin  '验证是否登陆
    RecordID=Request.QueryString("RID")
    Set conn=Server.CreateObject("adodb.Connection")
    Str= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("DB/DataBase.mdb")
    conn.Open Str
   
    conn.execute("Delete * From [Login] Where KeyID="&RecordID)
    Response.Write("<script language=JavaScript>alert('删除成功!');location.href='Admin.asp?action=UserList';</script>")
  End Sub
  
  Sub Logout
    Session("MasterLogin")=""
    Session("MasterLogin")=Nothing
    Response.Write("退出成功!")
  End Sub
%>

那位大虾能帮我把里面的ASP账号密码代码取出!!
其余的不要!!谢谢了!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 17:22 , Processed in 0.205349 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表