本文整理汇总了PHP中Util::CLTimeParser方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::CLTimeParser方法的具体用法?PHP Util::CLTimeParser怎么用?PHP Util::CLTimeParser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util::CLTimeParser方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getOverviewContent
public function getOverviewContent()
{
$html = "<div class=\"touchHeader\"><p>Uhr</p></div>\n\t\t\t<div style=\"padding:10px;\">";
$html .= "<div id=\"fheOverviewClock\"><span>" . Util::CLWeekdayName(date("w")) . "<br><b>" . date("d") . ". " . Util::CLMonthName(date("m")) . " " . date("Y") . "</b></span><b>" . Util::CLTimeParser(time()) . "</b></div>";
$html .= "</div>";
echo $html;
}
示例2: getEMailData
public function getEMailData($parameters)
{
$parameters = explode("::", $parameters);
$className = $parameters[1];
$classID = $parameters[2];
$C = new $className($classID);
$data = $C->getCalendarDetails($className, $classID);
$adresse = $data->getAdresse();
$emailData = $adresse->getEMailData();
$emailData["body"] = "{Anrede},\n\nhiermit bestätige ich Ihnen unseren Termin:\n\nStart: " . Util::CLDateParser(Kalender::parseDay($data->getDay())) . " um " . Util::CLTimeParser(Kalender::parseTime($data->getTime())) . " Uhr" . ($data->getEndDay() > 0 ? "\nEnde: " . Util::CLDateParser(Kalender::parseDay($data->getEndDay())) . " um " . Util::CLTimeParser(Kalender::parseTime($data->getEndTime())) . " Uhr" : "") . "\n\nBeschreibung: " . str_replace("<br />\n", "\n", $data->summary()) . "\n\nFreundliche Grüße\n" . Session::currentUser()->A("name");
$emailData["subject"] = "Termininformation";
return $emailData;
}
示例3: getEMailData
public function getEMailData($parameters)
{
$parameters = explode("::", $parameters);
$className = $parameters[1];
$classID = $parameters[2];
$C = new $className($classID);
$data = $C->getCalendarDetails($className, $classID);
$adresse = $data->getAdresse();
$emailData = $adresse->getEMailData();
$sum = $data->summary();
if (strpos($sum, "<p") !== false) {
$sum = "</p>{$sum}<p>";
} else {
$sum = nl2br($sum);
}
$emailData["body"] = "<p>{Anrede},<br>\n<br>\nhiermit bestätige ich Ihnen unseren Termin:<br>\n<br>\nStart: " . Util::CLDateParser(Kalender::parseDay($data->getDay())) . " um " . Util::CLTimeParser(Kalender::parseTime($data->getTime())) . " Uhr" . ($data->getEndDay() > 0 ? "<br>\nEnde: " . Util::CLDateParser(Kalender::parseDay($data->getEndDay())) . " um " . Util::CLTimeParser(Kalender::parseTime($data->getEndTime())) . " Uhr" : "") . "<br>\n<br>\nBeschreibung: " . $sum . "\n\nFreundliche Grüße<br>\n" . Session::currentUser()->A("name");
$emailData["subject"] = "Termininformation";
return $emailData;
}
示例4: getOverviewContent
public function getOverviewContent($echo = true)
{
$time = mktime(0, 0, 1);
$Datum = new Datum($time);
$Datum->addMonth();
$lastTime = $Datum->time();
$Datum->subMonth();
$Woche = date("W");
$K = $this->getData($time, $lastTime);
$hasEvent = array();
$html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemKalenderGUI\"></span><p>Kalender</p></div><div style=\"padding:10px;padding-left:0px;\">";
$html .= "<div style=\"width:25px;float:left;margin-right:5px;color:grey;font-size:11px;\">%%SMALLCALCONTENT%%</div>";
$html .= "<div style=\"border-bottom-width:1px;border-bottom-style:dashed;padding:3px;margin-left:30px;\" class=\"borderColor1\">Heute</div>";
$list = new HTMLList();
$list->addListStyle("list-style-type:none;margin-left:30px;");
$events = $K->getEventsOnDay(date("dmY", $Datum->time()));
if ($events != null and count($events) > 0) {
foreach ($events as $ev) {
foreach ($ev as $KE) {
$hasEvent[date("d", $K->parseDay($KE->getDay()))] = true;
$B = new Button("", $KE->icon(), "icon");
$B->style("float:left;margin-right:5px;margin-bottom:10px;");
$list->addItem("{$B}<b style=\"font-size:15px;\">" . $KE->title() . "</b><br /><small>" . Datum::getGerWeekArray(date("w", $K->parseDay($KE->getDay()))) . ", " . Util::CLDateParser($K->parseDay($KE->getDay())) . " " . Util::CLTimeParser($K->parseTime($KE->getTime())) . "</small>");
}
}
}
if (count($events) == 0) {
$list->addItem("<span style=\"color:grey;\">Kein Eintrag</span>");
}
$html .= $list;
$Datum->addDay();
$html .= "<div style=\"border-bottom-width:1px;border-bottom-style:dashed;padding:3px;margin-top:15px;margin-left:30px;\" class=\"borderColor1\">Morgen</div>";
$list = new HTMLList();
$list->addListStyle("list-style-type:none;margin-left:30px;");
$events = $K->getEventsOnDay(date("dmY", $Datum->time()));
if ($events != null and count($events) > 0) {
foreach ($events as $ev) {
foreach ($ev as $KE) {
$hasEvent[date("d", $K->parseDay($KE->getDay()))] = true;
$B = new Button("", $KE->icon(), "icon");
$B->style("float:left;margin-right:5px;margin-bottom:10px;");
$list->addItem("{$B}<b style=\"font-size:15px;\">" . $KE->title() . "</b><br /><small>" . Datum::getGerWeekArray(date("w", $K->parseDay($KE->getDay()))) . ", " . Util::CLDateParser($K->parseDay($KE->getDay())) . " " . Util::CLTimeParser($K->parseTime($KE->getTime())) . "</small>");
}
}
}
if (count($events) == 0) {
$list->addItem("<span style=\"color:grey;\">Kein Eintrag</span>");
}
$html .= $list;
$Datum->addDay();
$html .= "<div style=\"border-bottom-width:1px;border-bottom-style:dashed;padding:3px;margin-top:15px;margin-left:30px;\" class=\"borderColor1\">Später</div>";
$list = new HTMLList();
$list->addListStyle("list-style-type:none;margin-left:30px;");
$c = 0;
while ($Datum->time() < $lastTime) {
$events = $K->getEventsOnDay(date("dmY", $Datum->time()));
if ($events != null and count($events) > 0) {
foreach ($events as $ev) {
foreach ($ev as $KE) {
$hasEvent[date("d", $K->parseDay($KE->getDay()))] = true;
$B = new Button("", $KE->icon(), "icon");
$B->style("float:left;margin-right:5px;margin-bottom:10px;");
$list->addItem("{$B}<b style=\"font-size:15px;\">" . $KE->title() . "</b><br /><small>" . Datum::getGerWeekArray(date("w", $K->parseDay($KE->getDay()))) . ", " . Util::CLDateParser($K->parseDay($KE->getDay())) . "</small>");
if (date("W", $K->parseDay($KE->getDay())) > $Woche + 1) {
$list->addItemStyle("color:grey;");
}
$c++;
}
}
}
$Datum->addDay();
}
if ($c == 0) {
$list->addItem("<span style=\"color:grey;\">Kein Eintrag</span>");
}
$html .= $list . "</div>";
$smallCal = "";
$DatumC = clone $Datum;
for ($i = 0; $i < 14; $i++) {
$smallCal .= "<div style=\"padding:5px;text-align:right;" . (isset($hasEvent[date("d", $DatumC->time())]) ? "color:black;" : "") . "\" " . (isset($hasEvent[date("d", $DatumC->time())]) ? "class=\"backgroundColor3\"" : "") . "\">" . date("d", $DatumC->time()) . "</div>";
$DatumC->addDay();
}
$html = str_replace("%%SMALLCALCONTENT%%", $smallCal, $html);
if ($echo) {
echo $html;
}
return $html;
}
示例5: showPayPal
function showPayPal()
{
$new = "<p><a href=\"#\" onclick=\"CustomerPage.rme('handleRestart', [], function(){ document.location.reload(); }); return false;\">Weitere Karten kaufen</a></p>";
switch ($_SESSION["ticketDataPayment"]["via"]) {
#default:
case "paypal":
#www.paypal.com
$paypalHTML = '<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="payPalForm">
<p>Vielen Dank für Ihren Einkauf!<br />Sie erhalten die Rechnung in Kürze per E-Mail.<br /><br /><b>Um die Zahlung abzuschließen, klicken Sie bitte auf nachfolgenden Knopf:</b></p>
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="upload" value="1" />
<input type="hidden" name="currency_code" value="EUR" />
<input type="hidden" name="charset" value="utf-8" />
<input type="hidden" name="invoice" value="' . implode(";", $_SESSION["ticketDataOrderIDs"]) . '" />
<input type="hidden" name="business" value="nemi_1341164850_biz@2sins.de" />';
$i = 1;
foreach ($_SESSION["ticketDataSelection"] as $SeminarID => $anzahl) {
if ($anzahl == 0) {
continue;
}
$S = new Seminar($SeminarID, false);
$paypalHTML .= '
<input type="hidden" name="item_name_' . $i . '" value="' . $S->A("SeminarName") . ", " . $S->A("SeminarVon") . " ab " . Util::CLTimeParser($S->A("SeminarStart")) . " Uhr" . '" />
<input type="hidden" name="amount_' . $i . '" value="' . $anzahl * $S->A("SeminarPreisErwachsene") . '" />';
$i++;
}
$paypalHTML .= '
<p>
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc.gif" style="width:auto;border:0px;" name="submit" />
</p>
' . $new . '
</form>
<script type="text/javascript">
$(document).ready(function() {
$("#payPalForm").submit(function() {
window.open("", "payPalpopup", "width=1000,height=600,resizeable,scrollbars");
this.target = "payPalpopup";
});
//$("#payPalForm").submit();
});
</script>';
$html .= $paypalHTML;
break;
case "debit":
$html = "<form><p>Vielen Dank für Ihren Einkauf!<br />Sie erhalten die Rechnung in Kürze per E-Mail.<br /><br /><b>Der Rechnungsbetrag wird von uns von Ihrem Konto abgebucht.</b></p>{$new}</form>";
break;
case "transfer":
$S = mStammdaten::getActiveStammdaten();
$T = new HTMLTable(2);
$T->addLV("Kontoinhaber:", $S->A("firmaLang"));
$T->addLV("BLZ:", $S->A("blz"));
$T->addLV("Konto:", $S->A("ktonr"));
if ($S->A("IBAN") != "" and $S->A("SWIFTBIC") != "") {
$T->addRow(array("", ""));
$T->addLV("IBAN", $S->A("IBAN"));
$T->addLV("BIC", $S->A("SWIFTBIC"));
}
$T->addRow(array("", ""));
$T->addLV("Verw. zweck:", "Auftrag " . implode(", ", $_SESSION["ticketDataOrderIDs"]));
$html = "<form><p>Vielen Dank für Ihren Einkauf!<br />Sie erhalten die Rechnung in Kürze per E-Mail.<br /><br /><b>Bitte überweisen Sie den Rechnungsgetrag auf folgendes Konto:</b></p>{$T}<p>Diese Daten finden Sie auch auf der Rechnung.</p>{$new}</form>";
break;
default:
$html = "<form><p>Vielen Dank für Ihren Einkauf!<br />Sie erhalten die Rechnung in Kürze per E-Mail.</p>{$new}</form>";
break;
}
return $html;
}
示例6: CLDateTimeParser
public static function CLDateTimeParser($dateTime, $l = "load")
{
if ($dateTime == "0" and $l == "load") {
return "";
}
if ($dateTime == "" and $l == "store") {
return "0";
}
if ($l == "load") {
return Util::CLDateParser($dateTime) . " " . Util::CLTimeParser($dateTime);
}
if ($l == "store") {
$ex = explode(" ", $dateTime);
return Util::CLDateParser($ex[0], "store") - 60 + Util::CLTimeParser($ex[1], "store");
}
}
示例7: formatTime
function formatTime($time)
{
$time .= $time[3];
$time[3] = $time[2];
$time[2] = ":";
$timestamp = Util::parseTime("de_DE", $time);
return Util::CLTimeParser($timestamp);
}
示例8: lastUpdateParser
public static function lastUpdateParser($w)
{
return Util::CLDateParser($w) . " " . Util::CLTimeParser($w);
}
示例9: reminderList
public function reminderList()
{
#$T = new HTMLTable(2);
#$T->setTableStyle("width:100%;");
#$T->setColWidth(1, "30%");
$B = $this->reminderCheck();
$R = array();
$Kal = new Kalender();
foreach ($B as $E) {
switch (get_class($E)) {
case "KalenderEvent":
$id = str_replace("@", "", $E->UID());
$BD = new Button("Erledigt", "check", "iconic");
$BD->style("color:#333;");
$BD->doBefore("event.stopPropagation(); %AFTER");
$BD->rmePCR("Util", "-1", "reminderDone", array("'KalenderEvent'", "'" . $E->UID() . "'"), "function(){ \$j('#bottom').html(''); \$j('#{$id}').hide(); if(!\$j('.event:visible').length) window.close(); }");
$R[] = array($id, "<div class=\"event\" id=\"{$id}\" style=\"padding:5px;cursor:pointer;\" onclick=\"\$j('.confirm').removeClass('confirm'); \$j(this).addClass('confirm');\$j('#bottom').html('" . str_replace("\n", "", $E->summary() != "" ? addslashes($E->summary()) : "Keine Beschreibung") . "');\" onmouseover=\"\$j(this).addClass('highlight');\" onmouseout=\"\$j(this).removeClass('highlight');\">\n\t\t\t\t\t\t\t<div style=\"width:15%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\tKalender\n\t\t\t\t\t\t\t</div><div style=\"width:45%;display:inline-block;overflow:hidden;vertical-align:top;\">\n\t\t\t\t\t\t\t\t" . $E->title() . "\n\t\t\t\t\t\t\t</div><div style=\"width:33%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\t" . Util::CLTimeParser($Kal->parseTime($E->getTime())) . " - " . Util::CLTimeParser($Kal->parseTime($E->getEndTime())) . " Uhr" . "\n\t\t\t\t\t\t\t</div><div style=\"width:7%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\t{$BD}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>");
break;
case "Aufgabe":
$id = "Aufgabe_" . $E->getID();
$BD = new Button("Erledigt", "check", "iconic");
$BD->style("color:#333;");
$BD->doBefore("event.stopPropagation(); %AFTER");
$BD->rmePCR("Util", "-1", "reminderDone", array("'Aufgabe'", "'" . $E->getID() . "'"), "function(){ \$j('#bottom').html(''); \$j('#{$id}').hide(); if(!\$j('.event:visible').length) window.close(); }");
$R[] = array($id, "<div class=\"event\" id=\"{$id}\" style=\"padding:5px;cursor:pointer;\" onclick=\"\$j('.confirm').removeClass('confirm'); \$j(this).addClass('confirm');\$j('#bottom').html('" . str_replace("\n", "", addslashes(nl2br($E->A("AufgabeText")))) . "');\" onmouseover=\"\$j(this).addClass('highlight');\" onmouseout=\"\$j(this).removeClass('highlight');\">\n\t\t\t\t\t\t\t<div style=\"width:15%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\tAufgabe\n\t\t\t\t\t\t\t</div><div style=\"width:45%;display:inline-block;overflow:hidden;vertical-align:top;\">\n\t\t\t\t\t\t\t\t" . mb_substr($E->A("AufgabeText"), 0, 30) . "\n\t\t\t\t\t\t\t</div><div style=\"width:33%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\t" . Util::CLTimeParser($E->A("AufgabeUhrzeitVon")) . " Uhr" . "\n\t\t\t\t\t\t\t</div><div style=\"width:7%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t\t\t\t{$BD}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>");
/*$id = str_replace("@", "", $E->UID());
$BD = new Button("Erledigt", "check", "iconic");
$BD->style("color:#333;");
$BD->doBefore("event.stopPropagation(); %AFTER");
$BD->rmePCR("Util", "-1", "reminderDone", array("'KalenderEvent'", "'".$E->UID()."'"), "function(){ \$j('#bottom').html(''); \$j('#$id').hide(); if(!\$j('.event:visible').length) window.close(); }");
$R[] = array(
$id,
"<div class=\"event\" id=\"$id\" style=\"padding:5px;cursor:pointer;\" onclick=\"\$j('.confirm').removeClass('confirm'); \$j(this).addClass('confirm');\$j('#bottom').html('".str_replace("\n", "", addslashes($E->summary()))."');\" onmouseover=\"\$j(this).addClass('highlight');\" onmouseout=\"\$j(this).removeClass('highlight');\">
<div style=\"width:15%;display:inline-block;vertical-align:top;\">
Kalender
</div><div style=\"width:45%;display:inline-block;overflow:hidden;vertical-align:top;\">
".$E->title()."
</div><div style=\"width:33%;display:inline-block;vertical-align:top;\">
".Util::CLTimeParser($Kal->parseTime($E->getTime()))." - ".Util::CLTimeParser($Kal->parseTime($E->getEndTime()))." Uhr"."
</div><div style=\"width:7%;display:inline-block;vertical-align:top;\">
$BD
</div>
</div>"
);*/
break;
}
}
echo json_encode($R, JSON_UNESCAPED_UNICODE);
}
示例10: getPDFContent
public function getPDFContent($save = false)
{
if ($this->userdata == null or count($this->userdata) == 0) {
die(Util::getBasicHTMLError("Bitte wählen Sie Monat und Jahr aus", "Fehler"));
}
self::$pdf->SetAutoPageBreak(false);
$this->AddPage();
$D = new Datum(mktime(0, 0, 1, $this->userdata["lightCRMKalBerichtMonth"], 1, $this->userdata["lightCRMKalBerichtYear"]));
$day = clone $D;
$D->setToMonthLast();
$lastDay = $D;
$Kalender = new mKalenderGUI();
$K = $Kalender->getData($day->time(), $lastDay->time());
$i = 0;
while ($day->time() <= $lastDay->time()) {
$events = $K->getEventsOnDay(date("dmY", $day->time()));
if (count($events) == 0) {
$day->addDay();
continue;
}
if (self::$pdf->getY() > $this->pageBreakMargin - 15) {
$this->AddPage();
$i = 0;
}
if ($i > 0) {
self::$pdf->ln(10);
}
self::$pdf->SetFont($this->defaultFont, "B", $this->defaultFontSize);
self::$pdf->Cell(0, $this->defaultCellHeight, "Termine am " . Util::CLWeekdayName(date("w", $day->time())) . ", " . Util::CLFormatDate($day->time()), 0, 1);
self::$pdf->Line(10, self::$pdf->GetY(), 200, self::$pdf->GetY());
self::$pdf->SetFont($this->defaultFont, $this->defaultFontStyle, $this->defaultFontSize);
foreach ($events as $time) {
foreach ($time as $event) {
if (self::$pdf->getY() > $this->pageBreakMargin) {
$this->AddPage();
$i = 0;
if ($this->between) {
self::$pdf->SetFont($this->defaultFont, "B", $this->defaultFontSize);
self::$pdf->Cell(0, $this->defaultCellHeight, "Termine am " . Util::CLWeekdayName(date("w", $day->time())) . ", " . Util::CLFormatDate($day->time()), 0, 1);
self::$pdf->Line(10, self::$pdf->GetY(), 200, self::$pdf->GetY());
self::$pdf->SetFont($this->defaultFont, $this->defaultFontStyle, $this->defaultFontSize);
}
}
$this->between = true;
self::$pdf->Cell8(isset($this->widths["time"]) ? $this->widths["time"] : 20, $this->defaultCellHeight, Util::CLTimeParser(Kalender::parseTime($event->getTime())) . " - " . Util::CLTimeParser(Kalender::parseTime($event->getEndTime())), 0, 0);
self::$pdf->Cell8(isset($this->widths["title"]) ? $this->widths["title"] : 20, $this->defaultCellHeight, $event->title(), 0, 0);
self::$pdf->Cell8(isset($this->widths["location"]) ? $this->widths["location"] : 20, $this->defaultCellHeight, $event->location(), 0, 1);
$summary = $event->summary();
if ($summary != "") {
self::$pdf->setTextColor(100, 100, 100);
self::$pdf->SetFont($this->defaultFont, $this->defaultFontStyle, $this->defaultFontSize - 1);
self::$pdf->MultiCell8(isset($this->widths["summary"]) ? $this->widths["summary"] : 20, $this->defaultCellHeight - 1, trim(str_replace("<br />", "", $summary)), 0, 1);
self::$pdf->setTextColor(0, 0, 0);
self::$pdf->SetFont($this->defaultFont, $this->defaultFontStyle, $this->defaultFontSize);
}
self::$pdf->SetDrawColor(150, 150, 150);
self::$pdf->Line(10, self::$pdf->GetY(), 200, self::$pdf->GetY());
self::$pdf->SetDrawColor(0, 0, 0);
self::$pdf->ln(5);
}
}
$this->between = false;
$day->addDay();
$i++;
}
$tmpfname = Util::getTempFilename("Bericht");
self::$pdf->Output($tmpfname, $save ? "F" : "I");
if ($save) {
return $tmpfname;
}
}
示例11: saveMe
public function saveMe($checkUserData = true, $output = false, $update = true)
{
$old = new Todo($this->getID());
$old->loadMe();
#$fromDay = date("Y-m-d", Util::CLDateParser($this->A("TodoFromDay"), "store"));
#$fromTime = Util::formatTime("de_DE", Util::CLTimeParser($this->A("TodoFromTime"), "store"));
#die($this->getID());
if ($update) {
$this->changeA("TodoLastChange", time());
$this->changeA("TodoReminded", "0");
}
#$name = $this->getOwnerObject()->getCalendarTitle();
if ($this->A("TodoAllDay")) {
$this->changeA("TodoFromTime", Util::CLTimeParser(0));
$this->changeA("TodoTillTime", Util::CLTimeParser(0));
}
if ($this->A("TodoRepeatWeekOfMonth") > 0 and $this->A("TodoRepeatWeekOfMonth") != 127) {
$D = new Datum($this->hasParsers ? Util::CLDateParser($this->A("TodoFromDay"), "store") : $this->A("TodoFromDay"));
$nthDay = $D->getNthDayOfMonth();
if ($nthDay > 4) {
$nthDay = 4;
}
$this->changeA("TodoRepeatWeekOfMonth", $nthDay);
}
if ($this->A("TodoClass") != "" and $this->A("TodoClass") != "Kalender" and $this->A("TodoName") == "") {
$this->changeA("TodoName", $this->getOwnerObject()->getCalendarTitle());
}
if (Session::isPluginLoaded("mAufgabe") and ($this->A("TodoType") == 3 or $this->A("TodoType") == 4 or $this->A("TodoType") == 5) and $this->A("TodoUserID") > 0) {
$F = new Factory("Aufgabe");
$F->sA("AufgabeByClass", "Todo");
$F->sA("AufgabeByClassID", $this->getID());
$E = $F->exists(true);
if (!$E) {
$F->sA("AufgabeUserID", $this->A("TodoUserID"));
$F->sA("AufgabeText", "Bericht für Termin '" . $this->A("TodoName") . "' eintragen");
$F->sA("AufgabeCreated", time());
if ($this->A("TodoDoneTime") > 0) {
$F->sA("AufgabeStatus", "5");
$F->sA("AufgabeDone", time());
}
if ($this->hasParsers) {
$F->sA("AufgabeUntil", Util::CLDateParser($this->A("TodoFromDay"), "store"));
$F->sA("AufgabeUhrzeitVon", Util::CLTimeParser($this->A("TodoTillTime"), "store"));
} else {
$F->sA("AufgabeUntil", $this->A("TodoFromDay"));
$F->sA("AufgabeUhrzeitVon", $this->A("TodoTillTime"));
}
$F->store();
} else {
$E->changeA("AufgabeText", "Bericht für Termin '" . $this->A("TodoName") . "' eintragen");
if ($this->hasParsers) {
$E->changeA("AufgabeUntil", Util::CLDateParser($this->A("TodoFromDay"), "store"));
$E->changeA("AufgabeUhrzeitVon", Util::CLTimeParser($this->A("TodoTillTime"), "store"));
} else {
$E->changeA("AufgabeUntil", $this->A("TodoFromDay"));
$E->changeA("AufgabeUhrzeitVon", $this->A("TodoTillTime"));
}
if ($this->A("TodoDoneTime") > 0) {
$E->changeA("AufgabeStatus", "5");
$E->changeA("AufgabeDone", time());
}
$E->saveMe();
}
}
parent::saveMe($checkUserData, false);
if (Session::isPluginLoaded("mGoogle") and $this->updateGoogle) {
$KE = mTodoGUI::getCalendarDetails("Todo", $this->getID());
if ($this->A("TodoUserID") == Session::currentUser()->getID()) {
if ($old->A("TodoUserID") == $this->A("TodoUserID")) {
Google::calendarUpdateEvent(mTodoGUI::getCalendarDetails("Todo", $this->getID()));
} else {
Google::calendarDeleteEvent($KE);
#"Todo", $this->getID());
Google::calendarCreateEvent($KE);
}
} else {
Google::calendarDeleteEvent($KE);
#"Todo", $this->getID());
Google::calendarCreateEvent($KE, $this->A("TodoUserID"));
}
}
}
示例12: timeTillParser
public static function timeTillParser($w, $f, $E)
{
if ($f == "") {
$f = "TodoTillTime";
}
$f2 = "TodoFromTime";
if ($f == "TodoFromTime") {
$f2 = "TodoTillTime";
}
$rawTime = Util::CLTimeParser($w, "store");
$down = floor($rawTime / (15 * 60)) * 15 * 60;
$up = ceil($rawTime / (15 * 60)) * 15 * 60;
if (Util::CLTimeParser($down) == $w) {
$down -= 15 * 60;
$up += 15 * 60;
}
$I = new HTMLInput($f, "time", $w);
$I->style("width:50px;text-align:right;");
$I->id($f);
if ($f == "TodoFromTime") {
$I->connectTo("TodoTillTime");
}
$values = array($down - 900 * 2, $down - 900, $down, $up, $up + 900);
if ($f == "TodoFromTime") {
$values = array($down, $up, $up + 900, $up + 900 * 2, $up + 900 * 3);
}
/*$T = new HTMLTable(count($values));
$T->setTableStyle("margin-top:5px;display:none;");
$val = array_map("Util::CLTimeParser", $values);
$T->addRow($val);
$T->setTableID("{$f}Table");
for($i = 1; $i < 6; $i++){
#$T->setColClass($i, "");
$T->setColWidth($i, (100 / count($values))."%");
$T->addCellStyle($i, "cursor:pointer;text-align:center;color:grey;");
$T->addCellEvent($i, "mouseover", "this.className = 'backgroundColor0';");
$T->addCellEvent($i, "mouseout", "this.className = '';");
$T->addCellEvent($i, "click", "$('$f').value = '".Util::CLTimeParser($values[$i-1])."'; ".($f == "TodoFromTime" ? "$('$f2').value = '".Util::CLTimeParser($values[$i-1] + 3600)."';" : ""));
}*/
return "<span id=\"{$f}Display\" style=\"" . ($E->A("TodoAllDay") ? "display:none;" : "") . "\" ><span style=\"color:grey;margin-left:30px;\">um</span> " . $I . "</span>";
#.($w != "" ? $T : "")
}
示例13: getBusyList
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;
}
示例14: getAdresse
public function getAdresse($Beleg)
{
$html = "<div style=\"width:50%;display:inline-block;vertical-align:top;\">" . parent::getAdresse($Beleg) . "</div>";
$T = new HTMLTable(3, "Details");
$I = new Button("Details", "info", "iconic");
if (Session::isPluginLoaded("mAdresseNiederlassung") and strpos($Beleg->A("GRLBMServiceArbeitsort"), "AdresseNiederlassungID:") === 0) {
$N = new AdresseNiederlassung(str_replace("AdresseNiederlassungID:", "", $Beleg->A("GRLBMServiceArbeitsort")));
AdresseNiederlassung::fill($N);
$new = $N->A("AdresseNiederlassungStrasse") . " " . $N->A("AdresseNiederlassungNr") . ", " . $N->A("AdresseNiederlassungPLZ") . " " . $N->A("AdresseNiederlassungOrt");
$Beleg->changeA("GRLBMServiceArbeitsort", $new);
}
$T->addRow(array($I, "<label>Auftraggeber:</label>", $Beleg->A("GRLBMServiceAuftraggeber")));
$T->addRow(array("", "<label>Ansprechpartner:</label>", $Beleg->A("GRLBMServiceAnsprechpartner")));
$T->addRow(array("", "<label>Arbeitsort:</label>", $Beleg->A("GRLBMServiceArbeitsort")));
if ($Beleg->A("GRLBMServiceTerminTag") > 0) {
$T->addLV(array("", "<label>Termin:</label>", Util::CLDateParserE($Beleg->A("GRLBMServiceTerminTag")) . ($Beleg->A("GRLBMServiceTerminUhr") > 0 ? " um " . Util::CLTimeParser($Beleg->A("GRLBMServiceTerminUhr")) . " Uhr" : "")));
}
$html .= "<div style=\"width:49%;margin-left:1%;display:inline-block;vertical-align:top;\">{$T}</div>";
return $html;
}