Exemplo n.º 1
0
// 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>
<center>
<?php 
print $cal->showYear();
?>
<br />
<a href="../examples.php">Back to examples.php</a>
</center>
</body>
</html>
Exemplo n.º 2
0
<?php

require_once "../source/activecalendar.php";
$cal = new activeCalendar();
?>
 
<?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>
<center>
<?php 
print $cal->showYear(12, 5);
// '12' sets 3 months in each row, '5' sets the starting month (May)
?>
<br />
<a href="../examples.php">Back to examples.php</a>
</center>
</body>
</html>
Exemplo n.º 3
0
    $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;
}
if ($showcal == 7) {
    $out = "<a href=\"" . $suiteurl . "\">Check another function</a>";
    $out .= "<table><tr><td bgcolor=\"#ffff99\" class=\"code\">";
    $out .= "Functions <b>setEventContent(2007,1,11,\"some content\") + showMonth(2007,1)</b> generate the following calendar:";
    $out .= "</td></tr></table><br />";
    $cal = new activeCalendar(2007, 1);
    $cal->setEventContent(2007, 1, 11, "some content");
    $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 == 8) {
Exemplo n.º 4
0
}
/*
********************************************************************************
set an event content from 5 July till 8 July every year
(in this case Google with link)
********************************************************************************
*/
for ($x = 5; $x <= 8; $x++) {
    $cal->setEventContent($yearID, 7, $x, "Google", "http://www.google.com");
}
/*
********************************************************************************
set an event content on 15 March every year
the method setEventContent() accepts also an array as content parameter (4th)
if you pass an array a content table with multiple (as many as the array length) tr tags will be generated
********************************************************************************
*/
$multipleLinesEvent = array("Title:News", "Time:16.00", "Status:ok");
$cal->setEventContent($yearID, 3, 15, $multipleLinesEvent);
/*
********************************************************************************
create the year view
********************************************************************************
*/
echo $cal->showYear(2);
// this displays the year's view (parameter '2': 2 months in each row)
?>
</center>
</body>
</html>
Exemplo n.º 5
0
<?php

require_once "../source/activecalendar.php";
$cal = new activeCalendar();
$cal->enableWeekNum("Week");
// enables week number column
?>
 
<?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>
<center>
<?php 
print $cal->showYear(3);
// '3' sets 3 months in each row
?>
<br />
<a href="../examples.php">Back to examples.php</a>
</center>
</body>
</html>
Exemplo n.º 6
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>