%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim you_know
Dim you_know_numRows
Set you_know = Server.CreateObject("ADODB.Recordset")
you_know.ActiveConnection = MM_Connection_STRING
you_know.Source = "SELECT * FROM Did_you"
you_know.CursorType = 0
you_know.CursorLocation = 2
you_know.LockType = 1
you_know.Open()
you_know_numRows = 0
%>
<%
Dim open_mess
Dim open_mess_numRows
Set open_mess = Server.CreateObject("ADODB.Recordset")
open_mess.ActiveConnection = MM_Connection_STRING
open_mess.Source = "SELECT * FROM open_mess"
open_mess.CursorType = 0
open_mess.CursorLocation = 2
open_mess.LockType = 1
open_mess.Open()
open_mess_numRows = 0
%>
<%
Dim notices__MMColParam
notices__MMColParam = "n"
If (Request("MM_EmptyValue") <> "") Then
notices__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim notices
Dim notices_numRows
Set notices = Server.CreateObject("ADODB.Recordset")
notices.ActiveConnection = MM_Connection_STRING
notices.Source = "SELECT * FROM notices WHERE not_pend = '" + Replace(notices__MMColParam, "'", "''") + "' ORDER BY not_date DESC"
notices.CursorType = 0
notices.CursorLocation = 2
notices.LockType = 1
notices.Open()
notices_numRows = 0
%>
<%
Dim contacts
Dim contacts_numRows
Set contacts = Server.CreateObject("ADODB.Recordset")
contacts.ActiveConnection = MM_Connection_STRING
contacts.Source = "SELECT * FROM Contacts"
contacts.CursorType = 0
contacts.CursorLocation = 2
contacts.LockType = 1
contacts.Open()
contacts_numRows = 0
%>
<%
Dim events__MMColParam
events__MMColParam = "y"
If (Request("MM_EmptyValue") <> "") Then
events__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim events
Dim events_numRows
Set events = Server.CreateObject("ADODB.Recordset")
events.ActiveConnection = MM_Connection_STRING
events.Source = "SELECT * FROM events WHERE appr = '" + Replace(events__MMColParam, "'", "''") + "' ORDER BY tb_date ASC"
events.CursorType = 0
events.CursorLocation = 2
events.LockType = 1
events.Open()
events_numRows = 0
%>
<%
Dim votes
Dim votes_numRows
Set votes = Server.CreateObject("ADODB.Recordset")
votes.ActiveConnection = MM_Connection_STRING
votes.Source = "SELECT * FROM poll_quest"
votes.CursorType = 0
votes.CursorLocation = 2
votes.LockType = 1
votes.Open()
votes_numRows = 0
%>
<%
Dim photos
Dim photos_numRows
Set photos = Server.CreateObject("ADODB.Recordset")
photos.ActiveConnection = MM_Connection_STRING
photos.Source = "SELECT * FROM tblMultitimeimage, tblTheme WHERE tblTheme.golivedate < NOW() AND tblMultitimeimage.themeID=tblTheme.themeID AND tblMultitimeimage.open_pic = 'y'"
photos.CursorType = 0
photos.CursorLocation = 2
photos.LockType = 1
photos.Open()
photos_numRows = 0
%>
<%
FUNCTION CropSentence(strText, intLength, strTrial)
Dim wsCount
Dim intTempSize
Dim intTotalLen
Dim strTemp
wsCount = 0
intTempSize = 0
intTotalLen = 0
intLength = intLength - Len(strTrial)
strTemp = ""
IF Len(strText) > intLength THEN
arrTemp = Split(strText, " ")
FOR EACH x IN arrTemp
IF Len(strTemp) <= intLength THEN
strTemp = strTemp & x & " "
END IF
NEXT
CropSentence = Left(strTemp, Len(strTemp) - 1) & strTrial
ELSE
CropSentence = strText
END IF
END FUNCTION
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 2
Repeat1__index = 0
notices_numRows = notices_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 rrSource_you_know, rrRecCount_you_know, re_you_know
Set re_you_know = New regexp
re_you_know.Pattern = "SELECT (.*) FROM "
re_you_know.Global = False
re_you_know.IgnoreCase = True
rrSource_you_know="Select Count(*) as RecCount From " & re_you_know.Replace(you_know.Source,"")
rrRecCount_you_know=CInt(you_know.ActiveConnection.Execute(rrSource_you_know)("RecCount"))
Set rrSource_you_know = Nothing
Set re_you_know = Nothing
%>
<%
' *** Visit Counter ***
' FELIXONE 2002 - SB by Felice Di Stefano - www.felixone.it
Dim FX_count
Dim FX_digit
FX_digit = 5
Dim FX_dpath
FX_dpath = Server.MapPath("FX_DataCounter")
Dim FX_fpath
FX_fpath = Server.MapPath("FX_DataCounter/counter.txt")
set FX_fso = Server.CreateObject("Scripting.FileSystemObject")
' Check if directory and file exists, if not create it.
If (Not FX_fso.fileExists(FX_fpath)) Then
If (Not FX_fso.folderExists(FX_dpath)) Then
FX_fso.CreateFolder(FX_dpath)
End If
Application.Lock()
set FX_file = FX_fso.OpenTextFile(FX_fpath, 8, true)
FX_file.write(1099)
FX_file.Close()
Application.Unlock()
End If
' Read file and update it any time
set FX_fobj = FX_fso.getfile(FX_fpath)
set FX_file = FX_fobj.OpenAsTextStream(1,-2)
FX_count = FX_file.Read(100)
'If (Session("FX_DataCounter") = "") Then
Application.Lock()
set FX_file = FX_fso.CreateTextFile(FX_fpath, 8, false)
FX_file.write(FX_count+1)
FX_file.Close()
Application.Unlock()
set FX_fso = nothing
FX_count = FX_count+1
' Session("FX_DataCounter") = FX_count
'End If
' Add leadings
FX_numlength = Len(cStr(FX_count))
If (FX_numlength < FX_digit) Then
FX_lead = cInt(FX_digit - FX_numlength)
For i=1 To FX_lead
FX_count = "0" & FX_count
Next
End If
%>
<% Dim rrSource_photos, rrRecCount_photos, re_photos
Set re_photos = New regexp
re_photos.Pattern = "SELECT (.*) FROM "
re_photos.Global = False
re_photos.IgnoreCase = True
rrSource_photos="Select Count(*) as RecCount From " & re_photos.Replace(photos.Source,"")
rrRecCount_photos=CInt(photos.ActiveConnection.Execute(rrSource_photos)("RecCount"))
Set rrSource_photos = Nothing
Set re_photos = Nothing
%>