-
<!--#include file="../conn.asp"-->
- <!--#include file="../ks_cls/Kesion.CommonCls.asp"-->
- /*
- ==============================================================================================================================
- 文件作用:调用试卷列表
- 调用代码:<script src="/mnkc/showsj.asp?titlelen=20&num=10&classid=0&classtf=1&recommend=1&popular=1&money=1&hitstf=0" language="javascript"></script>
- 参数说明:num调用条数,classid栏目ID不限制取0否则取相应的栏目id编号,classtf显示栏目取1否则取0,hitstf按点击数排序取1否则取0
- ==============================================================================================================================
- */
<%
- dim KS:set KS=new PublicCls
- dim num:num=KS.chkclng(KS.g("num")) '调用条数
- dim titlelen:titlelen=KS.chkclng(KS.g("titlelen")) '标题长度
- dim classid:classid=KS.chkclng(KS.g("classid")) '栏目ID
- dim classtf:classtf=KS.chkclng(KS.g("classtf")) '是否显示栏目取1显示
- dim recommend:recommend=KS.chkclng(KS.g("recommend")) '是否推荐
- dim popular:popular=KS.chkclng(KS.g("popular")) '是否热门 1是
- dim money:money=KS.chkclng(KS.g("money")) '是否显示金币 1是
- dim hitstf:hitstf=KS.chkclng(KS.g("hitstf")) '取1按点击次数
- %>
- function loadex(id)
- {
- window.open('<%=KS.Setting(3) & KS.C_S(9,10)%>/exam/?id='+id,'new','');
- }
- <%dim param,mstr
- param=" where verific=1"
- if classid<>0 then param=param & " and tid=" & classid
- if recommend<>0 then param=param & " and recommend=1"
- if popular<>0 then param=param & " and popular=1"
- if hitstf=1 then param=param & " order by hits desc" else param=param & " order by a.id desc"
- dim rs:set rs=server.CreateObject("adodb.recordset")
- rs.open "select top " & num & " b.tname,a.* from KS_SJ a inner join KS_SJClass b on a.tid=b.id" & param,conn,1,1
- if not rs.eof then
- do while not rs.eof
- dim foldername:foldername=rs(0)
- if classtf=1 then
- foldername="[<a href='" & Replace(KS.Setting(3) & KS.C_S(9,8),"//","/") &"sjlb/" &rs("tid") & "_1.htm'>" &split(foldername,"|")(ubound(split(foldername,"|"))-1)&"</a>]"
- else
- foldername=""
- end if
-
- if money=1 then
- if rs("sq")>0 then
- mstr=" <span style='color:#f90'><img src='" & KS.Setting(3) & KS.C_S(9,10) & "/images/money.gif' align='absmiddle'>" & rs("sq") & KS.Setting(45) & "</span>"
- else
- mstr=" <img src='" & KS.Setting(3) & KS.C_S(9,10) & "/images/free.gif' align='absmiddle'>"
- end if
- end if
- dim url,target
- if rs("dtfs")="1" then
- url=Replace(KS.Setting(3) & KS.C_S(9,8),"//","/") & "sj/" & rs("ID") & ".htm"
- target=" target=\""_blank\"""
- else
- target=""
- url="javascript:loadex(" & rs("id") & ")"
- end if
- %>
- document.write("<li><span class='classname'><%=foldername%></span><a href=\"<%=url%>\"<%=target%>><%=ks.gottopic(rs("title"),titlelen)%></a><%=mstr%></li>");
- <%
- rs.movenext
- loop
- end if
- rs.close:set rs=nothing
- conn.close:set conn=nothing
- set KS=nothing
- %>
这个是6.5考试系统showsj.asp文件代码
请教各位大大:
如何把他的途径改成直接途径,现在他是相对的,
因为我用:<script src="http://www.外调网址.com/Mnkc/showsj.asp?num=5&recommend=1&classtf=1&money=1&hitstf=0"></script>
调用最新的发布过去别的站,他能显示标题,但是途径是相对我那个www.外调网址.com了,
请教高手如何修改