Fynkunst ... Bed & Breakfast ... Daic.dk ... Havne Sydfyn

<% '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Case "redirect" '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= if request("id") <> "" then ID = int(request("id")) BannerSQL = "SELECT * FROM banner_data WHERE banner_data_id = '" & ID & "'" set banner = objConn.execute(BannerSQL) UpdateSQL = "UPDATE banner_data SET u_hits = '" & int(banner("u_hits")) + 1 & "' WHERE banner_data_id = '" & ID & "'" objConn.execute(UpdateSQL) strSQL_GET = "SELECT * FROM banner_hits WHERE date = '" & DatePart("yyyy",now) & "-" & DatePart("m",now) & "-" & DatePart("d",now) & "' "_ & "AND hour = '" & Hour(now) & "' AND banner_id = '" & ID & "'" Set GetPrev = objConn.execute(strSQL_GET) If Not GetPrev.eof Then strSQL_Update = "UPDATE banner_hits SET hits='" & Int(GetPrev("hits")) + 1 & "' WHERE banner_id = '" & ID & "' "_ & "AND date = '" & DatePart("yyyy",now) & "-" & DatePart("m",now) & "-" & DatePart("d",now) & "' "_ & "AND hour = '" & Hour(now) & "'" Else strSQL_Update = "INSERT INTO banner_hits(banner_id,date,hour,hits) VALUES('" & Int(ID) & "','" & DatePart("yyyy",now) & "-" & DatePart("m",now) & "-" & DatePart("d",now) & "',"_ & "'" & Hour(now) & "','" & 1 & "')" End If objConn.execute(strSQL_Update) Set GetPrev = nothing response.redirect(banner("url")) end if '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= End Select set rs = nothing objConn.close: set conn = nothing %>