#INCLUDE WCONNECT.H
DEFINE CLASS RelatedSites AS rbPage
FUNCTION Page
PRIVATE pcContent, pcPageTitle
pcPageTitle = "Links Page"
This.Data()
This.Content = [<!-- Site.DataPath = ]+Site.DataPath+[-->]+;
This.TableHeader()+This.HTMLTable()
This.Merge('TemplatePage.htm')
ENDFUNC
HIDDEN FUNCTION Data
SELECT PADR([<a href="]+ALLTRIM(URL)+[">]+ ;
STRTRAN(STRTRAN(ALLTRIM(URL),[HTTP://],[]),[WWW.],[]) ;
+[</a>],240) as ALLTRIMURL, SiteName, Descript ;
FROM (Site.DataPath + "URL.dbf") ;
WHERE approved ;
ORDER BY SiteName ;
INTO CURSOR tList
ENDFUNC
HIDDEN FUNCTION HTMLTable()
LOCAL ARRAY laHeaders(1)
DIMENSION laHeaders[3]
laHeaders[1] = "URL"
laHeaders[2] = "Site"
laHeaders[3] = "Description"
loSC = CREATEOBJECT("wwShowCursor")
loSC.BuildFieldListHeader(@laHeaders)
loSC.lAlternateRows = .T.
loSC.cAlternatingBGColor =["#DFEEFF"]
loSC.cTableBGColor =["#FFFFFF"]
loSC.cPage_PageURL = [/RelatedSites.Page.fox?SessionID=_70E1DIU26&]
loSC.cTableBorder = [1]
loSC.nPage_ItemsPerPage = 20
loSC.ShowCursor()
Return loSC.GetOutput()
ENDFUNC
HIDDEN Function TableHeader()
RETURN [<p align="center"><b>]+Site.SiteName+[ Related Sites</b></p>]
ENDFUNC
ENDDEFINE
csCodeParser v0.9 stats: 76 lines in 0.00 seconds.