';
return $html;
}
function headerTableMonth($days="")
{
if(!$days)$days=$this->day_name_short;
$html='';
$html.='| '.$GLOBALS['mod_strings']['LBL_WEEK'].' | ';
foreach($days as $dn)
{
$html.=''.$dn.' | ';
}
$html.='
';
return $html;
}
function headerTableWeek($days="")
{
if(!$days)$days=$this->day_name;
$html='';
$html.='| '.$GLOBALS['mod_strings']['LBL_WEEK'].' | ';
foreach($days as $dn)
{
$html.=''.$dn.' | ';
}
$html.='
';
return $html;
}
function headerTableDay()
{
if(!$days)$days=$this->day_name;
$html='';
$html.='| '.$GLOBALS['mod_strings']['LBL_WEEK'].' | ';
foreach($days as $dn)
{
$html.=''.$dn.' | ';
}
$html.='
';
return $html;
}
function showTableMiniCalendar($month,$year)
{
global $timedate;
$html=$this->headerTableMiniCalendar();
if($this->noDayInWeek($month,$year)>0)$html.='| '.$this->getNoOfWeek($month,$year,1).' | ';
for($i=0;$i<$this->noDayInWeek($month,$year);$i++)$html.=' | ';
for($i=1;$i<$this->daysInMonth($month,$year)+1;$i++)
{
if(($this->noDayInWeek($month,$year)+$i-1)%7==0)$html.='
| '.$this->getNoOfWeek($month,$year,$i).' | ';
if($i<10)$ni='0'.$i;
else $ni=$i;
if(($this->noDayInWeek($month,$year)+$i)%7==0)$class="sundayDashlet";
elseif(date("d")==$i && date("m")==$month && date("Y")==$year)$class="headerDashlet";
else $class="dayDashlet";
if($this->act_type=="All")
{
$num_act=count($this->getActivities($month,$year,$ni,"calls","Calls","date_start"))+count($this->getActivities($month,$year,$ni,"meetings","Meetings","date_start"))+count($this->getActivities($month,$year,$ni,"tasks","Tasks","date_start"));
$actt=array();
if($this->showActivities($month,$year,$ni,"calls","Calls","date_start"))$actt[]=$this->showActivities($month,$year,$ni,"calls","Calls","date_start");
if($this->showActivities($month,$year,$ni,"meetings","Meetings","date_start"))$actt[]=$this->showActivities($month,$year,$ni,"meetings","Meetings","date_start");
if($this->showActivities($month,$year,$ni,"tasks","Tasks","date_start"))$actt[]=$this->showActivities($month,$year,$ni,"tasks","Tasks","date_start");
$act=htmlspecialchars('').implode("
",$actt).htmlspecialchars('
');
}
else
{
$num_act=count($this->getActivities($month,$year,$ni,strtolower($this->act_type),$this->act_type,"date_start"));
$actt=array();
if($this->showActivities($month,$year,$ni,strtolower($this->act_type),$this->act_type,"date_start"))$ac=$this->showActivities($month,$year,$ni,strtolower($this->act_type),$this->act_type,"date_start");
$act=htmlspecialchars('').$ac.htmlspecialchars('
');
}
if($num_act>0)
{
if(date("d")==$i && date("m")==$month && date("Y")==$year)$class="headerDashlet";
elseif(($this->noDayInWeek($month,$year)+$i)%7==0)$class="actsundayDashlet";
else $class="actDashlet";
$mouse=' onclick="
if(!document.getElementById(\'desc\'))
{
showdescriptionCalendar(\''.$GLOBALS['mod_strings']['LBL_ACTIVITIES'].' '.$timedate->to_display($year.'-'.$month.'-'.$ni, "Y-m-d", $timedate->get_date_format()).'\',\''.$act.'\',this,1);
}
else
{
hidedescriptionCalendar();
};"';
$img='
';
}
else
{
$mouse=' onmouseout="this.style.fontWeight=\'\';" onmouseover="this.style.fontWeight=\'bold\';hidedescriptionCalendar();"';
$img='';
}
$html.=''.$ni.' '.$img.' | ';
}
$html.='
';
$html.=$this->showFooterMiniCalendar();
return $html;
}
function showTableDashlet($month,$year)
{
global $timedate;
$html=$this->headerTableDashlet();
if($this->noDayInWeek($month,$year)>0)$html.=''.$this->getNoOfWeek($month,$year,1).' | ';
for($i=0;$i<$this->noDayInWeek($month,$year);$i++)$html.=' | ';
for($i=1;$i<$this->daysInMonth($month,$year)+1;$i++)
{
if(($this->noDayInWeek($month,$year)+$i-1)%7==0)$html.='
| '.$this->getNoOfWeek($month,$year,$i).' | ';
if($i<10)$ni='0'.$i;
else $ni=$i;
if(($this->noDayInWeek($month,$year)+$i)%7==0)$class="sundayDashlet";
elseif(date("d")==$i && date("m")==$month && date("Y")==$year)$class="headerDashlet";
else $class="dayDashlet";
if($this->act_type=="All")
{
$num_act=count($this->getActivities($month,$year,$ni,"calls","Calls","date_start"))+count($this->getActivities($month,$year,$ni,"meetings","Meetings","date_start"))+count($this->getActivities($month,$year,$ni,"tasks","Tasks","date_start"));
$actt=array();
if($this->showActivities($month,$year,$ni,"calls","Calls","date_start"))$actt[]=$this->showActivities($month,$year,$ni,"calls","Calls","date_start");
if($this->showActivities($month,$year,$ni,"meetings","Meetings","date_start"))$actt[]=$this->showActivities($month,$year,$ni,"meetings","Meetings","date_start");
if($this->showActivities($month,$year,$ni,"tasks","Tasks","date_start"))$actt[]=$this->showActivities($month,$year,$ni,"tasks","Tasks","date_start");
$act=htmlspecialchars('').implode("
",$actt).htmlspecialchars('
');
}
else
{
$num_act=count($this->getActivities($month,$year,$ni,strtolower($this->act_type),$this->act_type,"date_start"));
$actt=array();
if($this->showActivities($month,$year,$ni,strtolower($this->act_type),$this->act_type,"date_start"))$ac=$this->showActivities($month,$year,$ni,strtolower($this->act_type),$this->act_type,"date_start");
$act=htmlspecialchars('').$ac.htmlspecialchars('
');
}
if($num_act>0)
{
if(date("d")==$i && date("m")==$month && date("Y")==$year)$class="headerDashlet";
elseif(($this->noDayInWeek($month,$year)+$i)%7==0)$class="actsundayDashlet";
else $class="actDashlet";
$mouse=' onclick="
if(!document.getElementById(\'desc\'))
{
showdescriptionCalendar(\''.$GLOBALS['mod_strings']['LBL_ACTIVITIES'].' '.$timedate->to_display($year.'-'.$month.'-'.$ni, "Y-m-d", $timedate->get_date_format()).'\',\''.$act.'\',this,1);
}
else
{
hidedescriptionCalendar();
};"';
$img='
';
}
else
{
$mouse=' onmouseout="this.style.fontWeight=\'\';" onmouseover="this.style.fontWeight=\'bold\';hidedescriptionCalendar();"';
$img='';
}
$html.=''.$ni.' '.$img.' | ';
}
$html.='
';
$html.=$this->showFooter();
return $html;
}
function showTableMonth($month,$year)
{
$html=$this->headerTableMonth();
$html.=''.$this->getNoOfWeek($month,$year,1).' | ';
for($i=0;$i<$this->noDayInWeek($month,$year);$i++)$html.=' | ';
for($i=1;$i<$this->daysInMonth($month,$year)+1;$i++)
{
if(($this->noDayInWeek($month,$year)+$i-1)%7==0)$html.='
| '.$this->getNoOfWeek($month,$year,$i).' | ';
if($i<10)$ni='0'.$i;
else $ni=$i;
$html.=''.$ni.' ';
$html.=$this->showActivities($month,$year,$ni,"calls","Calls","date_start").'<br>';
$html.=$this->showActivities($month,$year,$ni,"meetings","Meetings","date_start");
$html.=' | ';
}
$html.='
';
return $html;
}
function showTableWeek($month,$year,$day)
{
$html=$this->headerTableWeek($this->day_name);
$days=$this->getDaysWeek($month,$year,$day);
$html.=''.$this->getNoOfWeek($month,$year,$day).' | ';
foreach($days as $d)
{
$exp=explode("-",$d);
$html.=''.$d.' ';
$html.=$this->showActivities($month,$year,$exp[2],"calls","Calls","date_start").' ';
$html.=$this->showActivities($month,$year,$exp[2],"meetings","Meetings","date_start");
$html.=" | ";
}
$html.='