📄 code_pic.asp
字号:
<%
'┏━━(YCMS代码讲解)━━━━━┓
'┃过程名:picclass ┃
'┃功 能:启动图片数据 ┃
'┗━━━━━━━[yecao.cn]━━┛
sub picclass(classid,classdj)
YC("<table border='0'><tr><td width='136' align='center' valign='top'>")
if classdj=1 then
sql="select top 1 id,title,color,pic,click,date,user from [YC_pic] where pic<>'' and pass=1 and bigclass="&classid&" order by id DESC"
else
sql="select top 1 id,title,color,pic,click,date,user from [YC_pic] where pic<>'' and pass=1 and class="&classid&" order by id DESC"
end if
set rs=conn.execute(sql)
do while not rs.eof
YC("<div class='p1'><div class='p2'><div class='p3'>")
YC("<a href='showpic.asp?id="&rs("id")&"'><img src='"&rs("pic")&"' border='0' alt='人气值:"&rs("click")&"' style='width:120px;height:120px;border:1px solid #444' align='absmiddle'></a></div></div></div>")
call br()
YC("<center><a href='showpic.asp?id="&rs("id")&"' target='dj'>"&YC_cut(rs("title"),16)&"</a></center> ")
call br()
rs.movenext
loop
if rs.eof and rs.bof then
YC("<div class='p1'><div class='p2'><div class='p3'><img src='img/nopic.gif' style='width:120px;height:120px;border:#999 1px solid' /></div></div></div><br /><br />")
end if
rs.close
set rs=nothing
YC("<td valign='top' width='100%'>")
if classdj=1 then
sqllist="select top 8 id,title,color,class,pic,click,date,user from [YC_pic] where bigclass="&classid&" and pass=1 order by id DESC"
else
sqllist="select top 8 id,title,color,class,pic,click,date,user from [YC_pic] where class="&classid&" and pass=1 order by id DESC"
end if
set rs=conn.execute(sqllist)
if rs.eof and rs.bof then
YC("<br /><div align='center'>数据读取中...<br /><br /><img src='img/loading.gif' border='0' /></div>")
else
YC("<ul class='list' >")
do while not rs.eof
YC("<li><span class='li_left'>")
if classdj=1 then
YC("[")
call myclass("YC_picclass","pic",rs("class"))
YC("] ")
end if
YC("<a href='showpic.asp?id="&rs("id")&"'><font color='"&rs("color")&"' title='人气值:"&rs("click")&"'>"&rs("title")&"</font></a>")
if replacetime(rs("date"),"1")=date() then
YC(" <img src='img/new.gif' border='0'>")
end if
YC("</span><span class='li_right'> ["&replacetime(rs("date"),"1")&"]</span></li>")
rs.movenext
loop
rs.close
set rs=nothing
YC("</ul>")
end if
YC("</td></tr></table>")
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -