ASP程序 如何调用文章标题为页面标题? 20
<%endifendifrstype.movenextifrstype.eofthenexitfornextendsub'新闻标题列表格式:callnewstitle(n...
<%
end if
end if
rstype.movenext
if rstype.eof then exit for
next
end sub
'新闻标题列表 格式:call newstitle(n,lang,dalei,xiaolei,wenzhangurl,jieshou,fuhao) 参数:n:每页多少条。lang:最大长度。dalei,xiaolei:大类、小类,wenzhangurl:显示具体新闻的页面地址。jieshou:是否接受URL类别参数,1为接受。fuhao:列表项目符号
sub newstitle(n,lang,dalei,xiaolei,wenzhangurl,jieshou,fuhao)
if jieshou = 1 then
if request_x("types") = "" then
xiaolei = xiaolei
else
xiaolei = trim(request_x("types"))
end if
else
xiaolei = xiaolei
end if
set rs_news=server.createobject("adodb.recordset")
if dalei = "" then
if xiaolei = "" then
sqltext4="select * from Conews where shenhe = 'yes' Order BY top desc, zuixin desc,time desc"
else
sqltext4="select * from Conews where type = '" & xiaolei & "' and shenhe = 'yes' Order BY top desc, zuixin desc,time desc"
end if
else
if xiaolei = "" then
sqltext4="select * from Conews where dalei = '"&dalei&"' and shenhe = 'yes' Order BY top desc, zuixin desc,time desc"
else
sqltext4="select * from Conews where dalei = '"&dalei&"' and type = '" & xiaolei & "' and shenhe = 'yes' Order BY top desc, zuixin desc,time desc"
end if
end if
rs_news.open sqltext4,conn,1,1
page = request_x("page")
if page <> "" then page = clng(page)
if request_x("page") = "" then page = 1
if rs_news.bof and rs_news.eof then
else
rs_news.pagesize = n
rs_news.absolutepage = page
end if
%>
请问怎么调用? 展开
end if
end if
rstype.movenext
if rstype.eof then exit for
next
end sub
'新闻标题列表 格式:call newstitle(n,lang,dalei,xiaolei,wenzhangurl,jieshou,fuhao) 参数:n:每页多少条。lang:最大长度。dalei,xiaolei:大类、小类,wenzhangurl:显示具体新闻的页面地址。jieshou:是否接受URL类别参数,1为接受。fuhao:列表项目符号
sub newstitle(n,lang,dalei,xiaolei,wenzhangurl,jieshou,fuhao)
if jieshou = 1 then
if request_x("types") = "" then
xiaolei = xiaolei
else
xiaolei = trim(request_x("types"))
end if
else
xiaolei = xiaolei
end if
set rs_news=server.createobject("adodb.recordset")
if dalei = "" then
if xiaolei = "" then
sqltext4="select * from Conews where shenhe = 'yes' Order BY top desc, zuixin desc,time desc"
else
sqltext4="select * from Conews where type = '" & xiaolei & "' and shenhe = 'yes' Order BY top desc, zuixin desc,time desc"
end if
else
if xiaolei = "" then
sqltext4="select * from Conews where dalei = '"&dalei&"' and shenhe = 'yes' Order BY top desc, zuixin desc,time desc"
else
sqltext4="select * from Conews where dalei = '"&dalei&"' and type = '" & xiaolei & "' and shenhe = 'yes' Order BY top desc, zuixin desc,time desc"
end if
end if
rs_news.open sqltext4,conn,1,1
page = request_x("page")
if page <> "" then page = clng(page)
if request_x("page") = "" then page = 1
if rs_news.bof and rs_news.eof then
else
rs_news.pagesize = n
rs_news.absolutepage = page
end if
%>
请问怎么调用? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询