383 lines
25 KiB
PHP
383 lines
25 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
require_once __DIR__ . '/includes/app.php';
|
|
|
|
$flash = consume_flash();
|
|
$applicationId = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT) ?: 0;
|
|
$requestedCycleId = filter_input(INPUT_GET, 'cycle', FILTER_VALIDATE_INT) ?: 0;
|
|
$application = $applicationId > 0 ? get_application($applicationId) : null;
|
|
$isApprovedSchool = $application && (string) $application['status'] === 'approved';
|
|
$values = student_defaults();
|
|
$errors = [];
|
|
$cycleContext = ['cycles' => [], 'selected' => null, 'active' => null, 'read_only' => false];
|
|
$selectedCycle = null;
|
|
$selectedCycleId = 0;
|
|
$isCycleReadOnly = false;
|
|
$cycleLabel = 'لا توجد دورة بعد';
|
|
|
|
if ($application && $isApprovedSchool) {
|
|
$cycleContext = resolve_school_cycle_context((int) $application['id'], $application, $requestedCycleId);
|
|
$selectedCycle = $cycleContext['selected'];
|
|
$selectedCycleId = $selectedCycle ? (int) ($selectedCycle['id'] ?? 0) : 0;
|
|
$isCycleReadOnly = (bool) $cycleContext['read_only'];
|
|
$cycleLabel = $selectedCycle ? (string) $selectedCycle['cycle_name'] : $cycleLabel;
|
|
}
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $application) {
|
|
[$values, $errors] = validate_student_input($_POST);
|
|
|
|
if (!$isApprovedSchool) {
|
|
$errors['form'] = 'لا يمكن فتح تسجيل الطلاب قبل اعتماد المركز.';
|
|
} elseif ($selectedCycleId <= 0) {
|
|
$errors['form'] = 'يرجى إنشاء دورة موسمية أولاً من صفحة المركز.';
|
|
} elseif ($isCycleReadOnly) {
|
|
$errors['form'] = 'هذه الدورة مؤرشفة للقراءة فقط. افتح دورة جديدة أو اختر دورة نشطة لإضافة طلاب جدد.';
|
|
}
|
|
|
|
if ($errors === []) {
|
|
try {
|
|
create_student_in_cycle((int) $application['id'], $selectedCycleId, $values);
|
|
set_flash('success', 'تم تسجيل الطالب بنجاح داخل الدورة الموسمية المحددة.');
|
|
header('Location: ' . school_page_url('students.php', (int) $application['id'], $selectedCycleId));
|
|
exit;
|
|
} catch (PDOException $exception) {
|
|
$duplicateCode = isset($exception->errorInfo[1]) && (int) $exception->errorInfo[1] === 1062;
|
|
if ($duplicateCode) {
|
|
$errors['student_code'] = 'هذا الكود مستخدم مسبقاً داخل نفس الدورة الموسمية.';
|
|
} else {
|
|
$errors['form'] = 'تعذر حفظ بيانات الطالب حالياً. يرجى المحاولة مرة أخرى.';
|
|
}
|
|
} catch (Throwable $exception) {
|
|
$errors['form'] = 'تعذر حفظ بيانات الطالب حالياً. يرجى المحاولة مرة أخرى.';
|
|
}
|
|
}
|
|
}
|
|
|
|
$students = $isApprovedSchool && $selectedCycleId > 0 ? list_school_students_by_cycle((int) $application['id'], $selectedCycleId) : [];
|
|
$metrics = $isApprovedSchool && $selectedCycleId > 0 ? school_student_metrics_by_cycle((int) $application['id'], $selectedCycleId) : [
|
|
'total' => 0,
|
|
'boys' => 0,
|
|
'girls' => 0,
|
|
'active' => 0,
|
|
'waiting' => 0,
|
|
'withdrawn' => 0,
|
|
];
|
|
|
|
$expectedCapacity = $application ? (int) ($application['expected_students'] ?? 0) : 0;
|
|
$remainingSeats = max(0, $expectedCapacity - $metrics['total']);
|
|
$pageTitle = $application ? 'تسجيل الطلاب: ' . (string) $application['center_name'] . ($selectedCycle ? ' — ' . $cycleLabel : '') : 'تسجيل الطلاب';
|
|
$pageDescription = 'صفحة مستقلة لتسجيل الطلاب وإدارة كشف المدرسة بعد الاعتماد، مع ربط كل البيانات بالدورة الموسمية النشطة أو المؤرشفة.';
|
|
$approvedSchoolUrl = $application ? school_page_url('approved_school.php', (int) $application['id'], $selectedCycleId) : 'approved_school.php';
|
|
$teachersUrl = $application ? school_page_url('teachers.php', (int) $application['id'], $selectedCycleId) : 'teachers.php';
|
|
$assessmentsUrl = $application ? school_page_url('assessments.php', (int) $application['id'], $selectedCycleId) : 'assessments.php';
|
|
$attendanceUrl = $application ? school_page_url('attendance.php', (int) $application['id'], $selectedCycleId) : 'attendance.php';
|
|
$applicationDetailUrl = $application ? 'application_detail.php?id=' . urlencode((string) $application['id']) : 'application_detail.php';
|
|
|
|
if (!$application) {
|
|
http_response_code(404);
|
|
}
|
|
|
|
render_page_start($pageTitle, 'approved', $pageDescription);
|
|
render_flash($flash);
|
|
?>
|
|
<section class="py-4 py-lg-5">
|
|
<div class="container-xxl">
|
|
<?php if (!$application): ?>
|
|
<div class="app-card text-center py-5">
|
|
<div class="empty-title mb-2">المدرسة غير موجودة</div>
|
|
<p class="text-muted mb-3">تحقق من رابط المدرسة أو ارجع إلى قائمة المراكز المعتمدة.</p>
|
|
<a class="btn btn-dark" href="applications.php?status=approved">المراكز المعتمدة</a>
|
|
</div>
|
|
<?php elseif (!$isApprovedSchool): ?>
|
|
<div class="page-banner mb-4 mb-lg-5">
|
|
<div class="row g-4 align-items-center">
|
|
<div class="col-lg-8">
|
|
<span class="eyebrow mb-3">التسجيل يبدأ بعد الاعتماد</span>
|
|
<h1 class="page-title mb-3"><?= e((string) $application['center_name']) ?></h1>
|
|
<p class="page-copy mb-3">هذه الصفحة جاهزة، لكن فتح سجل الطلاب مرتبط بتحويل حالة المركز إلى <strong>معتمد</strong> أولاً حتى يبقى التسلسل الإداري منظمًا.</p>
|
|
<div class="hero-meta">
|
|
<span>الحالة الحالية: <?= e(status_meta((string) $application['status'])['label']) ?></span>
|
|
<span>المدينة: <?= e((string) $application['city']) ?></span>
|
|
</div>
|
|
<div class="cta-stack mt-4">
|
|
<a class="btn btn-dark" href="<?= e($applicationDetailUrl) ?>">العودة لملف الاعتماد</a>
|
|
<a class="btn btn-outline-secondary" href="<?= e($approvedSchoolUrl) ?>">صفحة المركز</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="page-banner approved-hero mb-4 mb-lg-5">
|
|
<div class="row g-4 align-items-start">
|
|
<div class="col-lg-8">
|
|
<span class="approved-kicker mb-3">صفحة مستقلة لتسجيل الطلاب</span>
|
|
<h1 class="page-title mb-3">سجل الطلاب — <?= e((string) $application['center_name']) ?></h1>
|
|
<p class="page-copy mb-3">هذا هو أول موديول تشغيلي بعد اعتماد المدرسة. هنا يتم إدخال بيانات الطلاب في صفحة منفصلة وواضحة، مع كشف جاهز للمراجعة دون خلطه مع بقية وظائف المدرسة.</p>
|
|
<div class="hero-meta">
|
|
<span><?= e((string) $application['city']) ?></span>
|
|
<span>السعة المعتمدة <?= e((string) $expectedCapacity) ?> طالب</span>
|
|
<span>المقاعد المتبقية <?= e((string) $remainingSeats) ?></span>
|
|
</div>
|
|
<div class="cta-stack mt-4">
|
|
<a class="btn btn-dark" href="<?= e($approvedSchoolUrl) ?>">العودة لصفحة المركز</a>
|
|
<a class="btn btn-outline-secondary" href="<?= e($teachersUrl) ?>">فريق المعلمين</a>
|
|
<a class="btn btn-outline-secondary" href="<?= e($assessmentsUrl) ?>">التقييمات والأوزان</a>
|
|
<a class="btn btn-outline-secondary" href="<?= e($attendanceUrl) ?>">غياب الطلاب</a>
|
|
<a class="btn btn-outline-secondary" href="<?= e($applicationDetailUrl) ?>">ملف الاعتماد</a>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-4">
|
|
<div class="app-card approved-note h-100">
|
|
<div class="section-title mb-3">ملخص التسجيل</div>
|
|
<div class="launch-metrics">
|
|
<div class="launch-metric"><strong><?= e((string) $metrics['total']) ?></strong><span>إجمالي الطلاب</span></div>
|
|
<div class="launch-metric"><strong><?= e((string) $metrics['active']) ?></strong><span>طلاب مؤكدون</span></div>
|
|
<div class="launch-metric"><strong><?= e((string) $metrics['waiting']) ?></strong><span>قائمة الانتظار</span></div>
|
|
</div>
|
|
<div class="score-bar mt-3 mb-2"><span style="width: <?= e((string) ($expectedCapacity > 0 ? min(100, (int) round(($metrics['total'] / max(1, $expectedCapacity)) * 100)) : 0)) ?>%"></span></div>
|
|
<p class="capacity-note mb-0">تم شغل <?= e((string) $metrics['total']) ?> من أصل <?= e((string) $expectedCapacity) ?> مقعد متوقع حتى الآن.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if ($selectedCycle): ?>
|
|
<?php $cycleStatusMap = school_cycle_status_map(); ?>
|
|
<div class="row g-4 mb-4 align-items-start">
|
|
<div class="col-lg-7">
|
|
<div class="app-card h-100">
|
|
<div class="section-head mb-3">
|
|
<div>
|
|
<div class="section-title">الدورة الموسمية الحالية</div>
|
|
<div class="section-copy">كل بيانات هذه الصفحة مرتبطة الآن بالدورة <strong><?= e($cycleLabel) ?></strong>. عند انتهاء الموسم يمكنك أرشفتها من صفحة المركز والبدء بدورة جديدة بدون فقدان السجلات القديمة.</div>
|
|
</div>
|
|
<?= school_cycle_status_badge((string) $selectedCycle['status']) ?>
|
|
</div>
|
|
<div class="row g-3">
|
|
<div class="col-md-4"><div class="school-data-item"><strong>اسم الدورة</strong><span><?= e($cycleLabel) ?></span></div></div>
|
|
<div class="col-md-4"><div class="school-data-item"><strong>الفترة</strong><span><?= e((string) $selectedCycle['start_date']) ?> → <?= e((string) $selectedCycle['end_date']) ?></span></div></div>
|
|
<div class="col-md-4"><div class="school-data-item"><strong>عدد الدورات</strong><span><?= e((string) count($cycleContext['cycles'])) ?> دورة للمركز</span></div></div>
|
|
</div>
|
|
<div class="cta-stack mt-3">
|
|
<a class="btn btn-outline-secondary" href="<?= e($approvedSchoolUrl) ?>#cycles">إدارة الدورات الموسمية</a>
|
|
</div>
|
|
<?php if ($isCycleReadOnly): ?>
|
|
<div class="alert alert-warning mt-3 mb-0">هذه الدورة مؤرشفة حالياً، لذلك تبقى السجلات قابلة للمراجعة فقط بدون إضافة طلاب جدد.</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-5">
|
|
<div class="app-card sidebar-card h-100">
|
|
<div class="section-title mb-3">التبديل بين الدورات</div>
|
|
<p class="section-subtle mb-3">يمكنك فتح نفس صفحة الطلاب لأي موسم سابق أو حالي مباشرة من هنا بدون الرجوع إلى صفحة المركز.</p>
|
|
<div class="quick-link-stack">
|
|
<?php foreach ($cycleContext['cycles'] as $cycle): ?>
|
|
<?php
|
|
$isCurrentCycleLink = (int) $cycle['id'] === $selectedCycleId;
|
|
$isActiveCycleLink = (int) $cycle['id'] === (int) (($cycleContext['active']['id'] ?? 0));
|
|
$cycleStatusLabel = (string) ($cycleStatusMap[$cycle['status']]['label'] ?? 'غير معروف');
|
|
$cycleMetaLine = (string) $cycle['start_date'] . ' → ' . (string) $cycle['end_date'] . ' — ' . $cycleStatusLabel . ($isActiveCycleLink ? ' — النشطة حالياً' : '');
|
|
?>
|
|
<a class="quick-link-item <?= $isCurrentCycleLink ? 'is-current' : '' ?>" href="<?= e(school_page_url('students.php', (int) $application['id'], (int) $cycle['id'])) ?>">
|
|
<div>
|
|
<strong><?= e((string) $cycle['cycle_name']) ?><?= $isCurrentCycleLink ? ' — المعروضة الآن' : '' ?></strong>
|
|
<span><?= e($cycleMetaLine) ?></span>
|
|
</div>
|
|
</a>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="row g-4 align-items-start">
|
|
<div class="col-lg-4">
|
|
<div class="app-card sidebar-card mb-4">
|
|
<div class="section-head mb-3">
|
|
<div>
|
|
<div class="section-title">إضافة طالب جديد</div>
|
|
<div class="section-copy">نموذج مخصص للتسجيل فقط، مفصول عن صفحة المدرسة وعن بقية الوحدات.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if (!empty($errors['form'])): ?>
|
|
<div class="alert alert-danger mb-3"><?= e($errors['form']) ?></div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($isCycleReadOnly): ?>
|
|
<div class="alert alert-warning mb-0">هذه الدورة مؤرشفة. يمكنك مراجعة كشف الطلاب فقط، أو فتح دورة جديدة من صفحة المركز.</div>
|
|
<?php else: ?>
|
|
<form method="post" novalidate>
|
|
<div class="form-section-block mb-3">
|
|
<div class="form-section-heading">
|
|
<div>
|
|
<h2 class="form-section-title">الهوية التعليمية</h2>
|
|
<p class="form-section-copy">البيانات الأساسية التي تدخل مباشرة إلى كشف المدرسة.</p>
|
|
</div>
|
|
</div>
|
|
<div class="row g-3">
|
|
<div class="col-12">
|
|
<label class="form-label" for="student_code">الرقم / الكود</label>
|
|
<input class="form-control <?= isset($errors['student_code']) ? 'is-invalid' : '' ?>" id="student_code" name="student_code" value="<?= e($values['student_code']) ?>" placeholder="مثال: ST-401">
|
|
<?php if (isset($errors['student_code'])): ?><div class="invalid-feedback"><?= e($errors['student_code']) ?></div><?php endif; ?>
|
|
</div>
|
|
<div class="col-12">
|
|
<label class="form-label" for="full_name">اسم الطالب / الطالبة</label>
|
|
<input class="form-control <?= isset($errors['full_name']) ? 'is-invalid' : '' ?>" id="full_name" name="full_name" value="<?= e($values['full_name']) ?>" placeholder="الاسم الثلاثي">
|
|
<?php if (isset($errors['full_name'])): ?><div class="invalid-feedback"><?= e($errors['full_name']) ?></div><?php endif; ?>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label" for="gender">النوع</label>
|
|
<select class="form-select <?= isset($errors['gender']) ? 'is-invalid' : '' ?>" id="gender" name="gender">
|
|
<option value="">اختر</option>
|
|
<?php foreach (student_gender_options() as $option): ?>
|
|
<option value="<?= e($option) ?>" <?= $values['gender'] === $option ? 'selected' : '' ?>><?= e($option) ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
<?php if (isset($errors['gender'])): ?><div class="invalid-feedback"><?= e($errors['gender']) ?></div><?php endif; ?>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label" for="grade_level">الصف الدراسي</label>
|
|
<select class="form-select <?= isset($errors['grade_level']) ? 'is-invalid' : '' ?>" id="grade_level" name="grade_level">
|
|
<option value="">اختر</option>
|
|
<?php foreach (student_grade_options() as $option): ?>
|
|
<option value="<?= e($option) ?>" <?= $values['grade_level'] === $option ? 'selected' : '' ?>><?= e($option) ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
<?php if (isset($errors['grade_level'])): ?><div class="invalid-feedback"><?= e($errors['grade_level']) ?></div><?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-section-block mb-3">
|
|
<div class="form-section-heading">
|
|
<div>
|
|
<h2 class="form-section-title">ولي الأمر وحالة القيد</h2>
|
|
<p class="form-section-copy">تفاصيل التواصل والمتابعة قبل بداية الدوام.</p>
|
|
</div>
|
|
</div>
|
|
<div class="row g-3">
|
|
<div class="col-12">
|
|
<label class="form-label" for="guardian_name">اسم ولي الأمر</label>
|
|
<input class="form-control <?= isset($errors['guardian_name']) ? 'is-invalid' : '' ?>" id="guardian_name" name="guardian_name" value="<?= e($values['guardian_name']) ?>" placeholder="الاسم الكامل">
|
|
<?php if (isset($errors['guardian_name'])): ?><div class="invalid-feedback"><?= e($errors['guardian_name']) ?></div><?php endif; ?>
|
|
</div>
|
|
<div class="col-12">
|
|
<label class="form-label" for="guardian_phone">هاتف ولي الأمر</label>
|
|
<input class="form-control <?= isset($errors['guardian_phone']) ? 'is-invalid' : '' ?>" id="guardian_phone" name="guardian_phone" value="<?= e($values['guardian_phone']) ?>" placeholder="0500000000">
|
|
<?php if (isset($errors['guardian_phone'])): ?><div class="invalid-feedback"><?= e($errors['guardian_phone']) ?></div><?php endif; ?>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label" for="birth_date">تاريخ الميلاد</label>
|
|
<input type="date" class="form-control <?= isset($errors['birth_date']) ? 'is-invalid' : '' ?>" id="birth_date" name="birth_date" value="<?= e($values['birth_date']) ?>">
|
|
<?php if (isset($errors['birth_date'])): ?><div class="invalid-feedback"><?= e($errors['birth_date']) ?></div><?php endif; ?>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label" for="enrollment_status">حالة التسجيل</label>
|
|
<select class="form-select <?= isset($errors['enrollment_status']) ? 'is-invalid' : '' ?>" id="enrollment_status" name="enrollment_status">
|
|
<?php foreach (student_enrollment_status_map() as $key => $meta): ?>
|
|
<option value="<?= e($key) ?>" <?= $values['enrollment_status'] === $key ? 'selected' : '' ?>><?= e($meta['label']) ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
<?php if (isset($errors['enrollment_status'])): ?><div class="invalid-feedback"><?= e($errors['enrollment_status']) ?></div><?php endif; ?>
|
|
</div>
|
|
<div class="col-12">
|
|
<label class="form-label" for="notes">ملاحظات</label>
|
|
<textarea class="form-control" id="notes" name="notes" rows="4" placeholder="مثال: احتياج تعليمي، ملاحظة صحية، أو حالة انتظار."><?= e($values['notes']) ?></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-grid">
|
|
<button class="btn btn-dark" type="submit">حفظ الطالب</button>
|
|
</div>
|
|
</form>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<div class="app-card sidebar-card">
|
|
<div class="section-title mb-3">جاهزية بقية الوحدات</div>
|
|
<ul class="module-roadmap-list mb-0">
|
|
<li><strong>المعلمين</strong><span class="section-subtle">الصفحة أصبحت جاهزة الآن لإدارة الفريق التعليمي لهذا المركز.</span><div class="mt-2"><a class="btn btn-sm btn-outline-secondary" href="<?= e($teachersUrl) ?>">فتح صفحة المعلمين</a></div></li>
|
|
<li><strong>التقييمات والأوزان</strong><span class="section-subtle">الصفحة أصبحت جاهزة الآن لتعريف أنواع التقييم والمقاييس والأوزان.</span><div class="mt-2"><a class="btn btn-sm btn-outline-secondary" href="<?= e($assessmentsUrl) ?>">فتح صفحة التقييمات</a></div></li>
|
|
<li><strong>غياب الطلاب</strong><span class="section-subtle">الصفحة أصبحت جاهزة الآن لتسجيل الغياب اليومي، الأعذار، وحالات التأخر.</span><div class="mt-2"><a class="btn btn-sm btn-outline-secondary" href="<?= e($attendanceUrl) ?>">فتح صفحة الغياب</a></div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-8">
|
|
<div class="app-card mb-4">
|
|
<div class="section-head mb-3">
|
|
<div>
|
|
<div class="section-title">كشف المدرسة</div>
|
|
<div class="section-copy">الطلاب المسجلون حالياً في هذه المدرسة فقط.</div>
|
|
</div>
|
|
<span class="header-chip"><?= e((string) $metrics['boys']) ?> طلاب / <?= e((string) $metrics['girls']) ?> طالبات</span>
|
|
</div>
|
|
|
|
<div class="row g-3 mb-3">
|
|
<div class="col-md-4"><div class="school-data-item"><strong>إجمالي القيد</strong><span><?= e((string) $metrics['total']) ?> طالب</span></div></div>
|
|
<div class="col-md-4"><div class="school-data-item"><strong>حالات نشطة</strong><span><?= e((string) $metrics['active']) ?> طالب مؤكد</span></div></div>
|
|
<div class="col-md-4"><div class="school-data-item"><strong>مقاعد متاحة</strong><span><?= e((string) $remainingSeats) ?> مقعد متبقٍ</span></div></div>
|
|
</div>
|
|
|
|
<?php if ($students === []): ?>
|
|
<div class="empty-state text-center p-4">
|
|
<div class="empty-title mb-2">لا يوجد طلاب مسجلون بعد</div>
|
|
<p class="text-muted mb-0">ابدأ من نموذج التسجيل في الجانب الأيمن لإضافة أول طالب إلى كشف المدرسة.</p>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="table-responsive">
|
|
<table class="table app-table align-middle">
|
|
<thead>
|
|
<tr>
|
|
<th>الكود</th>
|
|
<th>الطالب</th>
|
|
<th>الصف</th>
|
|
<th>ولي الأمر</th>
|
|
<th>الهاتف</th>
|
|
<th>الحالة</th>
|
|
<th>التسجيل</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($students as $student): ?>
|
|
<tr>
|
|
<td><strong><?= e((string) $student['student_code']) ?></strong></td>
|
|
<td>
|
|
<strong><?= e((string) $student['full_name']) ?></strong>
|
|
<small><?= e((string) $student['gender']) ?></small>
|
|
</td>
|
|
<td><?= e((string) $student['grade_level']) ?></td>
|
|
<td>
|
|
<strong><?= e((string) $student['guardian_name']) ?></strong>
|
|
<?php if (!empty($student['notes'])): ?><small><?= e((string) $student['notes']) ?></small><?php endif; ?>
|
|
</td>
|
|
<td><?= e((string) $student['guardian_phone']) ?></td>
|
|
<td><?= student_enrollment_status_badge((string) $student['enrollment_status']) ?></td>
|
|
<td><?= e(substr((string) $student['created_at'], 0, 10)) ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<div class="app-card">
|
|
<div class="section-title mb-3">سياق المدرسة</div>
|
|
<div class="row g-3">
|
|
<div class="col-md-6"><div class="school-data-item"><strong>مدير المركز</strong><span><?= e((string) $application['director_name']) ?></span></div></div>
|
|
<div class="col-md-6"><div class="school-data-item"><strong>فترة التشغيل</strong><span><?= e((string) $application['start_date']) ?> — <?= e((string) $application['end_date']) ?></span></div></div>
|
|
<div class="col-md-6"><div class="school-data-item"><strong>الفئة المستهدفة</strong><span><?= e((string) $application['gender_scope']) ?></span></div></div>
|
|
<div class="col-md-6"><div class="school-data-item"><strong>البريد الرسمي</strong><span><?= e((string) $application['email']) ?></span></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</section>
|
|
<?php render_page_end(); ?>
|