%@LANGUAGE="VBSCRIPT"%>
<%
set rsBanner = Server.CreateObject("ADODB.Recordset")
rsBanner.ActiveConnection = MM_ELEDATA_STRING
rsBanner.Source = "SELECT * FROM BANNERS "
rsBanner.CursorType = 3
rsBanner.CursorLocation = 2
rsBanner.LockType = 1
rsBanner.Open()
rsBanner_numRows = 0
'the following codes are added to rotate the banners:
Dim rndMax
rndMax = CInt(rsBanner.RecordCount)
rsBanner.MoveFirst
Dim rndNumber
Randomize Timer
rndNumber = Int(RND * rndMax)
rsBanner.Move rndNumber
'end of codes.
%>
<%
set RsHeadlines = Server.CreateObject("ADODB.Recordset")
RsHeadlines.ActiveConnection = MM_ELEDATA_STRING
RsHeadlines.Source = "SELECT * FROM Headlines WHERE archive =0 ORDER BY Headline_ID DESC"
RsHeadlines.CursorType = 0
RsHeadlines.CursorLocation = 2
RsHeadlines.LockType = 3
RsHeadlines.Open()
RsHeadlines_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = 6
Dim Repeat1__index
Repeat1__index = 0
RsHeadlines_numRows = RsHeadlines_numRows + Repeat1__numRows
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(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)
if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
' 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
%>
Frequently Asked
Questions - FAQ
<%Dim SQL, RS, strRETURNED_DATA, EOF_VAL, intNUM_COL, intNUM_ROW, intROW_COUNTER, ID, TITLE, I, TOP_I, strCATE, CATE
I = 0
CATE = Trim(Request.QueryString("CATE"))
Call OPEN_DB()
SQL = "SELECT fldNAME, ID FROM tbl_cate ORDER BY fldNAME ASC"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.LockType = 1
RS.CursorType = 0
RS.Open SQL, MyConn
WHILE NOT RS.EOF
IF CATE = trim(RS("ID")) Then
strCATE = strCATE & "
<%
IF CATE = "" OR CATE = "0" THEN
SQL = "SELECT ID, fldTITLE FROM tbl_faq WHERE fldENABLE=1 ORDER BY fldORD"
ELSE
SQL = "SELECT ID, fldTITLE FROM tbl_faq WHERE fldENABLE=1 AND fldCATE_ID = " & CATE & " ORDER BY fldORD"
END IF
Set RS = Server.CreateObject("ADODB.Recordset")
RS.CursorType = 3
RS.Open SQL, MyConn
'RS = MyConn.Execute(SQL)
IF NOT RS.EOF THEN
strRETURNED_DATA = RS.getrows
ELSE
EOF_VAL = True
END IF
RS.close
IF Not EOF_VAL = True Then
intNUM_COL=ubound(strRETURNED_DATA,1)
intNUM_ROW=ubound(strRETURNED_DATA,2)
FOR intROW_COUNTER = 0 TO intNUM_ROW
ID = strRETURNED_DATA(0,intROW_COUNTER)
TITLE = strRETURNED_DATA(1,intROW_COUNTER)
I = I + 1
TOP_I = TOP_I + 1
%>
<%
I = 0
IF CATE = "" OR CATE = "0" THEN
SQL = "SELECT ID, fldTITLE, fldSOLUTION, fldQUESTION FROM tbl_faq WHERE fldENABLE=1 ORDER BY fldORD"
ELSE
SQL = "SELECT ID, fldTITLE, fldSOLUTION, fldQUESTION FROM tbl_faq WHERE fldENABLE=1 AND fldCATE_ID = " & CATE & " ORDER BY fldORD"
END IF
Set RS = MyConn.Execute(SQL)
IF NOT RS.EOF THEN
strRETURNED_DATA = RS.getrows
ELSE
EOF_VAL = True
END IF
RS.close
Set RS = Nothing
MyConn.close
Set MyConn = Nothing
IF Not EOF_VAL = True Then
intNUM_COL=ubound(strRETURNED_DATA,1)
intNUM_ROW=ubound(strRETURNED_DATA,2)
FOR intROW_COUNTER = 0 TO intNUM_ROW
ID = strRETURNED_DATA(0,intROW_COUNTER)
TITLE = strRETURNED_DATA(1,intROW_COUNTER)
SOLUTION = strRETURNED_DATA(2,intROW_COUNTER)
QUESTION = strRETURNED_DATA(3,intROW_COUNTER)
I = I + 1
%>
Q: <%=TITLE%>
<%= Replace(QUESTION,vbcrlf," ") %>
A: <%= Replace(SOLUTION,vbcrlf," ") %>
<%If NOT I = 1 THEN%><%Else%><% End If %> <%If NOT TOP_I = I THEN%><%Else%><% End If %>
<%
NEXT
END IF
%>
Latest News
<%
While ((Repeat1__numRows <> 0) AND (NOT RsHeadlines.EOF))
%>