#INCLUDE WCONNECT.H
DEFINE CLASS FoxFiles AS rbPage
FUNCTION Page
This.DataSetup()
This.Content = This.HTMLTable()
This.PageTitle = Site.SiteName+" Files"
THIS.Merge("TemplatePage.htm")
USE IN (SELECT('qResult'))
ENDFUNC
HIDDEN FUNCTION DataSetup()
SELECT FileLibrary.*, Member.LastName, Member.FirstName, ;
Speaker.LastName as sLast, Speaker.FirstName as SFirst ;
FROM (Site.DataPath+"FileLibrary.dbf") ;
LEFT OUTER JOIN (Site.MemberPath+"member.dbf") ;
ON FileLibrary.memberid = member.memberid ;
LEFT OUTER JOIN (Site.DataPath+"Speaker.dbf") ;
ON FileLibrary.Speakerid = Speaker.Speakerid ;
ORDER BY FileName ;
WHERE Approved ;
INTO CURSOR qResult ReadWrite
Replace LastName WITH sLast FOR NOT EMPTY(SpeakerID)
Replace FirstName WITH sFirst FOR NOT EMPTY(SpeakerID)
GO Top
EndFunc
HIDDEN FUNCTION HTMLTable()
LOCAL lcHTML
lcHTML = ""
lcHTML = [<table border="3" width="610" cellspacing="0" cellpadding="3">] + chr(13) + ;
[ <tr>] + chr(13) + ;
[ <td bgcolor="#C0C0C0">] + chr(13) + ;
[ <p align="left"><font face="Arial"><b> ]+Site.SiteName+[ Files</b></font></td>] + chr(13) + ;
[ </tr>] + CHR(13)+ ;
[</table>]
SELECT qResult
lcHTML = lcHTML+ [<table border="3" width="610" cellspacing="0" cellpadding="3">] + chr(13) + ;
[ <tr>] + chr(13) + ;
[ <td width="218" bgcolor="#C0C0C0">] + chr(13) + ;
[ <p align="left"><font face="Arial"><b> File Name</b></font></td>] + chr(13) + ;
[ <td width="478" bgcolor="#C0C0C0">] + chr(13) + ;
[ <p align="left"><font face="Arial"><b> Description</b></font></td>] + chr(13) + ;
[ <td width="478" bgcolor="#C0C0C0">] + chr(13) + ;
[ <p align="left"><font face="Arial"><b> Contributor</b></font></td>] + chr(13) + ;
[ </tr>] ;
SCAN FOR Approved
lcHTML = lcHTML + [ <tr>] + chr(13) + ;
[ <td width="478">] + chr(13) +;
[ <p align="left"><font face="Arial"> <a href="/files/] + ALLTRIM(FileName) + [">] + ALLTRIM(FileName) + [ </font></td>] + chr(13) + ;
[ <td width="218">] + chr(13) + ;
[ <p align="left"><font face="Arial"> ] + ALLTRIM(Description) + [ </font></td>] + chr(13) + ;
[ <td width="218">] + chr(13) + ;
[ <p align="left"><font face="Arial"> ] + ALLTRIM(LastName) + [ , ] + ALLTRIM(FirstName) + [ </font></td>] + chr(13) + ;
[ </tr>]
ENDSCAN
lcHTML = lcHTML + [</table>]
Return lcHTML
ENDFUNC
ENDDEFINE
csCodeParser v0.9 stats: 100 lines in 0.00 seconds.