<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim rsIndex__MMColParam rsIndex__MMColParam = "i" If (Request("MM_EmptyValue") <> "") Then rsIndex__MMColParam = Request("MM_EmptyValue") End If %> <% Dim rsIndex Dim rsIndex_numRows Set rsIndex = Server.CreateObject("ADODB.Recordset") rsIndex.ActiveConnection = MM_modulx_STRING rsIndex.Source = "SELECT * FROM sites WHERE sattr = '" + Replace(rsIndex__MMColParam, "'", "''") + "'" rsIndex.CursorType = 0 rsIndex.CursorLocation = 2 rsIndex.LockType = 1 rsIndex.Open() rsIndex_numRows = 0 %> <% Dim rsLayout Dim rsLayout_numRows Set rsLayout = Server.CreateObject("ADODB.Recordset") rsLayout.ActiveConnection = MM_modulx_STRING rsLayout.Source = "SELECT * FROM layout" rsLayout.CursorType = 0 rsLayout.CursorLocation = 2 rsLayout.LockType = 1 rsLayout.Open() rsLayout_numRows = 0 %> <% Dim rsMenu Dim rsMenu_numRows Set rsMenu = Server.CreateObject("ADODB.Recordset") rsMenu.ActiveConnection = MM_modulx_STRING rsMenu.Source = "SELECT * FROM menu ORDER BY morder ASC" rsMenu.CursorType = 0 rsMenu.CursorLocation = 2 rsMenu.LockType = 1 rsMenu.Open() rsMenu_numRows = 0 %> <% Dim rsStartpic Dim rsStartpic_numRows Set rsStartpic = Server.CreateObject("ADODB.Recordset") rsStartpic.ActiveConnection = MM_modulx_STRING rsStartpic.Source = "SELECT * FROM startseite" rsStartpic.CursorType = 0 rsStartpic.CursorLocation = 2 rsStartpic.LockType = 1 rsStartpic.Open() rsStartpic_numRows = 0 %> <% Dim rsNews Dim rsNews_numRows Set rsNews = Server.CreateObject("ADODB.Recordset") rsNews.ActiveConnection = MM_newspool_STRING rsNews.Source = "SELECT * FROM newspool WHERE ende >=NOW() AND start <=NOW() ORDER BY N_ID DESC" rsNews.CursorType = 0 rsNews.CursorLocation = 2 rsNews.LockType = 1 rsNews.Open() rsNews_numRows = 0 %> <% ' Moving to random record - Steven Jones' Extension If Not(rsStartpic.bof and rsStartpic.eof) Then ' reset the cursor to the beginning If (rsStartpic.CursorType > 0) Then rsStartpic.MoveFirst Else rsStartpic.Requery End If rsStartpic_totalrn = -1 rsStartpic_totalrn = rsStartpic.RecordCount ' ony works on some recordsets, but much faster If (rsStartpic_totalrn = -1) Then ' and if it didn't work, we still have to count the records. ' count the total records by iterating through the recordset rsStartpic_totalrn=0 While (Not rsStartpic.EOF) rsStartpic_totalrn = rsStartpic_totalrn + 1 rsStartpic.MoveNext Wend ' reset the cursor to the beginning If (rsStartpic.CursorType > 0) Then rsStartpic.MoveFirst Else rsStartpic.Requery End If End If ' now do final adjustments, and move to the random record rsStartpic_totalrn = rsStartpic_totalrn - 1 If rsStartpic_totalrn > 0 Then Randomize rsStartpic.Move Int((rsStartpic_totalrn + 1) * Rnd) End If End If ' all done; you should always check for an empty recordset before displaying data %> <% Dim rsModules__MMColParam rsModules__MMColParam = (rsIndex.Fields.Item("sid").Value) If (Request.QueryString("sid") <> "") Then rsModules__MMColParam = Request.QueryString("sid") End If %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 rsMenu_numRows = rsMenu_numRows + Repeat1__numRows %> <% Dim MM_paramName %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters Dim MM_keepNone Dim MM_keepURL Dim MM_keepForm Dim MM_keepBoth Dim MM_removeList Dim MM_item Dim MM_nextItem ' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" End If MM_keepURL="" MM_keepForm="" MM_keepBoth="" MM_keepNone="" ' add the URL parameters to the MM_keepURL string For Each MM_item In Request.QueryString MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item)) End If Next ' add the Form variables to the MM_keepForm string For Each MM_item In Request.Form MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item)) End If Next ' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm If (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) End If If (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) End If If (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) End If ' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %> <% Dim Repeat2__numRows Dim Repeat2__index Repeat2__numRows = 10 Repeat2__index = 0 rsModules_numRows = rsModules_numRows + Repeat2__numRows %> <%=(rsLayout.Fields.Item("Firma").Value)%> ">
">
"> <% While ((Repeat1__numRows <> 0) AND (NOT rsMenu.EOF)) %>
">
<% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsMenu.MoveNext() Wend %>

<% If Not rsNews.EOF Or Not rsNews.BOF Then %>

N E W S

"><%=(rsNews.Fields.Item("header").Value)%>

<%=(rsNews.Fields.Item("detail").Value)%>

">lesen Sie mehr ->


<% End If ' end Not rsNews.EOF Or NOT rsNews.BOF %>
" class="footer"><%=(rsLayout.Fields.Item("Firma").Value)%> - <%=(rsLayout.Fields.Item("Adresse").Value)%> - <%=(rsLayout.Fields.Item("Ort").Value)%> - <%=(rsLayout.Fields.Item("Tel").Value)%> - "><%=(rsLayout.Fields.Item("Mail").Value)%>
<% rsLayout.Close() Set rsLayout = Nothing %> <% rsMenu.Close() Set rsMenu = Nothing %> <% rsStartpic.Close() Set rsStartpic = Nothing %> <% rsNews.Close() Set rsNews = Nothing %> <% rsIndex.Close() Set rsIndex = Nothing %>