Default.aspx
上传用户:taiyokogyo
上传日期:2022-04-20
资源大小:365k
文件大小:4k
源码类别:

搜索引擎

开发平台:

C#

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApp._Default" %>
  2. <%@ Register assembly="SearchControls" namespace="SearchControls" tagprefix="cc1" %>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" >
  5. <head id="Head1" runat="server">
  6.     <title id="stitle" runat=server>淘特站内搜索引擎1.0</title>
  7.     <link href="style/pages.css" rel="stylesheet" type="text/css" />
  8. </head>
  9. <body>
  10. <%
  11. if (string.IsNullOrEmpty(_keyword)){
  12. %>
  13. <form method="get" action="?">
  14.     <p align="center">&nbsp;</p>
  15.   <p align="center"><a href="/"><img src="images/logo.gif" alt="淘特搜索引擎" width="352" height="66" border="0" /></a></p>
  16.     <p align="center">
  17.       <input name="keyword" type="text" class="input_key" id="key" size="50" maxlength="50"  />  
  18.       <input type="hidden" name="days" value="0" />
  19.       <input type="hidden" name="sortby" value="1" />
  20.       <input type="hidden" name="categoryid" value="0" />
  21.       <input name="button" type="submit" class="btn_search" id="button" value="搜索一下" />
  22.     </p>
  23.     <p align="center">&nbsp;</p>
  24.     
  25. </form>
  26. <%
  27. }
  28. else{
  29. %>
  30. <form method="get" action="?">
  31.   <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  32.     <tr>
  33.       <td width="245" height="60"><a href="/"><img src="images/logo.gif" alt="淘特搜索引擎" height="45" border="0" /></a></td>
  34.       <td align="left">日期范围:
  35.         <select name="days">
  36.           <option value="0" <%=DaysCheck(0) %>>不限</option>
  37.           <option value="7" <%=DaysCheck(7) %>>一周之内</option>
  38.           <option value="30" <%=DaysCheck(30) %>>一月之内</option>
  39.           <option value="365" <%=DaysCheck(365) %>>一年之内</option>
  40.         </select>
  41. 排序:
  42. <input type="radio" name="sortby" value="1" <%=SortByCheck(1) %> />
  43. 日期
  44. <input type="radio" name="sortby" value="2" <%=SortByCheck(2) %> />
  45. 相关度<br />
  46. <input name="keyword" type="text" class="input_key" id="keyword" value="<%=_keyword %>" size="50" maxlength="50"  />
  47. <input type="hidden" name="categoryid" value="<%=categoryid %>" />
  48. <input name="button2" type="submit" class="btn_search" id="button2" value="搜索一下" /></td>
  49.     </tr>
  50.   </table>
  51. </form>
  52. <form id="form1" runat="server">
  53. <div class="linebar">
  54. 共找到相关数据:<asp:Label ID="GetTotalNum" runat="server" Text="Label"></asp:Label>条 用时
  55.   <asp:Label ID="UseTime" runat="server" Text="Label"></asp:Label>秒
  56. </div>
  57. <div class="mainbox">
  58. <div class="contain">
  59. <div class="left">    
  60.     <asp:Repeater ID="ArticleList" runat="server">
  61.         <ItemTemplate>
  62.             <div class="search_title">
  63.               <a href="<%# ((SearchLib.TotSearch.DataFieldInfo)Container.DataItem).LinkUrl%>" target="_blank"><%# ((SearchLib.TotSearch.DataFieldInfo)Container.DataItem).Title%></a>
  64.             </div>
  65.             <div class="search_desc">
  66.             <%# ((SearchLib.TotSearch.DataFieldInfo)Container.DataItem).Summary%>
  67.             </div>
  68.             <span class="search_url"><%# ((SearchLib.TotSearch.DataFieldInfo)Container.DataItem).LinkUrl%></span>
  69.             <span class="search_date"><%# ((SearchLib.TotSearch.DataFieldInfo)Container.DataItem).ModDate%></span>
  70.             
  71.          </ItemTemplate>
  72.          </asp:Repeater>
  73.             
  74.   </div>
  75.   <div class="right">
  76.   <script type="text/javascript"><!--
  77. google_ad_client = "pub-6519981311832009";
  78. /* 250x250, 创建于 10-4-23 */
  79. google_ad_slot = "8598004635";
  80. google_ad_width = 250;
  81. google_ad_height = 250;
  82. //-->
  83. </script>
  84. <script type="text/javascript"
  85. src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  86. </script>
  87.   </div>
  88.  </div>
  89. </div>
  90. <div class="clear"></div>
  91. <cc1:Pager ID="Pager1" runat="server" GenerateFirstLastSection="True" 
  92.       GenerateGoToSection="True" GenerateHiddenHyperlinks="False" 
  93.       QueryStringParameterName="CurrentPage" OnCommand="pager_Command" 
  94.       GoToStyle="text" OfClause="/" PageClause="页" PageSize="15" /> 
  95. </form>    
  96. <%}%>
  97. <p align="center">Powered By <a href="http://www.totcms.com" target="_blank">淘特站内搜索引擎</a></p>
  98. </body>
  99. </html>