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

📄 searchnews.asp

📁 企业信息化管理系统:针对的是一个计算机配件生产公司为背景实现的。
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="3;news.asp">
<title>搜索栏</title>

</head>
<style type="text/css">
<!--
table {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
	font-style: normal;
	text-align: center;
}
#title {
	font-size: 24px;
}
#di{
text-align:right;
font-family:Arial, Helvetica, sans-serif;
font-size:12px
}
-->
</style>
<body>
<!--#include file="../Connections/auto.asp" -->
<% 
   'response.Write(request.QueryString("text"))
   set RS = server.CreateObject("ADODB.Recordset")
   set RS1 = server.CreateObject("ADODB.Recordset")
   Sname = "SELECT Login.Part, Message.Name, Message.Position, tongzhi.biaoti, tongzhi.fbshj, tongzhi.neirong, tongzhi.id, tongzhi.faburen, tongzhi.cishu, tongzhi.quanxian FROM (Message INNER JOIN Login ON Message.ID=Login.ID) LEFT JOIN tongzhi ON Message.ID=tongzhi.faburen WHERE ((Login.ID)=tongzhi.faburen And (Message.ID)=tongzhi.faburen) And ((tongzhi.quanxian)='"&Session("Part")&"' Or (tongzhi.quanxian)='gongsi') And ((tongzhi.biaoti) like '%"&Request.QueryString("text")&"%' Or (tongzhi.neirong) like '%"&Request.QueryString("text")&"%' Or (tongzhi.fbshj) like '%"&Request.QueryString("text")&"%') ORDER BY tongzhi.fbshj;"
      
%>
<table width="580" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td colspan="5" background="../picture/title.jpg"><div id="title" >搜索通知结果</div></td>
  </tr>
  <tr>
    <td width="35">权限</td>
    <td width="247">标题</td>
    <td width="120">发布人</td>
    <td width="127">发布时间</td>
    <td width="39">浏览</td>
  </tr>
<%  
   RS.open Sname , CN,1,3
   if not RS.eof then
      RS.movefirst
      RS.pagesize=5
	  page=CLng(Request("page"))
	  if page<1 then page=1
	  RS.absolutepage=page
   for i=1 to RS.pagesize
    if RS.eof then
	   exit for
	end if
   if strcomp(RS("quanxian"),"gongsi")=0 then
     quanxian = "公司"
   else
     quanxian = "本部"
   end if
 %>  
  <!--#include file="../Connections/xuanze.asp" --> 
     <tr><td>
	 <%response.Write(quanxian)%>
    </td><td><a href="#" onClick="JavaScript:window.open('tongzhi/tongzhinr.asp?ID=<%=RS("ID") %>','','width=600,height=400')">
	<%response.Write(RS("biaoti"))%>
	 </a></td><td>
	 <%response.Write(part&position)%>&nbsp;&nbsp;<%response.write(RS("Name"))%>
	 </td><td>
	 <%response.Write(RS("fbshj"))%>
	 </td><td>
	 <%response.Write(RS("cishu"))%>次
	 </td></tr>
	 <% 
	  if not RS.eof then
	   RS.movenext
	   else 
	     exit for
	  end if
   next
   'RS.close
%>
  <tr>
    <th height="21" colspan="5" background="../picture/title1.jpg">
    <div id="di">
	<% if page<>1 then %><a href=<%=path%>?page=1 >第一页</a>
			<a href=<%=path%>?page=<%=(page-1)%>>上一页</a> 
			<%end if 
			if page<>RS.pagecount then %>
   			<a href=<%=path%>?page=<%=(page+1)%> >下一页</a> 
			<a href=<%=path%>?page=<%=RS.pagecount%> >最后一页</a> 
			<%end if %>
	</div></th>
  </tr>
<%
  else 
    response.write("<tr><td colspan='5'>没有通知</td></tr>")
	RS.close
  end if
%>
</table> 
<br>
<br>

<table width="580" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <th colspan="5" background="../picture/title.jpg"><div id="title">搜索新闻结果</div></th>
  </tr>
  <tr>
    <td width="35">推荐</td>
    <td width="248">标题</td>
    <td width="121">发布人</td>
    <td width="125">发布时间</td>
    <td width="39">浏览</td>
  </tr>
<%
   Sname1 = "SELECT xinwen.cishu,Message.Name, xinwen.fbshj, xinwen.neirong, xinwen.biaoti, xinwen.id, xinwen.tuijian FROM (Message INNER JOIN Login ON Message.ID=Login.ID) LEFT JOIN xinwen ON Message.ID=xinwen.faburen WHERE ((Login.ID)=xinwen.faburen And (Message.ID)=xinwen.faburen) and ((xinwen.biaoti) like '%"&Request.QueryString("text")&"%' Or (xinwen.neirong) like '%"&Request.QueryString("text")&"%' Or (xinwen.fbshj) like '%"&Request.QueryString("text")&"%') order by xinwen.tuijian , xinwen.fbshj DESC;"
   RS1.open Sname1 , CN, 1,3
   
   if not RS1.eof then
      '分页
	        RS1.movefirst
			RS1.pagesize=5
			page1=CLng(Request("page1"))
			if page1<1 then page1=1
			RS1.absolutepage=page1
   for i=1 to RS1.pagesize   
    if RS1.eof then
	   exit for
	end if
 %>   
     <tr><td>
	 
	 <%
	  if strcomp(RS1("tuijian"),"True")=0 then
	     response.Write("<input name='imageField' type='image' src='../picture/03-Over.gif' width='36' height='18' border='-1'>")
	  else
	     response.Write("<input name='imageField' type='image' src='../picture/star.gif'  border='-1'>")
	  end if
	  %>
	 
    </td>
     <td><a href="#"onClick="JavaScript:window.open('tongzhi/xinwennr.asp?ID=<%=RS1("ID") %>','','width=600,height=400,top=100,left=200')">
	 <%response.Write(RS1("biaoti"))%>
	 </a></td><td>
	  &nbsp;<%response.Write(RS1("Name"))%>
	 </td><td>
	 <%response.Write(RS1("fbshj"))%>
	 </td><td>
	 <%response.Write(RS1("cishu"))%>
	 次	 </td>
     </tr>
	 <% 
	  if not RS1.eof then
	   RS1.movenext
	   else 
	     exit for
	  end if
   next
 
 %>
   <tr>
    <td height="21" colspan="5" background="../picture/title1.jpg">
	<div id="di">
	<% if page1<>1 then %><a href=<%=path%>?page1=1 >第一页</a>
			<a href=<%=path%>?page=<%=(page1-1)%>>上一页</a> 
			<%end if 
			if page1<>RS1.pagecount then %>
   			<a href=<%=path%>?page1=<%=(page1+1)%> >下一页</a> 
			<a href=<%=path%>?page1=<%=RS1.pagecount%> >最后一页</a> 
			<%end if %>
	
	</div>
  </tr>
  <%
  else 
    response.write("<tr><td colspan='5'>没有通知</td></tr>")
	RS1.close
	CN.close
  end if
%>
</table>
</body>
</html>

⌨️ 快捷键说明

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