2022-08-20 21:07:54 +03:00
|
|
|
|
{extends "../@layout.xml"}
|
2023-08-11 16:50:19 +03:00
|
|
|
|
{var $canReport = $owner->getId() !== $thisUser->getId()}
|
2022-08-20 21:07:54 +03:00
|
|
|
|
|
|
|
|
|
{block title}
|
|
|
|
|
{$name}
|
|
|
|
|
{/block}
|
|
|
|
|
|
|
|
|
|
{block header}
|
|
|
|
|
{$name}
|
2023-08-11 16:50:19 +03:00
|
|
|
|
<a style="float: right;" onClick="reportApp()" n:if="$canReport ?? false">Пожаловаться</a>
|
2022-08-20 21:07:54 +03:00
|
|
|
|
{/block}
|
|
|
|
|
|
|
|
|
|
{block content}
|
|
|
|
|
<center>
|
|
|
|
|
<iframe id="appFrame" referrerpolicy="unsafe-url" sandbox="allow-scripts" frameBorder="0" src="{$url}" height="600" width="600"></iframe>
|
|
|
|
|
</center>
|
|
|
|
|
|
|
|
|
|
<div n:if="!is_null($news)" id="news">
|
|
|
|
|
<h4>{$news->getName()}</h4>
|
|
|
|
|
<div id="app_news_container">
|
|
|
|
|
{$news->getText()|noescape}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<center>
|
|
|
|
|
<p>
|
|
|
|
|
{_app_dev}: <a href="{$owner->getURL()}">{$owner->getFullName()}</a>
|
|
|
|
|
</p>
|
|
|
|
|
</center>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
window.appId = {$id};
|
|
|
|
|
window.appTitle = {$name};
|
|
|
|
|
window.appPerms = {$perms};
|
|
|
|
|
window.appOrigin = {$origin};
|
|
|
|
|
</script>
|
|
|
|
|
|
2023-08-11 16:50:19 +03:00
|
|
|
|
<script n:if="$canReport ?? false">
|
|
|
|
|
function reportApp() {
|
|
|
|
|
uReportMsgTxt = "Вы собираетесь пожаловаться на данное приложение.";
|
|
|
|
|
uReportMsgTxt += "<br/>Что именно вам кажется недопустимым в этом материале?";
|
|
|
|
|
uReportMsgTxt += "<br/><br/><b>Причина жалобы</b>: <input type='text' id='uReportMsgInput' placeholder='Причина' />"
|
|
|
|
|
|
|
|
|
|
MessageBox("Пожаловаться?", uReportMsgTxt, ["Подтвердить", "Отмена"], [
|
|
|
|
|
(function() {
|
|
|
|
|
res = document.querySelector("#uReportMsgInput").value;
|
|
|
|
|
xhr = new XMLHttpRequest();
|
|
|
|
|
xhr.open("GET", "/report/" + {$id} + "?reason=" + res + "&type=app", true);
|
|
|
|
|
xhr.onload = (function() {
|
|
|
|
|
if(xhr.responseText.indexOf("reason") === -1)
|
|
|
|
|
MessageBox("Ошибка", "Не удалось подать жалобу...", ["OK"], [Function.noop]);
|
|
|
|
|
else
|
|
|
|
|
MessageBox("Операция успешна", "Скоро её рассмотрят модераторы", ["OK"], [Function.noop]);
|
|
|
|
|
});
|
|
|
|
|
xhr.send(null);
|
|
|
|
|
}),
|
|
|
|
|
Function.noop
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2022-08-20 21:07:54 +03:00
|
|
|
|
{script "js/al_games.js"}
|
|
|
|
|
{/block}
|