img.asp
上传用户:yjkj1008
上传日期:2020-10-17
资源大小:1496k
文件大小:2k
源码类别:

电子政务应用

开发平台:

HTML/CSS

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <!--#include file="Connections/conn_news.asp" -->
  3. <%
  4. '请尊重作者劳动成果不要删除以上信息
  5. '业一新闻系统3.0正式版
  6. '主页:http://yeyi.net
  7. '论坛:http://bbs.yeyi.net
  8. '业一网络 承接各种网站制作
  9. '程序开发 软件开发业务
  10. '业务联系
  11. '电话: 13007310512
  12. '联系人:郝亚平
  13. 'QQ:24344842 (只谈业务,技术问题请访问论坛)
  14. '请尊重作者劳动成果不要删除以上信息
  15. %>
  16. <% 
  17. dim style
  18. style = request("s")
  19. %>
  20. <%
  21. Dim rs__MMColParam
  22. rs__MMColParam = "0"
  23. If (Request.QueryString("n_tid") <> "") Then 
  24.   rs__MMColParam = Request.QueryString("n_tid")
  25. End If
  26. %>
  27. <%
  28. Dim rs
  29. Dim rs_numRows
  30. Set rs = Server.CreateObject("ADODB.Recordset")
  31. rs.ActiveConnection = MM_conn_news_STRING
  32. if rs__MMColParam = "0" then
  33. rs.Source = "SELECT *  FROM t_news  WHERE n_index = true and n_check = true  ORDER BY n_id DESC"
  34. else
  35. rs.Source = "SELECT *  FROM t_news  WHERE n_tid = " + Replace(rs__MMColParam, "'", "''") + " and n_check = true and n_index = true   ORDER BY n_date DESC"
  36. end if
  37. rs.CursorType = 0
  38. rs.CursorLocation = 2
  39. rs.LockType = 1
  40. rs.Open()
  41. rs_numRows = 0
  42. %>
  43. <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
  44. function DoTrimProperly(str, nNamedFormat, properly, pointed, points)
  45.   dim strRet
  46.   strRet = Server.HTMLEncode(str)
  47.   strRet = replace(strRet, vbcrlf,"")
  48.   strRet = replace(strRet, vbtab,"")
  49.   If (LEN(strRet) > nNamedFormat) Then
  50.     strRet = LEFT(strRet, nNamedFormat)
  51.     If (properly = 1) Then
  52.       Dim TempArray
  53.       TempArray = split(strRet, " ")
  54.       Dim n
  55.       strRet = ""
  56.       for n = 0 to Ubound(TempArray) - 1
  57.         strRet = strRet & " " & TempArray(n)
  58.       next
  59.     End If
  60.     If (pointed = 1) Then
  61.       strRet = strRet & points
  62.     End If
  63.   End If
  64.   DoTrimProperly = strRet
  65. End Function
  66. </SCRIPT>
  67. document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="35%" rowspan="2" align="center"><a href="news/<%=(rs.Fields.Item("n_tid").Value)%>/<%=(rs.Fields.Item("n_fname").Value)%>" target="_blank"><img src="news/upload/<%=(rs.Fields.Item("n_mpic").Value)%>" border="0"></a><% if style=1 then %></td></tr></table><% else %><td width="65%" height="33" >&nbsp;&nbsp;<%=DoTrimProperly((rs.Fields.Item("n_content").Value), 100, 0, 1, "...")%></td></tr><tr><td align="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td></tr></table><% end if %>');
  68. <%
  69. rs.Close()
  70. Set rs = Nothing
  71. %>