<% Option Explicit %> <% Dim PortfolioTypeID PortfolioTypeID = 1 Dim PageNumber PageNumber = Trim(Left(Request.QueryString, 10)) If Len(PageNumber) = 0 or Not(IsNumeric(PageNumber)) then PageNumber = 1 else PageNumber = CInt(PageNumber) end if Dim DetailCopy Dim Grid Dim MaxPage Dim MinPage Dim Back1 Dim Forward1 Dim ThisPage Dim TopicHeaderText Dim HeaderText ThisPage = Request.ServerVariables("PATH_INFO") Function CreateDynamicContent Dim SQL Dim PreviousColumn PreviousColumn = "-1" SQL = CreateDynamicPageSQL 'Response.Write(SQL & "
") RS.Open SQL, connOnline, 3, 3 PreviousColumn = 1 Grid = "

" do While not RS.EOF Dim PortfolioItemID Dim ThumbnailImage Dim TWidth Dim THeight Dim Label Dim Column Dim SectionImagePath Dim SectionName Dim ElementType Dim ShowTitlesInList SectionImagePath = RS("Directory") & "" SectionName = RS("PortfolioLabel") & "" ElementType = RS("PortfolioType") & "" ShowTitlesInList = CBool(RS("ShowTitlesInList")) TopicHeaderText = RS("TopicHeaderText") & "" HeaderText = RS("HeaderText") & "" PortfolioItemID = RS("PortfolioItemID") & "" ThumbnailImage = RS("ThumbnailImage") & "" TWidth = RS("TWidth") & "" THeight = RS("THeight") & "" Label = RS("Label") & "" Column = RS("Col") & "" If Column <> PreviousColumn then PreviousColumn = Column Grid = Grid & "

" & vbCRLF end if Dim Link Link = "" Grid = Grid & Link & "" & SectionName & ": " & Label & "
" & vbCRLF if ShowTitlesInList then Grid = Grid & Link & Label & "

" & vbCRLF else Grid = Grid & "
" & vbCRLF end if RS.MoveNext Loop RS.Close Grid = Grid & "

" SQL = CreateMinMaxPageSQL 'Response.Write(SQL & "
") RS.Open SQL, connOnline, 3, 3 do While not RS.EOF MaxPage = CInt(RS("MaxPage") & "") MinPage = CInt(RS("MinPage") & "") Exit Do Loop RS.Close 'Response.Write("PageNumber: " & PageNumber & "
") 'Response.Write("MinPage: " & MinPage & "
") 'Response.Write("MaxPage: " & MaxPage & "
") if PageNumber <= MinPage then Back1 = "" else Dim PrevPageNumber PrevPageNumber = PageNumber - 1 Back1 = "

To " & ElementType & " Portfolio " & PrevPageNumber & "

" end if if PageNumber >= MaxPage then Forward1 = "" else Dim NextPageNumber NextPageNumber = PageNumber + 1 Forward1 = "

To " & ElementType & " Portfolio " & NextPageNumber & "

" end if end Function function CreateDynamicPageSQL CreateDynamicPageSQL = "SELECT PortfolioItem.PortfolioItemID, PortfolioItem.ThumbnailImage, PortfolioItem.TWidth, PortfolioItem.THeight, PortfolioItem.Label, PortfolioItem.Col, PortfolioType.HeaderText, PortfolioType.TopicHeaderText, PortfolioType.Directory, PortfolioType.ShowTitlesInList, PortfolioType.PortfolioLabel, PortfolioType.PortfolioType " & _ "FROM PortfolioType INNER JOIN PortfolioItem ON PortfolioType.PortfolioTypeID = PortfolioItem.PortfolioTypeID " & _ "WHERE PortfolioItem.PortfolioTypeID=" & PortfolioTypeID & " AND PortfolioItem.Page=" & PageNumber & " " & _ "ORDER BY PortfolioItem.Col, PortfolioItem.Posi" end function function CreateMinMaxPageSQL CreateMinMaxPageSQL = "SELECT Max(PortfolioItem.Page) AS MaxPage, Min(PortfolioItem.Page) AS MinPage " & _ "FROM PortfolioItem " & _ "WHERE PortfolioItem.PortfolioTypeID=" & PortfolioTypeID end function CreateDynamicContent %> marketing advice and consultation writing and design of brochures, logos, websites and advertising in Toronto, Ontario, Canada, Markham
Services
Articles
Case Studies
Portfolio

<%=HeaderText%>

<%=TopicHeaderText%>

About Us
Links
Newsletter
Marketing Tools
Spam Test
In The News
Home
<%= Grid %>

<%=Back1%><%=Forward1%>

services | articles | case studies | portfolio | about us | links
newsletter | marketing tools | spam test | in the news | home

Copyright 2003 .

Send snail mail to:

Capstone Communications Group
15 Wilson Street
Markham, Ontario
Canada L3P 1M9

or call 905-472-2330 between 9 am to 5 pm Eastern Time.