Files
awo-hamburg-intranet/module/image/show_image.inc.php
Jan Usenko 52ca9249c3 Refactor contact management functions and remove phpinfo.php
- Updated formatting and structure of functions in edit_contact.inc.php for better readability and consistency.
- Added comments to clarify the purpose of certain code sections, especially regarding mandant handling.
- Removed the deprecated phpinfo.php file to clean up the codebase.
2026-05-11 08:54:44 +02:00

20 lines
656 B
PHP

<?php
$query = "SELECT * FROM image_header WHERE id = '" . $sitepart_id . "' LIMIT 1";
$result = @mysqli_query($GLOBALS['mysql_con'], $query);
if (@mysqli_num_rows($result) == 1) {
$image = @mysqli_fetch_array($result);
// Use module path for intranet images
if (!empty($image["content"]) && strpos($image["content"], 'intranet') !== false) {
$imagePath = '/module/' . ltrim($image["content"], '/');
} else {
$imagePath = '/userdata/' . ltrim($image["content"], '/');
}
echo "\n<div class=\"imgcontent\">\n";
echo "<img loading='lazy' src='" . $imagePath . "'>";
echo "</div>\n";
}
?>