%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%>
<%
session("count")=session("count")+1
if (session("count")=1) then
Dim count_view
Dim count_view_numRows
Set count_view = Server.CreateObject("ADODB.Recordset")
count_view.ActiveConnection = MM_tansik_conn_STRING
count_view.Source = "SELECT * FROM dbo.variables_table WHERE id =1"
count_view.CursorType = 0
count_view.CursorLocation = 2
count_view.LockType = 1
count_view.Open()
count_view_numRows = 0
application("x")=count_view.Fields.Item("counter").Value
application("x")=application("x")+1
set conn=Server.CreateObject("ADODB.Connection")
conn.open MM_tansik_conn_STRING
sql="UPDATE variables_table SET counter=" & application("x") & "where id=1"
on error resume next
conn.Execute sql,recaffected
conn.close
end if
If (Session("max_newsid") = "") Then
Response.Redirect("home.asp")
End If
Dim intro
Dim intro_numRows
Set intro = Server.CreateObject("ADODB.Recordset")
intro.ActiveConnection = MM_tansik_conn_STRING
intro.Source = "SELECT short_text, image, image_width, image_hight, image_alt FROM dbo.en_introduction"
intro.CursorType = 0
intro.CursorLocation = 2
intro.LockType = 1
intro.Open()
intro_numRows = 0
%>
<%
Dim news_1__MMColParam
news_1__MMColParam = "1"
If (Session("max_newsid") <> "") Then
news_1__MMColParam = Session("max_newsid")
End If
%>
<%
Dim news_1
Dim news_1_numRows
Set news_1 = Server.CreateObject("ADODB.Recordset")
news_1.ActiveConnection = MM_tansik_conn_STRING
news_1.Source = "SELECT * FROM dbo.en_news WHERE news_id = " + Replace(news_1__MMColParam, "'", "''") + ""
news_1.CursorType = 0
news_1.CursorLocation = 2
news_1.LockType = 1
news_1.Open()
news_1_numRows = 0
%>
<%
Dim news_2__MMColParam
news_2__MMColParam = "1"
If (Session("max_newsid")-1 <> "") Then
news_2__MMColParam = Session("max_newsid")-1
End If
%>
<%
Dim news_2
Dim news_2_numRows
Set news_2 = Server.CreateObject("ADODB.Recordset")
news_2.ActiveConnection = MM_tansik_conn_STRING
news_2.Source = "SELECT * FROM dbo.en_news WHERE news_id = " + Replace(news_2__MMColParam, "'", "''") + ""
news_2.CursorType = 0
news_2.CursorLocation = 2
news_2.LockType = 1
news_2.Open()
news_2_numRows = 0
%>
<%
Dim news_3__MMColParam
news_3__MMColParam = "1"
If (Session("max_newsid")-2 <> "") Then
news_3__MMColParam = Session("max_newsid")-2
End If
%>
<%
Dim news_3
Dim news_3_numRows
Set news_3 = Server.CreateObject("ADODB.Recordset")
news_3.ActiveConnection = MM_tansik_conn_STRING
news_3.Source = "SELECT * FROM dbo.en_news WHERE news_id = " + Replace(news_3__MMColParam, "'", "''") + ""
news_3.CursorType = 0
news_3.CursorLocation = 2
news_3.LockType = 1
news_3.Open()
news_3_numRows = 0
%>
<%
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
%>