Файл: Arhmobi_esdcms/dpanel/admin_chat/actions.php
Строк: 35
<?php
include_once '../../sys/inc/start.php';
$doc = new document(2);
$doc->title = __('Действия');
if (!isset($_GET ['id']) || !is_numeric($_GET ['id'])) {
$doc->toReturn('./');
$doc->err(__('Ошибка выбора сообщения'));
exit();
}
$id_message = (int) $_GET ['id'];
$q = $db->prepare("SELECT * FROM `admin_chat` WHERE `id` = ? LIMIT 1");
$q->execute(Array($id_message));
if (!$message = $q->fetch()) {
$doc->toReturn('./');
$doc->err(__('Сообщение не найдено'));
exit();
}
$listing = new listing;
$ank = new user($message['id_user']);
$post = $listing->post();
$post->title = $ank->nick();
$post->content = text::toOutput($message['message']);
$post->time = misc::when($message['time']);
$post = $listing->post();
$post->title = __('Посмотреть анкету');
$post->icon('ank_view');
$post->url = '/profile.view.php?id=' . $ank->id;
if ($user->group) {
$post = $listing->post();
$post->title = __('Ответить');
$post->icon('reply');
$post->url = 'index.php?message=' . $id_message . '&reply';
$post = $listing->post();
$post->title = __('Цитировать');
$post->icon('quote');
$post->url = 'index.php?message=' . $id_message . '&quote';
}
$post = $listing->post();
$post->title = __('Удалить сообщение');
$post->icon('delete');
$post->url = 'message.delete.php?id=' . $id_message;
$listing->display();
$doc->ret(__('Админка'), './?');
?>