%
'#########################################################################
'#
'# 端木广告发布管理系统1.0
'#
'# 1、本系统为免费软件,供所有网站免费使用,您可以任意修改、传播,
'# 但请尊重我的劳动成果,保留我的版权信息。谢谢!
'# 2、本系统为免费软件,用户自由选择是否使用,在使用中出现任何问
'# 题而造成的损失本人不负任何责任。
'# 3、如果您的网站正式起用了这个系统,请您通知我。如果可能,请在
'# 您的网站做上我的链接,希望能给予合作。谢谢!
'#
'#
'# 版权所有: 易诺网(www.yedns.com)
'# 程序制作: 端木忧伤(duanmuyoushang@sina.com)
'# 主页地址: http://www.yedns.com
'# 易诺网提供各种虚拟主机、国际国内域名、集团邮局的注册
'# 服务。虚拟主机免费试用,满意付款!
'#
'##########################################################################
%>
<%
dim getplace,getshow,adsrs,adssql,adsrsp,adssqlp,adsrss,adssqls,getip,getprice
adsconn.open adsdata
set adsrsp=server.createobject("adodb.recordset")
adssqlp="Select * from [ads] where act=1 and class <> 0 order by time"
adsrsp.open adssqlp,adsconn,1,3
while not adsrsp.eof
advertvirtualvalue=0
if adsrsp("class")=1 then
if adsrsp("click")>=adsrsp("clicks") then
advertvirtualvalue=1
end if
elseif adsrsp("class")=2 then
if adsrsp("show")>=adsrsp("shows") then
advertvirtualvalue=1
end if
elseif adsrsp("class")=3 then
if date()>=adsrsp("lasttime") then
advertvirtualvalue=1
end if
elseif adsrsp("class")=4 then
if adsrsp("click")>=adsrsp("clicks") then
advertvirtualvalue=1
end if
if adsrsp("show")>=adsrsp("shows") then
advertvirtualvalue=1
end if
elseif adsrsp("class")=5 then
if adsrsp("click")>=adsrsp("clicks") then
advertvirtualvalue=1
end if
if date()>=adsrsp("lasttime") then
advertvirtualvalue=1
end if
elseif adsrsp("class")=6 then
if adsrsp("show")>=adsrsp("shows") then
advertvirtualvalue=1
end if
if date()>=adsrsp("lasttime") then
advertvirtualvalue=1
end if
elseif adsrsp("class")=7 then
if adsrsp("click")>=adsrsp("clicks") then
advertvirtualvalue=1
end if
if adsrsp("show")>=adsrsp("shows") then
advertvirtualvalue=1
end if
if date()>=adsrsp("lasttime") then
advertvirtualvalue=1
end if
end if
if advertvirtualvalue>=1 then
adsrsp("act")=2
adsrsp.update
end if
adsrsp.movenext
wend
adsrsp.close
set adsrsp=nothing
adsconn.close
adsconn.open adsdata
getprice=request.querystring("priceid")
getplace=cint(request.querystring("place"))
set adsrs=server.createobject("adodb.recordset")
adssql="Select top 1 * from [ads] where act=1 and place="&getplace&" and priceid="&getprice&" order by time"
adsrs.open adssql,adsconn,1,3
if adsrs.eof=false then
getshow=adsrs("show")+1
adsrs("show")=getshow
adsrs("time")=now()
adsrs.Update
if adsrs("window")=0 then
ttarg = "_blank"
else
ttarg="_top"
end if
if adsrs("showtype")="i" then
%>
document.write('url.asp?id=<%=adsrs("id")%>\" target=\"<%=ttarg%>\"> height=<%=adsrs("height")%> src=\"<%=adsrs("gif_url")%>\">');
<%
elseif adsrs("showtype")="f" then
%>
document.write('');<%
else
%>
document.write('');
<%
end if
getip=request.ServerVariables("REMOTE_ADDR")
set adsrss=server.createobject("adodb.recordset")
adssqls="select * from iplist"
adsrss.open adssqls,adsconn,1,3
adsrss.AddNew
adsrss("adid") =adsrs("id")
adsrss("time") = now()
adsrss("ip") = getip
adsrss("class") = 1
adsrss.update
adsrss.close
set adsrss=nothing
end if
adsrs.close
set adsrs=nothing
adsconn.close
set adsconn=nothing
%>