<%@ Language=VBScript %> <% 'On Error Resume Next Response.Buffer = True ' ' initialise local variable(s) current_file = Trim(Request.ServerVariables("SCRIPT_NAME")) current_path = Left(current_file, InStrRev(current_file, "/")) ' ' get the content details iContentID = Trim(Request("CID")) sContentTitle = "Latest News Releases" sContentDetail = "Latest News Releases" sContentImage = current_path & "images/" & "blank1.gif" If Not IsNumeric(iContentID) Then iContentID = 0 End If ' sSQL = "sp_GetContent " & iContentID & ", 0" Set rsContent = dbConnection.Execute(sSQL) If Not ( rsContent.BOF Or rsContent.EOF ) Then iContentID = rsContent("int_content_id") sContentTitle = rsContent("vchar_name") sContentDetail = rsContent("vchar_description") ' sContentImage = Replace(Trim(sContentTitle), " & ", "_") sContentImage = Replace(Trim(sContentImage), " ", "_") sContentImage = "h_" & LCase(sContentImage) & ".gif" ' ' file system object Set fso = Server.CreateObject("Scripting.FileSystemObject") sContentImage = current_path & "images/" & sContentImage If Not fso.FileExists(Server.MapPath(sContentImage)) Then sContentImage = current_path & "images/" & "blank1.gif" End If Set fso = Nothing End If rsContent.Close Set rsContent = Nothing %> Merisol - <%= sContentTitle %>
 
<% Dim rsSections, iCount Dim records Dim pagecount Dim rowCount rowCount = 0 iCount = 1 blnPreviousRecord = False blnNextRecord = False If Request.QueryString("page") = "" Then Currentpage = 1 Else Currentpage = CInt(trim(Request.QueryString("page"))) End If Set rsSections = Server.Createobject("ADODB.RecordSet") rsSections.Open "SELECT * FROM NEWS ORDER By dat_news_date desc", dbConnection, adOpenKeyset, adLockReadOnly If rsSections.RecordCount > 0 Then rsSections.PageSize = 8 rsSections.AbsolutePage = Currentpage records = rsSections.RecordCount pagecount = rsSections.PageCount If Currentpage > PageCount Then Currentpage = PageCount If Currentpage < 1 Then Currentpage = 1 rowCount = 0 iCount = rsSections.AbsolutePosition Do While rowcount < rsSections.Pagesize And Not rsSections.EOF rowCount = rowCount + 1 %> <% iCount = iCount + 1 rsSections.MoveNext Loop End If %>
LATEST NEWS RELEASES
 
<%= iCount%>. " class="purpletextsm"><% = qdiDate(rsSections("dat_news_date"))%>
<% = rsSections("vchar_news_heading")%> <%If rsSections("int_Word") > 0 Then%>">Download in Word Format<%End If%> <%If rsSections("int_PDF") > 0 Then%>">Download in Acrobat Format<%End If%>
 
<% For intNextCount = 1 To rsSections.PageCount If intNextCount = Currentpage then strPrintPageCount = strPrintPageCount & "" & intNextCount & " " Else If intNextCount < Currentpage AND (intNextCount) = (Currentpage - 1 ) AND blnNextRecord = False then strUrl = "news.asp?Clicked="& Request("Clicked") &"&T1="& request("T1") &"&D1="& Request("D1") &"&iCount="& cint(Request.QueryString("iCount")-5) &"&page="& intNextCount %><% blnNextRecord = True End if strPrintPageCount = strPrintPageCount & "" & intNextCount & " " End if Next %> <% If currentpage * rsSections.PageSize > records Then Response.Write ("ARTICLES "& (currentpage-1) * rsSections.PageSize + 1 &" - "& records &" OF "& records ) Else Response.Write ("ARTICLES "& (currentpage-1) * rsSections.PageSize + 1 &" - "& (currentpage * rsSections.PageSize) &" OF "& records) End If %> <% For intNextCount = 1 To rsSections.PageCount If intNextCount = Currentpage then strPrintPageCount = strPrintPageCount & "" & intNextCount & " " Else If intNextCount > Currentpage AND (intNextCount) = (Currentpage + 1 ) AND blnPreviousRecord = False then strUrl = "news.asp?Clicked="& Request("Clicked") &"&T1="& request("T1") &"&D1="& Request("D1") &"&iCount="& iCount &"&page="& intNextCount %> NEXT > <% blnPreviousRecord = True End if strPrintPageCount = strPrintPageCount & "" & intNextCount & " " End if Next %>  
 
 
<% 'If records <> 0 Then ' If currentpage * rsSections.PageSize > records Then ' Response.Write ("

Result "& (currentpage-1) * rsSections.PageSize + 1 &" - "& records &" of "& records &"") ' Else ' Response.Write ("

Result "& (currentpage-1) * rsSections.PageSize + 1 &" - "& (currentpage * rsSections.PageSize) &" of "& records &"") ' End If 'Else ' Response.Write ("0 Results found") ' Response.End 'End If 'Response.Write ("
") 'Response.write "Page" & " " 'for i = 1 to rsSections.pagecount ' if i = Currentpage then ' Response.Write "" & i & " " ' else ' strUrl = "news.asp?Clicked="& Request("Clicked") &"&T1="& request("T1") &"&D1="& Request("D1") &"&page="& i ' Response.Write ahref(i, strUrl ,"Page","","Go to Result page "& i,false,"","","") &" " ' end if 'next %>