<% Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open Application("strConnect") dato = date aarnu=year(dato) ugenu=datepart("ww", dato) %> Forside - Admin <% ' Her starter klubrangliste artikel sql = "select klubscore from artikeltype" Set rsklub = Conn.Execute(sql) if rsklub("klubscore")=0 then %>
<% sql = "select * from artikel order by prioritet" Set rs = Conn.Execute(sql) do while rs.eof=false aid = rs("id") %> <% sql = "select id from billedplacering where id=" & rs("billedplacering") Set rsplac = Conn.Execute(sql) if rsplac.eof=false then if rsplac("id")=1 then 'Billede til højre med tekst uden omløb %> <% end if if rsplac("id")=2 then 'Billede til højre med tekst med omløb %> <% End If if rsplac("id")=3 then 'Billede til venstre med tekst uden omløb %> <% End If if rsplac("id")=4 then 'Billede til venstre med tekst med omløb %> <% rsplac.close set rsplac = nothing End If End If if rs("billedplacering")=0 and rs("billede")<>"" then 'Billede uden placering %> <% Else %> <% End If %> <% rs.movenext loop rs.close set rs = nothing %>

<%= (rs("overskrift")) %>

<% response.write(rs("tekst")) %> " border="0">
" border="0">
<% response.write(rs("tekst")) %>
" border="0">
<% response.write(rs("tekst")) %>
" border="0">
<% response.write(rs("tekst")) %>
" border="0">

<% response.write(rs("tekst")) %>
<% response.write(rs("tekst")) %>

Klubber tilmeldt Tipskometen:

<% ncounter=0 dim nk(1000) nucount=0 counter=0 dim k(1000) sql = "select * from klubpass" Set rs = Conn.Execute(sql) do while rs.eof=false 'her starter statistik 'sql = "SELECT * FROM statistik where uge=" & ugenu & " and " & " aar=" & aarnu & " and " & "type=" & 12 & " and " & "klub='" & rs("klubid") & "'" sql = "SELECT * FROM statistik where klub='" & rs("klubid") & "'" Set rsstat = Conn.Execute(sql) if rsstat.eof=false then do while rsstat.eof=false counter=counter+1 if rsstat("type")=13 then sql = "SELECT pris FROM tipstretten where id=" & rsstat("kuponid") Set rspris = Conn.Execute(sql) if not rspris.eof then if rspris("pris")>0 then pris=rspris("pris") * -1 else pris=0 end if else pris=0 end if rspris.close set rspris = nothing end if if rsstat("type")=12 then sql = "SELECT pris FROM tipstolv where id=" & rsstat("kuponid") Set rspris = Conn.Execute(sql) if rspris("pris")>0 then pris=rspris("pris") * -1 else pris=0 end if rspris.close set rspris = nothing end if if rsstat("gevinst")<>"" then gevinst = left(rsstat("gevinst"), (len(rsstat("gevinst"))-1)) else gevinst=0 end if tabel = split(gevinst, ",") coun=0 netto=0 for i = 1 to ubound(tabel) coun = coun + 1 tabel = (split(gevinst, ",")) next for t = 0 to coun if rsstat("type")=13 then if tabel(t) = 10 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 13 Set rsnetto = Conn.Execute(sql) netto = netto + rsnetto("10rigtige") rsnetto.close set rsnetto = nothing elseif tabel(t) = 11 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 13 Set rsnetto = Conn.Execute(sql) netto = netto + rsnetto("11rigtige") rsnetto.close set rsnetto = nothing elseif tabel(t) = 12 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 13 Set rsnetto = Conn.Execute(sql) netto = netto + rsnetto("12rigtige") rsnetto.close set rsnetto = nothing elseif tabel(t) = 13 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 13 Set rsnetto = Conn.Execute(sql) netto = netto + rsnetto("13rigtige") rsnetto.close set rsnetto = nothing end if elseif rsstat("type")=12 then if tabel(t) = 10 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 12 Set rsnetto = Conn.Execute(sql) netto = netto + rsnetto("10rigtige") rsnetto.close set rsnetto = nothing elseif tabel(t) = 11 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 12 Set rsnetto = Conn.Execute(sql) netto = netto + rsnetto("11rigtige") rsnetto.close set rsnetto = nothing elseif tabel(t) = 12 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 12 Set rsnetto = Conn.Execute(sql) netto = netto + rsnetto("12rigtige") rsnetto.close set rsnetto = nothing end if end if 'response.write(counter) k(counter)= (netto + pris) next rsstat.movenext loop rsstat.close set rsstat = nothing end if for i = 1 to ubound(k) ialt = ialt + k(i) next 'her slutter statistik dagidag = datepart("w",dato) sql = "SELECT * FROM statistik where uge=" & ugenu-1 & " and " & " aar=" & aarnu & " and " & "klub='" & rs("klubid") & "'" Set rsstat = Conn.Execute(sql) if rsstat.eof=false then do while rsstat.eof=false ncounter=ncounter+1 if rsstat("type")=13 then sql = "SELECT pris FROM tipstretten where id=" & rsstat("kuponid") Set rspris = Conn.Execute(sql) if not rspris.eof then if rspris("pris")>0 then npris=rspris("pris") * -1 else npris=0 end if else npris = 0 end if rspris.close set rspris = nothing end if if rsstat("type")=12 then sql = "SELECT pris FROM tipstolv where id=" & rsstat("kuponid") Set rspris = Conn.Execute(sql) if rspris("pris")>0 then npris=rspris("pris") * -1 else npris=0 end if rspris.close set rspris = nothing end if if rsstat("gevinst")<>"" then ngevinst = left(rsstat("gevinst"), (len(rsstat("gevinst"))-1)) else ngevinst=0 end if ntabel = split(ngevinst, ",") ncoun=0 nnetto=0 for ni = 1 to ubound(ntabel) ncoun = ncoun + 1 ntabel = (split(ngevinst, ",")) next for nt = 0 to ncoun if rsstat("type")=13 then if ntabel(nt) = 10 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 13 Set rsnetto = Conn.Execute(sql) nnetto = nnetto + rsnetto("10rigtige") rsnetto.close set rsnetto = nothing elseif ntabel(nt) = 11 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 13 Set rsnetto = Conn.Execute(sql) nnetto = nnetto + rsnetto("11rigtige") rsnetto.close set rsnetto = nothing elseif ntabel(nt) = 12 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 13 Set rsnetto = Conn.Execute(sql) nnetto = nnetto + rsnetto("12rigtige") rsnetto.close set rsnetto = nothing elseif ntabel(nt) = 13 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 13 Set rsnetto = Conn.Execute(sql) nnetto = nnetto + rsnetto("13rigtige") rsnetto.close set rsnetto = nothing end if elseif rsstat("type")=12 then if ntabel(nt) = 10 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 12 Set rsnetto = Conn.Execute(sql) nnetto = nnetto + rsnetto("10rigtige") rsnetto.close set rsnetto = nothing elseif ntabel(nt) = 11 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 12 Set rsnetto = Conn.Execute(sql) nnetto = nnetto + rsnetto("11rigtige") rsnetto.close set rsnetto = nothing elseif ntabel(nt) = 12 then sql = "SELECT * FROM tipsresultater where uge=" & rsstat("uge") & " and " & " aar=" & rsstat("aar") & " and " & "type=" & 12 Set rsnetto = Conn.Execute(sql) nnetto = nnetto + rsnetto("12rigtige") rsnetto.close set rsnetto = nothing end if end if nk(ncounter)= (nnetto + npris) next rsstat.movenext loop rsstat.close set rsstat = nothing end if for ni = 1 to ubound(nk) nialt = nialt + nk(ni) next %> <% for i = 1 to 1000 k(i)=0 nk(i)=0 next netto=0 ialt=0 nnetto=0 nialt=0 rs.movenext loop rs.close set rs = nothing %> <% Else %>
klub Spillerunden samlet resultat
<%= rs("klubnavn") %> <%= nialt %> kr. <%= ialt %> kr.

<% rsklub.close set rsklub = nothing End If ' her slutter klubranglisteartikel %> <% ' Her starter konkurrence artikel sql = "select turnering from artikeltype" Set rsklub = Conn.Execute(sql) if rsklub("turnering")=0 then %>

Stilling i konkurrencen:

<% sql = "select klubnavn from klubpass" Set rs = Conn.Execute(sql) do while rs.eof=false %> <% rs.movenext loop rs.close set rs = nothing %> <% Else %>
klub ugens resultat samlet resultat
<%= rs("klubnavn") %> 0 0

<% End If rsklub.close set rsklub = nothing ' her slutter konkurrence artikel %>

<% 'Set rs = Nothing 'Set rsplac = Nothing 'Set rsklub = Nothing conn.close Set Conn = Nothing %>