BVB Source Codes

Jie Yang v0.6.3 article system Show Article_Search.asp Source code

Return Download Jie Yang v0.6.3 article system: download Article_Search.asp Source code - Download Jie Yang v0.6.3 article system Source code - Type:.asp
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <!--#include file="../conn/conn.asp" -->
  3. <!--#include file="../inc/commoncode.asp" -->
  4. <!--#include file="../inc/commonfunction.asp" -->
  5. <%
  6. Call CloseSite
  7. dim typeid,pageshow,cid,keyword,s_type
  8. dim linkURL
  9. pageshow=request("pageshow")
  10. keyword=Replace_Text(trim(request("keywords")))
  11. if keyword="请输入关键字..." then keyword=""
  12. If keyword="%" Or InStr(keyword,"'") Or InStr(keyword,"select") Or InStr(keyword,"delete") Then
  13.         Response.Write("<script>alert(""查找的内容不合法!"");history.back();</script>")
  14.         Response.End()
  15. End If
  16.  
  17. '更新搜索的关键词,先判断关键词是否存在,存在则更新搜索次数,不存在则插入表中
  18. if keyword<>"" then
  19.         sqla="Select K_id from Article_KeyWords where K_words='"&Trim(keyword)&"'"
  20.         set rsa=Server.CreateObject("ADODB.RecordSet")
  21.         rsa.open sqla,conn,1,1
  22.         if not rsa.eof then
  23.                 conn.execute("Update Article_KeyWords set K_hits=K_hits+1 where K_id="&rsa("K_id")&"")
  24.         else
  25.                 conn.execute("Insert into Article_KeyWords(K_words,K_addtime) values('"&keyword&"','"&now()&"')")
  26.         end if
  27.         closers(ras)
  28. end if
  29.  
  30. '搜索条件,按内容或标题搜索
  31. s_type=request("s_type")
  32. typeid=request("info_type")
  33. if not IsNumeric(typeid) then
  34. typeid=""
  35. end if
  36. %>
  37. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  38. <html xmlns="http://www.w3.org/1999/xhtml">
  39. <head>
  40. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  41. <title>资讯搜索结果--<%=sitetitle%></title>
  42. <link href="<%=InstallDir%>Css/<%=MainWebCss%>" rel="stylesheet" type="text/css" />
  43. </head>
  44. <body>
  45. <%Call Head()%>
  46. <div class="container">
  47.         <div class="dh">
  48.                 <div class="navdhtext"><img src="<%=InstallDir%>skin/Default/dh.gif" /> 您的位置:资讯搜索结果列表</div>
  49.                 <div class="navdhsearch"><form name="searchform" action="<%=InstallDir%>Search/Article_Search.asp" method="post" style="padding:0; margin:0;">
  50.                                         <input name="keywords" type="text" class="isearchtxt" <%if keyword<>"" then%>value=<%=keyword%><%else%>value="请输入关键字..."<%end if%> onblur="if(this.value=='') this.value='请输入关键字...';" onfocus="if(this.value=='请输入关键字...') this.value='';" />      <select name="s_type">
  51.                                                 <option value="N_title" selected="selected">标题搜索</option>
  52.                                                 <option value="N_content" <%if s_type="N_content" then%>selected="selected"<%end if%>>内容搜索</option>
  53.                                         </select>
  54.                                         <select name="info_type">
  55.                                                 <option value="">全部资讯</option>
  56.                                         <%
  57.                                                
  58.                                                 sql="select S_id,S_name from Article_NewsSort where S_cid="&cid&" order by S_order asc"
  59.                                                 rs.open sql,conn,1,1
  60.                                                 if not rs.eof then
  61.                                                 for i=1 to rs.recordcount
  62.                                         %>
  63.                                                 <option value="<%=rs("S_id")%>" <%if cstr(typeid)=cstr(rs("S_id")) then%>selected="selected"<%end if%>><%=rs("S_name")%></option>
  64.                                         <%
  65.                                                 rs.movenext
  66.                                                 next
  67.                                                 end if
  68.                                                 closers(rs)
  69.                                         %>
  70.                                         </select>
  71.                                         <input name="isearchbtn" type="Submit" value="搜索" class="isearchbtn" />
  72.                                 </form></div>
  73. </div>
  74. <div class="pagemain">
  75.         <div class="list_left">
  76. <%
  77. sql="select * from Article_News where N_id is not null"
  78. if cid<>"" then
  79. sql=sql&" and N_cid="&cid&""
  80. end if
  81. if s_type="" then
  82.         s_type="N_title"
  83. end if
  84. if typeid<>"" then
  85.         sql=sql&" and N_sid="&typeid&""
  86. end if
  87. if keyword<>"" then
  88.         sql=sql&" and "&s_type&" like '%"&keyword&"%'"
  89. end if
  90. sql=sql&" order by N_id desc"
  91. linkURLs="Article_Search.asp?info_type="&typeid&"&keywords="&keyword&"&s_type="&s_type&""
  92. rs.open sql,conn,1,1
  93. const maxperpage=12
  94. if not(rs.bof and rs.eof) then  '判别数据表中的记录是否为空
  95.         dim recordtotal  '总记录条数
  96.         dim pagetotal  '总的页数
  97.         recordtotal=rs.recordcount '总的记录条数
  98.         rs.pagesize=maxperpage   '每页显示的最多条数
  99.         pagetotal=rs.pagecount  '总的页数
  100.         if pageshow<>"" and IsNumeric(pageshow) then
  101.                 if pageshow<1 or Len(pageshow)>10 Then
  102.                         pageshow=1
  103.                 else
  104.                         pageshow=CLng(pageshow)
  105.                 end If
  106.         else
  107.                 pageshow=1
  108.         end If
  109. end if 
  110. if Not(Rs.bof and Rs.eof) then
  111.         Rs.move(Cint(pageshow)-1)*maxperpage,1
  112. for i=1 to Rs.pagesize
  113. %>
  114.                 <dl>
  115.                         <dt><span><font color="#666666"><%=rs("N_addtime")%></font></span><img src="<%=InstallDir%>skin/Default/icon.gif" /> <a href="<%=FormatLink(rs("N_addtime"),rs("N_cid"),rs("N_sid"),rs("N_id"),0)%>" target="_blank"><font color="<%=rs("N_color")%>"><%=replace(rs("N_title"),keyword,"<font color='red'>"&keyword&"</font>")%></font></a></dt>
  116.                         <dd class="text"><%=left(RemoveHTML(rs("N_content")),120)%>....<a href="<%=FormatLink(rs("N_addtime"),rs("N_cid"),rs("N_sid"),rs("N_id"),0)%>" target="_blank">[阅读全文]</a></dd>
  117.                 </dl>
  118.                
  119. <%
  120. Rs.movenext
  121. if Rs.eof then exit for
  122. next
  123. %>
  124.         <input type="hidden" name="pageshow" value="<%=pageshow%>">
  125.         <li><%
  126.        
  127.         Call ShowPage(linkURLs,recordtotal,MaxPerPage,true,true,"篇资讯")%>&nbsp; </li>
  128. <%
  129. else
  130. response.Write("没有相关的搜索结果!")
  131. end if
  132. %>
  133.         </div>
  134.         <div class="list_right">
  135.                 <div class="list_tj">
  136.                         <div class="main_tit">推荐资讯</div>
  137.                         <div class="main_con"><%=GetInfoList("-1",0,"icon.gif",16,1,1,0,0,"N_id asc",16,"_blank",0,0,133,100,0,70)%></div>
  138.                 </div>
  139.                 <div class="list_hot">
  140.                         <div class="main_tit">热门资讯</div>
  141.                         <div class="main_con"><%=GetInfoList("-1",0,"icon.gif",20,1,0,0,0,"N_hits desc",16,"_blank",0,0,133,100,0,70)%></div>
  142.                 </div>
  143.         </div>
  144. </div>
  145. </div>
  146. <%Call Bottom()%>
  147. </body>
  148. </html>
downloadArticle_Search.asp Source code - Download Jie Yang v0.6.3 article system Source code
Related Source Codes/Software:
Jilin classification information release system v5.0 trial version - A ready-made classifieds site publishing system, h... 2016-09-21
Linyi CMS v6.5 market classification information - A. supply and demand information function: informa... 2016-09-21
Tesco discount net SQL version - And presentations, faster. 2016-09-21
- electronic enterprise website management system In a fully functional version - Super suitable for enterprise agents build a corpo... 2016-09-21
Rio mesh network hard disk system v3.0 - System functions: 1, increase the progress of Asp... 2016-09-21
Classified information network business in suzhou - Overall module: classification of supply and deman... 2016-09-21
NPOINT virtual host v1.7.0 formal version management system - The system main function is introduced 2016-09-21
IDC sales web site - Beautiful IDC sales web site source code 2016-09-21
Oo 126 CMS movie site system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
Pcook CMS bubble guest v3.0 SDCMS version - Developed by Asp+Access, and meet the needs of sma... 2016-09-21
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top