📄 code_dj.asp
字号:
<%
'┏━━(YCMS代码讲解)━━━━━┓
'┃过程名:djclass ┃
'┃功 能:启动娱乐数据 ┃
'┗━━━━━━━[yecao.cn]━━┛
sub djclass(classid,classdj)
YC("<table border='0'><tr><td width='136' valign='top' align='center'>")
if classdj=1 then
sql="select top 1 id,title,color,singer,commend,pic,click,date,user from [YC_dj] where pic<>'' and pass=1 and bigclass="&classid&" order by id DESC"
else
sql="select top 1 id,title,color,singer,commend,pic,click,date,user from [YC_dj] 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='showdj.asp?id="&rs("id")&"' target='dj520'><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='showdj.asp?id="&rs("id")&"'>"&YC_cut(rs("title"),16)&"</a></center> ")
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>")
call br()
YC("<center>暂时没有图片娱乐!</center>")
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,singer,commend,pic,click,date,user from [YC_dj] where bigclass="&classid&" and pass=1 order by id DESC"
else
sqllist="select top 8 id,title,color,class,singer,commend,pic,click,date,user from [YC_dj] 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_djclass","dj",rs("class"))
YC("] ")
end if
YC("<a href='showdj.asp?id="&rs("id")&"'><font color='"&rs("color")&"' title='"&rs("title")&"'>"&rs("title")&"</font></a>")
if replacetime(rs("date"),"1")=date() then
YC(" <img src='img/new.gif' alt='' border='0' />")
end if
YC("</span><span class='li_right'> ["&replacetime(rs("date"),"1")&"]</span></li>")
rs.movenext
loop
if rs.eof and rs.bof then
YC("<center><font color='red'><b>暂时没有娱乐!</b></font></center>")
end if
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 + -