⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ds.asp

📁 生活者姿态整站程序 生活者姿态整站程序 生活者姿态整站程序
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" codepage=936 %> 
<!--#include file="Connections/news.asp" -->
<!--#include file="ubb.asp" -->
<%
set rsn = Server.CreateObject("ADODB.Recordset")
rsn.ActiveConnection = MM_news_STRING
rsn.Source = "SELECT n_id, b_id, n_title, n_data FROM news ORDER BY n_data DESC"
rsn.CursorType = 0
rsn.CursorLocation = 2
rsn.LockType = 3
rsn.Open()
rsn_numRows = 0
%>
<%
Dim rsc__MMColParam
rsc__MMColParam = "1"
if (Request.QueryString("true") <> "") then rsc__MMColParam = Request.QueryString("true")
%>
<%
set rsc = Server.CreateObject("ADODB.Recordset")
rsc.ActiveConnection = MM_news_STRING
rsc.Source = "SELECT n_id, n_title FROM news WHERE n_com = " + Replace(rsc__MMColParam, "'", "''") + " ORDER BY n_data DESC"
rsc.CursorType = 0
rsc.CursorLocation = 2
rsc.LockType = 3
rsc.Open()
rsc_numRows = 0
%>
<%
set rsb = Server.CreateObject("ADODB.Recordset")
rsb.ActiveConnection = MM_news_STRING
rsb.Source = "SELECT * FROM big"
rsb.CursorType = 0
rsb.CursorLocation = 2
rsb.LockType = 3
rsb.Open()
rsb_numRows = 0
%>
<%
set rsh = Server.CreateObject("ADODB.Recordset")
rsh.ActiveConnection = MM_news_STRING
rsh.Source = "SELECT n_id, b_id, n_title, n_hit FROM news ORDER BY n_hit DESC"
rsh.CursorType = 0
rsh.CursorLocation = 2
rsh.LockType = 3
rsh.Open()
rsh_numRows = 0
%>
<%
Dim rsi__MMColParam
rsi__MMColParam = "1"
if (Request.QueryString("true") <> "") then rsi__MMColParam = Request.QueryString("true")
%>
<%
set rsi = Server.CreateObject("ADODB.Recordset")
rsi.ActiveConnection = MM_news_STRING
rsi.Source = "SELECT n_id, n_title, n_content, n_path FROM news WHERE n_i = " + Replace(rsi__MMColParam, "'", "''") + " ORDER BY n_id DESC"
rsi.CursorType = 0
rsi.CursorLocation = 2
rsi.LockType = 3
rsi.Open()
rsi_numRows = 0
%>
<%
set rsb1 = Server.CreateObject("ADODB.Recordset")
rsb1.ActiveConnection = MM_news_STRING
rsb1.Source = "SELECT * FROM big"
rsb1.CursorType = 0
rsb1.CursorLocation = 2
rsb1.LockType = 3
rsb1.Open()
rsb1_numRows = 0
%>
<%session("dd")=date()%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
rsb_numRows = rsb_numRows + Repeat1__numRows
%>
<%
Dim Repeat5__numRows
Repeat5__numRows = -1
Dim Repeat5__index
Repeat5__index = 0
rsb1_numRows = rsb1_numRows + Repeat5__numRows
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "")  Then MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<%
Dim Repeat4__numRows
Repeat4__numRows = 10
Dim Repeat4__index
Repeat4__index = 0
rsh_numRows = rsh_numRows + Repeat4__numRows
%>
<%
Dim Repeat3__numRows
Repeat3__numRows = 10
Dim Repeat3__index
Repeat3__index = 0
rsc_numRows = rsc_numRows + Repeat3__numRows
%>
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>					
function DoDateTime(str, nNamedFormat, nLCID)				
	dim strRet								
	dim nOldLCID								
										
	strRet = str								
	If (nLCID > -1) Then							
		oldLCID = Session.LCID						
	End If									
										
	On Error Resume Next							
										
	If (nLCID > -1) Then							
		Session.LCID = nLCID						
	End If									
										
	If ((nLCID < 0) Or (Session.LCID = nLCID)) Then				
		strRet = FormatDateTime(str, nNamedFormat)			
	End If									
										
	If (nLCID > -1) Then							
		Session.LCID = oldLCID						
	End If									
										
	DoDateTime = strRet							
End Function									
</SCRIPT>

<link rel="stylesheet" href="intohz.css" type="text/css"></head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> 
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" height="1">
  <tr>
    <td bgcolor="#F7F7F7"></td>
  </tr>
</table>
<table width="92%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>	
function DoTrimProperly(str, nNamedFormat, properly, pointed, points)
  dim strRet
  strRet = Server.HTMLEncode(str)
  strRet = replace(strRet, vbcrlf,"")
  strRet = replace(strRet, vbtab,"")
  If (LEN(strRet) > nNamedFormat) Then
    strRet = LEFT(strRet, nNamedFormat)			
    If (properly = 1) Then					
      Dim TempArray								
      TempArray = split(strRet, " ")	
      Dim n
      strRet = ""
      for n = 0 to Ubound(TempArray) - 1
        strRet = strRet & " " & TempArray(n)
      next
    End If
    If (pointed = 1) Then
      strRet = strRet & points
    End If
  End If
  DoTrimProperly = strRet
End Function
</SCRIPT>
  <tr> 
    <td width="70%" valign="top"> <br> 
      <% If Not rsi.EOF Or Not rsi.BOF Then %>
      <table width="90%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="E7E7E7">
        <tr> 
          <td bgcolor="#FFFFFF"> <br> <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td style="word-break:break-all"> <span class="big"><b><a href="detail.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "n_id=" & rsi.Fields.Item("n_id").Value %>"><%=(rsi.Fields.Item("n_title").Value)%></a></b></span><br> 
                  <a href="detail.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "n_id=" & rsi.Fields.Item("n_id").Value %>"><img src="upload/<%=(rsi.Fields.Item("n_path").Value)%>" border="0" align="left"></a><br> 
                  <% =ubbcode(DoTrimProperly((rsi.Fields.Item("n_content").Value), 300, 0, 1, "...")) %>
                </td>
              </tr>
              <tr> 
                <td> <div align="right"><A HREF="detail.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "n_id=" & rsi.Fields.Item("n_id").Value %>">详情...</A> 
                     .</div></td>
              </tr>
            </table></td>
        </tr>
      </table>
      <% End If ' end Not rsi.EOF Or NOT rsi.BOF %>
      <br> 
      <% 
While ((Repeat1__numRows <> 0) AND (NOT rsb.EOF)) 
%>
      <table width="90%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="E7E7E7">
        <tr> 
          <td height="23" background="images/biao_t1.gif">  <A HREF="list_b.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "b_id=" & rsb.Fields.Item("b_id").Value %>"><%=(rsb.Fields.Item("b_type").Value)%></A></td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF"> <br> <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
              <% FilterParam = rsb.Fields.Item("b_id").value
			  rsn.Filter = "b_id="&FilterParam
			  Dim Repeat2__numRows
			  Repeat2__numRows = 8
			  Dim Repeat2__index
			  Repeat2_index = 0
			  rsn_numRows=rsn__numRows+Repeat2__numRows
			  While ((Repeat2__numRows <> 0) AND (NOT rsn.EOF))
			  %>
              <tr> 
                <td width="3%" height="15"> 
                  <% if rsn("n_data")=session("dd") then %>
                  <img src="images/arrow1.gif" width="15" height="11"> 
                  <% else %>
                  <img src="images/arrow.gif" width="15" height="11"> 
                  <% end if %>
                </td>
                <td width="97%" height="15">[<%= DoDateTime((rsn.Fields.Item("n_data").Value), 2, 1042) %>] 
                  <A HREF="detail.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "n_id=" & rsn.Fields.Item("n_id").Value %>" target="_blank"> 
                  <% =(DoTrimProperly((rsn.Fields.Item("n_title").Value), 24, 0, 1, "...")) %>
                  </A> </td>
              </tr>
              <%
			  Repeat2__index=Repeat2__index+1
              Repeat2__numRows=Repeat2__numRows-1
			  rsn.movenext()
			  wend
			  %>
              <tr> 
                <td width="3%">&nbsp;</td>
                <td width="97%"> <div align="right"><A HREF="list_b.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "b_id=" & rsb.Fields.Item("b_id").Value %>">更多新闻...</A>   </div></td>
              </tr>
            </table></td>
        </tr>
      </table>
      <br> 
      <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsb.MoveNext()
  Wend
  %>
    </td>
  </tr>
</table>
<%
rsn.Close()
%>
<%
rsc.Close()
%>
<%
rsb.Close()
%>
<%
rsh.Close()
%>
<%
rsi.Close()
%>
<%
rsb1.Close()
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -