#include WCONNECT.H
DEFINE CLASS BootCamp as rbpage
PictureOdd = []
PictureEven = []
FUNCTION Page
LOCAL loDataManTopics, loDataManCosts
This.SaveEventIDtoSession()
loDataManTopics = This.DataManagerTopics()
loDataManCosts = This.DataManagerCosts()
This.DataSetup()
This.Content = This.MeetingHTML()+[<br>]+;
[<b>Topics</b><br>]+ ;
[(Choose your own classes the day of the event.)]+;
This.DataGridTopics(loDataManTopics)+[<br>]+;
[<b>Prices</b><br>]+;
This.DataGridCosts(loDataManCosts)
This.Merge('TemplatePage.htm')
ENDFUNC
HIDDEN Function SaveEventIDtoSession()
LOCAL lcEvents_ID
lcEvents_ID = Request.QueryString("Events_ID")
SessionVars.Globals.Set("Events_ID",lcEvents_ID)
ENDFUNC
HIDDEN PROCEDURE DataSetup()
LOCAL lcEvents_ID
lcEvents_ID = Request.QueryString("Events_ID")
SELECT events.*, ;
location_ds ;
FROM (site.Datapath+'events'), (site.dataPath+'locations') ;
WHERE events.locations_id = locations.locations_id ;
AND Events_ID = lcEvents_ID ;
INTO CURSOR qResults
ENDPROC
HIDDEN Function MeetingHTML
LOCAL lcHTML
lcHTML = []
SELECT qResults
SCAN
IF MOD(RECNO(),2) = 0
This.PictureEven = ;
[ <td> ] + CRLF+;
[ <!--This table contains the boardroom picture-->] + CRLF+;
[ <table border="0">] + CRLF+;
[ <tr>] + CRLF+;
[ <td>] + CRLF+;
[ <img src="/images/INTEREST.jpg" height="197" width="300">] + CRLF+;
[ </td> ] + CRLF+;
[ </tr>] + CRLF+;
[ </table>] + CRLF+;
[ <!--ends the table with the boardroom picture--> ] + CRLF+;
[ </td>] + CRLF
ELSE
This.PictureOdd = ;
[ <td> ] + CRLF+;
[ <!--This table contains the boardroom picture-->] + CRLF+;
[ <table border="0">] + CRLF+;
[ <tr>] + CRLF+;
[ <td>] + CRLF+;
[ <img src="/images/boardroom.jpg" height="197" width="300">] + CRLF+;
[ </td> ] + CRLF+;
[ </tr>] + CRLF+;
[ </table>] + CRLF+;
[ <!--ends the table with the boardroom picture--> ] + CRLF+;
[ </td>] + CRLF
Endif
lcHTML = lcHTML + This.MergeToString("Home_per_Conference.htm")
ENDSCAN
RETURN lcHTML
ENDFUNC
HIDDEN Function DataManagerTopics
LOCAL loDataMan, lcEvents_ID
lcEvents_ID = Request.QueryString("Events_ID")
STORE .NULL. to loDataMan
loDataMan = CreateObject("DataManager")
loDataMan.Alias = "zTopics"
loDataMan.SQL = [Select Topics.*, speakers.name from ]+Site.DataPath+[Topics.dbf, ]+Site.DataPath+[Speakers.dbf where Topics.Speakers_id = Speakers.Speakers_id and events_id="]+lcEvents_ID+[" order by speakers.speakers_id]
loDataMan.PageSize = 20
loDataMan.QueryAsNeeded()
RETURN loDataMan
ENDFUNC
HIDDEN FUNCTION DataGridTopics(toData)
LOCAL lcHTML
LOCAL loTable
STORE .NULL. to loGrid
STORE [] TO lcHTML
loGrid = CreateObject("DataGrid", toData)
loGrid.Border=[0]
loGrid.FieldList = [Level,Title,Name,Room,Time]
loGrid.CaptionList = [Level,Title,Speaker,Room,Time]
loGrid.Col_Title.HrefExpression = ['/Topic.Page.fox?SessionID=_71P0O15YP&Topics_id='+Topics_ID]
loGrid.Col_Name.HrefExpression = ['/Speaker.Page.fox?SessionID=_71P0O15YP&Speakers_id='+Speakers_I]
loGrid.Col_Level.Sortable = .F.
loGrid.Col_Title.Sortable = .F.
loGrid.Col_Name.Sortable = .F.
loGrid.Col_Room.Sortable = .F.
loGrid.Col_Time.Sortable = .F.
lcHTML = loGrid.HTMLGrid()
RETURN lcHTML
ENDFUNC
HIDDEN Function DataManagerCosts
LOCAL loDataMan, lcEvents_ID
lcEvents_ID = Request.QueryString("Events_ID")
STORE .NULL. to loDataMan
loDataMan = CreateObject("DataManager")
loDataMan.Alias = "zCosts"
loDataMan.SQL = [Select * from ]+Site.DataPath+[EventsPriceSchedule.dbf where events_id="]+lcEvents_ID+[" and end_dt >=DATE() order by start_dt]
loDataMan.PageSize = 20
loDataMan.QueryAsNeeded()
RETURN loDataMan
ENDFUNC
HIDDEN FUNCTION DataGridCosts(toData)
LOCAL lcHTML
LOCAL loTable
STORE .NULL. to loGrid
STORE [] TO lcHTML
loGrid = CreateObject("DataGrid", toData)
loGrid.FieldList = [price_ds,start_dt,end_dt,amount]
loGrid.CaptionList = [When,Start Date,End Date,Amount]
loGrid.Col_Price_ds.Sortable = .F.
loGrid.Col_Start_dt.Sortable = .F.
loGrid.Col_End_dt.Sortable = .F.
loGrid.Col_Amount.Sortable = .F.
lcHTML = loGrid.HTMLGrid()
RETURN lcHTML
ENDFUNC
ENDDEFINE
csCodeParser v0.9 stats: 201 lines in 0.01 seconds.