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

搜索引擎

开发平台:

C#

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Reset.aspx.cs" Inherits="WebApp.Reset" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head id="Head1" runat="server">
  5.     <title>淘特站内搜索引擎1.0</title>
  6. <style type="text/css">
  7. <!--
  8. .s_title {
  9. color: #006;
  10. font-size: 14px;
  11. font-weight: bold;
  12. }
  13. body,td,th {
  14. font-size: 12px;
  15. }
  16. td{ padding-left:10px;}
  17. -->
  18. </style>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  20. <script type="text/javascript">
  21.   function $(id) {
  22.     return document.getElementById(id);
  23.     }
  24.   function ProcessGather(){
  25.     $('Layer1').style.display='block';
  26.     $('Layer1').style.left=event.x-300;
  27.     $('Layer1').style.top=event.y-180;
  28.   }
  29.   </script>
  30.   </head>
  31. <body>
  32.     <form id="form1" runat="server">
  33.     
  34.     <div>
  35.     
  36. <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#eeeeee">
  37.           <tr>
  38.             <td height="32" colspan="2" align="center" bgcolor="#ECF5FF" class="s_title"> 淘特站内搜索引擎1.0</td>
  39.           </tr>
  40.           <tr>
  41.             <td height="24" colspan="2" bgcolor="#FFFFFF">说明:该操作将您数据库中选择的表及字段进行中文分词并添加到索引中。请根据您的实际情况,填写与搜索引擎中索引对应的字段(如id,标题,内容等),没有的字段请留空。</td>
  42.           </tr>
  43.           <tr>
  44.             <td width="22%" height="24" bgcolor="#FFFFFF">数据库连接字符串:</td>
  45.             <td width="78%" bgcolor="#FFFFFF"><asp:TextBox ID="ConnStr" runat="server" Height="109px"
  46.             TextMode="MultiLine" Width="99%">provider=microsoft.jet.oledb.4.0;data source=E:data.mdb</asp:TextBox>
  47.               <br />
  48. <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="连接数据库" />              
  49.               <br />
  50.             例:<br />
  51. Access数据库:provider=microsoft.jet.oledb.4.0;data source=E:data.mdb<br />
  52. Mssql数据库:Provider=SQLOLEDB;server=127.0.0.1;database=totnetcms;uid=cms_user;pwd=cms_user</td>
  53.           </tr>
  54.           <tr>
  55.             <td height="24" bgcolor="#FFFFFF">选择要索引的表:</td>
  56.             <td bgcolor="#FFFFFF"><asp:DropDownList ID="TableName" runat="server" AutoPostBack="True" 
  57.                       OnSelectedIndexChanged="db_table_SelectedIndexChanged"> </asp:DropDownList></td>
  58.           </tr>
  59.       </table>
  60.       <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#eeeeee">
  61.           <tr>
  62.             <td height="24" colspan="3" bgcolor="#FFFFFF">设置要索引的字段:请将下面字段信息中填写您的数据库表中对应的字段名称</td>
  63.           </tr>
  64.           <tr>
  65.             <td height="24" colspan="2" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="1">
  66.             <tr>
  67.                   <td height="24" bgcolor="#FFFFFF">搜索引擎中的字段</td>
  68.                   <td bgcolor="#FFFFFF"> 对应数据库中的字段</td>
  69.             </tr>
  70.         <tr>
  71.                   <td width="22%" height="24" bgcolor="#FFFFFF">ID:</td>
  72.                   <td width="23%" bgcolor="#FFFFFF"><asp:TextBox ID="id" runat="server">id</asp:TextBox>
  73.                     <br />
  74.                     <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
  75.             ControlToValidate="id" ErrorMessage="请填写表中的ID字段名"></asp:RequiredFieldValidator></td>
  76.                 </tr>
  77.                 <tr>
  78.                   <td height="24" bgcolor="#FFFFFF">标题:</td>
  79.                   <td bgcolor="#FFFFFF"><asp:TextBox ID="Title" runat="server">Title</asp:TextBox>
  80.                     <br />
  81.                     <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
  82.             ControlToValidate="Title" ErrorMessage="请填写表中的标题字段名"></asp:RequiredFieldValidator></td>
  83.                 </tr>
  84.                 <tr>
  85.                   <td height="24" bgcolor="#FFFFFF">栏目(类别)ID:</td>
  86.                   <td bgcolor="#FFFFFF"><asp:TextBox ID="CatalogId" runat="server"></asp:TextBox></td>
  87.                 </tr>
  88.                 <tr>
  89.                   <td height="24" bgcolor="#FFFFFF">缩略图:</td>
  90.                   <td bgcolor="#FFFFFF"><asp:TextBox ID="Photo" runat="server"></asp:TextBox></td>
  91.                 </tr>
  92.                 <tr>
  93.                   <td height="24" bgcolor="#FFFFFF">摘要:</td>
  94.                   <td bgcolor="#FFFFFF"><asp:TextBox ID="Summary" runat="server"></asp:TextBox></td>
  95.                 </tr>
  96.                 <tr>
  97.                   <td height="24" bgcolor="#FFFFFF">详细内容:</td>
  98.                   <td bgcolor="#FFFFFF"><asp:TextBox ID="Content" runat="server">Content</asp:TextBox>
  99.                     <br />
  100.                     <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
  101.             ControlToValidate="Content" ErrorMessage="请填写表中的内容字段名"></asp:RequiredFieldValidator></td>
  102.                 </tr>
  103.                 <tr>
  104.                   <td height="24" bgcolor="#FFFFFF">修改日期:</td>
  105.                   <td bgcolor="#FFFFFF"><asp:TextBox ID="ModDate" runat="server">ModDate</asp:TextBox>
  106.                     <br />
  107.                     <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
  108.             ControlToValidate="ModDate" ErrorMessage="请填写表中的日期字段名"></asp:RequiredFieldValidator></td>
  109.                 </tr>
  110.                 <tr>
  111.                   <td height="24" bgcolor="#FFFFFF">链接地址:</td>
  112.                   <td bgcolor="#FFFFFF"><asp:TextBox ID="LinkUrl" runat="server"></asp:TextBox></td>
  113.                 </tr>
  114.             </table></td>
  115.             <td width="61%" align="left" valign="top" bgcolor="#FFFFFF">当前选择表中的字段:<br />
  116.             <asp:ListBox ID="o_field" runat="server" Rows="15"> </asp:ListBox></td>
  117.           </tr>
  118.           
  119.           </table>
  120.           <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#eeeeee">
  121.           <tr>
  122.             <td width="22%" height="24" bgcolor="#FFFFFF">索引方式:</td>
  123.             <td width="78%" height="35" bgcolor="#FFFFFF"><asp:RadioButtonList ID="Rewrite" runat="server" 
  124.             RepeatDirection="Horizontal" RepeatLayout="Flow">
  125.               <asp:ListItem Selected="True" Value="0">附加</asp:ListItem>
  126.               <asp:ListItem Value="1">重写</asp:ListItem>
  127.             </asp:RadioButtonList></td>
  128.           </tr>
  129.           <tr>
  130.             <td height="24" bgcolor="#FFFFFF">&nbsp;</td>
  131.             <td height="35" bgcolor="#FFFFFF"><asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="开始执行索引" OnClientClick="ProcessGather()" /></td>
  132.             </tr>
  133.       </table>
  134.     </div>
  135.     </form>
  136.     <div id="Layer1" style="position:absolute; display:none; filter:alpha(opacity=50); width:285px; height:159px; z-index:1; left: 447px; top: 381px; background-color: #003399; layer-background-color: #99FFFF; border: 1px none #000000;">
  137.         <div align="center">
  138.           <p>&nbsp;</p>
  139.           <p>&nbsp;</p>
  140.           <p><font color="#FFFFFF">数据索引进行中,所用时间取决于您的数据库记录多少,请耐心等待......</font></p>
  141.         </div>
  142.       </div>
  143. </body>
  144. </html>