⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.asp

📁 紫碟轩留言本V2.0的简单原代码请 查阅
💻 ASP
字号:
<!--#include file="md5.asp" -->
<!--#include file="conn.asp" -->
<!--#include file="sub.asp" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=webname%></title>
</head>

<body>
<%
if request.QueryString("act")="login" then
a_name=request.Form("a_name")
a_pass=md5(md5(request.Form("a_pass")))
set rsa=server.createobject("adodb.recordset")
exec3="select * from zdu where u_name='"&a_name&"' and u_pass='"&a_pass&"'"
rsa.open exec3,conn,1,1
    if rsa.recordcount=0 then
	session.abandon   
	response.write "<script> alert('帐号或密码不正确!!\n\n 请注意大小写');</script>"
    elseif rsa.recordcount=1 then
       session("user")=rsa("u_name")
	   session("zdqx")=rsa("u_qx")
	   session.Timeout=30
       response.Redirect("index.asp")
    end if 
rsa.close
set rsa=nothing
end if
if request.QueryString("act")="out" then
session.Abandon()
response.Redirect("index.asp")
end if%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <!--页面头部-->
  <tr>
    <td height="30">
    <!--#include file="top.asp" -->    </td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <!--公告内容-->
  <tr>
    <td width="100%" height="20" valign="middle"></td>
  </tr>
</table>
<table width="100%" border="0">
  <tr>
    <td height="20" align="right" valign="bottom" bgcolor="#FFCC99">欢迎你,<font color="#FF0000"><%if session("user")="" then response.Write("游客") else response.Write(session("user")) end if%>
    </font>:&nbsp;&nbsp; &nbsp;&nbsp; <% if session("user")="" then%><a href="login.asp">登陆</a> | <a href="reg.asp" target="_blank">注册</a> | <%else%><a href="useredit.asp?user=<%=session("user")%>">资料修改</a> | <%end if%><a href="search.asp">搜索</a> | <a href="user.asp">查看用户</a> | 精华区 |  <a href="search.asp?sl=1&s_id=<%if session("user")<>"" then
	response.Write(session("user"))
	else 
	response.Write("游客") end if%>" target="_blank">个人文集</a> | <a href="help.asp" target="_blank">帮助</a> |&nbsp;&nbsp; </td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <!--快速签写留言-->
  <% if session("user")="" then%>
  <tr>
    <td height="40"><form id="form1" name="form1" method="post" action="index.asp?act=login">
      <br />
     &nbsp; 快速登陆&nbsp; 账号:
      <input name="a_name" type="text" id="a_name" value="" size="20" />
      &nbsp; 密码:
      <input name="a_pass" type="password" id="a_pass" value="" size="20" />
      <input name="Submit2" type="submit"  value="登陆"style="BACKGROUND-COLOR:   #2071a0;   BORDER-BOTTOM:   1px   double;   BORDER-LEFT:   1px   double;   BORDER-RIGHT:   1px   double;   BORDER-TOP:   1px   double;   COLOR:   #eeeeee;   TEXT-ALIGN:   center" onMouseOver="this.style.color='#ffff00'"onmouseout="this.style.color='#eeeeee'" />
    </form></td>
  </tr>
  <%else%>
  <tr>
    <td height="40"><form id="form1" name="form1" method="post" action="?act=out">
      <br />
      &nbsp;&nbsp;&nbsp; 账号:<font color="#FF0000"><%=session("user")%></font> &nbsp;&nbsp;
<% if session("zdqx")="user" then response.Write("等级:会员&nbsp;&nbsp;你可以执行以下操作:发表留言、回复留言。")
if session("zdqx")="admin" then response.Write("等级:管理员&nbsp;&nbsp;你可以执行以下操作:审核、回复、屏蔽、精华、置定。")
if session("zdqx")="alladmin" then response.Write("等级:超级管理员 &nbsp;&nbsp;<a href='admin.asp' target='_blank'><font color='#FF0000'>登陆后台</font></a>")%>
      <input name="Submit2" type="submit"  value="注销"style="BACKGROUND-COLOR:   #2071a0;   BORDER-BOTTOM:   1px   double;   BORDER-LEFT:   1px   double;   BORDER-RIGHT:   1px   double;   BORDER-TOP:   1px   double;   COLOR:   #eeeeee;   TEXT-ALIGN:   center" onMouseOver="this.style.color='#ffff00'"onmouseout="this.style.color='#eeeeee'" />
    </form></td>
  </tr>
  <%end if%>
</table>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
  <!--签写留言,分类-->
<%
set rs1=server.createobject("adodb.recordset")
exec3="select * from zdfl "
rs1.open exec3,conn,1,1
%>
  <tr valign="middle">
    <td width="10%" align="right" valign="bottom" bgcolor="#FFCC99"><span class="putongziti">分类:</span></td>
    <td width="80%" valign="bottom" bgcolor="#FFCC99"><span class="putongziti">&nbsp; |
        <% do while not rs1.eof%>
        &nbsp; <a href="search.asp?sl=4&fl=<%=rs1("f_id")%>"><%=rs1("f_name")%></a>&nbsp; |
        <%rs1.movenext
	loop
	rs1.close
set rs1=nothing%>
    </span></td>
    <td width="10%" align="right" bgcolor="#FFCC99" class="putongziti"><b><a href="add.asp"><font color="#FF0000">·签写留言</font></a></b></td>
  </tr>
</table>
<form action="admin_del.asp" method="post">
<table width="100%" align="center" cellpadding="0" cellspacing="1">
<%
set rsi=server.createobject("adodb.recordset")
exec1="select * from zdi where m_con=0 order by m_ding desc,m_uptime desc"
rsi.open exec1,conn,1,1
if not rsi.bof and not rsi.eof then
dim page
if request("page")="" then    
page=1  
else
page=cint(request("page"))      
end if
rsi.pagesize=webNum  '每页显示N条记录
rsi.absolutepage=page
dim i
i=rsi.pagesize
end if
 %>
  <!--循环留言-->
  <tr>
    <td width="100%" align="center"><table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" >
      <tr>
        <td height="15" colspan="5" align="left">&nbsp;</td>
      </tr>
      <tr bordercolor="#0099CC" bgcolor="#0099CC">
        <td width="10%" align="center" class="dhzi">留言分类</td>
        <td width="44%" align="center" bordercolor="#0099CC" bgcolor="#0099CC" class="dhzi">留言标题</td>
        <td width="18%" align="center" bordercolor="#0099CC" bgcolor="#0099CC" class="dhzi">作者</td>
        <td width="9%" align="center" class="dhzi">回复/点击</td>
        <td width="19%" align="center" class="dhzi">最后更新</td>
      </tr>
<%do while not rsi.eof and i>0
i=i-1
set rsfl=server.createobject("adodb.recordset")
exec2="select * from zdfl where f_id="&rsi("m_flid")
rsfl.open exec2,conn,1,1%>
      <tr bordercolor="#0099CC"   onMouseOver="this.bgColor='#E1F8FF';" onMouseOut="this.bgColor='#ffffff';">
        <td align="center" class="biaogebiankuang"><a href="search.asp?sl=4&fl=<%=rsfl("f_id")%>">[<%=rsfl("f_name")%>]</a></td>
        <td align="left" bordercolor="#0099CC"  class="biaogebiankuang" ><%if session("zdqx")="alladmin" then%><input name="del" type="checkbox" id="del" value="<%=rsi("m_id")%>" />
        <%end if%>
          <% if rsi("m_ding")="true" then response.Write("<font color='#FF0000'>[置定]</font>")
		 if rsi("m_jh")="true" then response.Write("<font color='#FF0000'>[精华]</font>")%><a href="view.asp?id=<%=rsi("m_id")%>"><%=rsi("m_bt")%></a><% if now-rsi("m_time")<0.5 then response.Write(" &nbsp;<img src='images/new.gif' width='30' height='10' />")%>          </td>
        <td align="center" bordercolor="#0099CC"  class="biaogebiankuang" ><%=rsi("m_user")%><br />
          <%=rsi("m_time")%></td>
        <td align="center" class="biaogebiankuang"><%=rsi("m_re")%>/<%=rsi("m_view")%></td>
        <td align="center" class="biaogebiankuang"><%=rsi("m_upuser")%><br />
          <%=rsi("m_uptime")%></td>
      </tr>
 <% rsi.movenext
 loop
%>     
    </table>
    <br />
    <% if rsi.recordcount=0 then response.Write("暂时没有留言")%></td>
  </tr>
  <tr>
    <td height="18" align="left" valign="middle" bgcolor="#FFCC99" class="putongziti">&nbsp;<a href="index.asp?page=1<%if request.QueryString("id")<>"" then response.Write("&id="&request.QueryString("id"))%>">首页</a>&nbsp;
        <%if not page="1" then%>
      <a href="index.asp?page=<%=page-1%><%if request.QueryString("id")<>"" then response.Write("&id="&request.QueryString("id"))%>">上一页</a>
      <%else response.Write("上一页") end if%>
      &nbsp;
        <%if not page=rsi.pagecount then%>
      <a href="index.asp?page=<%=page+1%><%if request.QueryString("id")<>"" then response.Write("&id="&request.QueryString("id"))%>">下一页</a>
      <% else response.Write("下一页") end if%>&nbsp; <a href="index.asp?page=<%=rsi.pagecount%><%if request.QueryString("id")<>"" then response.Write("&id="&request.QueryString("id"))%>">末页</a>&nbsp;&nbsp;    
    <font color="#FF0000"><%=page%></font>/<%=rsi.pagecount%><%if session("zdqx")="alladmin" then%>
    <input type="submit" name="Submit" style="BACKGROUND-COLOR:   #2071a0;   BORDER-BOTTOM:   1px   double;   BORDER-LEFT:   1px   double;   BORDER-RIGHT:   1px   double;   BORDER-TOP:   1px   double;   COLOR:   #eeeeee;   TEXT-ALIGN:   center" onMouseOver="this.style.color='#ffff00'"onmouseout="this.style.color='#eeeeee'" value="批量删除">
        <%end if%>
       &nbsp;&nbsp;&nbsp; 跳到
        <select name="select3" onChange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}">
		 <% for t = 0 to rsi.pagecount-1%>
          <option value="index.asp?page=<%=t+1%>" <%if t+1=page then%>selected<%end if%>><%=t+1%></option>
		  <%next%>
        </select>
        页</td>
  </tr>
</table>
</form>
<%rsi.close
set rsi=nothing
rsfl.close
set rsfl=nothing%>
<br />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <!--版权-->
  <tr>
    <td width="100%" height="20" > <%call ksmyboot%> </td>
  </tr>
</table>
<script language="JavaScript" type="text/javascript" src="http://c6.50bang.com/click.js?user_id=400648&l=101" charset="gb2312"></script>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -