?? friendlink_body.asp
字號:
<%sub friendlink_body()
dim totalcs
%>
<table width="<%=tablewidth%>" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tr>
<td align="center" valign="top" bgcolor="#FFFFFF" class="linee">
<%
dim totalfl,passing
sql="select fl_id from friendlink"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
totalfl=rs.recordcount
sql="select fl_id from friendlink where passed=1"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
passing=rs.recordcount
%>
<table width="99%" border="1" cellpadding="3" cellspacing="0" bordercolor="#09DD77" style="border-collapse: collapse">
<tr>
<td height="25" align="center" background="images/dh.gif"> 當前共有 <font color="#FF0000"><%=totalfl%></font> 個友情鏈接,其中正在等待通過驗證的 <font color="#FF0000"><%=passing%></font> 個
</tr>
</table><br>
<%sql="select * from flcat"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
dim rs2_numrows
rs2_numrows=0
Dim HLooper1__numRows
Dim HLooper1__index
HLooper1__index = 0
startrw = 0
endrw = HLooper1__index
numberColumns = 5
sql="select * from friendlink where flcat_id="&rs("flcat_id")&" and passed=0"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
HLooper1__numRows = rs2.recordcount
if HLooper1__numRows=0 then
numrows=1
else
if HLooper1__numRows>=numberColumns then
if (HLooper1__numRows mod numberColumns)=0 then
numrows=HLooper1__numRows\numberColumns
else
numrows=HLooper1__numRows\numberColumns+1
end if
else
numrows=1
end if
end if
%>
<table width="99%" border="1" cellpadding="0" cellspacing="0" bordercolor="#09DD77" style="border-collapse: collapse">
<tr>
<td height="25" background="images/dh.gif"> <B><%=rs("flcat_name")%></B></td>
</tr>
<tr>
<td bgcolor="#eaf4ff">
<table width="100%" border="0" align="center" cellpadding="10" cellspacing="0">
<%do while((numrows <> 0) AND (Not rs2.EOF))
startrw = endrw + 1
endrw = endrw + numberColumns
rs2_numRows = rs2_numRows + HLooper1__numRows%>
<tr>
<%do While ((startrw <= endrw) AND (Not rs2.EOF))%>
<td width="20%" align="center"><a href="<%=rs2("fl_url")%>" title="<%=rs2("fl_name")%>" target="_blank"><%=rs2("fl_name")%></a></td>
<%
startrw = startrw + 1
rs2.MoveNext()
loop
%>
</tr>
<%numrows=numrows-1
loop
if rs2.eof and rs2.bof then%>
<tr>
<td align="center"> 當前該分類中還沒有鏈接!</td>
</tr>
<% end if
rs2.close
set rs2=nothing
%>
</table></td>
</tr>
</table><br>
<%rs.movenext
loop
if rs.eof and rs.bof then%>
<table width="99%" border="0" cellspacing="1" cellpadding="10" bgcolor="#7ec3f8" align="center">
<tr>
<td align="center" bgcolor="#eaf4ff" > 當前沒有友情鏈接!</td>
</tr>
</table><br>
<%end if%>
</td>
</tr>
</table>
<%
rs.close
set rs=nothing
end sub%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -