-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.php
37 lines (26 loc) · 1.32 KB
/
example.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/*
-= PrintablePDFYearCalendar =-
https://github.com/goerdy/PrintablePDFYearCalendar
by Philipp "goerdy" Gürth
Version: 0.1
*/
//TODO: Improve code comments
//This is a simple example file to show the usage of PrintablePDFYearCalendar
//Include mkCal.php to your project
require('mkCal.php');
//Get your Data together
//you can use three 2-dimensional Arrays to deliver your data
//$DaysTextArray[MONTH][DAY] = string
$DaysTextArray[2][18]="goerdy"; //prints "goerdy" on february 18th
//$DaysColorArray[MONTH][DAY] = sting
$DaysColorArray[2][18]="#FF0000"; //red background for February 18th
$DaysColorArray[4][22]="#00FF00"; //green background for April 22nd
$DaysColorArray[12][3]="#0000FF"; //blue background for December 12
//DaysHolidaysArray[MONTH][DAY]= boolean
$DaysHolidaysArray[1][1]="true"; //New years eve is highlighted as holiday
$DaysHolidaysArray[3][17]="true"; //March 17th is highlighted as holiday
//function PrintablePDFYearCalendar($title, $Year, $locale, $daysText, $daysColor, $daysHolidays, $highlightHolidays, $highlightSunday, $highlightSaturday, $footer, $format, $colorScheme)
PrintablePDFYearCalendar("Example Calendar", 2024 ,"en_US", $DaysTextArray, $DaysColorArray, $DaysHolidaysArray, "#FF0000" ,"#FF0000", "#990000", "some customizable footer text", "A4Landscape", "blue");
?>