prepare("SELECT m.*, u.username as created_by_name FROM meetings m LEFT JOIN users u ON m.created_by = u.id WHERE m.id = ?");
$stmt->execute([$id]);
$meeting = $stmt->fetch(PDO::FETCH_ASSOC);
if (!$meeting) {
die("الاجتماع غير موجود");
}
} catch (PDOException $e) {
die("خطأ في قاعدة البيانات");
}
$settings = get_settings();
$logo_path = 'uploads/charity/' . ($settings['site_logo'] ?? 'default_logo.png');
// Check if logo exists
if (!file_exists($logo_path)) {
// Try to find any logo in the directory if the specific one is missing
$possible_logos = glob('uploads/charity/*logo*.*');
if (!empty($possible_logos)) {
$logo_path = $possible_logos[0];
} else {
$logo_path = '';
}
}
if ($logo_path) {
$logo_html = '';
} else {
$logo_html = '';
}
?>