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

📄 search.asp

📁 本系统采用ASP作为开发环境
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% If session("Admin")<>"" Then
	Response.Redirect("Manage/Manager.asp")
 End if
  %>
<%
		riqi=cint(Request.QueryString("date"))	
	Response.Buffer=true 
	If Request.Form("add")<>"" Then 
		Session("month")=cint(Session("month"))+1
		If Session("month")=13 Then 
			Session("month")=1 
			Session("year")=cint(Session("year"))+1
		End If 	
	End If
	If Request.Form("minus")<>"" Then 
		Session("month")=Session("month")-1 
		If Session("month")=0 Then 
			Session("month")=12 
			Session("year")=Session("year")-1
		End If 	
	End If
	If Session("year")="" Then 
		Session("year")=cint(year(date()))
		Session("month")=cint(month(date()))
		Session("day")=cint(day(date()))
	End If 
	If Request.Querystring("date")<>"" Then 
		Session("day")=riqi
	End If 
	months=Session("month")
	If months=1 or months=3 or months=5 or months=7 or months=8 or months=10 or months=12 Then 
		sum=31
	Else
		If months=2 Then
			If years Mod 100=0 and years Mod 4=0 Then
				sum=29
			Else
				sum=28
			End If 
		Else 
			sum=30
		End If 
	End If 
	if Session("day")>sum then 
		Session("day")=sum 
		riqi=sum 
	end if 
	times=cdate(Session("year")&"-"&Session("month")&"-"&Session("day"))	
 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charSet=gb2312">
<title>网络新闻中心--站内搜索!</title>
<object type="application/x-oleobject" id=Closes classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
	<param name="command" value="Close">
</object>		
<link rel="stylesheet" href="Css/Style.css">
<script src="Js/Status.js"></SCRIPT>  
<script src="Js/Manage.js"></script>
<script src="Js/Win.js"></script>
</head>
<body topmargin="0" leftmargin="0" onblur="ed()">

<!--#include file="Top.asp" -->
<table width="800" height="1035" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999" bgcolor="#F7F3F7" class="wenbenkuang">
  		<tr valign="middle" bgcolor="#214994">
  		  <td height="20" colspan="2">
		  <table width="724" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
		  	<form method="post" action="Search.asp" name="search">
            <tr>
              <td width="100" height="20"><div align="right"><span class="style6">站内新闻搜索</span></div></td>
              <td width="129"><div align="center" class="style6">
                <div align="right">内容关键字:
                </div>
              </div></td>
              <td width="210"><input name="keyword" type="text" class="wenbenkuang" size="35"></td>
              <td width="137"><div align="center">
                <Select name="id" class="wenbenkuang1">
                  <option value="1" Selected>时政要闻</option>
                  <option value="2">经济动向</option>
                  <option value="3">世界军事</option>
                  <option value="4">科学教育</option>
                  <option value="5">法治道德</option>
                  <option value="6">社会现象</option>
                  <option value="7">体育世界</option>
                  <option value="8">时尚娱乐</option>
                </Select>
              </div></td>
              <td width="148"><input name="btnQuest" type="submit" class="go-wenbenkuang3" value="确认查询"></td>
            </tr></form>
          </table></td>
  	  </tr>
  		<tr class="wenbenkuang">
    		<td width="608" height="992" valign="middle">		  <table width="550" height="60" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td colspan="3">
						<!-- #include file="Conn/conn.asp" -->
                          <% key=Request.Form("keyword")
						id=Request.Form("id")
						 select case id
							case 1
								table="时政要闻"
							case 2 
								table="经济动向"
							case 3
								table="世界军事"
							case 4
								table="科学教育"
							case 5
								table="法治道德"
							case 6 
								table="社会现象"
							case 7
								table="体育世界"
							case 8 
								table="时尚娱乐"
						end select 
						sql="select * from tb_News where Content Like '%"&key&"%' and Style='"&table&"' and IssueDate=#"&times&"#"
						rs.open sql,conn
					%>	
				<table width="550" height="55" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td height="21"><table width="550" height="20" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="27"><img src="Image/top1.gIf" width="27" height="21"></td>
                        <td width="486" valign="baseline" background="Image/top2.gIf"><div align="center">您的查询条件是:<%=table%>类新闻,内容关键字为“ <%=key%> ”</div></td>
                        <td width="37"><img src="Image/top3.gIf" width="37" height="21"></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td>
					<table width="550" height="930" border="0" cellpadding="0" cellspacing="0" class="wenbenkuang">
					  <tr>
                        <td colspan="3" valign="top">
						<table width="545" border="0" align="center" cellpadding="2" cellspacing="2">
                          <tr bgcolor="#CED3DE">
                            <td height="20" class="wenbenkuang"><div align="center">新闻类型</div></td>
                            <td height="20" class="wenbenkuang"><div align="center">新闻标题</div></td>
                          </tr>
						<% while not rs.eof %> 
                          <tr>
                           <td width="127" height="20"  class="wenbenkuang"><div align="center">【<%=rs("Type")%>】</div></td>
                           <td width="423" height="20" class="wenbenkuang"><a href="#" onclick="window.open('Show.asp?id=<%=rs("ID")%>','详细内容查看','width=630,height=400,scrollbars=yes')">
                                <%If len(cstr(rs("Title")))>30 Then Response.Write(left(cstr(rs("Title")),28)&"...") Else Response.Write(rs("Title")) End If %>
                                        </A> </td>
                          </tr>
						  <% rs.movenext
						  wend
						  set rs=nothing
						  conn.close
						  set conn=nothing
						  %>
                        </table></td>
                      </tr>
                    </table>					</td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
    		<td width="190">
				<table width="180" height="974" border="0" align="center" cellpadding="0" cellspacing="0">
          			<tr>
          			  <td height="40" colspan="3"><div align="center"><a href="Vote.asp">年度新闻人物评选</a></div></td>
       			  </tr>
          			<tr>
            			<td height="200" colspan="3"><!-- #include file="Time.asp" --></td>
          			</tr>
          			<tr>
            			<td height="491" colspan="3"><table cellpadding="0" cellspacing="0">
                          <tr>
                            <td width="27" height="21"><img src="Image/top1.gIf" width="27" height="21"></td>
                            <td width="113" valign="baseline" background="Image/top2.gIf"><div align="center">即 时 新 闻</div></td>
                            <td width="37"><img src="Image/top3.gIf" width="37" height="21"></td>
                          </tr>
                          <tr>
                            <td height="468" colspan="3">
                              <table width="177" height="468" border="0" align="center" cellpadding="0" cellspacing="0" class="wenbenkuang">
                                <tr>
                                  <td width="175" height="466" align="center" valign="top">
                                    <table width="169" border="0" cellpadding="0" cellspacing="0">
                                      <!-- #include File="Conn/conn.asp" -->
                                      <% 
										sql="Select top 16 * from tb_News where IssueDate=#"&Date()&"# order by IssueDate Desc,ID dESC"
										rs.open sql,conn
										While Not rs.Eof 
									%>
                                      <tr>
                                        <td height="10">&nbsp;</td>
                                        <td height="10">&nbsp;</td>
                                      </tr>
                                      <tr>
                                        <td width="31" height="18">
                                          <div align="center"><img src="Image/i8.gIf" width="14" height="13"></div></td>
                                        <td width="138" height="18"> <a href="#" onclick="window.open('Show.asp?id=<%=rs("ID")%>','详细内容查看','width=630,height=400,scrollbars=yes,toolbar=no,location=no,status=no,menubar=no')">
                                          <%If len(cstr(rs("Title")))>10 Then Response.Write(left(cstr(rs("Title")),8)&"...") Else Response.Write(rs("Title")) End If %>
                                        </A> </td>
                                      </tr>
                                      <% 
											rs.movenext
										Wend
										Set rs=Nothing
										conn.Close
										Set conn=Nothing
									%>
                                  </table></td>
                                </tr>
                            </table></td>
                          </tr>
          			  </table></td>
      				</tr>
      				<tr>
        				<td height="243" align="center"><table cellpadding="0" cellspacing="0">
                          <tr>
                            <td width="27" height="21"><img src="Image/top1.gIf" width="27" height="21"></td>
                            <td width="113" valign="baseline" background="Image/top2.gIf"><div align="center">友 情 链 接</div></td>
                            <td width="37"><img src="Image/top3.gIf" width="37" height="21"></td>
                          </tr>
                          <tr>
                            <td height="220" colspan="3">
                              <table width="177" height="220" border="0" align="center" cellpadding="0" cellspacing="0" class="wenbenkuang">
                                <tr>
                                  <td width="175" height="169" align="center" valign="top">
                                    <table width="169" border="0" align="center" cellpadding="0" cellspacing="0">
                                      <!-- #include File="Conn/conn.asp" -->
                                      <% 
										sql="Select top 6 * from tb_Link order by IssueDate Desc,ID dESC"
										rs.open sql,conn
										While Not rs.Eof 
									%>
                                      <tr>
                                        <td height="45" colspan="2"><div align="center"><a href="<%=rs("Address")%>"><img src="Image/IMG_link/<%=rs("Pictrue")%>" alt="<%=rs("Name")%>" width="160" height="38" border="0"></a></div></td>
                                      </tr>
                                      <% 
											rs.movenext
										Wend
										Set rs=Nothing
										conn.Close
										Set conn=Nothing
											%>
                                  </table></td>

                                </tr>
                            </table></td>
                          </tr>
      				  </table></td>
      				</tr>
			  </table>
			</td>
		</tr>
  		<tr class="wenbenkuang">
  		  <td height="20" colspan="2" valign="top">
		  <table height="21" border="0" cellpadding="0" cellspacing="0">
            <!-- #include File="Conn/conn.asp" --><tr>
            <% 
				sql="Select Count(*) as sum,Style from tb_News where IssueDate=#"&times&"# group by Style"
				rs.open sql,conn
				While Not rs.Eof 
			%>
              <td width="53" height="20"><div align="center"><%=rs("Style")%></div></td>
              <td width="52" height="20"><div align="center">共<font color="#FF0000"><%=rs("sum")%></font> 条</div></td>
            
            <% 
					rs.movenext
				Wend
				Set rs=Nothing
				conn.Close
				Set conn=Nothing
			%></tr>
          </table></td>
	  </tr>
</table>
<!-- #include file="Bottom.asp" -->
</body>
</html>

⌨️ 快捷键说明

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