<%@ Language=VBScript %> <% '#############Start of Functions for Date########### 'To exclude the dates which are less than current dates function excludeDate(str) if str<>"" then dim larray Dim lstr larray=Split(str,",") for i=0 to Ubound(larray) dim chDate chDate=larray(i) if isDateOkay(chDate) then if Cdate(chDate)>=now then lstr=lstr & larray(i) lstr=lstr & "," end if else lstr=larray(i) end if Next excludeDate=lstr else excludeDate="" end if end function Function isDateOkay(d) isDateOkay=False If isEmpty(d) Then Exit Function If Trim(""&d)="" Then Exit Function On Error Resume Next If isDate(d) Then isDateOkay=True End Function '#############End of Functions for Date########### if session("ordernumber")="" then 'set myFilecon = createobject("Scripting.FilesystemObject") 'set myFile =myFilecon.OpenTextFile("g:\inetpub\wwwroot\stressmanagement.co.uk_2007\cart\data\count.txt") ' set myFile =myFilecon.OpenTextFile("c:\smm_count.txt") 'countValue=myFile.ReadLine 'myFile.close 'countValue=countValue+1 'set myFileobject = createObject("Scripting.FilesystemObject") 'set myFile = myFileobject.CreateTextFile("g:\inetpub\wwwroot\stressmanagement.co.uk_2007\cart\data\count.txt") ' set myFile = myFileobject.CreateTextFile("c:\smm_count.text") 'myFile.write(countValue) 'myFile.close 'session("ordernumber")=countValue '------------------------------------ 'Added for DB session order no 'Added on 02/06/2008 '------------------------------------ set myConnection=server.Createobject("ADODB.Connection") myConnection.open "symran" set myRecordset=server.createobject("ADODB.Recordset") myRecordset.open "select enquiryID from sysadmin", myConnection If myRecordset.EOF Then enquiryID = 1 Else enquiryID = myRecordset("enquiryID")+1 End If session("ordernumber")=enquiryID strSQLRef="update sysadmin set enquiryID ="&enquiryID myConnection.execute strSQLRef '-------------------------------------- end if pageNumber=request.querystring("page") if pageNumber="" then pageNumber=Request.Form("page") Session("pageNumber")=pageNumber end if 'if pageNumber="21" or pageNumber="22" or pageNumber="23" or pageNumber="24" or pageNumber="25" then 'Session("exceptPP")="True" 'end if set myConnection=server.Createobject("ADODB.Connection") myConnection.open "symran" set myRecordset=server.createobject("ADODB.Recordset") myRecordset.open "select * from smm where nativepage="&pageNumber&" order by SKU", myConnection toggle = 0 do while not myRecordset.EOF duration = myRecordset("duration") %> <%=myRecordset("SKU")%> programme course.">
Symran > Mindfulness Workshops > Book a Course > <%=myRecordset("SKU")%>

<%=myRecordset("SKU")%>
<%if Request("page")=23 then%>Limited to 8 places only<%end if%>

<%if toggle = 0 then%>
<%=myRecordset("short_description")%> <%if myRecordset("picturefile")<>"" then%> <%end if%>

Cost: £<%=myRecordset("unitprice")%>
<%=myRecordset("SKU")%> - <%=trim(duration)%>
Number of people:
<% dim ldates ldates=myRecordset("dates") ldates=excludeDate(ldates) if Len(ldates)>0 then%>
Select Date:
<% end if%>

Course Details : Mental health and Well-being

  • Duration: <%=trim(duration)%>
  • Dates available: <%=ldates%>
  • Venue: <%=myRecordset("Venue")%>
">
<%=myRecordset("description")%>
<% toggle = 0 end if %> ">
<% myRecordset.movenext loop myRecordset.close myConnection.close %>