예제 #1
0
$yearID = false;
// init false to display current year
$monthID = false;
// init false to display current month
$dayID = false;
// init false to display current day
extract($_GET);
// get the new values (if any) of $yearID,$monthID,$dayID
$arrowBack = "<img src=\"img/back.png\" border=\"0\" alt=\"&lt;&lt;\" />";
// use png arrow back
$arrowForw = "<img src=\"img/forward.png\" border=\"0\" alt=\"&gt;&gt;\" />";
// use png arrow forward
$cal = new activeCalendar($yearID, $monthID, $dayID);
$cal->enableYearNav($myurl, $arrowBack, $arrowForw);
// enables navigation controls
$cal->enableDatePicker(2000, 2010, $myurl);
// enables date picker (year range 2000-2010)
?>
 
<?php 
print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head><title>Active Calendar Class :: Example</title>
<link rel="stylesheet" type="text/css" href="<?php 
print @$_GET['css'];
?>
" />
</head>
<body>
예제 #2
0
파일: monthview.php 프로젝트: emma5021/toba
$yearID = false;
// GET variable for the year (set in Active Calendar Class), init false to display current year
$monthID = false;
// GET variable for the month (set in Active Calendar Class), init false to display current month
$dayID = false;
// GET variable for the day (set in Active Calendar Class), init false to display current day
extract($_GET);
$cal = new activeCalendar($yearID, $monthID, $dayID);
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head><title>Active Calendar Class Month View Example</title>
<link rel="stylesheet" type="text/css" href="activecalendar.css" />
</head>
<body>
<center>
<?php 
$cal->enableMonthNav();
// this enables the month's navigation controls
$cal->enableDatePicker(2002, 2006, $myurl);
// this enables the date picker controls
$cal->enableDayLinks($myurl);
// this enables the day links
echo $cal->showMonth();
// this displays the month's view
?>
</center>
</body>
</html>
예제 #3
0
<link rel="stylesheet" type="text/css" href="activecalendar1.css" />
</head>
<body>
<center>
<?php 
$monthName = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12");
// The months will not have a name, just a number
$dayName = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
// The days will be in german language
$cal->monthYearDivider = " / ";
// this creates a different divider between month and year in the month`s title
$cal->setMonthNames($monthName);
$cal->setDayNames($dayName);
$cal->enableYearNav($myurl);
// this enables the year's navigation controls
$cal->enableDatePicker(2003, 2008);
// this enables the date picker (year range 2003 - 2008)
$cal->enableDayLinks($myurl);
// this enables the day links
$cal->setEvent(2005, 5, 7);
// this sets an event on 7 May 2004
$cal->setEvent(2005, 12, 20);
// this sets an event on 20 December 2004
if (!$yearID) {
    $yearID = date("Y");
}
// make sure there is an $yearID (for the following functions)
/*
********************************************************************************
set an event on 11 August every year
********************************************************************************
예제 #4
0
파일: testsuite.php 프로젝트: emma5021/toba
if ($showcal == 1) {
    $out = "<a href=\"" . $suiteurl . "\">Check another function</a>";
    $out .= "<table><tr><td bgcolor=\"#ffff99\" class=\"code\">";
    $out .= "Function <b>showMonth()</b> generates the following calendar:";
    $out .= "</td></tr></table><br />";
    $out .= $cal->showMonth();
    $out .= "<br /><a href=\"http://validator.w3.org/check?uri=referer\" target=\"_blank\">Validate this XHTML <span class=\"small\">(results in a new window)</span></a>";
    echo $out;
}
if ($showcal == 2 || !$showcal && $yearID && $monthID && !$dayID) {
    $out = "<a href=\"" . $suiteurl . "\">Check another function</a>";
    $out .= "<table><tr><td bgcolor=\"#ffff99\" class=\"code\">";
    $out .= "Functions <b>enableMonthNav()</b>, <b>enableDatePicker(2000,2010)</b> and <b>showMonth()</b> generate the following calendar(s):";
    $out .= "</td></tr></table><br />";
    $cal->enableMonthNav($suiteurl);
    $cal->enableDatePicker(2000, 2010);
    $out .= $cal->showMonth();
    $out .= "<br /><a href=\"http://validator.w3.org/check?uri=referer\" target=\"_blank\">Validate this XHTML <span class=\"small\">(results in a new window)</span></a>";
    echo $out;
}
if ($showcal == 3 || !$showcal && $yearID && $monthID && $dayID) {
    $out = "<a href=\"" . $suiteurl . "\">Check another function</a>";
    $out .= "<table><tr><td bgcolor=\"#ffff99\" class=\"code\">";
    $out .= "Functions <b>enableDayLinks()</b> and <b>showMonth()</b> generate the following calendar:";
    $out .= "</td></tr></table><br />";
    $cal->enableDayLinks($suiteurl);
    $out .= $cal->showMonth();
    $out .= "<br /><a href=\"http://validator.w3.org/check?uri=referer\" target=\"_blank\">Validate this XHTML <span class=\"small\">(results in a new window)</span></a>";
    echo $out;
}
if ($showcal == 4) {
예제 #5
0
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head><title>Active Calendar Class with MySQL Events</title>
<link rel="stylesheet" type="text/css" href="activecalendar1.css" />
</head>
<body>
<center>
<?php 
/*
********************************************************************************
Uncomment the following to display a month calendar with the MySQL events
********************************************************************************
*/
$cal->enableDatePicker(2002, 2006);
// this enables the month's datepicker (year range 2002 - 2006)
$cal->enableDayLinks($myurl);
// this enables the month's day links
$cal->enableMonthNav($myurl);
// this enables the month's navigation controls
echo $cal->showMonth();
// this displays the month's view
/*
********************************************************************************
Uncomment the following to display a year calendar with the MySQL events
For better view, please comment or remove the lines above, that generate the month calendar
********************************************************************************
*/
//$cal->enableDatePicker(2002,2006); // this enables the years's datepicker (year range 2002 - 2006)
//$cal->enableYearNav($myurl); // this enables the years's navigation controls