📄 code_index.asp
字号:
<%
'┏━━━━┓
'┃首页新闻┃
'┗━━━━┛
sub YC_news()
YC("<table border='0'><tr><td width=""136"" align=""center"">")
sql="select top 1 id,title,color,pic,date,click,user from [YC_news] where pic<>'' and pass=1 order by id DESC"
set rs=conn.execute(sql)
do while not rs.eof
YC("<div class='p1'><div class='p2'><div class='p3'>")
YC("<a href='shownews.asp?id="&rs("id")&"' target=""news"">")
YC("<img src='"&rs("pic")&"' border='0' alt='人气值:"&rs("click")&"' style=""width:120px;height:120px;border:1px solid #999;"" align=""absmiddle""></a>")
YC("</div></div></div>")
call br()
YC("<center><a href='shownews.asp?id="&rs("id")&"' target='news'><font color="""&rs("color")&""">"&YC_cut(rs("title"),16)&"</font></a></center>")
rs.movenext
loop
if rs.eof and rs.bof then
YC("<div class='p1'><div class='p2'><div class='p3'><img alt='' 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><td valign=""top"" class=""newsbg"">")
sql="SELECT top "&indexpage(0)&" id,title,color,class,date,click,user FROM [YC_news] where pass=1 ORDER BY id DESC"
set rs=conn.execute(sql)
YC("<ul class=""list"">")
do while not rs.eof
YC("<li><span class='li_left'>[")
call mYClass("YC_newsclass","news",rs("class"))
YC("] <a target='news' href=""shownews.asp?id="&rs("id")&"""><font color="""&rs("color")&""" title='人气值:"&rs("click")&"'>"&rs("title")&"</font></a>")
if rs("date")=date() then
YC(" <img src='img/new.gif' alt='' width='22' height='7' 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>暂时没有新闻!</center>")
end if
if not rs.eof or not rs.bof then
end if
rs.close
set rs=nothing
YC("</ul></td></tr></table>")
end sub
'┏━━━━┓
'┃首页文章┃
'┗━━━━┛
sub YC_art()
YC("<table border='0'><tr><td width=""136"" align=""center"">")
sql="select top 1 id,title,color,click,user,pic,copyright,writer,date from [YC_art] where pic<>'' and pass=1 order by id DESC"
set rs=conn.execute(sql)
do while not rs.eof
YC("<div class='p1'><div class='p2'><div class='p3'>")
YC("<a href='showart.asp?id="&rs("id")&"' target='art'><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='showart.asp?id="&rs("id")&"' target='art'><font color="""&rs("color")&""">"&YC_cut(rs("title"),16)&"</font></a></center> ")
rs.movenext
loop
if rs.eof and rs.bof then
YC("<div class='p1'><div class='p2'><div class='p3'><img alt='' 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><td class=artbg valign=""top"">")
sql="select top "&indexpage(1)&" id,title,color,click,user,pic,copyright,writer,date,class from [YC_art] where pass=1 order by id DESC"
set rs=conn.execute(sql)
YC("<ul class=""list"">")
do while not rs.eof
YC("<li><span class='li_left'>[")
call mYClass("YC_artclass","art",rs("class"))
YC("] <a href='showart.asp?id="&rs("id")&"' target='art'><font color='"&rs("color")&"' TITLE='人气值:"&rs("click")&"'>"&rs("title")&"</font></a>")
if rs("date")=date() then
YC(" <img src='img/new.gif' alt='' width='22' height='7' 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>暂时没有文章!</center>")
end if
rs.close
set rs=nothing
YC("</ul></td></tr></table>")
end sub
'┏━━━━┓
'┃首页图片┃
'┗━━━━┛
sub YC_pic()
YC("<table border='0' cellspacing=""0"" cellpadding=""2"" align=""center""><tr>")
sql="select top "&indexpage(2)&" id,title,color,date,click,user,pic from [YC_pic] where pass=1 order by id DESC"
set rs=conn.execute(sql)
do while not rs.eof
YC("<td align=""center""><div class='p1'><div class='p2'><div class='p3'>")
YC("<a href='showpic.asp?id="&rs("id")&"' target='pic' onfocus='this.blur()'><img src='"&rs("pic")&"' border='0' alt='人气值:"&rs("click")&"' class='p' align=""absmiddle""></a></div></div></div></td>")
rs.movenext
loop
if rs.eof and rs.bof then
YC("<td align=""center"" height=""112""><center>暂时没有图片!</center></td>")
end if
YC("</tr></table>")
rs.close
set rs=nothing
end sub
'┏━━━━┓
'┃首页娱乐┃
'┗━━━━┛
sub YC_dj()
YC("<table border='0'><tr><td width=""136"" align=""center"">")
sql="select top 1 id,title,color,click,user,pic,commend,singer,date from [YC_dj] where pic<>'' and pass=1 order by id DESC"
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='dj'><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")&""" target=""dj""><font color="""&rs("color")&""">"&YC_cut(rs("title"),16)&"</font></a></center> ")
rs.movenext
loop
if rs.eof and rs.bof then
YC("<div class='p1'><div class='p2'><div class='p3'><img alt='' 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 class=""djbg"" valign=""top"">")
sql="select top "&indexpage(3)&" id,title,color,class,date,singer,user,commend,click from [YC_dj] where pass=1 order by id DESC"
set rs=conn.execute(sql)
YC("<ul class=""list"">")
do while not rs.eof
YC("<li><span class='li_left'>[")
call mYClass("YC_djclass","dj",rs("class"))
YC("] <a href='showdj.asp?id="&rs("id")&"' target='dj'><font color='"&rs("color")&"' title='"&rs("title")&"'>"&rs("title")&"</font></a>")
if rs("date")=date() then
YC(" <img src='img/new.gif' alt='' width='22' height='7' 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>暂时没有娱乐!</center>")
end if
rs.close
set rs=nothing
YC("</ul></td></tr></table>")
end sub
'┏━━━━┓
'┃首页下载┃
'┗━━━━┛
sub YC_down()
YC("<table border='0'><tr><td width=""136"" align=""center"">")
sql="select top 1 id,title,color,pic,commend,filesize,click,downclick,user,date from [YC_down] where pic<>'' and pass=1 order by id DESC"
set rs=conn.execute(sql)
do while not rs.eof
YC("<div class='p1'><div class='p2'><div class='p3'>")
YC("<a href=""showdown.asp?id="&rs("id")&""" target=""down""><img src="""&rs("pic")&""" border='0' title='人气值:"&rs("click")&"' style='width:120px;height:120px;border:1px solid #444' align=""absmiddle"" alt=""""></a></div></div></div>")
call br()
YC("<center><a href=""showdown.asp?id="&rs("id")&""" target=""down""><font color="""&rs("color")&""">"&YC_cut(rs("title"),16)&"</font></a></a></center>")
rs.movenext
loop
if rs.eof and rs.bof then
YC("<div class='p1'><div class='p2'><div class='p3'><img alt='' 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 class=""downbg"" valign=""top"">")
sql="select top "&indexpage(4)&" id,title,color,class,pic,commend,filesize,click,downclick,user,date from [YC_down] where pass=1 order by id DESC"
set rs=conn.execute(sql)
YC("<ul class=""list"">")
do while not rs.eof
YC("<li><span class='li_left'>[")
call mYClass("YC_downclass","down",rs("class"))
YC("] <a href=""showdown.asp?id="&rs("id")&""" target='down'><font color="""&rs("color")&""" title='"&rs("title")&"'>"&rs("title")&"</font></a>")
if rs("date")=date() then
YC(" <img src='img/new.gif' alt='' width='22' height='7' 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>暂时没有下载!</center>")
end if
rs.close
set rs=nothing
YC("</ul></td></tr></table>")
end sub
'┏━━━━┓
'┃首页连接┃
'┗━━━━┛
sub YC_link()
sql="select top "&indexpage(5)&" id,logo,webname,url,date,click from [YC_link] where logo<>'' and pass=1 and best=1 order by id desc"
set rs=conn.execute(sql)
YC("<table cellpadding=""3"" align=""center"" height='150'><tr>")
do while not rs.eof
YC("<td><a href='link.asp?action=go&id="&rs("id")&"' target='_blank'><img border='0' src='"&rs("logo")&"' width='88' height='31' align=""absmiddle"" alt='人气值:"&rs("click")&"' onerror='this.src=""img/noimg.gif""' /></a></td>")
i=i+1
if i mod 2=0 then
YC("</tr><tr>")
end if
rs.movenext
loop
if rs.eof and rs.bof then
YC("<td><center>暂时没有链接!</center></td>")
end if
YC("</tr></table>")
end sub
'┏━━━━┓
'┃首页投票┃
'┗━━━━┛
sub YC_vote()
YC("<table cellpadding=""3"" align=""center"" height='139'><tr><td>")
sqlvote="select top 1 id,classname from [YC_voteclass] order by id desc"
set rsvote=server.createobject("adodb.recordset")
rsvote.open sqlvote,conn,1,1
if rsvote.eof then
YC("<center>暂时没有投票!</center>")
else
YC("<form name=""form1"" method=""post"" action=""showvote.asp?action=postvote"" target=""vote"">")
YC("<input name=""classid"" type=""hidden"" value="""&rsvote("id")&""" />")
YC(" <b>"&rsvote("classname")&"</b><br />")
sqlvoteurl="SELECT id,title,click FROM [YC_vote] WHERE class="&rsvote("id")&" order by id"
set rsvoteurl=server.createobject("adodb.recordset")
rsvoteurl.open sqlvoteurl,conn,1,1
if rsvoteurl.eof then
YC("<center>暂时没有投票项目!</center>")
else
for i=1 to rsvoteurl.recordcount
if i=1 then
YC(" <input type=""radio"" name=""numid"" checked value="""&i&""" />"&rsvoteurl("title")&"("&rsvoteurl("click")&")<br />")
else
YC(" <input type=""radio"" name=""numid"" value="""&i&""" />"&rsvoteurl("title")&"("&rsvoteurl("click")&")<br />")
end if
rsvoteurl.movenext
next
end if
YC("<center>")
if request.cookies(yecaocookies&"jinzhevote")("go")<>"yes" then
YC("<input type=""submit"" name=""YCMSVOTE"" value=""投 票"" onmouseover=""this.className='overput'"" onmouseout=""this.className='put'"" class=""put"" /> <input type=""button"" name=""YCMSVOTE"" value=""查 看"" onmouseover=""this.className='overput'"" onmouseout=""this.className='put'"" onclick=""window.open('showvote.asp?id="&rsvote("id")&"');"" class=""put"" />")
else
YC("<input type=""submit"" name=""YCMSVOTE"" value=""已投票"" disabled class=""put"" /> <input type=""button"" name=""YCMSVOTE"" value=""查 看"" onmouseover=""this.className='overput'"" onmouseout=""this.className='put'"" onclick=""window.open('showvote.asp?id="&rsvote("id")&"');"" class=""put"" />")
end if
YC("</center></form>")
rsvoteurl.close
set rsvoteurl=nothing
end if
rsvote.close
set rsvote=nothing
YC("</td></tr></table>")
end sub
'┏━━━━┓
'┃首页留言┃
'┗━━━━┛
sub YC_book()
YC("<table cellpadding=""3"" height='145'><tr><td valign='top'>")
'sql="select top "&indexpage(7)&" id,title,user,date,ip from [YC_book] where pass=1 order by id DESC"
sql="select top "&indexpage(7)&" id,title,user,date,ip from [YC_book] order by id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
YC("<ul class=""list"">")
do while not rs.eof
YC("<li><a href=""book.asp?action=showbook&id="&rs("id")&""" title='"&rs("title")&"'>"&YC_cut(rs("title"),20)&"</a></li>")
rs.movenext
loop
if rs.eof and rs.bof then
YC("<center>暂时没有留言!</center>")
end if
YC("</ul>")
rs.close
set rs=nothing
YC("</td></tr></table>")
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -