<% Server.Execute "/NoHACK1.asp" dim Time1, sql, rs, Errh, LoopFlag, outTmp, picTmp, outTmp1, urlTmp, urlTmp1 dim GID, rs1, G_Type GID = ReqNum(Request("ID")) sql = "select * from ML_Group where G_Show='Y' and AutoID=" & GID set rs1 = GetRecordset(sql) if rs1.BOF and rs1.EOF then response.Redirect "/main.asp" response.End end if '----加人氣 sql = "Update ML_Group set G_Vote=G_Vote+1 where AutoID=" & GID Errh = DoCommand(sql) %> 完美商城乾坤袋
         
<% dim RecCount, BannerID(5), BannerPic(5), BannerUrl(5), Idx sql = "Select AutoID,PicName,Url from TOP_Banner Where ShowMall='Y' And BannerType='A' And " & _ "DateDiff(d, StartDay, GetDate())>=0 And DateDiff(d, EndDay, GetDate())<=0 Order By AddTime desc, AutoID desc" Set rs = GetRecordset( sql ) if rs.BOF and rs.EOF then RecCount = 0 else RecCount = rs.RecordCount end if ' 若資料小於五筆 直接全列出 if RecCount < 6 then For LoopFlag = 1 to 5 if rs.EOF then BannerID(LoopFlag) = "" BannerPic(LoopFlag) = "" BannerUrl(LoopFlag) = "" else BannerID(LoopFlag) = CStr(rs(0).value) BannerPic(LoopFlag) = rs(1).value BannerUrl(LoopFlag) = Trim(rs(2).value) rs.movenext end if Next else ' 隨機取資料 Randomize ' 取亂數將隨機五筆存入Array For LoopFlag = 1 to 5 rs.AbsolutePosition = Int((RecCount * Rnd) + 1) BannerID(LoopFlag) = CStr(rs(0).value) BannerPic(LoopFlag) = rs(1).value BannerUrl(LoopFlag) = Trim(rs(2).value) ' 過濾重覆的 For Idx = 1 to LoopFlag - 1 if BannerID(LoopFlag) = BannerID(Idx) then LoopFlag = LoopFlag - 1 exit For end if Next Next end if rs.close set rs = nothing %>
 
" width="250" height="190">
<%=rs1("G_Name")%>

<%=rs1("G_Data")%>

單品功能介紹: <%=rs1("G_Data2")%>

附註: <%=rs1("G_Memo")%>

 

<% rs1.close : set rs1 = nothing %>