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

    <!--#include file="conn.asp"-->
<!--#include file="md5code.asp"-->
<META content="免费主页、免费空间、个人主页、域名注册、虚拟主机、企业邮局、主机租用、主机托管、网站推广、智能建站、建站服务、网站建设、通用网址、网络实名、域名抢注、国际域名、国内域名" name=keywords>
<title>虫影设计网-个人主页基地|免费空间|免费主页|网页制作|网站建设|平面设计|域名注册|网站推广|网站维护...</title>
<% '====================判断管理员是否有登陆=====================
if session("name")="" and session("pass")="" then
response.write"<SCRIPT language=JavaScript>alert('请您登陆后,再进入这个页面!');"
response.write"this.location.href='index.asp';</SCRIPT>"'转向到index.asp
end if 
%>
<%'删除
if request("action")="del" then'当action的值等于del的时候执行下面的程序
set rs=server.createobject("adodb.recordset")'利用Server内置对象创建一个记录集
id=Request.QueryString("id")'用id取值字符串中传的id
sql="select * from admin where id="&id'用sql定义SQL语句,这里的*是通配符,表示所有,而Where有点像我们汉语中的“当”,整句话的意思是选择所有来自表名为admin里的字段,它的条件是当数据库中的id字段是字串所传来的id
rs.open sql,conn,2,3'用刚才创建的名为rs的记录集打开数据库,设置属性为修改数据(1,1为只读数据,1,3为插入数据,2,3是修改数据)
rs.delete'执行删除
rs.update'更新数据库
end if
%>

<%'搜索条
if request("action")="ss" then
shenfen=request.form("shenfen") 
response.cookies("shenfen")=rs("shenfen")'定义全局变量"shenfen"
session("shenfen")=shenfen
response.redirect "sousuo.asp"
end if 
%>
<html>
<style type="text/css">
<!--
.unnamed1 {
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.unnamed1 {
	height: 10.px;
	height: 15px;
	border: none;
	background-color: #F2F8FF;
	width: 50px;
}
.unnamed11 {	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: dashed;
	border-left-style: none;
	border-top-color: #000000;
	border-right-color: #000000;
	border-bottom-color: #000000;
	border-left-color: #000000;
	width: 150px;
	background-color: #f2f8ff;
}
.unnamed2 {	height: 1px;
	width: 1px;
	clear: both;
	border: none;
}
.style1 {color: #7B0045}
.mytext {FONT-SIZE: 12px
}
.unnamed12 {height: 10.px;
	height: 20px;
}
.unnamed21 {
	height: 1px;
	width: 1px;
	border: none;
}
.unnamed3 {
	border: 1px dashed #000000;
}
body {
	margin-top: 0px;
}
.style8 {font-size: 12px;
	color: #000000;
}
.style6 {font-size: 12px;
	color: #FFFFFF;
}
.style6 {font-size: 12px;
	color: #FFFFFF;
}
.style7 {font-size: 12px;
	color: #FFFFFF;
}
.style7 {font-size: 12px;
	color: #FFFFFF;
}
.style8 {font-size: 12px;
	color: #FFFFFF;
}
.style8 {font-size: 12px;
	color: #FFFFFF;
}
.unnamed22 {border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: dashed;
	border-left-style: none;
	border-top-color: #99CCFF;
	border-right-color: #99CCFF;
	border-bottom-color: #99CCFF;
	border-left-color: #99CCFF;
}
.style10 {color: #999999}
-->
</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="770" height="383"  border="0" align="center" cellpadding="0" cellspacing="3">
  <tr>
    <td>&nbsp;</td>
    <td><form name="form2" method="post" action="sousuo.asp?action=ss">
        管理搜索
            <input name="shenfen" type="text" id="shenfen">
        <input type="submit" name="Submit" value="显示">
    </form></td>
  </tr>
  <tr>
    <td width="174" height="370" valign="top"><table width="88%" height="14"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
      <tr>
        <td bgcolor="#F2F8FF"><div align="center">会员信息</div></td>
      </tr>
    </table>
      <table width="80%" height="2"  border="0" cellpadding="0" cellspacing="0" id="sadfsdfs">
        <tr>
          <td></td>
        </tr>
      </table>
      <table width="88%" height="71"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
      <tr>
        <td width="208" height="0" bgcolor="#f2f8ff"><form name="form1" method="post" action="index.asp?action=yes" style="margin-bottom:0;margin-top:0">
            <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="3">
              <tr>
                <td width="40%"><font color="#0000FF" size="2">用户名:</font></td>
                <td width="60%"><input name="admin" type="text" class="unnamed1" id="admin" value="<%=Request.cookies("name")%>" size="8"></td>
              </tr>
              <tr>
                <td><font color="#0000FF" size="2">身 份:</font></td>
                <td><input name="password" type="text" class="unnamed1" id="password" value="管理员" size="8">
                  <input name="zt" type="text" class="unnamed2" id="zt" value="no"></td>
              </tr>
              <tr>
                <td height="13" colspan="2">
                    <div align="center">  <a href="tj.asp">添加管理员</a> <span class="style1"><a style="font-size:12" href="exit.asp">退出登陆</a></span> </div></td>
              </tr>
            </table>
        </form></td>
      </tr>
    </table>
      <SPAN class=mytext></SPAN></td>
    <td width="596" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><span class="style10">注:搜索条可以搜索身份,姓名,性别,状态四项数据</span></td>
      </tr>
    </table>
    <table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
      <tr>
        <td bgcolor="#F2F8FF"><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="13%"><div align="center"><a style="font-size:14px ">身份</a></div></td>
            <td width="15%"><div align="center"><a style="font-size:14px ">姓名</a></div></td>
            <td width="7%"><div align="center"><a style="font-size:14px ">性别</a></div></td>
            <td width="16%"><div align="center"><a style="font-size:14px ">加入日期</a></div></td>
            <td width="13%">&nbsp;</td>
            <td width="10%"><a style="font-size:14px ">状态</a></td>
            <td width="10%">&nbsp;</td>
            <td width="16%">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
    </table>      
      <table width="80%" height="2"  border="0" cellpadding="0" cellspacing="0" id="dfgdfgds">
        <tr>
          <td></td>
        </tr>
      </table>
      <%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from admin order by id desc"
rs.open sql,conn,1,1
page=request.querystring("page")
  if page="" then
  page=1
  end if 
  pages = 25'每页显示记录数
 
  rs.pagesize = pages 
  maxpagecount=rs.pagecount
  r=clng(rs.RecordCount)'记录总数
  rs.absolutepage = page '当前页数

  pagestart=page-3       '导航页码
  pageend=page+3
  if pagestart<1 then
     pagestart=1
  end if
  if pageend>maxpagecount then
     pageend=maxpagecount
  end if                 '导航页码

%>
      <table width="100%" height="25" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
        <tr>
          <td bgcolor="#f2f8ff"><table width="80%" height="6"  border="0" cellpadding="0" cellspacing="0" id="1231232">
              <tr>
                <td></td>
              </tr>
            </table>
              <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <%row_count=1
						i=0
						do while not rs.eof and rcount < rs.pagesize 
						%>
                  <td width="496"><span class="mytext"> </span>
                      <div align="center">
                        <div align="center"> </div>
                      </div>
                      <div align="right">
                        <table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#99CCFF">
                          <tr>
                            <td width="17%" bgcolor="#F2F8FF"><div align="center"><SPAN class=mytext><%=rs("shenfen")%></SPAN></div></td>
                            <td width="16%" bgcolor="#F2F8FF"><div align="left"><span class="mytext"><%=rs("admin")%></span></div></td>
                            <td width="9%" bgcolor="#F2F8FF" class="mytext"><div align="center"><%=rs("sex")%></div></td>
                            <td width="18%" bgcolor="#F2F8FF" class="mytext"><div align="center"><%=rs("date")%></div></td>
                            <td width="16%" bgcolor="#F2F8FF" class="mytext">&nbsp;</td>
                            <td width="11%" bgcolor="#F2F8FF"><%if rs("zt")="停止" then%>
                              <a style="font-size:13;color:#FF0000" href="gl.asp?id=<%=rs("id")%>&action=no">停止</a>
                              <%end if%>
                              <%if rs("zt")="正常" then%>
                              <a style="font-size:13;color:#0000CC" href="gl.asp?id=<%=rs("id")%>&action=yes">正常</a>
                              <%end if%></td>
                            <td width="13%" bgcolor="#F2F8FF"><a href="gl.asp?action=bj&id=<%=rs("id")%>#123" style="font-size:14px ">操作</a></td>
                          </tr>
                        </table>
                        <table width="50%" height="4"  border="0" cellpadding="0" cellspacing="0" id="32131">
                          <tr>
                            <td></td>
                          </tr>
                        </table>
                        <span class="mytext"></span> </div></td>
                  <td width="92"><a href="gl.asp?action=del&id=<%=rs("id")%>" style="font-size:14px " onClick="return confirm('是否确定删除本会员?');" >删除</a></td>
                  <%if row_count mod 1 =0 then%>
                </tr>
                <tr> </tr>
                <tr>
                  <%end if%>
                  <%
							 rs.movenext
  rcount=rcount+1
  i=i+1
  row_count=row_count+1 
  loop
  set  rs=nothing
%>
                </tr>
              </table>
              <table width="80%" height="2"  border="0" cellpadding="0" cellspacing="0" id="123123">
                <tr>
                  <td></td>
                </tr>
            </table></td>
        </tr>
      </table>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="8"><img src="../images/d.gif" width="1" height="1"></td>
        </tr>
      </table>
      <table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
        <tr>
          <td bgcolor="#F2F8FF"><div align="right"> <span class="mytext"></span>
                  <% response.write "<a href='qbmp.asp?page=1'><IMG alt='' src='img/First.gif' border=0></a>"%>
                  <span class="style8">
                  <% for i=pagestart to pageend
            if i=0 then 
            i=1
            end if
            strurl="<a href='qbmp.asp?page="&i&"'><font size=2 color=000000>["&i&"]</font></a>"
response.write " "
response.write strurl
response.write " "
response.write " "
next

%>
                  <% response.write "<a href='qbmp.asp?page="&maxpagecount&"'><img src='img/Last.gif' width='9' height='8' border=0></a>"%>
                  <span class="style6"> </span><span class="style7">  
                  <%response.write "<font size=2 color=000000>"&page&"/"&maxpagecount&"页</font>"%>
              </span></span></div></td>
        </tr>
      </table>
      <p>
<%
if request("action")="bj" then'当action的值等于bj的时候执行下面的程序
set rs=server.createobject("adodb.recordset")'利用Server内置对象创建一个记录集
sql="select * from admin where id="&request("id")'用sql定义SQL语句,这里的*是通配符,表示所有,而Where有点像我们汉语中的“当”,整句话的意思是选择所有来自表名为admin里的字段,它的条件是当数据库中的id字段是字串所传来的id
rs.open sql,conn,1,1'用刚才创建的名为rs的记录集打开数据库,设置属性为只读(1,1为数据,1,3为插入数据,2,3是修改数据)
oskey=rs("shenfen")
%>
      </p>
        <form name="form1" method="post" action="gl.asp?action=xg&id=<%=rs("id")%>">
          <table width="80%" height="4"  border="0" cellpadding="0" cellspacing="0" id="dsavsdv">
            <tr>
              <td></td>
            </tr>
          </table>
          <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
            <tr>
              <td><table width="100%" height="139" border="0" align="center" cellpadding="0" cellspacing="5" bgcolor="#F2F8FF">
                  <tr bgcolor="#f2f8ff">
                    <td colspan="2"><div align="center"><a name="123"></a></div></td>
                  </tr>
                  <tr bgcolor="#f2f8ff">
                    <td width="90">用户名:</td>
                    <td width="410">                  <SPAN class=mytext><%=rs("admin")%></SPAN></td>
                  </tr>
                  <tr bgcolor="#f2f8ff">
                    <td>身 份:</td>
                    <td>
                      <span class="forumRow">
                      <select name="shenfen" id="shenfen" style="font-size:9pt">
                        <option value=普通会员<%if oskey="普通会员" then%> selected<%end if%>>普通会员</option>
                        <option value=水晶会员<%if oskey="水晶会员" then%> selected<%end if%>>水晶会员</option>
                        <option value=钻石会员<%if oskey="钻石会员" then%> selected<%end if%>>钻石会员</option>
                      </select>
                    </span> </td>
                  </tr>
                  <tr bgcolor="#f2f8ff">
                    <td>性 别:</td>
                    <td><SPAN class=mytext><%=rs("sex")%></SPAN></td>
                  </tr>
                  <tr bgcolor="#f2f8ff">
                    <td>密 码:</td>
                    <td><a href="gl.asp?action=mima&id=<%=rs("id")%>">密码设为空</a>
                        <input name="password2" class="unnamed21" id="password2" value="123456"></td>
                  </tr>
                  <tr bgcolor="#f2f8ff">
                    <td>Q  Q:</td>
                    <td>                  <SPAN class=mytext><%=rs("qq")%></SPAN></td>
                  </tr>
                  <tr bgcolor="#f2f8ff">
                    <td>邮 编:</td>
                    <td>                  <SPAN class=mytext><%=rs("youbian")%></SPAN></td>
                  </tr>
                  <tr bgcolor="#f2f8ff">
                    <td>住 址:</td>
                    <td>                  <SPAN class=mytext><%=rs("dizhi")%></SPAN></td>
                  </tr>
                  <tr bgcolor="#f2f8ff">
                    <td>联系电话:</td>
                    <td>                  <SPAN class=mytext><%=rs("dianhua")%></SPAN></td>
                  </tr>
                  <tr bgcolor="#f2f8ff">
                    <td>E-mail:</td>
                    <td>                  <SPAN class=mytext><%=rs("mail")%></SPAN></td>
                  </tr>
                  <tr bgcolor="#f2f8ff">
                    <td>个性签名:</td>
                    <td>                    <table width="94%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><SPAN class=mytext><%=rs("qianming")%></SPAN></td>
                      </tr>
                      </table></td>
                </tr>
                  <tr bgcolor="#f2f8ff">
                    <td>个人说明:</td>
                    <td>  <textarea name="textarea" cols="50" rows="8"><%=rs("textarea")%></textarea></td>
                </tr>
                  <tr bgcolor="#f2f8ff">
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr bgcolor="#f2f8ff">
                    <td colspan="2"><div align="center">
                        <input type="submit" name="Submit" value="修改">
                    
                  <input type="reset" name="Submit" value="重填">
                    </div></td>
                  </tr>
              </table></td>
            </tr>
          </table>
          <input name="active" type="hidden" id="active" value="yes">
        </form>
		<%end if%>
<%'修改
if request("action")="xg" then
set rs=server.createobject("adodb.recordset")
sql="select * from admin where id="&request("id")
rs.open sql,conn,1,3
rs("shenfen")=request.form("shenfen")
rs.update
rs.close
set rs=nothing
response.redirect "gl.asp"
end if
%>
<%'密码
if request("action")="mima" then
set rs=server.createobject("adodb.recordset")
sql="select * from admin where id="&request("id")
rs.open sql,conn,1,3

rs("password")=md5(request.form("password2"))

rs.update
rs.close
set rs=nothing
response.redirect "gl.asp"
end if
%>
<% '正常
if request.querystring("action")="no" then
set rs=server.createobject("adodb.recordset")
id=request.querystring("id")
sql="select * from admin where id="&id
rs.open sql,conn,1,3
rs("zt")="正常"
rs("date")=date()
rs.update
rs.close
set rs=nothing
response.redirect("gl.asp")
end if
'停止
if request.querystring("action")="yes" then
set rs=server.createobject("adodb.recordset")
id=request.querystring("id")
sql="select * from admin where id="&id
rs.open sql,conn,1,3
rs("zt")="停止"
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect("gl.asp")
end if
%>
  
</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>