- square date

- fixed typos
- missed mCss inits
This commit is contained in:
marko
2023-01-28 13:03:59 +01:00
parent cd8f15fe25
commit 4ff0659f90
10 changed files with 109 additions and 97 deletions

View File

@@ -43,7 +43,7 @@ class participo
return
'<div style="border: 1px solid black">' .
'Datum: ' . date('Y-m-d') . '<br />' .
'Angemeldet als <strong>' . htmlspecialchars($_SESSION['user']['username']) . '</strong>.<br />' .
'Eingeloggt als <strong>' . htmlspecialchars($_SESSION['user']['username']) . '</strong>.<br />' .
'<a href="logout.php">Sitzung beenden</a>' .
'</div>';
}
@@ -517,3 +517,27 @@ function getCurPagesUrl()
}
return $pageURL;
}
/**
* space saving way to put a date
*
* @param [DateTime] $date
* @return string html tag containing the date
*/
function getHtmlSquareDate($date = null)
{
$date = $date ?? new DateTime;
$year = $date->format('Y');
$month = $date->format('M');
$day = $date->format('d');
return
'<div>'
. '<div>'
. '<span style="font-size:large">' . $day . '</span>'
. '<span style="writing-mode: sideways-lr">' . $month . '</span>'
. '</div>'
. '<div style="font-size: small">' . $year . '</div>'
. '</div>';
}