<% dim debugoutput : debugoutput = "" dim debug : debug = false call HandleRequest() sub HandleRequest() dim util : set util = new utilities dim MapID : MapID = util.MNN(Request.Querystring("MapID")) if MapID > 0 then call UpdateTheMapRating(MapID, Rating) Response.Redirect(GetMapUrl(MapID)) end if set util = nothing end sub sub UpdateTheMapRating(MapID, Rating) dim db : set db = new database dim rs, sql sql = "update maps set TH = TH + 1 " sql = sql & "where ID = " & db.sqlN(MapID) on error resume next call db.ExecuteNonQuery(sql) on error goto 0 set rs = nothing set db = nothing end sub function GetMapUrl(MapID) dim db : set db = new database dim rs, sql sql = "select FP from maps " sql = sql & "where ID = " & db.sqlN(MapID) set rs = db.ExecuteReader(sql) if not rs.eof then GetMapUrl = rs("FP") else GetMapUrl = "" end if set rs = nothing set db = nothing end function %>