Callboard.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:8k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../FS_Inc/Const.asp" -->
  3. <!--#include file="../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../FS_Inc/Function.asp" -->
  5. <!--#include file="lib/strlib.asp" -->
  6. <!--#include file="lib/UserCheck.asp" -->
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <title>公告中心-网站内容管理系统</title>
  9. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  10. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  11. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  12. <meta name="Keywords" content="Foosun,FoosunCMS,Foosun Inc.,风讯,风讯网站内容管理系统,风讯系统,风讯新闻系统,风讯商城,风讯b2c,新闻系统,CMS,域名空间,asp,jsp,asp.net,SQL,SQL SERVER" />
  13. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  14. <head>
  15. <body>
  16. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  17.   <tr>
  18.     <td>
  19.       <!--#include file="top.asp" -->
  20.     </td>
  21.   </tr>
  22. </table>
  23. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  24.   
  25.     <tr class="back"> 
  26.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" --> </td>
  27.     </tr>
  28.     <tr class="back"> 
  29.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  30.           <!--#include file="menu.asp" -->
  31.         </div></td>
  32.       <td width="82%" valign="top" class="hback"><table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  33.           <tr class="hback"> 
  34.             
  35.           <td class="hback"><strong>位置:</strong><a href="../">网站首页</a> &gt;&gt; 
  36.             <a href="main.asp">会员首页</a> &gt;&gt; <a href="Callboard.asp">会员公告</a>&gt;&gt;&gt;公告中心</td>
  37.           </tr>
  38.         </table>
  39.         
  40.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  41.         <tr class="hback"> 
  42.           <td colspan="4" class="hback"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  43.               <tr> 
  44.                 <td width="44%"> 共搜索到<strong> 
  45.                   <%
  46. Dim RsUserNewsObj,RsUserNewsSQL
  47. Dim strpage,strSQLs
  48. strpage=request("page")
  49. if len(strpage)=0 Or strpage<1 or trim(strpage)=""  Then strpage="1"
  50. Set RsUserNewsObj = Server.CreateObject(G_FS_RS)
  51. If Request("Keyword")<>"" then
  52. if Request("searchtype") <>"" then
  53. if  Request("Name") = "title" then
  54.   strSQLs = " and Title like '%" & Request("Keyword")& "%' " 
  55. Elseif  Request("Name") = "content" then
  56.   strSQLs = " and Content  like '%" & Request("Keyword")& "%' "
  57. End if
  58. Else
  59. if  Request("Name") = "title" then
  60.   strSQLs = " and title = '" & Request("Keyword")& "'"
  61. Elseif  Request("Name") = "content" then
  62.   strSQLs = " and content  = '" & Request("Keyword")& "'"
  63. End if
  64. End if
  65. Else
  66. strSQLs = ""
  67. End if
  68. RsUserNewsSQL = "Select Newsid,title,content,AddTime,GroupID,NewsPoint,isLock From Fs_ME_News  where isLock=0 "& strSQLs &" Order by NewsID desc"
  69. RsUserNewsObj.Open RsUserNewsSQL,User_Conn,1,3
  70. Response.Write "<Font color=red>" & RsUserNewsObj.RecordCount&"</font>"
  71. %>
  72.                   </strong> 个信息</td>
  73.                 <form action="Callboard.asp"  method="post" name="myform" id="myform">
  74.                   <td width="56%"><div align="left">搜索: 
  75.                       <select name="Name" id="select">
  76.                         <option value="title" <%if Request("Name") = "title" then response.Write("selected")%>>标题</option>
  77.                         <option value="content" <%if Request("Name") = "content" then response.Write("selected")%>>内容</option>
  78.                       </select>
  79.                       <input name="keyword" type="text" id="keyword2" value="<%=Request("keyword")%>" size="10">
  80.                       <input name="searchtype" type="checkbox" id="searchtype" value="1" <%if Request("searchtype")="1" then Response.Write("checked")%> >
  81.                       模糊搜索 
  82.                       <input type="submit" name="Submit" value="搜索">
  83.                     </div></td>
  84.                 </form>
  85.               </tr>
  86.             </table></td>
  87.         </tr class="hback">
  88.         <tr class="hback"> 
  89.           <td width="34%" class="xingmu"><div align="left"><strong>标题 </strong></div></td>
  90.           <td width="20%" class="xingmu"><div align="left"><strong>日期</strong></div></td>
  91.           <td width="46%" class="xingmu"><div align="left"><strong>描述</strong></div></td>
  92.         </tr>
  93.         <%
  94. Dim select_count,select_pagecount,i
  95. if RsUserNewsObj.eof then
  96.    RsUserNewsObj.close
  97.    set RsUserNewsObj=nothing
  98.    Response.Write"<TR><TD colspan=""3""  class=""hback"">没有记录。</TD></TR>"
  99. else
  100. RsUserNewsObj.pagesize = 20
  101. RsUserNewsObj.absolutepage=cint(strpage)
  102. select_count=RsUserNewsObj.recordcount
  103. select_pagecount=RsUserNewsObj.pagecount
  104. for i=1 to RsUserNewsObj.pagesize
  105. if RsUserNewsObj.eof Then exit For 
  106. %>
  107.         <tr class="hback"> 
  108.           <td class="hback"><div align="left">·<a href="ShowCallboard.asp?NewsID=<% = RsUserNewsObj("NewsID")%>"> 
  109.               <% = RsUserNewsObj("title")%>
  110.               </a></div></td>
  111.           <td class="hback"><div align="left"> <% = RsUserNewsObj("addtime")%></div></td>
  112.           <td class="hback"><div align="left">
  113.               <% = Left(RsUserNewsObj("Content"),30)%>
  114.               ... </div></td>
  115.         </tr>
  116.         <%
  117.   RsUserNewsObj.MoveNext
  118.   Next
  119.   %>
  120.         <tr class="hback"> 
  121.           <td colspan="4" class="xingmu"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
  122.               <tr> 
  123.                 <td width="80%"> <span class="top_navi"> 
  124.                   <%  Response.Write("每页:"& RsUserNewsObj.pagesize &"个,")
  125. Response.write"&nbsp;共<b>"& select_pagecount &"</b>页<b>&nbsp;" & select_count &"</b>条记录,本页是第<b>"& strpage &"</b>页。"
  126. if int(strpage)>1 then
  127. Response.Write"&nbsp;<a href=Callboard.asp?page=1&Keyword="&Request("Keyword")&"&Name="& Request("Name")&"&searchtype="&Request("searchtype")&">第一页</a>&nbsp;&nbsp;"
  128. Response.Write"&nbsp;<a href=Callboard.asp?page="&cstr(cint(strpage)-1)&"&Keyword="&Request("Keyword")&"&Name="& Request("Name")&"&searchtype="&Request("searchtype")&">上一页</a>&nbsp;&nbsp;"
  129. End if
  130. If int(strpage)<select_pagecount then
  131. Response.Write"&nbsp;<a href=Callboard.asp?page="&cstr(cint(strpage)+1)&"&Keyword="&Request("Keyword")&"&Name="& Request("Name")&"&searchtype="&Request("searchtype")&">下一页</a>&nbsp;"
  132. Response.Write"&nbsp;<a href=Callboard.asp?page="& select_pagecount &"&Keyword="&Request("Keyword")&"&Name="& Request("Name")&"&searchtype="&Request("searchtype")&">最后一页</a>&nbsp;&nbsp;"
  133. End if
  134. Response.Write"<br>"
  135. RsUserNewsObj.close
  136. Set RsUserNewsObj=nothing
  137. End if
  138. %>
  139.                   </SPAN></td>
  140.                 <form name="form1" method="post" action="UserList.asp">
  141.                 </form>
  142.               </tr>
  143.             </table></td>
  144.         </tr>
  145.       </table> </td>
  146.     </tr>
  147.     <tr class="back"> 
  148.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  149.           <!--#include file="Copyright.asp" -->
  150.         </div></td>
  151.     </tr>
  152.  
  153. </table>
  154. </body>
  155. </html>
  156. <%
  157. Set Fs_User = Nothing
  158. %>
  159. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->