/
var
/
www
/
vhosts
/
m-auto.co
/
httpdocs
/
admin
/
/var/www/vhosts/m-auto.co/httpdocs/admin
mkdir
upload
Name
Size
Mode
Actions
assets/
-
0755
rm
includes/
-
0755
rm
7-6-2026.zip
10206
0644
edit
dl
rm
about_edit.php
3899
0644
edit
dl
rm
about_process.php
1367
0644
edit
dl
rm
auth.php
684
0644
edit
dl
rm
bookings.php
5367
0644
edit
dl
rm
booking_delete.php
924
0644
edit
dl
rm
branches.php
2470
0644
edit
dl
rm
branch_delete.php
1290
0644
edit
dl
rm
branch_form.php
4694
0644
edit
dl
rm
branch_process.php
1233
0644
edit
dl
rm
brands.php
2578
0644
edit
dl
rm
brand_delete.php
1327
0644
edit
dl
rm
brand_form.php
2369
0644
edit
dl
rm
brand_process.php
1660
0644
edit
dl
rm
cars.php
6946
0644
edit
dl
rm
car_delete.php
2886
0644
edit
dl
rm
car_form.php
40348
0644
edit
dl
rm
car_image_actions.php
5142
0644
edit
dl
rm
car_process.php
10426
0644
edit
dl
rm
categories.php
2167
0644
edit
dl
rm
category_delete.php
746
0644
edit
dl
rm
category_form.php
1607
0644
edit
dl
rm
category_process.php
943
0644
edit
dl
rm
dashboard.php
4965
0644
edit
dl
rm
index.php
2713
0644
edit
dl
rm
login_process.php
1532
0644
edit
dl
rm
logout.php
100
0644
edit
dl
rm
news.php
3448
0644
edit
dl
rm
news_delete.php
771
0644
edit
dl
rm
news_form.php
6769
0644
edit
dl
rm
news_process.php
2527
0644
edit
dl
rm
offers.php
2810
0644
edit
dl
rm
offer_delete.php
1327
0644
edit
dl
rm
offer_form.php
4573
0644
edit
dl
rm
offer_process.php
2115
0644
edit
dl
rm
settings.php
5217
0644
edit
dl
rm
settings_process.php
692
0644
edit
dl
rm
slider.php
3529
0644
edit
dl
rm
slider_delete.php
1345
0644
edit
dl
rm
slider_form.php
4529
0644
edit
dl
rm
slider_process.php
1983
0644
edit
dl
rm
themes.php
4703
0644
edit
dl
rm
theme_delete.php
1332
0644
edit
dl
rm
theme_form.php
1522
0644
edit
dl
rm
theme_process.php
1785
0644
edit
dl
rm
users.php
4480
0644
edit
dl
rm
user_delete.php
1055
0644
edit
dl
rm
user_form.php
5463
0644
edit
dl
rm
user_process.php
3193
0644
edit
dl
rm
videos.php
4942
0644
edit
dl
rm
video_delete.php
1717
0644
edit
dl
rm
video_form.php
7181
0644
edit
dl
rm
video_process.php
3336
0644
edit
dl
rm
Edit:
/var/www/vhosts/m-auto.co/httpdocs/admin/news.php
(3448B)
<?php include 'auth.php'; require_permission('news_view'); include 'includes/header.php'; ?> <?php // Fetch all news articles $result = $conn->query("SELECT * FROM news ORDER BY created_at DESC"); $news_articles = $result->fetch_all(MYSQLI_ASSOC); ?> <div class="row"> <div class="col-12"> <div class="d-flex justify-content-between align-items-center mb-4"> <h2 class="fs-3">إدارة الأخبار</h2> <a href="news_form.php" class="btn btn-primary"> <i class="fas fa-plus me-2"></i>إضافة خبر جديد </a> </div> <div class="glass-card p-4"> <?php if (count($news_articles) > 0): ?> <div class="table-responsive"> <table class="table table-dark table-hover"> <thead> <tr> <th scope="col">#</th> <th scope="col">العنوان</th> <th scope="col">تاريخ الإنشاء</th> <th scope="col">الإجراءات</th> </tr> </thead> <tbody> <?php foreach ($news_articles as $article): ?> <tr> <td><?php echo $article['id']; ?></td> <td> <?php echo htmlspecialchars($article['title']); ?> <?php if (!empty($article['video_type']) && $article['video_type'] !== 'none'): ?> <span class="badge bg-primary ms-2" title="يحتوي على فيديو"> <i class="fas fa-video"></i> </span> <?php endif; ?> </td> <td><?php echo date('d/m/Y H:i', strtotime($article['created_at'])); ?></td> <td> <a href="news_form.php?id=<?php echo $article['id']; ?>" class="btn btn-sm btn-warning me-2"> <i class="fas fa-edit"></i> تعديل </a> <a href="news_delete.php?id=<?php echo $article['id']; ?>" class="btn btn-sm btn-danger" onclick="return confirm('هل أنت متأكد من حذف هذا الخبر؟')"> <i class="fas fa-trash"></i> حذف </a> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <?php else: ?> <div class="text-center py-5"> <i class="fas fa-newspaper fa-3x text-muted mb-3"></i> <h4 class="text-muted">لا توجد أخبار حالياً</h4> <p class="text-muted">ابدأ بإضافة أول خبر</p> <a href="news_form.php" class="btn btn-primary"> <i class="fas fa-plus me-2"></i>إضافة خبر جديد </a> </div> <?php endif; ?> </div> </div> </div> <?php include 'includes/footer.php'; ?>
Save
query("SELECT * FROM news ORDER BY created_at DESC"); $news_articles = $result->fetch_all(MYSQLI_ASSOC); ?>
إدارة الأخبار
إضافة خبر جديد
0): ?>
#
العنوان
تاريخ الإنشاء
الإجراءات
تعديل
حذف
لا توجد أخبار حالياً
ابدأ بإضافة أول خبر
إضافة خبر جديد