private static function getTransformedDateTime($dateTime) { $year = substr($dateTime, 0, 4); $month = substr($dateTime, 4, 2); $day = substr($dateTime, 6, 2); $hour = substr($dateTime, 9, 2); $minute = substr($dateTime, 11, 2); $sec = substr($dateTime, 13, 2); $date = $year . "-" . $month . "-" . $day; $time = $hour . ":" . $minute; return str_to_timestamp($date, $time); }
$event->set_attributes($date); $_SESSION["confirmation"] = str_replace("%TITLE", htmlentities($values["DATE_TITLE"], ENT_QUOTES, "UTF-8"), gettext("Event %TITLE altered.")); } else { $owner = $calendar->get_attribute("CALENDAR_OWNER"); if ($owner instanceof steam_group) { $subgroups = $owner->get_subgroups(); $calendar->add_entry_recursive($date, TRUE, $subgroups); } else { $calendar->add_entry($date, TRUE); } $_SESSION["confirmation"] = str_replace("%TITLE", htmlentities($values["DATE_TITLE"], ENT_QUOTES, "UTF-8"), gettext("Event %TITLE added to calendar.")); } if (isset($group) && is_object($group) && $group instanceof koala_group_default) { header("Location: " . $backlink["link"] . "calendar/?date=" . str_to_timestamp($bDate, $bTime)); } else { header("Location: " . $backlink["link"] . "?date=" . str_to_timestamp($bDate, $bTime)); } exit; } else { $portal->set_problem_description($problems, $hints); } } $content = new HTML_TEMPLATE_IT(PATH_TEMPLATES); $content->loadTemplateFile("event_edit.template.html"); $content->setVariable("INFO_TEXT", ""); //TODO: hier kommt spaeter eine Monatsuebersicht hin (?) $content->setVariable("LABEL_TITLE", gettext("Title")); $content->setVariable("LABEL_LOCATION", gettext("Location")); $content->setVariable("LABEL_BEGIN", gettext("Begin* (day, month, year) (hour, minute)")); $content->setVariable("LABEL_END", gettext("End* (day, month, year) (hour, minute)")); $content->setVariable("LONG_DSC_LABEL", gettext("Description"));