예제 #1
0
$myurl = $_SERVER['PHP_SELF'] . "?css=" . @$_GET['css'];
// the links url is this page
$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'];
?>
" />
예제 #2
0
<html>
<head><title>Active Calendar Class Year View with Events Example</title>
<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)
/*
********************************************************************************
예제 #3
0
파일: testsuite.php 프로젝트: emma5021/toba
}
if ($showcal == 4) {
    $out = "<a href=\"" . $suiteurl . "\">Check another function</a>";
    $out .= "<table><tr><td bgcolor=\"#ffff99\" class=\"code\">";
    $out .= "Function <b>showYear(3)</b> generates the following calendar:";
    $out .= "</td></tr></table><br />";
    $out .= $cal->showYear(3);
    $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 == 5 || !$showcal && $yearID && !$monthID && !$dayID) {
    $out = "<a href=\"" . $suiteurl . "\">Check another function</a>";
    $out .= "<table><tr><td bgcolor=\"#ffff99\" class=\"code\">";
    $out .= "Functions <b>enableYearNav()</b> and <b>showYear()</b> generate the following calendar(s):";
    $out .= "</td></tr></table><br />";
    $cal->enableYearNav($suiteurl);
    $out .= $cal->showYear();
    $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 == 6) {
    $out = "<a href=\"" . $suiteurl . "\">Check another function</a>";
    $out .= "<table><tr><td bgcolor=\"#ffff99\" class=\"code\">";
    $out .= "Functions <b>setEvent(2007,1,23) + setEvent(2007,8,2) + showYear(2007)</b> generate the following calendar:";
    $out .= "</td></tr></table><br />";
    $cal = new activeCalendar(2007);
    $cal->setEvent(2007, 1, 23);
    $cal->setEvent(2007, 8, 2);
    $out .= $cal->showYear();
    $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;
예제 #4
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 Year View with JavaScript Example</title>
<link rel="stylesheet" type="text/css" href="activecalendar.css" />
</head>
<body>
<script type="text/javascript">
function selectDate(year,month,day){
document.selectform.yearselection.value=year;
document.selectform.monthselection.value=month;
document.selectform.dayselection.value=day;
}
</script>
<center>
<b>Please click on a calendar date (javascript must be enabled!)</b>
<form name="selectform" action="">
Selected Year: <input type="text" name="yearselection" /> Selected Month: <input type="text" name="monthselection" /> Selected Day: <input type="text" name="dayselection" />
</form>
<?php 
$cal->enableYearNav();
// this enables the year's navigation controls
// the following enables day links, that call the javascript function: selectDate(year,month,day)
$cal->enableDayLinks(false, "selectDate");
echo $cal->showYear();
?>
</center>
</body>
</html>