www.gusucode.com > 蓝影会员系统(淡蓝色经典)源码程序 > gldl.asp

    <!--#include file="conn.asp" -->
<!--#include file="md5code.asp" -->
<META content="免费主页、免费空间、个人主页、域名注册、虚拟主机、企业邮局、主机租用、主机托管、网站推广、智能建站、建站服务、网站建设、通用网址、网络实名、域名抢注、国际域名、国内域名" name=keywords>
<title>虫影设计网-个人主页基地|免费空间|免费主页|网页制作|网站建设|平面设计|域名注册|网站推广|网站维护...</title>

<%
if request("action")="yes" then
name=request.form("name") 
pass=md5(request.form("pass"))'定义admin的值是表单传过来的用户名域名称admin
if name="" or pass="" then '这句的意思是假如用户名和密码没有输入的话那么执行下一句
response.Write("<script language=javascript>alert('请填写完整!');history.go(-1)</script>") '用javascript脚本提示用户
end if '结束if语句
sql="SELECT * FROM gl WHERE name='" & Replace(name,"'","''") & "' and pass='" & Replace(pass,"'","''") & "'" 
set rs=conn.execute(sql) '设定记录集rs,用conn执行SQL语句
if rs.eof or rs.bof then '当没有符合筛选结果时,则执行下面的句子
response.write "<script language=javascript>"
response.write "alert('用户(密码)不对!');"
response.write "javascript:history.go(-1);"
response.write "</script>" '用javascript脚本提示用户
else '如果符合条件的时候
response.cookies("name")=rs("name")'rs("name")中的name也是数据库里面的字段
'=================name这个是数据库里面的字段==============
session("name")=name
'========name这个是数据库里面的字段==============
session("pass")=pass

response.redirect "gl.asp" '转向到gl.asp,进入管理页
end if '结束if语句
end if
%>
<html>
<style type="text/css">
<!--
.unnamed1 {
	height: 15px;
	width: 150px;
	border: 1px solid #000000;
}
-->
</style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-top: 0px;
}
-->
</style></head>

<body background=img/back.jpg>
<table width="770"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><!--#include file="tou.asp" --></td>
  </tr>
</table>
<table width="80%" height="2"  border="0" cellpadding="0" cellspacing="0" id="sdfsfdsf">
  <tr>
    <td></td>
  </tr>
</table>

<table width="770" height="193"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><form name="form1" method="post" action="gldl.asp?action=yes">
      <table width="80%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><div align="center"><strong>管理员登陆</strong></div></td>
        </tr>
      </table>
      <table width="80%" height="2"  border="0" cellpadding="0" cellspacing="0" id="1231231231">
        <tr>
          <td></td>
        </tr>
      </table>
      <table width="80%"  border="0" align="center" cellpadding="0" cellspacing="2">
        <tr>
          <td width="37%">&nbsp;</td>
          <td width="10%">管理员:</td>
          <td width="53%"><input name="name" type="text" class="unnamed1" id="name"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>密 码:</td>
          <td><input name="pass" type="password" class="unnamed1" id="pass"></td>
        </tr>
        <tr>
          <td colspan="3"><div align="center">
              <input type="submit" name="Submit" value="登陆">      
               <input type="reset" name="Submit" value="重置">
          </div></td>
        </tr>
      </table>
      <table width="80%" height="2"  border="0" cellpadding="0" cellspacing="0" id="sdfasdfasfs">
        <tr>
          <td></td>
        </tr>
      </table>
    </form>    </td>
  </tr>
</table>
<br>
<table width="770"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><!--#include file="down.asp" --></td>
  </tr>
</table>
</body>
</html>