<% set conn = Server.CreateObject("ADODB.Connection") conn.open "DSN=banner_system" Select Case request("action") Case "" '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Portal = "11" Select Case request("side") Case "startside" category = "1" Case "erhverv" category = "3" Case "brancher" category = "3" Case "uddannelse" category = "7" Case "nyheder" category = "9" Case "turisme" category = "9" Case "kalender" category = "13" Case "kultur-fritid" category = "13" Case "shopping" category = "7" Case "offentlig-info" category = "9" Case "godtblandet" category = "7" Case "support" category = "25" Case "sydfyn-info" category = "25" Case "soeg" category = "3" Case Else category = "1" End Select MyDate = datepart("yyyy",date) & "-" & datepart("m",date) & "-" & datepart("d",date) CountSQL = "SELECT COUNT(i.banner_data_id) "_ & "FROM banner_xref_portals as x, banner_data as i "_ & "WHERE x.banner_data_id = i.banner_data_id AND x.portal_id = '" & portal & "' AND x.category_id = '" & category & "'"_ & " AND startdate <= '" & MyDate & "'"_ & " AND enddate >= '" & MyDate & "'"_ & " AND i.active = 'true'" IdSQL = "SELECT i.banner_data_id as i_id "_ & "FROM banner_xref_portals as x, banner_data as i "_ & "WHERE x.banner_data_id = i.banner_data_id AND x.portal_id = '" & portal & "' AND x.category_id = '" & category & "'"_ & " AND startdate <= '" & MyDate & "'"_ & " AND enddate >= '" & MyDate & "'"_ & " AND i.active = 'true'" set rs = conn.execute(CountSQL) rCount = rs(0) set rs = conn.execute(IdSQL) cnt = 1 dim RRs redim RRs(rCount) do while not rs.eof RRs(cnt) = rs("i_id") cnt = cnt + 1 rs.movenext loop %> Sydfyn-info.dk - banner
<% randomize currentRR = cLng(rnd*rCount+0.5) ID = RRs(currentRR) sql = "SELECT * FROM banner_data WHERE banner_data_id='" & ID & "'" set rs = conn.execute(sql) Response.write "" & vbCrLf expo = int(rs("u_expo")) + 1 set rs = conn.execute("UPDATE banner_data SET u_expo='" & expo & "' WHERE banner_data_id = " & int(ID)) %> <% randomize currentRR = cLng(rnd*rCount+0.5) ID = RRs(currentRR) sql = "SELECT * FROM banner_data WHERE banner_data_id=" & ID set rs = conn.execute(sql) Response.write "" & vbCrLf expo = int(rs("u_expo")) + 1 set rs = conn.execute("UPDATE banner_data SET u_expo='" & expo & "' WHERE banner_data_id = " & int(ID)) %>
Fynkunst ... Lokalhistorie ... Opslagstavlen ... Postkort ... Brugtbil-basen
<% '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Case "redirect" '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= if request("id") <> "" then BannerSQL = "SELECT * FROM banner_data WHERE banner_data_id = '" & request("id") & "'" set banner = conn.execute(BannerSQL) UpdateSQL = "UPDATE banner_data SET u_hits = '" & int(banner("u_hits")) + 1 & "' WHERE banner_data_id = '" & request("id") & "'" conn.execute(UpdateSQL) response.redirect(banner("url")) end if '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= End Select set rs = nothing conn.close: set conn = nothing %>