Files
awo-hamburg-intranet/module/infopoint/content_infopoint.php
2026-02-17 14:56:23 +01:00

27 lines
902 B
PHP

<?php
function loadContent($current_page){
switch ($current_page['type']) {
case 'collection':
echo $current_page['description'] . "<br>";
$current_date = new DateTime();
echo $current_date->format('H:i:s');
break;
case 'textcontent':
loadTextContent($current_page['type_id']);
break;
case 'image':
echo "<img class='fullscreen_image' src='../../userdata/infopoint/".$current_page['image']."'>";
break;
default:
break;
}
}
function loadTextContent($id){
$select_textcontent = $GLOBALS['pdo_conn']->prepare("SELECT * FROM textcontent_header WHERE id = :id");
$select_textcontent->execute(array(':id' => $id));
$res_textcontent = $select_textcontent->fetch(PDO::FETCH_ASSOC);
echo $res_textcontent['content'];
}