<% sitelang= Session("sitelang") SetLocale(1044) %> <% SetLocale(1044) 'on error resume next dim conntemp, rstemp dim indx dim stadiumids dim secno secno = cstr(minute(Now())) & cstr(second(Now())) insecno = trim(Request.Form("securitycode")) insecnover = "1355" & trim(Request.Form("securitycodeverifier")) comment = Request.Form("comment") author = Request.Form("author") email = Request.Form("email") if not (insecno=insecnover) then if not trim(insecno) = "" then response.write("Du må oppgi sikkerhetskoden før du kan legge inn en kommentar.Gå tilbake.") end if end if indx = 1 dim debug news_id = Request.QueryString("news_id") if news_id= "" then news_id = Request.Form("news_id") end if if news_id = "" then error = "Feil. Stadioninfo kan ikke vises" end if accessdb=server.mappath("../db/Stadiums.mdb") strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" strconn=strconn & accessDB & ";" set conntemp=server.createobject("adodb.connection") conntemp.open strconn taken= (request.cookies ("news_visited")("id_" & news_id)) if taken = "" then 'Write the name of the poll and the latest choice to the cookie response.cookies ("news_visited")("id_" & news_id) = "Y" 'Make the cookie expire in seven days response.cookies ("news_visited").expires = DATE + 1 mySQL="insert into news_visits (news_id,visit_date) values (" & news_Id & ",'" & CDate(Now()) & "')" set rstemp=conntemp.execute(mySQL) 'debug = "Første gang" 'else 'debug = "Vært her før" end if ' mySQL="select a.title, a.ingress, a.body, b.firstname, b.surname, a.photo_url, a.photo_text, a.photographer, a.news_date from news a, person b where a.author = b.person_id and a.status = 'active' and a.news_id=" & news_id mySQL="select a.title, a.ingress, a.body, b.firstname, b.surname, a.photo_url, a.photo_text, a.photographer, a.news_date from news a, person b where a.author = b.person_id and a.news_id=" & news_id if Not Session("loggedin")= "yes" then mySQL= mySQL & " and news_date < Now() " end if set rstemp=conntemp.execute(mySQL) dim title, name, dt, ing, body, img if not rstemp.eof then rstemp.movefirst title = rstemp("title") name = rstemp("firstname") & " " & rstemp("surname") dt = CStr(FormatDateTime(rstemp("news_date"),vbshortdate)) ingr = rstemp("ingress") body = rstemp("body") img =rstemp("photo_url") phtext = rstemp("photo_text") phgr = rstemp("photographer") end if %>
<% if not trim(title) = "" then %>

<% =title %> <% end if %> <% if not trim(name)= "" then %>
Av <% = name %> (<% =dt %>)

<% end if %> <% if not trim(ingr)= "" then %>

<% =ingr %>

<% end if %> <% if not trim(body) = "" then %>

<% =body %>

<% end if %> <% if not trim(img) = "" then %>


<% =phtext %> <% if not phgr = "" then %> (Bilde: <% = phgr %>) <% end if %>

<% end if %> <% if not stadiumids = "" then %> <% end if %>
<% mySQL="select distinct a.stadium_name as stad, a.community, a.stadium_id as stadid from stadium a, stadium_news b where a.stadium_id = b.stadium_id and b.news_id = " & news_id set rstemp=conntemp.execute(mySQL) if not rstemp.eof then response.write("

Aktuelle stadioner") response.write("" ) do while not rstemp.eof response.write("
" & rstemp("stad") & "") response.write(" " & rstemp("community") & "" ) stadiumids = stadiumids & rstemp("stadid") & "," rstemp.movenext loop stadiumids = left(stadiumids, len (stadiumids)-1) end if %> <% mySQL="select distinct a.url, a.name,a.comments,a.flag_link_error from link a, news_links b where a.link_id = b.link_id and a.active=1 and b.news_id = " & news_id set rstemp=conntemp.execute(mySQL) if not rstemp.eof then response.write("

Se også:") response.write("" ) do while not rstemp.eof response.write("
" & rstemp("name") & "" ) if not rstemp("comments") = "" then response.write(" - " & rstemp("comments") & "") end if rstemp.movenext loop end if %> <% function redims(arrayindx) redim preserve paraname(arrayindx) redim preserve paravalu(arrayindx) end function if not comment = "" and not author = "" then dim paraname() dim paravalu() indx = 0 redims(indx) paraname(indx) = "comment" paravalu(indx) = "'" & comment & "'" indx = indx + 1 redims(indx) paraname(indx) = "author" paravalu(indx) = "'" & author & "'" indx = indx + 1 redims(indx) paraname(indx) = "news_id" paravalu(indx) = news_id indx = indx + 1 if Session("loggedin")= "yes" then redims(indx) paraname(indx) = "expert" paravalu(indx) = "yes" indx = indx + 1 end if if not email = "" then redims(indx) paraname(indx) = "email" paravalu(indx) = "'" & email & "'" indx = indx + 1 end if redims(indx) paraname(indx) = "insert_date" paravalu(indx) = "'" & CDate(Now()) & "'" if len (insecno) > 4 and insecno=insecnover and not insecno = "" and not news_id=52 and not news_id=107 then mySQL="insert into comments(" mySQLEnd = " values (" for indx = 0 to ubound(paraname) if instr (paravalu(indx), " href") > 0 or instr (paravalu(indx), " 0 or instr (paravalu(indx), "href") > 0 or instr (paravalu(indx), "<)") > 0 or instr (paravalu(indx), "boss.com") > 0 then illegalcomment = true else if not indx = 0 then mySQL = mySQL & "," mySQLEnd = mySQLEnd & "," end if mySQL = mySQL & paraname(indx) mySQLEnd = mySQLEnd & paravalu(indx) end if next mySQL = mySQL & ")" & mySQLEnd & ")" if illegalcomment then response.write("Ulovlig kommentar: Ingen linker eller liknende er lovlig pga problemer med søppelinnlegg. Gå tilbake og fjern alle linker. Ta kontakt med stadionsiden.com hvis spørsmål") else set rstemp=conntemp.execute(mySQL) end if else response.write("Du må oppgi sikkerhetskoden før du kan legge inn en kommentar. Gå tilbake.") end if end if %>

<% mySQL="select * from comments where news_id = " & news_id & " and deleted = false order by expert" dim exp set rstemp=conntemp.execute(mySQL) if not rstemp.eof and not news_id = 52 then exp = rstemp("expert") if exp then %>

<% = dict.Item(140) %><% else %>

<% = dict.Item(72) %><% end if response.write( "") do while not rstemp.eof if not exp = rstemp("expert") then %>

<% = dict.Item(72) %><% end if exp = rstemp("expert") insdt = rstemp("insert_date") response.write("") response.write("") response.write("") rstemp.movenext loop response.write("
" & dict.Item(73) & ": " & rstemp("author") & " " & Day(CDAte(insdt)) & "/" & Month(CDate(insdt)) & " " & Year(CDate(insdt)) & "
" & rstemp("comment") & " 
 
") end if %> <% = dict.Item(169) %> <% if Session("loggedin")= "yes" then %>
Du er pålogget. Dine kommentarer blir nå registrert som ekspertkommentarer!
<% = dict.Item(76) %>:

<% = dict.Item(77) %>:
<% else %>
<% = dict.Item(76) %>:

<% = dict.Item(77) %>:
<% end if %>
<% = dict.Item(147) %> 1355<% =secno %>
<% = dict.Item(148) %>
<% = dict.Item(78) %>


<% = dict.Item(138) %> http://www.stadionsiden.com/index.asp?news_id=<%=news_id%> <% ' rstemp.close set rstemp=nothing conntemp.close set conntemp=nothing %>