Commit 791d1875 authored by Administrator's avatar Administrator

Update 1 files via Son of Anton

parent f322e121
...@@ -5,23 +5,42 @@ ...@@ -5,23 +5,42 @@
<form method="GET" action="/members" style="display:grid;grid-template-columns:1fr 1fr;gap:15px;"> <form method="GET" action="/members" style="display:grid;grid-template-columns:1fr 1fr;gap:15px;">
<div class="form-group" style="grid-column:1/-1;"> <div class="form-group" style="grid-column:1/-1;">
<label class="form-label">بحث شامل</label> <label class="form-label">بحث شامل</label>
<input type="text" name="q" class="form-input" placeholder="الاسم بالعربي، الرقم القومي، رقم العضوية، رقم المحمول، رقم الاستمارة..." style="font-size:16px;padding:12px;" autofocus> <input type="text" name="q" value="<?= e($query ?? '') ?>" class="form-input" placeholder="الاسم بالعربي، الرقم القومي، رقم العضوية، رقم المحمول، رقم الاستمارة..." style="font-size:16px;padding:12px;" autofocus>
</div> </div>
<div class="form-group"> <div style="grid-column:1/-1;">
<label class="form-label">الحالة</label> <button type="submit" class="btn btn-primary" style="padding:12px 30px;">🔍 بحث</button>
<select name="status" class="form-select"><option value="">الكل</option> <a href="/members" class="btn btn-outline">عرض كل الأعضاء</a>
<?php foreach ($statuses as $val => $label): ?><option value="<?= e($val) ?>"><?= e($label) ?></option><?php endforeach; ?>
</select>
</div> </div>
<div class="form-group">
<label class="form-label">الفرع</label>
<select name="branch_id" class="form-select"><option value="">الكل</option>
<?php foreach ($branches as $b): ?><option value="<?= (int) $b['id'] ?>"><?= e($b['name_ar']) ?></option><?php endforeach; ?>
</select>
</div>
<div class="form-group"><label class="form-label">من تاريخ</label><input type="date" name="date_from" class="form-input"></div>
<div class="form-group"><label class="form-label">إلى تاريخ</label><input type="date" name="date_to" class="form-input"></div>
<div style="grid-column:1/-1;"><button type="submit" class="btn btn-primary">بحث</button></div>
</form> </form>
</div> </div>
<?php if (!empty($results)): ?>
<div class="card" style="margin-top:20px;">
<div style="padding:15px 20px;border-bottom:1px solid #E5E7EB;">
<h3 style="margin:0;color:#0D7377;">نتائج البحث (<?= count($results) ?>)</h3>
</div>
<div class="table-responsive">
<table class="data-table">
<thead><tr><th>رقم العضوية</th><th>الاسم</th><th>الرقم القومي</th><th>الهاتف</th><th>الفرع</th><th>الحالة</th><th>الإجراءات</th></tr></thead>
<tbody>
<?php foreach ($results as $m): ?>
<tr>
<td style="font-weight:600;"><?= e($m['membership_number'] ?? '—') ?></td>
<td><a href="/members/<?= (int) $m['id'] ?>" style="color:#0D7377;font-weight:600;"><?= e($m['full_name_ar']) ?></a></td>
<td style="direction:ltr;text-align:right;font-size:13px;"><?= e($m['national_id'] ?? '—') ?></td>
<td style="direction:ltr;text-align:right;font-size:13px;"><?= e($m['phone_mobile'] ?? '—') ?></td>
<td style="font-size:13px;"><?= e($m['branch_name'] ?? '—') ?></td>
<td style="font-size:13px;font-weight:600;"><?= e($m['status'] ?? '—') ?></td>
<td><a href="/members/<?= (int) $m['id'] ?>" class="btn btn-sm btn-outline">عرض</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<?php elseif (($query ?? '') !== ''): ?>
<div class="card" style="margin-top:20px;padding:40px;text-align:center;color:#6B7280;">
لا توجد نتائج لـ "<?= e($query) ?>"
</div>
<?php endif; ?>
<?php $__template->endSection(); ?> <?php $__template->endSection(); ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment