?? default.asp
字號(hào):
<%@LANGUAGE="VBSCRIPT" codepage=936 %>
<!--#include file="head.asp" -->
<!--#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>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" background="images/bg2.gif">
<tr>
<td><div align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="776" height="60">
<param name="movie" value="../ad1.swf">
<param name="quality" value="high">
<embed src="../ad1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="776" height="60"></embed></object>
</div></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" background="images/bg2.gif" 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="630" valign="top"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="24%"><table width="96%" height="100%" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td height="100%" valign="top"><br>
<table width="86%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<form name="form1" method="get" action="search.asp">
<td> <div align="center">
<input type="text" name="sss" size="17">
<br>
<br>
<select name="xxx" size="1">
<option value="n_title" selected>標(biāo)題</option>
<option value="n_author">作者</option>
<option value="n_content">內(nèi)容</option>
</select>
<input type="submit" name="Submit" value=" 搜 ">
</div></td>
</form>
</tr>
</table>
<br>
<table width="92%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="E7E7E7">
<tr>
<td height="20" background="images/biao_t1.gif"> 站長推薦:</td>
</tr>
<tr>
<td bgcolor="#F7F7F7" height="150" valign="top"><br>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center" height="16">
<%
While ((Repeat3__numRows <> 0) AND (NOT rsc.EOF))
%>
<tr>
<td width="13" background="images/news_bg.gif"><img src="images/arrow.gif" width="20" height="9"></td>
<td width="167" background="images/news_bg.gif"> <a href="detail.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "n_id=" & rsc.Fields.Item("n_id").Value %>" target="_blank">
<% =(DoTrimProperly((rsc.Fields.Item("n_title").Value), 6, 0, 1, "...")) %>
</a> </td>
</tr>
<%
Repeat3__index=Repeat3__index+1
Repeat3__numRows=Repeat3__numRows-1
rsc.MoveNext()
Wend
%>
</table>
<br> </td>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -