inbound update
This commit is contained in:
parent
85c1b9dd67
commit
9e429aea35
@ -264,11 +264,11 @@ if (isset($_GET['id'])) {
|
|||||||
<td class="text-center pe-4">
|
<td class="text-center pe-4">
|
||||||
<div class="btn-group shadow-sm rounded">
|
<div class="btn-group shadow-sm rounded">
|
||||||
<a href="view_mail.php?id=<?= $mail['id'] ?>&type=inbound" class="btn btn-sm btn-white text-primary border" title="عرض">
|
<a href="view_mail.php?id=<?= $mail['id'] ?>&type=inbound" class="btn btn-sm btn-white text-primary border" title="عرض">
|
||||||
<a href="print_inbound.php?id=<?= $mail['id' ?>" target="_blank" class="btn btn-sm btn-white text-secondary border" title="طباعة">
|
|
||||||
<i class="fas fa-print"></i>
|
|
||||||
</a>
|
|
||||||
<i class="fas fa-eye"></i>
|
<i class="fas fa-eye"></i>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="print_inbound.php?id=<?= $mail['id'] ?>" target="_blank" class="btn btn-sm btn-white text-secondary border" title="طباعة">
|
||||||
|
<i class="fas fa-print"></i>
|
||||||
|
</a>
|
||||||
<?php if (canEdit('inbound')): ?>
|
<?php if (canEdit('inbound')): ?>
|
||||||
<button class="btn btn-sm btn-white text-warning border" onclick='openMailModal("edit", <?= json_encode($mail) ?>)' title="تعديل">
|
<button class="btn btn-sm btn-white text-warning border" onclick='openMailModal("edit", <?= json_encode($mail) ?>)' title="تعديل">
|
||||||
<i class="fas fa-edit"></i>
|
<i class="fas fa-edit"></i>
|
||||||
|
|||||||
@ -110,7 +110,7 @@ function getStatusBadgeInternal($mail) {
|
|||||||
<tbody>
|
<tbody>
|
||||||
<?php if ($messages): ?>
|
<?php if ($messages): ?>
|
||||||
<?php foreach ($messages as $msg): ?>
|
<?php foreach ($messages as $msg): ?>
|
||||||
<tr style="cursor: pointer;" onclick="window.location='view_mail.php?id=<?= $msg['id'] ?>'">
|
<tr style="cursor: pointer;" onclick="window.location='view_mail.php?id=<?= $msg['id'] ?>&type=internal'">
|
||||||
<td class="ps-4">
|
<td class="ps-4">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<?php if ($msg['sender_image']): ?>
|
<?php if ($msg['sender_image']): ?>
|
||||||
@ -141,7 +141,7 @@ function getStatusBadgeInternal($mail) {
|
|||||||
</td>
|
</td>
|
||||||
<td><?= getStatusBadgeInternal($msg) ?></td>
|
<td><?= getStatusBadgeInternal($msg) ?></td>
|
||||||
<td class="pe-4 text-center">
|
<td class="pe-4 text-center">
|
||||||
<a href="view_mail.php?id=<?= $msg['id'] ?>" class="btn btn-sm btn-light rounded-pill px-3">عرض</a>
|
<a href="view_mail.php?id=<?= $msg['id'] ?>&type=internal" class="btn btn-sm btn-light rounded-pill px-3">عرض</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|||||||
@ -212,7 +212,7 @@ function getStatusBadgeInternal($mail) {
|
|||||||
<tbody>
|
<tbody>
|
||||||
<?php if ($messages): ?>
|
<?php if ($messages): ?>
|
||||||
<?php foreach ($messages as $msg): ?>
|
<?php foreach ($messages as $msg): ?>
|
||||||
<tr style="cursor: pointer;" onclick="window.location='view_mail.php?id=<?= $msg['id'] ?>'">
|
<tr style="cursor: pointer;" onclick="window.location='view_mail.php?id=<?= $msg['id'] ?>&type=internal'">
|
||||||
<td class="ps-4">
|
<td class="ps-4">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<?php if ($msg['recipient_image']): ?>
|
<?php if ($msg['recipient_image']): ?>
|
||||||
@ -243,7 +243,7 @@ function getStatusBadgeInternal($mail) {
|
|||||||
</td>
|
</td>
|
||||||
<td><?= getStatusBadgeInternal($msg) ?></td>
|
<td><?= getStatusBadgeInternal($msg) ?></td>
|
||||||
<td class="pe-4 text-center">
|
<td class="pe-4 text-center">
|
||||||
<a href="view_mail.php?id=<?= $msg['id'] ?>" class="btn btn-sm btn-light rounded-pill px-3">عرض</a>
|
<a href="view_mail.php?id=<?= $msg['id'] ?>&type=internal" class="btn btn-sm btn-light rounded-pill px-3">عرض</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|||||||
@ -20,7 +20,7 @@ function canView($page) {
|
|||||||
return $_SESSION['permissions'][$page]['view'] ?? false;
|
return $_SESSION['permissions'][$page]['view'] ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!canView('outbound')) {
|
if (!canView('inbound')) {
|
||||||
die('Unauthorized access');
|
die('Unauthorized access');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ if (!$id) {
|
|||||||
die('Invalid ID');
|
die('Invalid ID');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch outbound mail details
|
// Fetch inbound mail details
|
||||||
$stmt = db()->prepare("SELECT * FROM inbound_mail WHERE id = ?");
|
$stmt = db()->prepare("SELECT * FROM inbound_mail WHERE id = ?");
|
||||||
$stmt->execute([$id]);
|
$stmt->execute([$id]);
|
||||||
$mail = $stmt->fetch();
|
$mail = $stmt->fetch();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user