public function getDisplayTime($short = false) { $time = strtotime($this->created_at); return DisplayTime::format($time, $short); }
public function getDisplayTime($short = false) { $time = $this->getMTime(); return DisplayTime::format($time, $short); }
<?php require_once __DIR__ . "/../classes/display/displayTime.php"; require_once __DIR__ . "/../classes/backend.php"; //create new backend object, if not included //(then $backend is probably created and we can reuse it) if (!isset($backend)) { $backend = new Backend(); } //Time $time = new DisplayTime(); $time->setUnsafeStartDate(isset($_GET['year']) ? $_GET['year'] : null, isset($_GET['month']) ? $_GET['month'] : null, isset($_GET['day']) ? $_GET['day'] : null); $backend->setTime($time); //little handy trick to chose the right one switch (true) { case isset($_GET['day']): $backend->setModus(Backend::MODUS_DAY); break; case isset($_GET['month']): $backend->setModus(Backend::MODUS_MONTH); break; case isset($_GET['year']): $backend->setModus(Backend::MODUS_YEAR); break; } //Force modus if given correct if (isset($_GET['modus'])) { $backend->setUnsafeModus($_GET['modus']); } //Length if (isset($_GET['length'])) {
//therefor "new Language" must be called once! require_once __DIR__ . "/classes/display/language.php"; $lang = new Language(isset($_GET['lang']) ? $_GET['lang'] : null); //include user require_once __DIR__ . "/classes/systemUser.php"; $user = new SystemUser("Gast"); //including necassary classes require_once __DIR__ . "/classes/analyse/country.php"; require_once __DIR__ . "/classes/display/displayTime.php"; require_once __DIR__ . "/classes/display/urlbuilder.php"; require_once __DIR__ . "/classes/backend.php"; //"Config" require_once __DIR__ . "/config/settings.php"; include_once __DIR__ . "/config/information.php"; //instances of the classes $displayTime = new DisplayTime(); $displayTime->setUnsafeStartDate(isset($_GET['year']) ? $_GET['year'] : null, isset($_GET['month']) ? $_GET['month'] : null); $displayTime->setUnsafeEndDate(isset($_GET['year']) ? $_GET['year'] : null, isset($_GET['month']) ? $_GET['month'] : null); $urlBuilder = new URLBuilder(isset($_GET['show']) ? $_GET['show'] : null, $lang->getLanguage()); $backend = new Backend(); if (isset($_GET['length'])) { $backend->setUnsafeListLength($_GET['length']); } //set Page title switch ($urlBuilder->getPage()) { case "about": $fstat_title = FLANG_H_ABOUT_FSTAT; break; case "last": $fstat_title = FLANG_H_LAST . " " . $backend->getListLength() . " " . FLANG_VISITOR_L; break;