![]() |
|
|||||||
|
|
||||||||
|
|
|
|
|
|
||||
|
|
|
|
|
|||||
|
|
|
|
||||||
|
|
|
|
|
|
|
|
|
|
| Accueil | Contactez-Nous | Archives | Commentaires | Sites Web relatifs | REDI | SARDC |
|
|
<%
Dim adoCon
Dim strCon
Dim strSQL
Dim rsResults
Dim intRecordPositionPageNum 'Holds the record position
Dim intRecordLoopCounter 'Loop counter for displaying the database records
Dim lngTotalRecordsFound 'Holds the total number of records in the database
Dim lngTotalNumPages 'holds the total number of pages in the database
Dim intLinkPageNum 'Holds the page number to be linked to
Dim intLoopCounter 'Holds the loop counter number
Dim sarySearchWord 'Holds the keywords for the URL
Dim strSearchKeywords 'Holds the keywords to be searched
Dim intSQLLoopCounter 'Loop counter for the loop for the sql query
Dim intSearchWordLength 'Holds the length of the word to be searched
Dim blnSearchWordLenthOK 'Boolean set to false if the search word length is not OK
Dim intRecordDisplayFrom 'Holds the number of the search result that the page is displayed from
Dim intRecordDisplayedTo
Dim strName
Dim strAcronym
Dim strType
Dim strPhysical
dim strpostal
Dim strTel
Dim strContact
Dim strEmail
Dim strFax
Dim strUrl
Dim strContactTitle
Dim strProfile
Dim strInitiatives
Dim strFocus
Dim strMajorKeys
Dim strOtherKeys
Dim strAdd
Dim strCriteria
Dim strCountry
Dim strSearch
strSearch = Request.QueryString("Search")
If Request.QueryString("PagePosition") = "" Then
intRecordPositionPageNum = 1
'Else the page has been displayed before so the page postion is set to the Record Position number
Else
intRecordPositionPageNum = CInt(Request.QueryString("PagePosition"))
End If
Set adoCon = Server.CreateObject("ADODB.Connection")
Set rsResults = Server.CreateObject("ADODB.Recordset")
strCon = "DRIVER={Microsoft Access Driver (*.mdb)};"
strCon = strCon & "DBQ=" & Server.MapPath("sadcsearch")
adoCon.open strCon
strSQL = "Select * from fr_Articles WHERE Keywords LIKE '%" & strSearch & "%'"
rsResults.open strSQL,strCon,3
lngTotalRecordsFound = CLng(rsResults.RecordCount)
rsResults.PageSize = 10
'Get the page number record poistion to display from
IF NOT rsResults.EOF Then rsResults.AbsolutePage = intRecordPositionPageNum
'Count the number of pages the search results will be displayed on calculated by the PageSize attribute set above
lngTotalNumPages = CLng(rsResults.PageCount)
'Calculate the the record number displayed from and to on the page showing
intRecordDisplayFrom = (intRecordPositionPageNum - 1) * 10 + 1
intRecordDisplayedTo = (intRecordPositionPageNum - 1) * 10+ 10
If intRecordDisplayedTo > lngTotalRecordsFound Then intRecordDisplayedTo = lngTotalRecordsFound
If lngTotalRecordsFound > 0 Then
Response.write("Your Search for " & strSearch & " returned " & lngTotalRecordsFound & " results. Displaying records " & intRecordDisplayFrom & " - " & intRecordDisplayedTo & " ") Else Response.write("Your Search for " & strSearch & " did not match any articles ") Response.write("
")
End If
For intRecordLoopCounter = 1 to 10
%>
<%
If Not rsResults.EOF Then
%>
"> <% = rsResults("Title") %>
") rsResults.MoveNext End If Next %>
|
|
|
SADC Today
|
|
Tous commentaires ou questions au sujet de cette page, contactez sadctoday@sardc.net Pour toutes questions concernant la page entrez en contact avec Web Applications Developer. |
|