Ejemplo n.º 1
0
$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>
Ejemplo n.º 2
0
    $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) {
    $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>";
Ejemplo n.º 3
0
 /**
  * Loads datepicker
  *      
  * @param object  &$datePicker
  * @param integer $cat
  * 
  * @return null
  */
 function loadDatePicker(&$datePicker, $cat = null)
 {
     global $_CORELANG;
     if ($this->_objTpl->placeholderExists($this->moduleLangVar . '_DATEPICKER')) {
         $timestamp = time();
         $datePickerYear = $_REQUEST["yearID"] ? $_REQUEST["yearID"] : date('Y', $timestamp);
         $datePickerMonth = $_REQUEST["monthID"] ? $_REQUEST["monthID"] : date('m', $timestamp);
         $datePickerDay = $_REQUEST["dayID"] ? $_REQUEST["dayID"] : date('d', $timestamp);
         $datePicker = new \activeCalendar($datePickerYear, $datePickerMonth, $datePickerDay);
         $datePicker->enableMonthNav("?section=Calendar");
         $datePicker->enableDayLinks("?section=Calendar");
         $datePicker->setDayNames(explode(',', $_CORELANG['TXT_DAY_ARRAY']));
         $datePicker->setMonthNames(explode(',', $_CORELANG['TXT_MONTH_ARRAY']));
         $eventManagerAllEvents = new \Cx\Modules\Calendar\Controller\CalendarEventManager(null, null, $cat, null, true, false, true);
         $eventManagerAllEvents->getEventList();
         $events = $eventManagerAllEvents->getEventsWithDate();
         foreach ($events as $event) {
             $datePicker->setEvent($event["year"], $event["month"], $event["day"], " withEvent");
         }
         $datePicker = $datePicker->showMonth();
     }
 }
Ejemplo n.º 4
0
// 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);
if (@$_GET['calmode'] == "start") {
    $cal->enableDayLinks(false, "getStartDate");
} elseif (@$_GET['calmode'] == "end") {
    $cal->enableDayLinks(false, "getEndDate");
} elseif (@$_GET['calmode'] == "eu") {
    $cal->enableDayLinks(false, "getEUDate");
} elseif (@$_GET['calmode'] == "us") {
    $cal->enableDayLinks(false, "getUSDate");
}
// enables day links with javascript function getUSDate
$cal->enableMonthNav($myurl, $arrowBack, $arrowForw);
// enables navigation controls
$cal->setFirstWeekDay(1);
// '0' -> Sunday , '1' -> Monday
?>
 
<?php 
Ejemplo n.º 5
0
include "activecalendar.php";
$yearID = false;
$monthID = false;
$dayID = false;
$weekID = false;
$showcal = false;
extract($_GET);
$cal = new activeCalendar($weekID, $yearID, $monthID, $dayID);
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"activecalendar.css\"></link>\n";
?>
<style type="text/css">
<!--
.code {font-family: "Courier New", Courier, Arial, mono; font-size: 12px; font-weight: bold; color: #000099; text-align: right}
.explain {font-family: Tahoma, Arial, mono; font-size: 12px; font-weight: bold; color: #000000; text-align: left}
.explain2 {font-family: "Courier New", Courier, Arial, mono; font-size: 12px; font-weight: bold; color: #000099; text-align: left}
.mtable {border-width: 2px; border-style:outset; border-color: #eeeeee;}
.small { font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 10px}
-->
</style>
</head>
<body>
<center>
<h2>Calendario</h2>
<?php 
$cal->enableDatePicker(2000, 2010);
$cal->enableDayLinks();
$cal->enableWeekLinks();
$cal->enableDatePicker();
$out = $cal->showMonth();
echo $out;
Ejemplo 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>