Ejemplo n.º 1
0
 function __construct()
 {
     parent::__construct();
     $this->customize();
 }
Ejemplo n.º 2
0
 function getBusyList($UserID = null, $echo = false)
 {
     $cutoffDatePast = time() - 2 * 24 * 3600;
     $cutoffDateFuture = time() + 84 * 24 * 3600;
     $Kal = new mKalender();
     $K = $Kal->getData($cutoffDatePast, $cutoffDateFuture, $UserID);
     $Datum = new Datum();
     $Datum->normalize();
     $htmlEvents = "";
     $htmlEvents .= "<div class=\"backgroundColor2\"><p class=\"prettySubtitle\">KW " . date("W", $Datum->time()) . "</p></div>";
     while ($Datum->time() < $cutoffDateFuture) {
         $list = "";
         $events = $K->getEventsOnDay(date("dmY", $Datum->time()));
         if ($events != null and count($events) > 0) {
             foreach ($events as $ev) {
                 foreach ($ev as $KE) {
                     $list .= "<div style=\"white-space: nowrap;overflow: hidden;text-overflow: ellipsis;\" title=\"" . $KE->title() . "\"><span>" . Util::CLTimeParser($K->parseTime($KE->currentWhen()->time)) . " - " . Util::CLTimeParser($K->parseTime($KE->getEndTime())) . "</span> <small style=\"color:grey;\">" . $KE->title() . "</small></div>";
                 }
             }
         }
         $Datum->addDay();
         $style = "";
         if ($Datum->w() == 0 or $Datum->w() == 6) {
             continue;
         }
         #$style = "background-color:#DDD;";
         if ($Datum->w() == 1) {
             $htmlEvents .= "<div class=\"backgroundColor2\"><p class=\"prettySubtitle\">KW " . date("W", $Datum->time()) . "</p></div>";
         }
         $htmlEvents .= "<div style=\"margin-bottom:20px;{$style}display:inline-block;width:50%;box-sizing:border-box;vertical-align:top;min-height:60px;\">\n\t\t\t\t<div style=\"background-color:#EEE;padding:5px;\">\n\t\t\t\t\t<span style=\"display:inline-block;width:30px;font-weight:bold;\">" . mb_substr(Util::CLWeekdayName($Datum->w()), 0, 2) . "</span>\n\t\t\t\t\t<span style=\"color:grey;\">" . Util::CLDateParser($Datum->time()) . "</span>\n\t\t\t\t</div>\n\t\t\t\t<div style=\"padding:5px;\">\n\t\t\t\t\t{$list}\n\t\t\t\t</div>\n\t\t\t\t</div>";
     }
     if ($echo) {
         echo $htmlEvents;
     }
     return $htmlEvents;
 }