-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudents.php
More file actions
60 lines (53 loc) · 2.27 KB
/
Copy pathstudents.php
File metadata and controls
60 lines (53 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>الطلاب المسجلين</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>عرض الطلاب المسجلين</h1>
<p class="subtitle">جميع الطلاب الذين تم تسجيلهم في النظام</p>
<div class="table-box">
<table>
<thead>
<tr>
<th>اسم الطالب</th>
<th>البريد الإلكتروني</th>
<th>رقم الطالب</th>
<th>السنة الدراسي</th>
<th>اسم الدفعة</th>
</tr>
</thead>
<tbody>
<?php
$file = "students.txt";
if (file_exists($file) && filesize($file) > 0) {
$students = file($file, FILE_IGNORE_NEW_LINES);
foreach ($students as $student) {
$data = explode("|", $student);
if (count($data) == 5) {
echo "<tr>";
echo "<td>" . htmlspecialchars($data[0]) . "</td>";
echo "<td>" . htmlspecialchars($data[1]) . "</td>";
echo "<td>" . htmlspecialchars($data[2]) . "</td>";
echo "<td>" . htmlspecialchars($data[3]) . "</td>";
echo "<td>" . htmlspecialchars($data[4]) . "</td>";
echo "</tr>";
}
}
} else {
echo "<tr><td colspan='5'>لا يوجد طلاب مسجلون حتى الآن</td></tr>";
}
?>
</tbody>
</table>
</div>
<div class="links">
<a href="index.html">العودة إلى نموذج التسجيل</a>
</div>
</div>
</body>
</html>