mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-17 04:03:05 +02:00
Stage 6 has been completed, and some classes have been merged into one
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?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'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user