43 lines
1.3 KiB
PHP
Executable File
43 lines
1.3 KiB
PHP
Executable File
<?php
|
|
|
|
require_once('modules/EcmCalendars/Calendar.php');
|
|
global $current_user;
|
|
$c = new Calendar();
|
|
if ($_REQUEST['date']) {
|
|
$exp = explode("-", $_REQUEST['date']);
|
|
$c->year = $exp[0];
|
|
$c->month = $exp[1];
|
|
} else {
|
|
$c->year = date("Y");
|
|
$c->month = date("m");
|
|
}
|
|
|
|
if ($_SESSION['cal_dashlet']['act_status'])
|
|
$c->act_status = $_SESSION['cal_dashlet']['act_status'];
|
|
else
|
|
$c->act_status = "All";
|
|
|
|
if ($_SESSION['cal_dashlet']['act_user'])
|
|
$c->act_user = $_SESSION['cal_dashlet']['act_user'];
|
|
else
|
|
$c->act_user = "All";
|
|
|
|
if ($_SESSION['cal_dashlet']['act_type'])
|
|
$c->act_type = $_SESSION['cal_dashlet']['act_type'];
|
|
else
|
|
$c->act_type = "All";
|
|
|
|
if ($_REQUEST['act_status'])
|
|
$c->act_status = $_SESSION['cal_dashlet']['act_status'] = $_REQUEST['act_status'];
|
|
if ($_REQUEST['act_user'])
|
|
$c->act_user = $_SESSION['cal_dashlet']['act_user'] = $_REQUEST['act_user'];
|
|
if ($_REQUEST['act_type'])
|
|
$c->act_type = $_SESSION['cal_dashlet']['act_type'] = $_REQUEST['act_type'];
|
|
|
|
$dashletDefs = $current_user->getPreference('dashlets', 'Home');
|
|
$dashletDefs[$_SESSION['calendar_dashlet_id']]['options'] = array('act_user' => $c->act_user, 'act_status' => $c->act_status, 'act_type' => $c->act_type);
|
|
$current_user->setPreference('dashlets', $dashletDefs, 0, 'Home');
|
|
|
|
echo $c->showTableMiniCalendar($c->month, $c->year, 1);
|
|
?>
|