| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 582 人关注过本帖
标题:ASP排序函数问题,请教一下前辈们
只看楼主 加入收藏
qq56664
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-5-11
收藏
 问题点数:0 回复次数:1 
ASP排序函数问题,请教一下前辈们
小弟刚从html过来,很多东西还不懂,希望前辈们支持一下。
" border="0" />

请大家看上图上面的红色横线区域
东北双线:是正在开放套黄
千兆电信:是精品固顶

如果能让正在开放的套黄放在精品固顶的上面?

请热心人帮忙代码如下。


<%
Dim TeGq,Sitesflook
Set TeGq = New cls_tee5Main
Set Rs = Server.CreateObject("ADODB.Recordset")
Class cls_tee5Main
Dim rssum, nums
'=================================================
'过程名:SetRed_ads
'作  用:精品推荐私服,按照天数计算
'=================================================
sub SetRed_ads()
sql="select top " & CInt(tee5.finePage) & " Gq_sfdata.id,Gq_sfdata.name,Gq_sfdata.IP,Gq_sfdata.service,Gq_sfdata.Sdate,Gq_sfdata.hour,Gq_sfdata.minute,Gq_sfdata.addr,Gq_sfdata.QQ,Gq_sfdata.xingzhi,Gq_sfdata.homepage,Gq_sfdata.download,Gq_sfdata.gameid,Gq_GameType.game,Gq_sfdata.download,Gq_sfdata.fine,Gq_sfdata.finetime,Gq_sfdata.Daytime"
sql=sql&" from Gq_sfdata,Gq_GameType where Gq_sfdata.gameid=Gq_GameType.id"
sql=sql&" and Gq_sfdata.ulock=1 and Gq_sfdata.fine=2 and Gq_sfdata.gameid="&menu&" order by Gq_sfdata.hour,Gq_sfdata.minute"
Rs.Open Sql,Conn,1,1
if rs.eof and rs.bof then
rs.close
else
while not rs.eof
if tee5.Checkday(rs("finetime"),rs("Daytime")) then
Response.Write "<TR bgColor="&tee5.bg_1&" onmouseover=javascript:this.bgColor='"&tee5.bg_1_1&"' onmouseout=javascript:this.bgColor='"&tee5.bg_1&"'>" & vbCrLf
Response.Write "<TD><a href="&sitesflook&"id="&rs("id")&" target=_blank><font color=#000000>"&rs("name")&"</a></TD>" & vbCrLf
Response.Write "<TD><a href='"&rs("download")&"' target='_blank'>"&rs("IP")&"</a></TD>" & vbCrLf
Response.Write "<TD>"
%>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<span class="STYLE1">☆精品推荐☆ 全天强烈推荐服务器 ☆</span>
<%
Response.Write "</TD>" & vbCrLf
Response.Write "<TD>"&rs("Addr")&""&split(tee5.ssign,",")(rs("Service"))&"</TD>" & vbCrLf
Response.Write "<TD>"&rs("xingzhi")&"←<img border='0' src='Index_img/atop1.gif' width='25' height='11'></TD>" & vbCrLf
Response.Write "<TD>"&rs("QQ")&"</TD>" & vbCrLf
if tee5.sfLook = 1 then
Response.Write "<TD><a href=html/Game/" & tee5.ContentHtml(rs) & ".html target=_blank>点击查看<img src='Index_img/hot.gif' hspace=0 vspace=0 border=0></a></TD>" & vbCrLf
else
Response.Write "<TD><a href="&Sitesflook&"id="&rs("id")&" target=_blank>点击查看</a></TD>" & vbCrLf
end if
Response.Write "<TD align=center><font color=#FF0000>极力推荐</font></TD>" & vbCrLf
Response.Write "</TR>" & vbCrLf
end if
rs.movenext
wend
rs.close
end if
end sub
'=================================================
'过程名:Today_00
'作  用:整点固顶当前开机的私服
'=================================================
sub Today_00
%>
<script language="JavaScript" type="text/JavaScript">
<%
sql="select count(Gq_sfdata.id) from Gq_sfdata,Gq_GameType where Gq_sfdata.gameid=Gq_GameType.id and Gq_sfdata.ulock=1 and Gq_sfdata.isBest="&SFstatus&" and Gq_sfdata.gameid="&menu&" and datediff('d',Gq_sfdata.Sdate,now())=0 and hour(now)-hour=0 and minute-30<0 and hour(now)<24"
Rs.Open Sql,Conn,1,1
rssum=rs(0)
rs.close
%>
theAds=new Array();
shu =<%=rssum%>
dot=''
<%
sql="select Gq_sfdata.id,Gq_sfdata.name,Gq_sfdata.IP,Gq_sfdata.service,Gq_sfdata.Sdate,Gq_sfdata.hour,Gq_sfdata.minute,Gq_sfdata.addr,Gq_sfdata.QQ,Gq_sfdata.xingzhi,Gq_sfdata.homepage,Gq_sfdata.download,Gq_sfdata.gameid,Gq_GameType.game,Gq_sfdata.download,Gq_sfdata.hot from Gq_sfdata,Gq_GameType where Gq_sfdata.gameid=Gq_GameType.id and Gq_sfdata.ulock=1 and Gq_sfdata.isBest="&SFstatus&" and Gq_sfdata.gameid="&menu&" and datediff('d',Gq_sfdata.Sdate,now())=0 and hour(now)-hour=0 and minute-30<0 order by Gq_sfdata.minute desc"
Rs.Open Sql,Conn,1,1
nums=rssum
for i=1 to nums
%>
theAds[<%=i%>]='<tr bgcolor=\"#ffffff\" onmouseover=javascript:this.bgColor=\'#FFCCCC\' onmouseout=javascript:this.bgColor=\'#ffffff\'><TD><a href=<%=sitesflook%>id=<%=rs("id")%> target=_blank><%=rs("name")%></a></TD><TD><a href="<%=rs("download")%>" target="_blank"><%=rs("IP")%></a></TD><TD><font color=#FF0000><%
if rs("Sdate")<>"" then response.write year(rs("sdate"))&"年/"&month(rs("sdate"))&"月/"&day(rs("Sdate"))&"日/"%><%
if rs("hour")>=0 and rs("hour")<7 then
response.write "凌晨"&rs("hour")&"点"
else
if rs("hour")>17 and rs("hour")<24 then
response.write "晚上"&rs("hour")-12&"点"
else
if rs("hour")<12 then
response.write "上午"&rs("hour")&"点"
else
if rs("hour")>12 and rs("hour")<=17 then
response.write "下午"&rs("hour")-12&"点"
else
if rs("hour")=12 then
response.write "中午"&rs("hour")&"点"
end if
end if
end if
end if
end if%><% if rs("hour")<24 and rs("minute")<30 then
response.write""
else
if rs("hour")<24 and rs("minute")>=30 then
response.write "半"
end if
end if%></font></TD><TD><font color=#ff0000><%=rs("Addr")%><%=split(tee5.ssign,",")(rs("Service"))%></font></TD><TD><font color=#ff0000><%=rs("xingzhi")%></font><font color="#0000FF">←推荐</font></TD><TD><font color=#ff0000><%=rs("QQ")%></font></a></TD><TD><%if tee5.sfLook = 1 then%><a href=html/Game/<%= tee5.ContentHtml(rs) %>.html target=_blank><%else%><a href=<%=sitesflook%>id=<%=rs("id")%> target=_blank><%end if%><font color=#000000>点击查看</font></a></TD><TD align=center><font color=#FF0000>正在开放</font></TD></tr>'
<%
rs.movenext
next
rs.close
%>
theAds2=''
adshu=shu+1
function Quickpick()
{
  var ball
  for( ball = 1; ball < adshu; ball++)
  {
    this[ball] = parseInt(Math.random() * shu + 1);
    for(var list = 0; list < ball; list++)
    {
      if(this
== this[ball])
      {      
        list = ball;
        ball--;
      }
    }
  }
  return this;
}
var idx;
var ballball = new Array(shu);
ballball = this.Quickpick();
for(idx = 1; idx < adshu; idx++){
document.write(dot+theAds[ballball[idx]]);
if (idx < shu){document.write('')}}
document.write(dot+theAds2);
</script>
<%
end sub
搜索更多相关主题的帖子: 函数 前辈 ASP 
2008-05-11 19:01
qq56664
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-5-11
收藏
得分:0 
怎么没有人帮我。呀。
2008-05-12 11:31
快速回复:ASP排序函数问题,请教一下前辈们
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019234 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved