[Output_None] // // LP5 Calender v1.3 // Author Duncan Cameron // djcameron@lassodevelopment.com // OpenSource // //Changed Date_GetCurrentDate //To Sever_Date: -ShortY2K //Use Server Clock for date [Var: 'ServerTimeZone' = (Date_LocaltoGMT: (Server_Date: -ShortY2K))] // // //Set page title [Var: 'PageTitle' = 'Calendario disponibilità'] // // // //Month Array List [Var: 'MonthsArray' = (Array: 'Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre')] [var: 'DaysInMonth' = (Array: 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)] //Year Settings for the calendar [If: !(Action_Param: 'Year')] [Var: 'YearShown' = (Date_GetYear: $ServerTimeZone)] [Else] [Var: 'YearShown' = (Integer:(Action_Param: 'Year'))] [/If] [Var: 'YearsToShow' = 5] //Check that the year is not between 1970 - 2037. [If: (Integer:$YearShown) <= 1970] [Var: 'ErrorDate' = 1] [/If] [If: (Integer:$YearShown) >= 2037] [Var: 'ErrorDate' = 1] [/If] //Set Date Variables if none exist [If: !(Action_Param: 'Month')] [Var: 'GetMonth' = (Date_GetMonth: $ServerTimeZone)] [Else] [Var: 'GetMonth' = (Integer: (Action_Param: 'Month'))] [/If] // Settings for Lasso to find the correct date [Var: 'Year' = (Integer: $YearShown)] [Var: 'NextYear' = $Year] [Var: 'PrevYear' = $Year] //Set Month start [Var: 'DateStamp' = $GetMonth + '/' + 1 + '/' + $Year] //Next Month Information [Var: 'AddMonth' = ($GetMonth + 1)] [If: $AddMonth == 13] [$AddMonth = 1] [$NextYear = ++$Year] [/If] [Var: 'NextMonth' = $AddMonth + '/' + 1 + '/' + $NextYear] //Previous Month Information [Var: 'SubMonth' = ($GetMonth - 1)] [If: $SubMonth == 0] [$SubMonth = 12] [$PrevYear = --$Year] [/If] [Var: 'PrevMonth' = $SubMonth + '/' + 1 + '/' + $PrevYear] //Final Settings for links //Months [Var: 'PrevMonthLink' = (Date_GetMonth: $PrevMonth)] [Var: 'NextMonthLink' = (Date_GetMonth: $NextMonth)] [IF: $GetMonth == 1] [Var: 'PrevYearLink' = $PrevYear] [Else] [Var: 'PrevYearLink' = $YearShown] [/If] [IF: $GetMonth == 12] [Var: 'NextYearLink' = $NextYear] [Else] [Var: 'NextYearLink' = $YearShown] [/If] [Var: 'DayOfWeekMonthStart' = (Date_Format: $DateStamp, -DateFormat='%w')] [Var: 'LastDay' = ($DaysInMonth->(Get:(Integer:$GetMonth)))] [If:$GetMonth == 2][Var: 'FebCheck' = (Decimal: $YearShown) / 4][If: ((String:$FebCheck)->(EndsWith: '.000000'))][++$LastDay][/If][/if] [Var: 'StartDate' = ((Integer: '-' + (Integer: ($DayOfWeekMonthStart))) + 2)] [Records:-InlineName='mese_corrente'][/records] [/Output_None] [Output: $PageTitle]
Home La Villa La Tenuta Dove Siamo Contatti


[If: (Var: 'ErrorDate') != 1]

[$MonthsArray->(Get: ($GetMonth))] [$Yearshown]

[Var: 'Day' = 0] [var: 'TableRow' = 1] [While: $TableRow <= 6] [Var: 'TableColumn' = 1] [While: $TableColumn <= 7] [If: ($StartDate <= 0) || ($StartDate > $LastDay)] [Else: $Day >= 0 && $Day <= $LastDay] [Var:'giorno'=(++$Day)] [/inline][/If][$StartDate = ++$StartDate] [$TableColumn = ++$TableColumn] [/While] [$TableRow = ++$TableRow] [/While]
Dom Lun Mar Mer Gio Ven Sab
[$giorno]

disponibile
opzionato
prenotato

Mese Precedente | Mese Corrente | Prossimo Mese

[Else]

Sorry, the year [Output: $Year] is not available in this calendar!

Back to Calendar

[/If]