-
Notifications
You must be signed in to change notification settings - Fork 0
/
gelen-mesajlar.php
117 lines (75 loc) · 4.16 KB
/
gelen-mesajlar.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
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
112
113
114
115
116
<?php
require_once 'header.php';
islemkontrol();
?>
<div class="pagination-area bg-secondary">
<div class="container">
<div class="pagination-wrapper">
</div>
</div>
</div>
<div class="settings-page-area bg-secondary section-space-bottom">
<div class="container">
<div class="row settings-wrapper">
<?php require_once 'hesap-sidebar.php' ?>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12">
<div class="settings-details tab-content">
<div class="tab-pane fade active in" id="Personal">
<h2 class="title-section">Gelen Mesajlar</h2>
<div class="personal-info inner-page-padding">
<table class="table table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Mesaj Tarihi</th>
<th scope="col">Gönderen</th>
<th scope="col">Durum</th>
<th scope="col">Detay</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
$mesajsor = $db->prepare("SELECT mesaj.*,kullanici.* FROM mesaj INNER JOIN kullanici ON mesaj.kullanici_gon=kullanici.kullanici_id where mesaj.kullanici_gel=:id order by mesaj_okunma,mesaj_zaman DESC");
$mesajsor->execute(array(
'id' => $_SESSION['userkullanici_id']
));
$say = 0;
while ($mesajcek = $mesajsor->fetch(PDO::FETCH_ASSOC)) {
$say++;
$kullanici_gon = $mesajcek['kullanici_gon'];
?>
<tr>
<th scope="row"><?php echo $say ?></th>
<td><?php echo $mesajcek['mesaj_zaman'] ?></td>
<td><?php echo $mesajcek['kullanici_ad'] . " " . $mesajcek['kullanici_soyad'] ?></td>
<td>
<?php
if ($mesajcek['mesaj_okunma'] == 0) { ?>
<i style="color:green" class="fa fa-circle" aria-hidden="true">
<?php } else { ?>
<i class="fa fa-circle" aria-hidden="true">
<?php }
?>
</td>
<td>
<a href="mesaj-detay?mesaj_id=<?php echo $mesajcek['mesaj_id'] ?>&kullanici_gon=<?php echo $mesajcek['kullanici_gon'] ?>">
<button class="btn btn-primary btn-xs">Mesajı Oku</button>
</a></td>
<td>
<a onclick="return confirm('Bu mesajı silmek istiyormusunuz? \n İşlem geri alınamaz...')"
href="nedmin/netting/kullanici.php?gelenmesajsil=ok&mesaj_id=<?php echo $mesajcek['mesaj_id'] ?>">
<button class="btn btn-danger btn-xs">Sil</button>
</a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php require_once 'footer.php'; ?>