Files
XC_VM/src/public/Controllers/Admin/TicketViewController.php
T
Divarion-D 738973c5db docs(php): add standardized file headers across codebase
- Add @author, @copyright, @link, @version, @license to 399 PHP files
- MERGE mode: inject metadata into 243 existing docblocks (preserving docs)
- INSERT mode: create new docblocks for 156 files without headers
- Skip 3 files that already had correct headers
- Exclude third-party libs (TMDb, mobiledetect, Dropbox, etc.)
- Exclude bin/, ministra/, content/, tmp/, resources/, module views
- Update tools/add_headers.php to v2 with MERGE strategy
2026-04-05 22:38:36 +03:00

35 lines
1.0 KiB
PHP

<?php
/**
* Контроллер просмотра тикета (admin/ticket_view.php)
*
* @package XC_VM_Public_Controllers_Admin
* @author Divarion_D <https://github.com/Divarion-D>
* @copyright 2025-2026 Vateron Media
* @link https://github.com/Vateron-Media/XC_VM
* @license AGPL-3.0 https://www.gnu.org/licenses/agpl-3.0.html
*/
class TicketViewController extends BaseAdminController {
public function index() {
global $db, $rUserInfo;
$this->requirePermission();
$rTicketInfo = null;
if (isset(RequestManager::getAll()['id'])) {
$rTicketInfo = getTicket(RequestManager::getAll()['id']);
}
if (!$rTicketInfo) {
$this->redirect('tickets');
return;
}
if ($rUserInfo['id'] != $rTicketInfo['member_id']) {
$db->query('UPDATE `tickets` SET `admin_read` = 1 WHERE `id` = ?;', RequestManager::getAll()['id']);
}
$this->setTitle('View Ticket');
$this->render('ticket_view', compact('rTicketInfo'));
}
}