mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-17 04:03:05 +02:00
30 lines
860 B
PHP
30 lines
860 B
PHP
<?php
|
|||
|
|
/**
|
||
|
|
* XC_VM — Контроллер просмотра тикета (admin/ticket_view.php)
|
||
|
|
*/
|
||
|
|
namespace App\Http\Controllers\Admin;
|
||
|
|
|
||
|
|
class TicketViewController extends BaseAdminController {
|
||
|
|
public function index() {
|
||
|
|
global $db, $rUserInfo;
|
||
|
|
|
||
|
|
$this->requirePermission();
|
||
|
|
|
||
|
|
$rTicketInfo = null;
|
||
|
|
if (isset(\CoreUtilities::$rRequest['id'])) {
|
||
|
|
$rTicketInfo = getTicket(\CoreUtilities::$rRequest['id']);
|
||
|
|
}
|
||
|
|
if (!$rTicketInfo) {
|
||
|
|
$this->redirect('tickets');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
if ($rUserInfo['id'] != $rTicketInfo['member_id']) {
|
||
|
|
$db->query('UPDATE `tickets` SET `admin_read` = 1 WHERE `id` = ?;', \CoreUtilities::$rRequest['id']);
|
||
|
|
}
|
||
|
|
|
||
|
|
$this->setTitle('View Ticket');
|
||
|
|
$this->render('ticket_view', compact('rTicketInfo'));
|
||
|
|
}
|
||
|
|
}
|