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

📄 liuyan.asp

📁 一个免费的绿叶网上书店请大家提宝贵意见 站长的帐号是   用户名:雨丁香  密码:200505 副站长帐号是   用户名: wangli 密码:197207
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="base.asp"-->
<%
if session("username")="" then Response.Redirect "login.htm"

if session("adminflag")>2 and session("class")<>"留言管理"  then Call PrintMsg(NotAdmin)
Response.Buffer=true
Response.Expires=0
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="JavaScript">
function confirmDel(id){

if ( confirm("你确定要删除吗?")) {
window.location.href = "proddel.asp?action=questbook&id="+id
}
}
</script>
</head>

<body>

<% 
     
	 if request.form("search")<>"" then
           if request("myselect")=1 then
        	  sql="select * from liuyan where username like '%" & request.form("search") & "%'"
           elseif request("myselect")=2 then
              sql="select * from liuyan where title like '%" & request.form("search") & "%'"           
		   end if                             
		else
			sql="select * from liuyan"
			end if
			rs.open sql,conn,1,3 %>
			<!--#include file="../include/pages.inc"-->
			<%if rs.EOF then
			response.write "<script language=JavaScript>" & chr(13) & "alert('数据库中暂无资料!');"&"history.back()" & "</script>"			
			else%>
	 
<div align="center"> 
  <h3><font color="#FF0000"><strong>网上书店留言管理 </strong></font></h3>
  
  <table width="641" border="2" cellpadding="5" bordercolor="#3300FF">
    <tr bgcolor="#3399FF"> 
      <td width="64"><div align="center">留言人</div></td>
      <td width="165"><div align="center">标题</div></td>
      <td width="85"><div align="center">Email</div></td>
      <td width="63"><div align="center">删除</div></td>
    </tr>
	 <% for i=1 to rs.pagesize
     if rs.eof then exit for
    %>
    <tr> 
      <td><div align="center"><%=rs("username")%></div></td>
      <td><div align="center"><a href="liulist.asp?id=<%=rs("id")%>"><%=rs("title")%></a></div></td>      
      <td><div align="center"><% if rs("email")="" then %>网友没填写<% else  %><%=rs("email")%><% end if %></div></td>
      <td><div align="center"><a href='javascript:confirmDel(<%=rs("id")%>)'>删除</a></div></td>
    </tr>
	<% rs.movenext
	next %>
  </table>
  <% call ShowPageNavigator(pageno,"liuyan.asp")%> <% rs.close %>
  <form name="form1" method="post" action="liuyan.asp">
    <table width="586" border="2" align="center" bordercolor="#3333CC">
      <tr>
        <td width="109" bgcolor="#3399FF"><div align="center">留言搜索</div></td>
        <td width="123" bgcolor="#3399FF"><select name="myselect" id="myselect">
            <option selected>您还没选择</option>
            <option value="1">姓名</option>
            <option value="2">留言标题</option>
          </select></td>
        <td width="332" bgcolor="#3399FF">请输入关键字
          <input name="search" type="text" id="search" size="16">
          <input type="submit" name="Submit" value="提交"></td>
      </tr>
    </table>
  </form>
  <% end if %>
  <p>&nbsp;</p>
  <p><strong><font color="#FF0000"></font></strong></p>
</div>
</body>
</html>

⌨️ 快捷键说明

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