';
$html.='
';
$html.='

' . substr($exp[1], 0, 5) . '
';
$html.='
';
$html.='
';
if (strlen($r['name']) > 24)
$name = mb_substr($r['name'], 0, 23, "UTF-8") . " ...";
else
$name = $r['name'];
//$html.='
';
if ($r['account_name'] && $r['account_id']) {
if (strlen($r['account_name']) > 24)
$account_name = mb_substr($r['account_name'], 0, 23, "UTF-8") . " ...";
else
$account_name = $r['account_name'];
//$html.='
';
}
for ($i = 0; $i < count($r['contact_id']); $i++) {
if ($r['contact_id'][$i] && $r['contact_name'][$i]) {
if (strlen($r['contact_name']) > 24)
$contact_name = mb_substr($r['contact_name'][$i], 0, 23, "UTF-8") . " ...";
else
$contact_name = $r['contact_name'][$i];
//$html.='
';
}
}
$html.='
';
$html.='';
//$html.='';
$time_temp = $exp[1];
$duration_temp = $r['duration'];
}
$pos = 0;
$i = 0;
$row = 0;
$maxhour = $this->hour_height;
foreach ($arr as $r) {
$exp = explode(" ", $r['date']);
$hour = explode(":", $exp[1]);
if ($temp_hour == (int) $hour[0] && $i < 3) {
$pos+=$this->box_width;
$i++;
} elseif ($temp_hour == (int) $hour[0] && $i >= 3) {
$pos = 0;
$i = 0;
$row++;
$bd_hours[(int) $hour[0]] = ($row + 1) * $this->hour_height;
} else {
$pos = 0;
$i = 0;
$row = 0;
$maxhour = $this->hour_height;
}
$b[(int) $hour[0]][] = array("id" => $r['id'], "time" => $exp[1], "pos" => $pos, "i" => $i, "row" => $row);
$temp_hour = (int) $hour[0];
$temp_pos = $pos;
$temp_id = $r['id'];
$temp_row = $row;
}
//print_r($b);
if (count($bd_hours) > 0) {
foreach ($bd_hours as $key => $value) {
$html.='';
}
}
if (count($b) > 0) {
foreach ($b as $bdd) {
foreach ($bdd as $bd) {
$hour = explode(":", $bd['time']);
$y = $this->hour_height * $bd['row'];
$html.='';
}
}
}
}
return $html;
}
function showActivities($month, $year, $day, $table, $module, $date_field) {
$arr = $this->getActivities($month, $year, $day, $table, $module, $date_field);
if (count($arr) > 0) {
$html = '';
foreach ($arr as $r) {
if ($r['status'] == "Held" || $r['status'] == "Not Held") {
$linkClass = "dashletLink";
$linkClassName = "dashletLinkNameHeld";
$hourClass = "";
} elseif (date("Y-m-d H:i:s") > $r['date']) {
$linkClass = "dashletLink";
$linkClassName = "dashletLinkExpired";
$hourClass = "";
} else {
$linkClass = "dashletLink";
$linkClassName = "dashletLink";
$hourClass = "";
}
$exp = explode(" ", $r['date']);
$u = new User();
$u->retrieve($r['user_id']);
$user = $u->first_name . PHP_EOL . $u->last_name;
unset($u);
$html.='