0 ? qh_fetch_clinic($editId) : null; if ($editId > 0 && $editClinic === null) { qh_set_flash('warning', qh_t('The requested clinic record was not found.', 'لم يتم العثور على سجل العيادة المطلوب.')); qh_redirect('admin_clinics.php'); } $toLower = static function (string $value): string { return function_exists('mb_strtolower') ? mb_strtolower($value, 'UTF-8') : strtolower($value); }; if ($search !== '') { $needle = $toLower($search); $clinics = array_values(array_filter($clinics, static function (array $clinic) use ($needle, $toLower): bool { $haystack = implode(' ', [ (string) ($clinic['code'] ?? ''), (string) ($clinic['name_en'] ?? ''), (string) ($clinic['name_ar'] ?? ''), (int) ($clinic['requires_vitals'] ?? 0) === 1 ? 'vitals first' : 'direct doctor', ]); return str_contains($toLower($haystack), $needle); })); } qh_page_start( 'admin', qh_t('Clinic management', 'إدارة العيادات'), qh_t('Professional clinic directory with search, edit, and delete actions.', 'دليل احترافي للعيادات مع البحث وخيارات التعديل والحذف.') ); ?>
= qh_h(qh_t('Search clinics, adjust codes and routing, and keep the front desk workflow organized.', 'ابحث في العيادات وعدّل الرموز ومسار العمل وحافظ على تنظيم سير العمل في الاستقبال.')) ?>
= qh_h($search !== '' ? qh_t('Filtered results based on your search.', 'نتائج مفلترة بناءً على البحث.') : qh_t('All configured clinic records.', 'جميع سجلات العيادات المهيأة.')) ?>
| = qh_h(qh_t('Code', 'الرمز')) ?> | = qh_h(qh_t('Clinic', 'العيادة')) ?> | = qh_h(qh_t('Routing', 'المسار')) ?> | = qh_h(qh_t('Order', 'الترتيب')) ?> | = qh_h(qh_t('Actions', 'الإجراءات')) ?> |
|---|---|---|---|---|
| = qh_h((string) $clinic['code']) ?> |
= qh_h(qh_name($clinic)) ?>
= qh_h(qh_is_ar() ? (string) ($clinic['name_en'] ?? '') : (string) ($clinic['name_ar'] ?? '')) ?>
|
= qh_h((int) $clinic['requires_vitals'] === 1 ? qh_t('Vitals first', 'العلامات أولاً') : qh_t('Direct doctor', 'الطبيب مباشرة')) ?> | = qh_h((string) $clinic['sort_order']) ?> |
= qh_h(qh_t('Define the code, both names, routing type, and display order in one focused form.', 'حدّد الرمز والاسمين ونوع المسار وترتيب العرض في نموذج واحد مركز.')) ?>