-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutine.php
More file actions
111 lines (107 loc) · 3.8 KB
/
routine.php
File metadata and controls
111 lines (107 loc) · 3.8 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
$page_title = 'রুটিন - Apex Model School';
include 'header.php';
?>
<style>
.page-content {
background-color: #f5f5f5;
padding: 40px 0;
width: 85%;
margin: auto;
border-radius: 15px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.page-title { color: #333; font-weight: 700; font-size: 2rem; margin-bottom: 10px; text-align: center; }
.page-subtitle { color: #666; text-align: center; margin-bottom: 30px; font-size: 1.1rem; }
.table-container {
background: white;
border-radius: 12px;
padding: 30px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
margin-bottom: 40px;
}
.table {
margin: 0;
}
.table thead {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.table thead th {
border: none;
padding: 15px;
font-weight: 600;
text-align: center;
}
.table tbody td {
padding: 12px 15px;
border-bottom: 1px solid #e0e0e0;
text-align: center;
vertical-align: middle;
}
.table tbody tr:hover {
background-color: #f9f9f9;
}
.no-data {
text-align: center;
padding: 60px 20px;
color: #999;
}
.no-data i {
font-size: 48px;
display: block;
margin-bottom: 15px;
color: #ddd;
}
</style>
<div class="page-content">
<div class="container" style=" max-width: 1050px;">
<h1 class="page-title">রুটিন</h1>
<p class="page-subtitle">স্কুলের সময়সূচী ও ক্লাস রুটিন</p>
<div class="table-container">
<table class="table table-striped">
<thead>
<tr>
<th style="width: 15%;">ফাইল</th>
<th style="width: 35%;">নাম</th>
<th style="width: 20%;">তারিখ</th>
<th style="width: 30%;">অ্যাকশন</th>
</tr>
</thead>
<tbody>
<?php
$result = $conn->query("SELECT * FROM routine_files ORDER BY uploaded_date DESC");
if ($result && $result->num_rows > 0) {
while ($file = $result->fetch_assoc()) {
$ext = strtolower(pathinfo($file['filename'], PATHINFO_EXTENSION));
$icon = ($ext == 'pdf') ? 'fa-file-pdf' : (in_array($ext, ['jpg', 'jpeg', 'png']) ? 'fa-image' : 'fa-file');
?>
<tr>
<td><i class="fas <?= $icon ?>" style="font-size: 1.5rem; color: #667eea;"></i></td>
<td><strong><?= htmlspecialchars($file['title']) ?></strong></td>
<td><?= date('d M Y', strtotime($file['uploaded_date'])) ?></td>
<td>
<a href="download_file.php?id=<?= $file['id'] ?>&type=routine" class="btn-download">
<i class="fas fa-download"></i> ডাউনলোড
</a>
</td>
</tr>
<?php
}
} else {
?>
<tr>
<td colspan="4" class="no-data">
<i class="fas fa-inbox"></i>
<p>রুটিন উপলব্ধ নেই</p>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<?php include 'footer.php'; ?>