⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ads.asp

📁 嘉缘人才6.0精简 ,很好用的人才系统
💻 ASP
字号:
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/Commoncode.asp"-->
<%
response.expires = 0
response.expiresabsolute = now() - 0
response.addHeader "pragma","no-cache"
response.addHeader "cache-control","private"
Response.CacheControl = "no-cache"
const advertlistnumber=24
'''''''''''''''''''''''''''''''''''判断是否有过期广告并更新
set rs=server.createobject("adodb.recordset")
sql="Select * from [JOB_ads] where JOB_act=1 and JOB_class <> 0 order by JOB_time"
rs.open sql,conn,1,3
if not rs.eof then
while not rs.eof
advertvirtualvalue=0

if rs("JOB_class")=1 then
	if rs("JOB_click")>=rs("JOB_clicks") then
	advertvirtualvalue=1
	end if
	
	elseif rs("JOB_class")=2 then
	if rs("JOB_show")>=rs("JOB_shows") then
	advertvirtualvalue=1
	end if
	
	elseif rs("JOB_class")=3 then
	if date()>=rs("JOB_lasttime") then
	advertvirtualvalue=1
	end if
	
	elseif rs("JOB_class")=4 then
	if rs("JOB_click")>=rs("JOB_clicks") then
	advertvirtualvalue=1
	end if
	if rs("JOB_show")>=rs("JOB_shows") then
	advertvirtualvalue=1
	end if
	
	elseif rs("JOB_class")=5 then
	if rs("JOB_click")>=rs("JOB_clicks") then
	advertvirtualvalue=1
	end if
	if date()>=rs("JOB_lasttime") then
	advertvirtualvalue=1
	end if
	
	elseif rs("JOB_class")=6 then
	if rs("JOB_show")>=rs("JOB_shows") then
	advertvirtualvalue=1
	end if
	if date()>=rs("JOB_lasttime") then
	advertvirtualvalue=1
	end if
	
	elseif rs("JOB_class")=7 then
	if rs("JOB_click")>=rs("JOB_clicks") then
	advertvirtualvalue=1
	end if
	if rs("JOB_show")>=rs("JOB_shows") then
	advertvirtualvalue=1
	end if
	if date()>=rs("JOB_lasttime") then
	advertvirtualvalue=1
	end if
end if

if advertvirtualvalue>=1 then
	rs("JOB_act")=2
	rs.update
end if
	rs.movenext
wend
end if
rs.close
set rs=nothing 

getprice=request.querystring("priceid")
getplace=cint(request.querystring("place"))
sql="select * from JOB_place where JOB_place="&getplace&" and JOB_priceid="&getprice&""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
hangnum=1
lienum=1
if not rs.eof then
num=split(rs("job_aa"),"*")
hangnum=num(0)
lienum=num(1)
num=lienum*hangnum
end if
rs.close

if (not isNumeric(num)) or num="" then
	num=10
end if

sql="Select top "&num&" * from [JOB_ads] where JOB_act=1 and JOB_place="&getplace&" and JOB_priceid="&getprice&" order by JOB_time asc,JOB_id asc"
rs.open sql,conn,1,3
if not rs.eof then
%>document.write("")
<%
i=0
Do while Not rs.eof
	rs("JOB_show")=rs("JOB_show")+1
	rs("JOB_time")=now()
	rs.Update

	if rs("JOB_window")=0 then
		ttarg = "_blank"
	else
		ttarg="_top"
	end if
	
	
if rs("JOB_showtype")="i" then
	viewads=viewads&"<li align=center><a href="&SiteUrl&InstallDir&"ads/adsurl.asp?id="&rs("JOB_id")&" target="&ttarg&">"
	viewads=viewads&"<img border=0 "
	If rs("JOB_width")>0 then
	viewads=viewads&" width="&rs("JOB_width")&" "
	end if
	if  rs("JOB_height")>0 then
	viewads=viewads&" height="&rs("JOB_height")&" "
	end if
	if cint(rs("JOB_place"))=5 then
	viewads=viewads&" align='left' "
	end if
	viewads=viewads&" src="&SiteUrl&InstallDir&rs("JOB_gif_url")&"></a></li>"
%>
document.write("<%=viewads%>")
<%	
	viewads=""
elseif rs("JOB_showtype")="f" then
	viewads="<li><embed src='"&SiteUrl&InstallDir&rs("JOB_gif_url")&"' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'"
	if cint(rs("JOB_width"))>0 then
	viewads=viewads&" width="&rs("JOB_width")
	end if
	if cint(rs("JOB_height"))>0 then
	viewads=viewads&" height="&rs("JOB_height")
	end if
	viewads=viewads&" </embed></li>"
%>
document.write("<%=viewads%>")
<%viewads=""
else
%>document.write("<li>&nbsp;</li>")
<%
end if
rs.movenext
i=i+1
If cint(i) mod cint(lienum)=0 then
	if i<>num then
%>
<%  end if
End if
loop
end if
rs.close
set rs=nothing 
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -