init
This commit is contained in:
48
modules/EcmCalendars/ShowCalendar.php
Executable file
48
modules/EcmCalendars/ShowCalendar.php
Executable file
@@ -0,0 +1,48 @@
|
||||
<?
|
||||
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($_REQUEST['act_status'])
|
||||
{
|
||||
$c->act_status=$_REQUEST['act_status'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$c->act_status="All";
|
||||
}
|
||||
if($_REQUEST['act_user'])
|
||||
{
|
||||
$c->act_user=$_REQUEST['act_user'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$c->act_user="All";
|
||||
}
|
||||
if($_REQUEST['act_type'])
|
||||
{
|
||||
$c->act_type=$_REQUEST['act_type'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$c->act_type="All";
|
||||
}
|
||||
$_SESSION['cal_dashlet']['act_type']=$c->act_type;
|
||||
$_SESSION['cal_dashlet']['act_user']=$c->act_user;
|
||||
$_SESSION['cal_dashlet']['act_status']=$c->act_status;
|
||||
$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 '<script type="text/javascript" src="modules/EcmCalendars/helper.js"></script>';
|
||||
echo $c->showTableDashlet($c->month,$c->year,1);
|
||||
?>
|
||||
Reference in New Issue
Block a user