请问文章如何调用?
我一不知道相对应栏目的文章如何调用<%
sub news_all() '调用新闻
set rsq=server.createobject("adodb.recordset")
sql="select top 10 * from HN_news where kinds=true and class=1 order by id desc"
rsq.open sql,conn,1,1
response.Write"<div class='ttcontent'>"
response.Write"<div id='ttc1_1'>"
response.Write"<ul class='list3'>"
DO WHILE Not rsq.eof
%>
<li><span><%=rsq("time")%></span><strong>·</strong><a href="newsdisp.asp?id=<%=rsq("id")%>" title="<%=rsq("title")%>" target="_blank">
<% = Left(rsq("title"),14) %><% if Len(rsq("title"))>13 then %>…<% end if %></a></li>
<%
rsq.movenext
LOOP
response.Write"</ul></div></div>"
rsq.close
set rsq=nothing
end sub
sub news() '调用新闻
set rs=server.createobject("adodb.recordset")
sql="select top 10 * from HN_news where kinds=true and class=2 order by id desc"
rs.open sql,conn,1,1
response.Write"<div class='ttcontent'>"
response.Write"<div id='ttc1_1'>"
response.Write"<ul class='list3'>"
DO WHILE Not rs.eof
%>
<li><span><%=rs("time")%></span><strong>·</strong><a href="newsdisp.asp?id=<%=rs("id")%>" title="<%=rs("title")%>" target="_blank">
<% = Left(rs("title"),14) %><% if Len(rs("title"))>13 then %>…<% end if %></a></li>
<%
rs.movenext
LOOP
response.Write"</ul></div></div>"
rs.close
set rs=nothing
end sub
sub news1() '调用新闻
set rs=server.createobject("adodb.recordset")
sql="select top 10 * from HN_news where kinds=true and class=6 order by id desc"
rs.open sql,conn,1,1
response.Write"<div class='ttcontent' title='法律咨询中心'>"
response.Write"<div id='ttc1_1'>"
response.Write"<ul class='list3'>"
DO WHILE Not rs.eof
%>
<li><span><%=rs("time")%></span><strong>·</strong><a href="newsdisp.asp?id=<%=rs("id")%>" title="<%=rs("title")%>" target="_blank">
<% = Left(rs("title"),14) %><% if Len(rs("title"))>13 then %>…<% end if %></a></li>
<%
rs.movenext
LOOP
response.Write"</ul></div></div>"
rs.close
set rs=nothing
end sub
sub news2() '调用新闻
set rs=server.createobject("adodb.recordset")
sql="select top 10 * from HN_news where kinds=true and class=7 order by id desc"
rs.open sql,conn,1,1
response.Write"<div class='ttcontent' title='法律咨询中心'>"
response.Write"<div id='ttc1_1'>"
response.Write"<ul class='list3'>"
DO WHILE Not rs.eof
%>
<li><span><%=rs("time")%></span><strong>·</strong><a href="newsdisp.asp?id=<%=rs("id")%>" title="<%=rs("title")%>" target="_blank">
<% = Left(rs("title"),14) %><% if Len(rs("title"))>13 then %>…<% end if %></a></li>
<%
rs.movenext
LOOP
response.Write"</ul></div></div>"
rs.close
set rs=nothing
end sub
'===================================
sub work() '调用成功案例
set rs=server.createobject("adodb.recordset")
sql="select * from jcl_photo where photo=1 order by id desc"
rs.open sql,conn,1,1
k=1
do while Not rs.eof and k<2
%>
<tr>
<%
for n=1 to 4
%>
<td><table width="15%" border="0" align="center" cellpadding="1" cellspacing="0" title="法律咨询中心">
<tr>
<td width="53%"><div class="turl" style="width:107px; height:90px;"><a title="<%=rs("P_name")%>" href="<%=rs("p_net")%>" target="_blank"> <img src="photo/<%=rs("p_url")%>" width="104" height="87" hspace="3" vspace="3" border="0" /></a></div></td>
</tr>
<tr>
<td width="53%"><table width="100%" border="0" align="right" cellpadding="4" cellspacing="0" id="table6">
<tr>
<td height="25" align=center><a title="<%=rs("P_name")%>" href="<%=rs("p_net")%>" target="_blank"><%=rs("P_name")%></a></span></td>
</tr>
</table></td>
</tr>
</table>
<div align="center"></div></td>
<%
rs.movenext
if rs.eof then exit for
if rs.eof then exit do
Next
%>
</tr>
<%
k=k+1
Loop
rs.close
set rs=nothing
'===================================
我应该怎么改啊? 有特殊字符,, 这代码是 凹丫丫网站管理系统2.0 的
回复 板凳 稻草人 的帖子
依样画葫芦呗页:
[1]
