当前位置: 网学 > 编程文档 > ASP > 正文

asp常用函数集合,非常不错以后研究第1/4页

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 13/06/16
tattribute("num",strtag)
if not isnumeric(getattribute("len",strtag)) then
response.write("标签[news:relate]参数错误!参数[len]必须是数字!")
response.end()
end if
objclass.len = getattribute("len",strtag)
if getattribute("lih",strtag) <> "" and not isnumeric(getattribute("lih",strtag)) then
response.write("标签[news:relate]参数错误!参数[lih]必须是数字!")
response.end()
end if
objclass.lih = getattribute("lih",strtag)
if not isnumeric(getattribute("col",strtag)) then
response.write("标签[news:relate]参数错误!参数[col]必须是数字!")
response.end()
end if
parsenewstag = objclass.relateshow(getattribute("col",strtag),classid,newsid,keywords)
set objclass = nothing
case "page"
set objclass = new ncmspagetag
parsenewstag = objclass.pageshow(getattribute("show",strtag),classid,newsid)
set objclass = nothing
case else
response.write("标签[news:xxxx]构造错误!")
response.end()
end select
end function

function getcurclasscount(classid)
dim rs,curclasscount
set rs = conn.execute("select count(*) from NCMS_news where classid in(" & classid & allchildclass(classid) & ")")
if instr(rs(0)/n_listnum,".") <> 0 then
curclasscount = fix(rs(0)/n_listnum) + 1
else
curclasscount = rs(0)/n_listnum
end if
rs.close:set rs = nothing
getcurclasscount = curclasscount
end function

class ncmsclasstag
public ty,len,order,lih
public function classshow(stype,scolumn,classid,indexid,pagestr)
dim TempHTM,xsql,rs,sql,databox,l,obox
TempHTM = "" & chr(10) & "<table cellpadding=""0"" cellspacing=""0"" width=""100%"" border=""0"">" & chr(10)
TempHTM = TempHTM & "<tr>" & chr(10)
if indexid = "" or indexid = 0 then
indexid = 1
end if
select case stype
case "text"
set rs = server.createobject("adodb.recordset")
if order = "desc" then
sql = "select classid,title,click,filename,addtime from NCMS_news where classid in(" & classid & allchildclass(classid) & ") and created=1 and pagetype=0 order by id desc"
elseif order = "asc" then
sql = "select classid,title,click,filename,addtime from NCMS_news where classid in(" & classid & allchildclass(classid) & ") and created=1 and pagetype=0 order by id asc"
else
response.write("标签[news:list]参数[order]错误!")
response.end()
end if
rs.cursorlocation = 3
rs.open sql,conn,1,3
if rs.eof then
rs.close:set rs = nothing

网学推荐

免费论文

原创论文

浏览:
设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
湘ICP备09003080号