<%
dim ID,sqlAD,rsAD,AD
ID=Trim(request("ID"))
if ID="" then
sqlAD="select * from Advertisement where ADType=0 order by ID desc"
else
sqlAD="select * from Advertisement where ADType=0 and ID="&Clng(ID)
end if
set rsAD=server.createobject("adodb.recordset")
rsAD.open sqlAD,conn,1,1
if not rsAd.bof and not rsAD.eof then
if rsAD("isflash")=true then
AD= ""
else
AD ="
0 then AD = AD & " width='" & rsAD("ImgWidth") & "'"
if rsAD("ImgHeight")>0 then AD = AD & " height='" & rsAD("ImgHeight") & "'"
AD = AD & " border='0'>"
end if
response.write AD
end if
rsAD.close
set rsAD=nothing
%>