0) {
require_once __DIR__ . '/../../Models/DetailsManager.php';
$label='';
$description='';
$img_path1 = "service/images/details/";
$ctrl = new DetailsManager();
$row = $ctrl->getDetailsById($id);
$imagePath ="";
if ($row !== null) {
if (!empty($row['img_ext'])) {
$imagePath = $img_path1 . 'img_' . $row['item_id'] . '.' . $row['img_ext'];
}
if($lang==='ar'){
$label = $row['details_title'] ?? '';
$description = $row['details_description'] ?? '';
}
else if($lang==='ku'){
$label = $row['details1_title'] ?? '';
$description = $row['details1_description'] ?? '';
}
else if($lang==='en'){
$label = $row['details2_title'] ?? '';
$description = $row['details2_description'] ?? '';
}
} else {
$list = $ctrl->getMenu();
$item = findById($list, $id);
if ($item !== null) {
$label= $item['title'][$lang];
}
}
}
?>