-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrash-loader.php
37 lines (35 loc) · 1.82 KB
/
trash-loader.php
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
<?php
require "config/global.php";
$user_id = $_SESSION['user_id']; // Assuming user_id is stored in session
// Fetch updated ads for the user
$ads = Ad::get_ads_by_user_id($user_id,"trash");
// Generate HTML for the ads
foreach ($ads as $ad) {
$image = $ad['images'][0];
$id = $ad['id'];
?>
<div class="col-md-12 col-sm-12 col-md-12">
<div class="singles-dashboard-list">
<div class="sd-list-left">
<img src="<?= $image['path'] ?>" class="img-fluid" alt="" />
</div>
<div class="sd-list-right">
<h4 class="listing_dashboard_title"><a href="#" class="text-primary"><?= $ad['title'] ?></a></h4>
<div class="user_dashboard_listed">
Price: from <?= CustomOperations::price($ad['price']) ?> month
</div>
<div class="user_dashboard_listed">
City: <a href="javascript:void(0);" class="text-primary"><?= Ad::get_ad_meta($id, 'city') ?></a> , Area: <?= Ad::get_ad_meta($id, 'area') ?>
</div>
<div class="action">
<a href="" data-bs-toggle="tooltip" data-bs-placement="top" title="Edit"><i class="fa-solid fa-pen-to-square"></i></a>
<a href="property.php?slug=<?= $ad['slug'] ?>" data-bs-toggle="tooltip" data-bs-placement="top" title="202 User View"><i class="fa-regular fa-eye"></i></a>
<a href="#" data-id="<?= $ad['id'] ?>" data-bs-toggle="tooltip" data-bs-placement="top" title="Delete Property" class="delete"><i class="fa-regular fa-circle-xmark"></i></a>
<a href="#" data-bs-toggle="tooltip" data-bs-placement="top" title="Make Featured" class="delete"><i class="fa-solid fa-star"></i></a>
</div>
</div>
</div>
</div>
<?php
}
?>