<% 'Databaskoppling Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("data/data01.mdb")&";pwd=skovde" 'Tar fram vilken laout som skall användas Set RecSet = Server.CreateObject("ADODB.Recordset") SQL = "Select * From front Where use = '1'" RecSet.Open SQL, Connect, 3, 3 'Hämtar layoutdata layoutid = RecSet("id") special1 = RecSet("special1") special2 = RecSet("special2") gameid = RecSet("gameid") cell1 = RecSet("cell1") cell1link = RecSet("cell1link") cell2 = RecSet("cell2") cell2link = RecSet("cell2link") cell3 = RecSet("cell3") cell3link = RecSet("cell3link") cell4 = RecSet("cell4") cell4link = RecSet("cell4link") RecSet.Close : Set RecSet = nothing Connect.Close : Set Connect = nothing %> DUKES Skövde

 
<%If layoutid = "1" Then%>
<%If special1 = "picture" Then%>
<%If cell1link <> "" Then%> <%Else%> <%End if%>
<%ElseIf special1 = "news" Then%>
NEWS

<% 'Öppnar och kopplar databasen Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("data/data01.mdb")&";pwd=skovde" Set RecSet = Server.CreateObject("ADODB.Recordset") SQL = "Select * From news Where public = '1' And layout <> '1' Order by date DESC" RecSet.Open SQL, Connect, 3, 3 'Meddelande vid tom databas If RecSet.EOF Then Response.Write "No news at this moment!." End If 'Listar nyheterna antal = 0 Do until RecSet.EOF Or antal >= 3 antal = antal + 1 'Gör en sammanfattning/ingress smalltext = Replace(RecSet("text"),"
"," ") smalltext = Left(smalltext,150) smalltext = smalltext &"..." %> &show=read"><%=RecSet("headline")%>
<%=RecSet("date")%>
<%=smalltext%>


<% RecSet.Movenext Loop 'Stänger databasen RecSet.Close : Set RecSet = nothing Connect.Close : Set Connect = nothing %>
<%Else%>
ARTICLES

<% 'Öppnar och kopplar databasen Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("data/data01.mdb")&";pwd=skovde" Set RecSet = Server.CreateObject("ADODB.Recordset") SQL = "Select * From news Where public = '1' And layout = '1' Order by date DESC" RecSet.Open SQL, Connect, 3, 3 'Meddelande vid tom databas If RecSet.EOF Then Response.Write "No articles at this moment!." End If 'Listar nyheterna antal = 0 Do until RecSet.EOF Or antal >= 3 antal = antal + 1 'Gör en sammanfattning/ingress smalltext = Replace(RecSet("text"),"
"," ") smalltext = Left(smalltext,150) smalltext = smalltext &"..." %> &show=read"><%=RecSet("headline")%>
<%=RecSet("date")%>
<%=smalltext%>


<% RecSet.Movenext Loop 'Stänger databasen RecSet.Close : Set RecSet = nothing Connect.Close : Set Connect = nothing %>
<%End if%>
<%If cell2link <> "" Then%> <%Else%> <%End if%>
<%If cell3link <> "" Then%> <%Else%> <%End if%>

<%If cell4link <> "" Then%> <%Else%> <%End if%>

<%ElseIf layoutid = "2" Then%>
<% 'Öppnar och kopplar databasen Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("data/data01.mdb")&";pwd=skovde" gameid = CInt(gameid) Set RecSet = Server.CreateObject("ADODB.Recordset") SQL = "Select * From games Where id = "&gameid RecSet.Open SQL, Connect, 3, 3 %> <% 'Stänger databasen RecSet.Close : Set RecSet = nothing Connect.Close : Set Connect = nothing %>
">
" alt="">
<%=RecSet("home")%>
<%=RecSet("guests")%>
<%If cell2link <> "" Then%> <%Else%> <%End if%>
<%If cell3link <> "" Then%> <%Else%> <%End if%>

<%If cell4link <> "" Then%> <%Else%> <%End if%>

<%ElseIf layoutid = "3" Then%>

<%If special1 = "picture" Then%> <%If cell1link <> "" Then%> <%Else%> <%End if%> <%ElseIf special1 = "news" Then%>

NEWS

<% 'Öppnar och kopplar databasen Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("data/data01.mdb")&";pwd=skovde" Set RecSet = Server.CreateObject("ADODB.Recordset") SQL = "Select * From news Where public = '1' And layout <> '1' Order by date DESC" RecSet.Open SQL, Connect, 3, 3 'Meddelande vid tom databas If RecSet.EOF Then Response.Write "No news at this moment!." End If 'Listar nyheterna antal = 0 Do until RecSet.EOF Or antal >= 3 antal = antal + 1 'Gör en sammanfattning/ingress smalltext = Replace(RecSet("text"),"
"," ") smalltext = Left(smalltext,150) smalltext = smalltext &"..." %> &show=read"><%=RecSet("headline")%>
<%=RecSet("date")%>
<%=smalltext%>


<% RecSet.Movenext Loop 'Stänger databasen RecSet.Close : Set RecSet = nothing Connect.Close : Set Connect = nothing %>
<%Else%>
ARTICLES

<% 'Öppnar och kopplar databasen Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("data/data01.mdb")&";pwd=skovde" Set RecSet = Server.CreateObject("ADODB.Recordset") SQL = "Select * From news Where public = '1' And layout = '1' Order by date DESC" RecSet.Open SQL, Connect, 3, 3 'Meddelande vid tom databas If RecSet.EOF Then Response.Write "No articles at this moment!." End If 'Listar nyheterna antal = 0 Do until RecSet.EOF Or antal >= 3 antal = antal + 1 'Gör en sammanfattning/ingress smalltext = Replace(RecSet("text"),"
"," ") smalltext = Left(smalltext,150) smalltext = smalltext &"..." %> &show=read"><%=RecSet("headline")%>
<%=RecSet("date")%>
<%=smalltext%>


<% RecSet.Movenext Loop 'Stänger databasen RecSet.Close : Set RecSet = nothing Connect.Close : Set Connect = nothing %>
<%End if%>
<%If special2 = "picture" Then%> <%If cell2link <> "" Then%> <%Else%> <%End if%> <%ElseIf special2 = "news" Then%>
NEWS

<% 'Öppnar och kopplar databasen Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("data/data01.mdb")&";pwd=skovde" Set RecSet = Server.CreateObject("ADODB.Recordset") SQL = "Select * From news Where public = '1' And layout <> '1' Order by date DESC" RecSet.Open SQL, Connect, 3, 3 'Meddelande vid tom databas If RecSet.EOF Then Response.Write "No news at this moment!." End If 'Listar nyheterna antal = 0 Do until RecSet.EOF Or antal >= 3 antal = antal + 1 'Gör en sammanfattning/ingress smalltext = Replace(RecSet("text"),"
"," ") smalltext = Left(smalltext,150) smalltext = smalltext &"..." %> &show=read"><%=RecSet("headline")%>
<%=RecSet("date")%>
<%=smalltext%>


<% RecSet.Movenext Loop 'Stänger databasen RecSet.Close : Set RecSet = nothing Connect.Close : Set Connect = nothing %>
<%Else%>
ARTICLES

<% 'Öppnar och kopplar databasen Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("data/data01.mdb")&";pwd=skovde" Set RecSet = Server.CreateObject("ADODB.Recordset") SQL = "Select * From news Where public = '1' And layout = '1' Order by date DESC" RecSet.Open SQL, Connect, 3, 3 'Meddelande vid tom databas If RecSet.EOF Then Response.Write "No articles at this moment!." End If 'Listar nyheterna antal = 0 Do until RecSet.EOF Or antal >= 3 antal = antal + 1 'Gör en sammanfattning/ingress smalltext = Replace(RecSet("text"),"
"," ") smalltext = Left(smalltext,150) smalltext = smalltext &"..." %> &show=read"><%=RecSet("headline")%>
<%=RecSet("date")%>
<%=smalltext%>


<% RecSet.Movenext Loop 'Stänger databasen RecSet.Close : Set RecSet = nothing Connect.Close : Set Connect = nothing %>
<%End if%>
<%If cell3link <> "" Then%> <%Else%> <%End if%>
<%ElseIf layoutid = "4" Then%>
<%If cell1link <> "" Then%> <%Else%> <%End if%>
<%ElseIf layoutid = "5" Then%>

<%If cell1link <> "" Then%> <%Else%> <%End if%>

<%If cell2link <> "" Then%> <%Else%> <%End if%>
<%If cell3link <> "" Then%> <%Else%> <%End if%>
<%Else%> Error. Code: A100404. <%End if%>
 
© DUKES Skövde <%=Year(Date)%> - info@skovdedukes.com