#INCLUDE WCONNECT.H
DEFINE CLASS JobBoardListPublic AS rbPage
JobDescription = []
FUNCTION Page
This.Data()
This.Content = This.TableHeader() +;
this.JobBoardSubmitLink() + ;
This.HTMLTable()
This.PageTitle = "Job Board List"
This.Merge('TemplatePage.htm')
ENDFUNC
FUNCTION Details
LOCAL lcID, lcContent
STORE [] TO lcID, lcContent
lcID = Request.QueryString("ID")
lcContent = This.DataGetDescription(lcID)
lcContent = STRTRAN(lcContent,CHR(13),[<br>])
lcContent = STRTRAN(lcContent, [ ],[ ])
This.JobDescription = lcContent
This.Content = This.MergeToString("JobBoardDetail.htm")
This.PageTitle = "Job Board Details"
This.Merge('TemplatePage.htm')
ENDFUNC
HIDDEN FUNCTION Data
LOCAL ldCutoff
ldCutoff = GOMONTH(DATE(),-3)
USE IN (SELECT("qResult"))
SELECT DatePosted, ;
City, ;
State, ;
Company , ;
Position , ;
[<a href="/JobBoardListPublic.Details.fox?SessionID=_6PQ1CBY65&ID=]+JobBoardID+[">Description</a>] as Description, ;
Contact, ;
Phone, ;
Fax, ;
Email ;
From (Site.DataPath + "JobBoard.dbf") ;
ORDER BY DatePosted desc ;
WHERE Approved ;
AND DatePosted > ldCutoff ;
INTO CURSOR qResult
SELECT qResult
RETURN RECCOUNT('qResult')
ENDFUNC
HIDDEN Function DataGetDescription(tcID)
USE IN (SELECT("qResult"))
SELECT ;
From (Site.DataPath + "JobBoard.dbf") ;
WHERE JobBoardID = tcID ;
INTO CURSOR qResult
SELECT qResult
IF RECCOUNT('qResult') > 0
RETURN qResult.Description
ELSE
RETURN "Error in JobBoardListPublic.DataGetDescription - No Results"
ENDIF
ENDFUNC
HIDDEN FUNCTION HTMLTable()
LOCAL ARRAY laHeaders(1)
DIMENSION laHeaders[10]
laHeaders[1] = "Date Posted"
laHeaders[2] = "City"
laHeaders[3] = "State"
laHeaders[4] = "Company"
laHeaders[5] = "Position"
laHeaders[6] = 'Description'
laHeaders[7] = 'Contact'
laHeaders[8] = 'Phone'
laHeaders[9] = 'Fax'
laHeaders[10] = 'Email'
loSC = CREATEOBJECT("wwShowCursor")
loSC.BuildFieldListHeader(@laHeaders)
loSC.lAlternateRows = .T.
loSC.cAlternatingBGColor =["#DFEEFF"]
loSC.cTableBGColor =["#FFFFFF"]
loSC.cPage_PageURL = [/JobBoardListPublic.Page.fox?SessionID=_6PQ1CBY65&]
loSC.cTableBorder = [1]
loSC.nPage_ItemsPerPage = 20
loSC.ShowCursor()
Return loSC.GetOutput()
ENDFUNC
HIDDEN Function TableHeader()
RETURN [<p align="center"><b>] + Site.SiteName + [ Job Board</b></p>]
ENDFUNC
HIDDEN Function JobBoardSubmitLink()
RETURN [<strong><a href="/JobBoardSubmit.Page.fox?SessionID=_6PQ1CBY65" ] + ;
[style="text-decoration: none"> ] + ;
[<font face="Arial" style="font-size: smaller" ] + ;
[color="#000099">Submit New Jobs</font></a></strong> ] + ;
[<P align=left>]
ENDFUNC
ENDDEFINE
csCodeParser v0.9 stats: 156 lines in 0.00 seconds.