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

📄 xinxi.asp

📁 自己做的毕业设计
💻 ASP
字号:
<!--#include file=conn.asp-->

<meta http-equiv="Content-Language" content="zh-cn">
<link href="inc_style.css" rel="stylesheet" type="text/css">
<script>
function loadThreadFollow(t_id,b_id){
	var targetImg =eval("document.all.followImg" + t_id);
	var targetDiv =eval("document.all.follow" + t_id);
	
	if ("object"==typeof(targetImg)){
		if (targetDiv.style.display!='block'){
			targetDiv.style.display="block";
			
		}else{
			targetDiv.style.display="none";
		}
	}
}
</script>
<script language="javascript">
function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'chkall' )
       e.checked = form.chkall.checked;
    }
  }
//-->
    </SCRIPT>
<style type="text/css">
<!--
body {
	background-color: #E7EEF5;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style><div align="center">
 <table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">
<tr bgcolor="#B6EBC4">
<td width="88%" height="20" bgcolor="#E8EEF4" style="margin-top: 0; margin-bottom: 0">
    <FORM name=sou1 action="" method=POST style="line-height: 100%; margin-top: 0; margin-bottom: 0">
    <p align="center">
      
      标题
        <input name="tp" type="radio" id="radio" value="1" checked>
      用户
      <input type="radio" name="tp" id="radio2" value="2">  
      &nbsp;&nbsp;&nbsp; 关键字:
      <input name="key" type="text" id="key" size="20">
    <input type="submit" value="查找" name="B1">
    </form>    </td>
    </tr>
</table>
</div>
<div align="center">
  <center>
 <table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">

<FORM name=thisForm action="zhuti_del2.asp" method=POST style="line-height: 100%; margin-top: 0; margin-bottom: 0">
<%
dim rs,sql,k,tp,rs1
dim ThisPage,Pagesize,Allrecord,Allpage
if request("page")="" then
  ThisPage=1		
else
  ThisPage=request("page")
end if
tp=request("tp")
set rs = Server.CreateObject("ADODB.RecordSet")
set rs1 = Server.CreateObject("ADODB.RecordSet")
Select Case tp
Case "1"
sql = "select * from [zhuti] where title like '%"&trim(request("key"))&"%' order by id desc"
Case "2"
sql = "select * from [zhuti] where name like '%"&trim(request("key"))&"%' order by id desc"
Case Else
sql="select * from [zhuti] order by id desc"
End Select

rs.open sql,conn,1,1
if rs.eof then
response.write "<li>还没有用户数据!"
response.end
end if
rs.Pagesize=10
Pagesize=rs.Pagesize
Allrecord=rs.Recordcount
Allpage=rs.Pagecount
if ThisPage<1 then                           
ThisPage=1
end if
On Error Resume Next
rs.move (ThisPage-1)*Pagesize
k=0
%>
<tr bgcolor="#B6EBC4">
    <td width="6%" height="30" align="center" bgcolor="#C5D5E4" >
    <p align="center">编号</td>
    <td width="32%" height="30" align="center" bgcolor="#C5D5E4" >
    <p align="center">标题</td>
    <td width="11%" height="30" align="center" bgcolor="#C5D5E4" >
    <p align="center">发贴者</td>
    <td width="7%" height="30" align="center" bgcolor="#C5D5E4" >
    <p align="center">精华</td>
    <td width="6%" height="30" align="center" bgcolor="#C5D5E4" >
      <p align="center">置顶</td>
    <td width="10%" align="center" bgcolor="#C5D5E4">发布时间</td>
    <td width="7%" height="30" align="center" bgcolor="#C5D5E4">
    <p align="center">点击数</td>
    <td width="6%" height="30" align="center" bgcolor="#C5D5E4" >
    <p align="center">回复数</td>
    <td width="8%" height="30" align="center" bgcolor="#C5D5E4" >
    操作</td>
    <td width="7%" height="30" align="center" bgcolor="#C5D5E4" >
    选择</td>
  </tr>
  <%
  dim id
  do while not rs.eof
  id=rs("id")
  %>
<tr onMouseOver="this.style.backgroundColor='#EFE8D6';return true;" onMouseOut="this.style.backgroundColor='#FFFFFF';">
    <td width="6%" height="25" align="center" bgcolor="#E3EBF2" >
    <p align="center"><%=k+1%></td>
    <td width="32%" height="25" align="center" bgcolor="#E3EBF2" >
      <p align="center"><%=rs("title")%></td>
    <td width="11%" height="25" align="center" bgcolor="#E3EBF2" >
    <p align="center"><%=rs("name")%></td>
    <td width="7%" height="25" align="center" bgcolor="#E3EBF2" >
    <p align="center"><%if rs("good")=true then
	response.Write("是")
	else
	response.Write("否")
	end if%></td>
    <td width="6%" height="25" align="center" bgcolor="#E3EBF2" >
    <p align="center"><%if rs("tops")=true then
	response.Write("是")
	else
	response.Write("否")
	end if%></td>
    <td width="10%" align="center" bgcolor="#E3EBF2" ><%=datevalue(rs("time"))%></td>
    <td width="7%" height="25" align="center" bgcolor="#E3EBF2" >
    <p align="center"><%=rs("hits")%>    </td>
    <td width="6%" height="25" align="center" bgcolor="#E3EBF2" >
    <p align="center"><%=rs("recount")%></td>
    <td width="8%" height="25" align="center" bgcolor="#E3EBF2" >
    <font color="#FF0000">
    <span id="followImg<%=k%>" style="CURSOR: hand" onClick="loadThreadFollow(<%=k%>,5)">
    面版</span></font></td>
    <td width="7%" height="25" align="center" bgcolor="#E3EBF2" >
          <input type="checkbox" name="selectedid" value="<%=trim(rs("id"))%>"></td>
  </tr>
  <tr style="display:none" id="follow<%=k%>">
    <td height="25" colspan="10" bgcolor="#E3EBF2">
   <table width="98%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">
<tr bgcolor="#B6EBC4">

        <td align="center" bgcolor="#C5D5E4"><p align="center">
          <%if rs("good")<>true then%>
          <a href="zhuti_jh.asp?id=<%=trim(rs("id"))%>"><font color="#0000FF">精华</font></a>
          <%else%>
          <a href="zhuti_jh2.asp?id=<%=trim(rs("id"))%>"><font color="#0000FF">取消精华</font></a>
          <%end if%></td>
        <td align="center" bgcolor="#C5D5E4"><%if rs("tops")<>true then%>
          <a href="zhuti_zd.asp?id=<%=trim(rs("id"))%>"><font color="#0000FF">置顶</font></a>
          <%else%>
          <a href="zhuti_zd2.asp?id=<%=trim(rs("id"))%>"><font color="#0000FF">取消置顶</font></a>
          <%end if%></td>
        <td align="center" bgcolor="#C5D5E4"><a href="zhuti_del.asp?id=<%=trim(rs("id"))%>"><font color="#0000FF">直接删除</font></a></td>
        </tr>
    </table>    </td>
  </tr>
    <%
    k=k+1
    rs.movenext
    if k>=Pagesize then exit do
	loop
	rs.close
    set rs=nothing
    set rs1=nothing
    closedb
	%>
  <tr>
    <td height="30" colspan="10" bgcolor="#E3EBF2">
         <table width="98%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">
<tr bgcolor="#B6EBC4">
<td height="31" colspan="4" align="center" bgcolor="#DBE4EE">
<p align="center">
  <INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>选中所有记录&nbsp;&nbsp;
  <input type="submit" value=" 删  除 " name="B1"></td>
</tr>
<tr> 
<td height="17" width="151" align="center">
共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录</td>
<td height="17" width="181" align="center">
共 <font color="#CC5200"><%=Allpage%></font> 页</td>
<td height="17" width="237" align="center">
现在是第 
                <font color="#CC5200"><%=ThisPage%></font> 页</td>
<td height="17" width="200" align="center">
<%
if ThisPage<2 then     
response.write "<font color=""#808080"">首页</font>&nbsp;"
response.write "<font color=""#808080"">上一页</font>&nbsp;"     
else     
response.write "<a href=?page=1&t1="&trim(request("t1"))&">首页</a>&nbsp;"
response.write "<a href=?page="&ThisPage-1&"&t1="&trim(request("t1"))&">上一页</a>&nbsp;"     
end if
if Allpage-ThisPage<1 then     
response.write "<font color=""#808080"">下一页</font>&nbsp;"
response.write "<font color=""#808080"">尾页</font>&nbsp;"  
else     
response.write "<a href=?page="&(ThisPage+1)&"&t1="&trim(request("t1"))&">下一页</a>&nbsp;"   
response.write "<a href=?page="&Allpage&"&t1="&trim(request("t1"))&">尾页</a>&nbsp;"     
end if
%></td>
</tr>
          </table>    </td>
  </tr>
  </form>
</table>
  </center>
</div>

⌨️ 快捷键说明

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