<%@language="vbscript" %> <% thisyear = request.QueryString ("thisyear") if thisyear = "" then thisyear = year(now) else thisyear = cdbl(thisyear) end if col = 0 changeover = 7 set col_rs = server.CreateObject ("ADODB.Recordset") set col_rs.activeconnection = conn col_rs.open "SELECT * FROM colours " &_ "ORDER BY colournum " do until col_rs.eof col = col + 1 redim preserve fore(col) redim preserve back(col) fore(col) = trim(col_rs("forecolour").value) back(col) = trim(col_rs("backcolour").value) col_rs.movenext loop col_rs.close set key_rs = server.CreateObject ("ADODB.Recordset") set key_rs.activeconnection = conn key_rs.open "SELECT cost " &_ "FROM dates " &_ "WHERE booked = 0 " &_ "GROUP BY cost " &_ "ORDER BY cost " col = 0 do until key_rs.eof col = col + 1 redim preserve holcost(col) holcost(col) = trim(key_rs("cost").value) key_rs.movenext loop key_rs.close totalcost = col set hol_rs = server.CreateObject ("ADODB.Recordset") set hol_rs.activeconnection = conn hol_rs.open "SELECT * FROM properties " &_ "ORDER BY propertyname " do until hol_rs.eof propertycode = trim(hol_rs("propertycode").value) hol_rs.movenext loop hol_rs.close %> Rates and Booking - Wood Holiday Properties in Yorkshire Dales

Rates And Booking

<% if thisyear <> year(now) then %><<% else %> <% end if %>

>

<% = thisyear %>

<% for m = 1 to 12 %>

<% = monthname(m) %>

<% for i = 1 to 7 %>

<% = left(weekdayname(i), 1) %>

<% next weeks = 1 for wd = 1 to 7 if datepart("w", "1/" & m & "/" & thisyear) = wd then if datediff("d", now(), "1" & "/" & m & "/" & thisyear) < 0 then bgcolor = "#999999" color = "" show = false else checkdate = "1" & "/" & m & "/" & thisyear thiswd = datepart("w", checkdate) if thiswd = changeover then wdd = string(2 - len(d), "0") & d wdm = string(2 - len(m), "0") & m changedate = thisyear & wdm & wdd t = true else checkdate = dateadd("d", -7, checkdate) for i = 1 to 7 subdate = dateadd("d", i, checkdate) thiswd = datepart("w", subdate) if thiswd = changeover then dbd = day(subdate) dbm = month(subdate) wdd = string(2 - len(dbd), "0") & dbd wdm = string(2 - len(dbm), "0") & dbm changedate = thisyear & wdm & wdd end if next t = false end if set get_rs = server.CreateObject ("ADODB.Recordset") set get_rs.activeconnection = conn get_rs.open "SELECT * FROM dates " &_ "WHERE propertycode = '" & propertycode & "' " &_ "AND startdate = '" & changedate & "' " if get_rs.eof and get_rs.bof then bgcolor = "#999999" color = "" else do until get_rs.eof if cbool(get_rs("booked").value) = true then bgcolor = "#ff0000" color = "background-color: #ff0000" else for i = 1 to totalcost if holcost(i) = trim(get_rs("cost").value) then bgcolor = fore(i) color = "background-color: #" & back(i) & "" end if next end if show = true get_rs.movenext loop end if get_rs.close end if %>

1

<% exit for else %>

 

<% end if next for d = 2 to 32 if isdate(d & "/" & m & "/" & thisyear) then if datediff("d", now(), d & "/" & m & "/" & thisyear) < 0 then bgcolor = "#999999" color = "" show = false else checkdate = d & "/" & m & "/" & thisyear thiswd = datepart("w", checkdate) if thiswd = changeover then wdd = string(2 - len(d), "0") & d wdm = string(2 - len(m), "0") & m changedate = thisyear & wdm & wdd t = true else checkdate = dateadd("d", -7, checkdate) for i = 1 to 7 subdate = dateadd("d", i, checkdate) thiswd = datepart("w", subdate) if thiswd = changeover then dbd = day(subdate) dbm = month(subdate) wdd = string(2 - len(dbd), "0") & dbd wdm = string(2 - len(dbm), "0") & dbm changedate = thisyear & wdm & wdd end if next t = false end if set get_rs = server.CreateObject ("ADODB.Recordset") set get_rs.activeconnection = conn get_rs.open "SELECT * FROM dates " &_ "WHERE propertycode = '" & propertycode & "' " &_ "AND startdate = '" & changedate & "' " if get_rs.eof and get_rs.bof then bgcolor = "#999999" color = "" else do until get_rs.eof if cbool(get_rs("booked").value) = true then bgcolor = "#ff0000" color = "background-color: #ff0000" else for i = 1 to totalcost if holcost(i) = trim(get_rs("cost").value) then bgcolor = fore(i) color = "background-color: #" & back(i) & "" end if next end if show = true get_rs.movenext loop end if get_rs.close end if %>

<% = d %>

<% if datepart("w", d & "/" & m & "/" & thisyear) = 1 then weeks = weeks + 1 end if else last = (datepart("w", d - 1 & "/" & m & "/" & thisyear) + 1) exit for end if next for i = last to 7 %>

 

<% next if weeks < 6 then for j = weeks + 1 to 6 for i = 1 to 7 %>

 

<% next next end if %>
<% next %>

Key

 

 

Booked

<% for i = 1 to totalcost %>

 

£ <% = formatnumber(holcost(i), 2) %>

<% next %>

Booking

To book call 0845 051 0153 or complete this form, print and send along with your deposit to the address shown.

Notes

  • Prices are for up to four adults and two children per week.
  • All bookings are from Saturday 3pm to Saturday 10.30am except weekend breaks. 20% Deposit is required at booking plus the balance four weeks prior to the holiday.
  • Bed linen is available at £4.50 per head extra
  • Long weekends available (only at short notice in peak season). Contact us for availability.