⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 indexnew.asp

📁 后台登陆admin.asp
💻 ASP
📖 第 1 页 / 共 2 页
字号:
rs.movenext
loop
if rs.bof and rs.eof then
   Response.Write "<li>当前没有图片!</li>"
end if
rs.close
set rs=nothing
if picway=1 then Response.Write "</TR>" & vbCrLf
Response.Write "</TABLE>" & vbCrLf
end sub
'=================================================
'过程名:index_art
'作  用:首页线路调用
'参  数:num-------------调用条数
'        fontnum---------标题长度
'        classid---------一级分类调用id,0为全部
'        classyes--------是否显示分类,True为是,False为否
'        NewWindows------是否新窗打开,True为是,False为否
'Web:    www.ynsky.com.cn
'=================================================
sub index_art(num,fontnum,classid,classyes,NewWindows)
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 align=center border=0>" & vbCrLf
if classid=0 then
   sql="select top "&num&" * from art where passed=0 order by art_id DESC"
else
   sql="select top "&num&" * from art where passed=0 and (cat_id="&classid&" or cat_id in(select cat_id from a_cat where sid="&classid&")) order by art_id DESC"			
end if 
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
dim nnn
if NewWindows=True then
   nnn="target='_blank'"
else
   nnn=""				
end if     
sql="select cat_id,cat_name from a_cat where cat_id="&rs("cat_id")
set rscat=server.createobject("adodb.recordset")
rscat.open sql,conn,1,1
Response.Write "<TR><TD height='22' class=table-xia>"
if classyes=True then 
Response.Write "<a href='http://www.ynsky.com.cn/art_list.asp?cat_id="&rs("cat_id")&"'>『"&left(rscat("cat_name"),10)&"』</a>"
else
Response.Write ""&indexdot&"" 
end if
Response.Write "<a href='http://www.ynsky.com.cn/showart.asp?art_id="&rs("art_id")&"' Title='线路名称:"&rs("art_title")&"&#13&#10发表时间:"&rs("art_date")&"&#13&#10阅读次数:"&rs("art_count")&"次&#13&#10所属分类:"&rscat("cat_name")&"' "& nnn &">"&gotTopic(rs("art_title"),fontnum)&"</a>" & vbCrLf
if rs("isimg")=1 then
Response.Write "<img src='img/img.gif' alt='图片线路' align=absmiddle border=0>" & vbCrLf
end if
Response.Write "</TD><TD align=right class=table-xia>" & vbCrLf

'首页线路的 时间 调用if DateDiff("h",rs("art_date"),now())<=24 then Response.Write "<FONT color=red>"
'首页线路的 时间 调用Response.Write ""&Right("0"&month(rs("art_date")),2)&"-"&right("0"&day(rs("art_date")),2)&"</FONT>" & vbCrLf

Response.Write "</TD></TR>"
rscat.close
set rscat=nothing
rs.movenext
loop
if rs.eof and rs.bof then
   Response.Write "<TR><TD>暂时没有旅游线路!</TD></TR>"
end if
rs.close
set rs=nothing
Response.Write "</TABLE>" & vbCrLf
end sub
'=================================================
'过程名:index_web
'作  用:首页旅游手记调用
'参  数:num-------------调用条数
'        fontnum---------标题长度
'        classid---------一级分类调用id,0为全部
'        classyes--------是否显示分类,True为是,False为否
'        NewWindows------是否新窗打开,True为是,False为否
'Web:    www.ynsky.com.cn
'=================================================
sub index_web(num,fontnum,classid,classyes,NewWindows)
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 align=center border=0>" & vbCrLf
if classid=0 then
   sql="select top "&num&" * from web where passed=0 order by art_id DESC"
else
   sql="select top "&num&" * from web where passed=0 and (cat_id="&classid&" or cat_id in(select cat_id from web_cat where sid="&classid&")) order by art_id DESC"			
end if 
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
dim nnn
if NewWindows=True then
   nnn="target='_blank'"
else
   nnn=""				
end if     
sql="select cat_id,cat_name from web_cat where cat_id="&rs("cat_id")
set rscat=server.createobject("adodb.recordset")
rscat.open sql,conn,1,1
Response.Write "<TR><TD height='22' class=table-xia>"
if classyes=True then 
Response.Write "<a href='http://www.ynsky.com.cn/web_list.asp?cat_id="&rs("cat_id")&"'>『"&left(rscat("cat_name"),10)&"』</a>"
else
Response.Write ""&indexdot&"" 
end if
Response.Write "<a href='http://www.ynsky.com.cn/showweb.asp?art_id="&rs("art_id")&"' Title='文章名称:"&rs("art_title")&"&#13&#10发表时间:"&rs("art_date")&"&#13&#10阅读次数:"&rs("art_count")&"次&#13&#10所属分类:"&rscat("cat_name")&"' "& nnn &">"&gotTopic(rs("art_title"),fontnum)&"</a>" & vbCrLf
if rs("isimg")=1 then
Response.Write "<img src='img/img.gif' alt='图片文章' align=absmiddle border=0>" & vbCrLf
end if
Response.Write "</TD><TD align=right class=table-xia>" & vbCrLf

if DateDiff("h",rs("art_date"),now())<=24 then Response.Write "<FONT color=red>"
Response.Write ""&Right("0"&month(rs("art_date")),2)&"-"&right("0"&day(rs("art_date")),2)&"</FONT>" & vbCrLf

Response.Write "</TD></TR>"
rscat.close
set rscat=nothing
rs.movenext
loop
if rs.eof and rs.bof then
   Response.Write "<TR><TD>旅游手记暂无文章!</TD></TR>"
end if
rs.close
set rs=nothing
Response.Write "</TABLE>" & vbCrLf
end sub
'=================================================
'过程名:index_joke
'作  用:首页旅游手记调用
'参  数:num-------------调用条数
'        fontnum---------标题长度
'        classid---------一级分类调用id,0为全部
'        classyes--------是否显示分类,True为是,False为否
'        NewWindows------是否新窗打开,True为是,False为否
'Web:    www.ynsky.com.cn
'=================================================
sub index_joke(num,fontnum,classid,classyes,NewWindows)
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 align=center border=0>" & vbCrLf
if classid=0 then
   sql="select top "&num&" * from joke where passed=0 order by art_id DESC"
else
   sql="select top "&num&" * from joke where passed=0 and (cat_id="&classid&" or cat_id in(select cat_id from joke_cat where sid="&classid&")) order by art_id DESC"			
end if 
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
dim nnn
if NewWindows=True then
   nnn="target='_blank'"
else
   nnn=""				
end if     
sql="select cat_id,cat_name from joke_cat where cat_id="&rs("cat_id")
set rscat=server.createobject("adodb.recordset")
rscat.open sql,conn,1,1
Response.Write "<TR><TD height='22' class=table-xia>"
if classyes=True then 
Response.Write "<a href='http://www.ynsky.com.cn/joke_list.asp?cat_id="&rs("cat_id")&"'>『"&left(rscat("cat_name"),10)&"』</a>"
else
Response.Write ""&indexdot&"" 
end if
Response.Write "<a href='http://www.ynsky.com.cn/showjoke.asp?art_id="&rs("art_id")&"' Title='文章名称:"&rs("art_title")&"&#13&#10发表时间:"&rs("art_date")&"&#13&#10阅读次数:"&rs("art_count")&"次&#13&#10所属分类:"&rscat("cat_name")&"' "& nnn &">"&gotTopic(rs("art_title"),fontnum)&"</a>" & vbCrLf
if rs("isimg")=1 then
Response.Write "<img src='img/img.gif' alt='图片文章' align=absmiddle border=0>" & vbCrLf
end if
Response.Write "</TD><TD align=right class=table-xia>" & vbCrLf

if DateDiff("h",rs("art_date"),now())<=24 then Response.Write "<FONT color=red>"
Response.Write ""&Right("0"&month(rs("art_date")),2)&"-"&right("0"&day(rs("art_date")),2)&"</FONT>" & vbCrLf

Response.Write "</TD></TR>"
rscat.close
set rscat=nothing
rs.movenext
loop
if rs.eof and rs.bof then
   Response.Write "<TR><TD>旅游手记暂无文章!</TD></TR>"
end if
rs.close
set rs=nothing
Response.Write "</TABLE>" & vbCrLf
end sub
'=================================================
'过程名:index_book
'作  用:首页留言调用
'参  数:num-------------调用条数
'        fontnum---------标题长度
'Web:    www.ynsky.com.cn
'=================================================
sub index_book(num,fontnum)
sql="select top "&num&" id,zt,name,words,date from words order by date DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 align=center border=0>" & vbCrLf
do while not rs.eof
Response.Write "<TR><TD height='22' class=table-xia>"&indexdot&"<a href='http://www.ynsky.com.cn/book.asp?select=name&keyword="&rs("name")&"' title='留言姓名:"&rs("name")&"&#13&#10留言时间:"&rs("date")&"'>"&gotTopic(rs("zt"),fontnum)&"</a></td></tr>" & vbCrLf
rs.movenext
loop
if rs.eof and rs.bof then
Response.Write "<TR><TD>暂时没有留言</td></tr>"              
end if
rs.close
set rs=nothing
Response.Write "</TABLE>" & vbCrLf
end sub

'=================================================
'过程名:index_flink
'作  用:首页连接调用----LOGO横向
'参  数:num-------------调用条数
'Web:    www.ynsky.com.cn
'=================================================
sub index_flink(num)
sql="select top "&num&" * from friendlink where fl_logo<>'' and passed=0 and lk=0 and istop=1 order by fl_id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
Response.Write "<TABLE cellPadding=0>" & vbCrLf
Response.Write "<TR align=middle>" & vbCrLf
Response.Write "<TD><a href='http://www.ynsky.com.cn/' target='_blank'><img border=0 src='img/logo.gif' width='88' height='31' Title='欢迎来到七彩的云南!'></a>" & vbCrLf
Response.Write "</TD>" & vbCrLf
do while not rs.eof
Response.Write "<TD><a href='http://www.ynsky.com.cn/link.asp?action=go&fl_id="&rs("fl_id")&"' target='_blank'><img border=0 src='"&rs("fl_logo")&"' width='88' height='31' title='网站名称:"&rs("fl_name")&"&#13&#10网站地址:"&rs("fl_url")&"&#13&#10加入时间:"&rs("fl_date")&"&#13&#10点击次数:"&rs("count")&"'></a>" & vbCrLf
Response.Write "</TD>" & vbCrLf
rs.movenext
loop
'if rs.eof and rs.bof then
'Response.Write "当前没有链接"
'end if
Response.Write "</TR></TABLE>"  
rs.close
set rs=nothing
end sub

'=================================================
'过程名:index_flinkwz
'作  用:首页连接调用----文字连接
'参  数:num-------------调用条数
'Web:    www.ynsky.com.cn
'=================================================
sub index_flinkwz(num)
sql="select top "&num&" * from friendlink where fl_logo='' and passed=0 and lk=0 order by fl_id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
Response.Write "<select name='titlelink' id='titlelink' class='input' onchange=""if(this.options[this.selectedIndex].value!=''){window.open(this.options[this.selectedIndex].value,'_blank');}"">" & vbCrLf
Response.Write "<option>文字友情连接</option>"
do while not rs.eof
Response.Write "<option value='link.asp?action=go&fl_id="&rs("fl_id")&"'>"&rs("fl_name")&"</option>"
rs.movenext
loop
if rs.eof and rs.bof then
   Response.Write "<option>当前没有链接</option>"
end if
Response.Write "</select>" 
rs.close
set rs=nothing 
end sub
'=================================================
'过程名:index_points
'作  用:首页会员积分排行调用
'参  数:num-------------调用条数
'Web:    www.ynsky.com.cn
'=================================================
sub index_points(num)
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=1 align=center border=0>" & vbCrLf
sql="select top "&num&" UserName,points from [user] where userlock=0 order by points DESC,userid DESC"		
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
i=1
do while not rs.eof
Response.Write "<TR><TD height='22' class=table-xia>&nbsp;<b>"&right("0"&i,2)&".</b>"&rs(0)&"</TD><TD align=right class=table-xia>"&rs(1)&"&nbsp;</TD></TR>" & vbCrLf
i=i+1
rs.movenext
loop
if rs.eof and rs.bof then
   Response.Write "<TR><TD align=center>暂无会员信息!</TD></TR>"
end if
rs.close
set rs=nothing
Response.Write "</TABLE>" & vbCrLf
end sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -