Add more shielding to templates

This commit is contained in:
Visman 2021-03-11 19:20:14 +07:00
parent b3c0c2d728
commit 07e080cefe
12 changed files with 48 additions and 48 deletions

View file

@ -9,7 +9,7 @@
<li>
<a href="{{ $cur[1] }}">{{ $cur[0] }}</a>
@if ($cur[2])
<a class="f-btn" href="{{ $cur[2] }}" title="{!! __('Delete link') !!}">{!! __('Delete link') !!}</a>
<a class="f-btn" href="{{ $cur[2] }}" title="{{ __('Delete link') }}">{!! __('Delete link') !!}</a>
@endif
</li>
@endforeach

View file

@ -20,19 +20,19 @@
@foreach ($p->logsInfo as $hash => $cur)
<li class="f-lgli">
<span class="f-lgname f-lgsname">
<a class="f-lganame" href="{{ $cur['linkView'] }}" title="{!! __('View log %s', $cur['log_name']) !!}">{{ $cur['log_name'] }}</a>
<a class="f-lganame" href="{{ $cur['linkView'] }}" title="{{ __('View log %s', $cur['log_name']) }}">{{ $cur['log_name'] }}</a>
</span>
<span class="f-llv @if ($cur['emergency']) f-llvem @endif" title="{!! __('Level emergency') !!}"><span>{{ num($cur['emergency']) }}</span></span>
<span class="f-llv @if ($cur['alert']) f-llval @endif" title="{!! __('Level alert') !!}"><span>{{ num($cur['alert']) }}</span></span>
<span class="f-llv @if ($cur['critical']) f-llvcr @endif" title="{!! __('Level critical') !!}"><span>{{ num($cur['critical']) }}</span></span>
<span class="f-llv @if ($cur['error']) f-llver @endif" title="{!! __('Level error') !!}"><span>{{ num($cur['error']) }}</span></span>
<span class="f-llv @if ($cur['warning']) f-llvwa @endif" title="{!! __('Level warning') !!}"><span>{{ num($cur['warning']) }}</span></span>
<span class="f-llv @if ($cur['notice']) f-llvno @endif" title="{!! __('Level notice') !!}"><span>{{ num($cur['notice']) }}</span></span>
<span class="f-llv @if ($cur['info']) f-llvin @endif" title="{!! __('Level info') !!}"><span>{{ num($cur['info']) }}</span></span>
<span class="f-llv @if ($cur['debug']) f-llvde @endif" title="{!! __('Level debug') !!}"><span>{{ num($cur['debug']) }}</span></span>
<span class="f-llv @if ($cur['emergency']) f-llvem @endif" title="{{ __('Level emergency') }}"><span>{{ num($cur['emergency']) }}</span></span>
<span class="f-llv @if ($cur['alert']) f-llval @endif" title="{{ __('Level alert') }}"><span>{{ num($cur['alert']) }}</span></span>
<span class="f-llv @if ($cur['critical']) f-llvcr @endif" title="{{ __('Level critical') }}"><span>{{ num($cur['critical']) }}</span></span>
<span class="f-llv @if ($cur['error']) f-llver @endif" title="{{ __('Level error') }}"><span>{{ num($cur['error']) }}</span></span>
<span class="f-llv @if ($cur['warning']) f-llvwa @endif" title="{{ __('Level warning') }}"><span>{{ num($cur['warning']) }}</span></span>
<span class="f-llv @if ($cur['notice']) f-llvno @endif" title="{{ __('Level notice') }}"><span>{{ num($cur['notice']) }}</span></span>
<span class="f-llv @if ($cur['info']) f-llvin @endif" title="{{ __('Level info') }}"><span>{{ num($cur['info']) }}</span></span>
<span class="f-llv @if ($cur['debug']) f-llvde @endif" title="{{ __('Level debug') }}"><span>{{ num($cur['debug']) }}</span></span>
<span class="f-logbt">
<a class="f-btn f-lga f-lgadown" href="{{ $cur['linkDownload'] }}" title="{!! __('Download log') !!}"><span class="f-lgs">{!! __('Download log') !!}</span></a>
<a class="f-btn f-lga f-lgadel" href="{{ $cur['linkDelete'] }}" title="{!! __('Delete log') !!}"><span class="f-lgs">{!! __('Delete log') !!}</span></a>
<a class="f-btn f-lga f-lgadown" href="{{ $cur['linkDownload'] }}" title="{{ __('Download log') }}"><span class="f-lgs">{!! __('Download log') !!}</span></a>
<a class="f-btn f-lga f-lgadel" href="{{ $cur['linkDelete'] }}" title="{{ __('Delete log') }}"><span class="f-lgs">{!! __('Delete log') !!}</span></a>
</span>
</li>
@endforeach

View file

@ -1,6 +1,6 @@
@extends ('layouts/main')
<section class="f-main f-message">
<h2>{{ __('Info') }}</h2>
<h2>{!! __('Info') !!}</h2>
@if ($p->bannedIp)
<p>{!! __('Ban message 1') !!}</p>
@else

View file

@ -48,7 +48,7 @@
@yield ('pagination')
@if ($p->model->canCreateTopic)
<div class="f-actions-links">
<a class="f-btn f-btn-create-topic" title="{!! __('Post topic') !!}" href="{{ $p->model->linkCreateTopic }}"><span>{!! __('Post topic') !!}</span></a>
<a class="f-btn f-btn-create-topic" title="{{ __('Post topic') }}" href="{{ $p->model->linkCreateTopic }}"><span>{!! __('Post topic') !!}</span></a>
</div>
@endif
</div>
@ -79,7 +79,7 @@
<div class="f-ficon"></div>
@endif
<div class="f-finfo">
<h3><span class="f-tmoved" title="{!! __('Moved') !!}"><span class="f-movedtxt">{!! __('Moved') !!}</span></span> <a class="f-ftname" href="{{ $topic->link }}">{{ $topic->censorSubject }}</a></h3>
<h3><span class="f-tmoved" title="{{ __('Moved') }}"><span class="f-movedtxt">{!! __('Moved') !!}</span></span> <a class="f-ftname" href="{{ $topic->link }}">{{ $topic->censorSubject }}</a></h3>
</div>
</div>
</li>
@ -98,13 +98,13 @@
<span class="f-tdot"><span class="f-dottxt">·</span></span>
@endif
@if ($topic->sticky)
<span class="f-tsticky" title="{!! __('Sticky') !!}"><span class="f-stickytxt">{!! __('Sticky') !!}</span></span>
<span class="f-tsticky" title="{{ __('Sticky') }}"><span class="f-stickytxt">{!! __('Sticky') !!}</span></span>
@endif
@if ($topic->closed)
<span class="f-tclosed" title="{!! __('Closed') !!}"><span class="f-closedtxt">{!! __('Closed') !!}</span></span>
<span class="f-tclosed" title="{{ __('Closed') }}"><span class="f-closedtxt">{!! __('Closed') !!}</span></span>
@endif
@if ($topic->poll_type > 0)
<span class="f-tpoll" title="{!! __('Poll') !!}"><span class="f-polltxt">{!! __('Poll') !!}</span></span>
<span class="f-tpoll" title="{{ __('Poll') }}"><span class="f-polltxt">{!! __('Poll') !!}</span></span>
@endif
<a class="f-ftname" href="{{ $topic->link }}">{{ $topic->censorSubject }}</a>
@if ($topic->pagination)
@ -119,10 +119,10 @@
</span>
@endif
@if (false !== $topic->hasUnread)
<small class="f-tunread"><a href="{{ $topic->linkUnread }}" title="{!! __('Unread posts info') !!}"><span class="f-unreadtxt">{!! __('Unread posts') !!}</span></a></small>
<small class="f-tunread"><a href="{{ $topic->linkUnread }}" title="{{ __('Unread posts info') }}"><span class="f-unreadtxt">{!! __('Unread posts') !!}</span></a></small>
@endif
@if (false !== $topic->hasNew)
<small class="f-tnew"><a href="{{ $topic->linkNew }}" title="{!! __('New posts info') !!}"><span class="f-newtxt">{!! __('New posts') !!}</span></a></small>
<small class="f-tnew"><a href="{{ $topic->linkNew }}" title="{{ __('New posts info') }}"><span class="f-newtxt">{!! __('New posts') !!}</span></a></small>
@endif
</h3>
<p><!-- inline -->
@ -155,17 +155,17 @@
@if ($p->model->canCreateTopic || $p->model->canMarkRead || $p->model->canSubscription)
<div class="f-actions-links">
@if ($p->model->canMarkRead)
<a class="f-btn f-btn-markread f-opacity" title="{!! __('Mark forum read') !!}" href="{{ $p->model->linkMarkRead }}"><span>{!! __('All is read') !!}</span></a>
<a class="f-btn f-btn-markread f-opacity" title="{{ __('Mark forum read') }}" href="{{ $p->model->linkMarkRead }}"><span>{!! __('All is read') !!}</span></a>
@endif
@if ($p->model->canSubscription)
@if ($p->model->is_subscribed)
<a class="f-btn f-btn-unsubscribe f-opacity" title="{!! __('Unsubscribe forum') !!}" href="{{ $p->model->linkUnsubscribe }}"><span>{!! __('Unsubscribe') !!}</span></a>
<a class="f-btn f-btn-unsubscribe f-opacity" title="{{ __('Unsubscribe forum') }}" href="{{ $p->model->linkUnsubscribe }}"><span>{!! __('Unsubscribe') !!}</span></a>
@else
<a class="f-btn f-btn-subscribe f-opacity" title="{!! __('Subscribe forum') !!}" href="{{ $p->model->linkSubscribe }}"><span>{!! __('Subscribe') !!}</span></a>
<a class="f-btn f-btn-subscribe f-opacity" title="{{ __('Subscribe forum') }}" href="{{ $p->model->linkSubscribe }}"><span>{!! __('Subscribe') !!}</span></a>
@endif
@endif
@if ($p->model->canCreateTopic)
<a class="f-btn f-btn-create-topic" title="{!! __('Post topic') !!}" href="{{ $p->model->linkCreateTopic }}"><span>{!! __('Post topic') !!}</span></a>
<a class="f-btn f-btn-create-topic" title="{{ __('Post topic') }}" href="{{ $p->model->linkCreateTopic }}"><span>{!! __('Post topic') !!}</span></a>
@endif
</div>
@endif

View file

@ -21,7 +21,7 @@
<div class="f-nav-links">
<div class="f-nlinks">
<div class="f-actions-links">
<a class="f-btn f-btn-markread f-opacity" title="{!! __('Mark all as read') !!}" href="{{ $p->linkMarkRead }}"><span>{!! __('All is read') !!}</span></a>
<a class="f-btn f-btn-markread f-opacity" title="{{ __('Mark all as read') }}" href="{{ $p->linkMarkRead }}"><span>{!! __('All is read') !!}</span></a>
</div>
</div>
</div>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{!! __('lang_identifier') !!}" dir="{!! __('lang_direction') !!}">
<html lang="{{ __('lang_identifier') }}" dir="{{ __('lang_direction') }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{!! __('lang_identifier') !!}" dir="{!! __('lang_direction') !!}">
<html lang="{{ __('lang_identifier') }}" dir="{{ __('lang_direction') }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -28,7 +28,7 @@
<ul class="f-menu-items">
@foreach ($p->fNavigation as $key => $val)
<li id="fork-nav-{{ $key }}" class="f-menu-item"><!-- inline -->
<a class="f-menu-a @if ($key == $p->fIndex) active @endif" href="{{ $val[0] }}" @if ($val[2]) title="{!! __($val[2]) !!}" @endif>
<a class="f-menu-a @if ($key == $p->fIndex) active @endif" href="{{ $val[0] }}" @if ($val[2]) title="{{ __($val[2]) }}" @endif>
<span class="f-menu-span">{!! __($val[1]) !!}</span>
</a>
@if ($val[3])
@ -36,7 +36,7 @@
@foreach ($val[3] as $key => $val)
<li id="fork-nav-{{ $key }}" class="f-menu-item">
@if ($val[0])
<a class="f-menu-a @if ($key == $p->fSubIndex) active @endif" href="{{ $val[0] }}" @if ($val[2]) title="{!! __($val[2]) !!}" @endif>
<a class="f-menu-a @if ($key == $p->fSubIndex) active @endif" href="{{ $val[0] }}" @if ($val[2]) title="{{ __($val[2]) }}" @endif>
<span class="f-menu-span">{!! __($val[1]) !!}</span>
</a>
@else
@ -53,7 +53,7 @@
<ul class="f-menu-user-items">
@foreach ($p->fNavigationUser as $key => $val)
<li id="fork-nav-{{ $key }}" class="f-menu-item"><!-- inline -->
<a class="f-menu-a @if ($key == $p->fIndex) active @endif" href="{{ $val[0] }}" @if ($val[2]) title="{!! __($val[2]) !!}" @endif>
<a class="f-menu-a @if ($key == $p->fIndex) active @endif" href="{{ $val[0] }}" @if ($val[2]) title="{{ __($val[2]) }}" @endif>
@if (\is_array($val[1]))
<span class="f-menu-span">{!! __(...$val[1]) !!}</span>
@else
@ -65,7 +65,7 @@
@foreach ($val[3] as $key => $val)
<li id="fork-nav-{{ $key }}" class="f-menu-item">
@if ($val[0])
<a class="f-menu-a @if ($key == $p->fSubIndex) active @endif" href="{{ $val[0] }}" @if ($val[2]) title="{!! __($val[2]) !!}" @endif>
<a class="f-menu-a @if ($key == $p->fSubIndex) active @endif" href="{{ $val[0] }}" @if ($val[2]) title="{{ __($val[2]) }}" @endif>
<span class="f-menu-span">{!! __($val[1]) !!}</span>
</a>
@else

View file

@ -39,7 +39,7 @@
@endforeach
@if ($poll->canVote)
<p class="f-poll-btns">
<button class="f-btn" name="vote" value="{!! __('Vote') !!}" title="{!! __('Vote') !!}"><span>{!! __('Vote') !!}</span></button>
<button class="f-btn" name="vote" value="{{ __('Vote') }}" title="{{ __('Vote') }}"><span>{!! __('Vote') !!}</span></button>
</p>
</form>
@else

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{!! __('lang_identifier') !!}" dir="{!! __('lang_direction') !!}">
<html lang="{{ __('lang_identifier') }}" dir="{{ __('lang_direction') }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View file

@ -19,7 +19,7 @@
<h3>
<a class="f-ftname" href="{{ $cur->link }}">{{ $cur->forum_name }}</a>
@if ($cur->tree->newMessages)
<small class="f-fnew"><a href="{{ $cur->linkNew }}" title="{!! __('New posts') !!}"><span class="f-newtxt">{!! __('New posts') !!}</span></a></small>
<small class="f-fnew"><a href="{{ $cur->linkNew }}" title="{{ __('New posts') }}"><span class="f-newtxt">{!! __('New posts') !!}</span></a></small>
@endif
</h3>
@if ($cur->subforums)

View file

@ -29,10 +29,10 @@
@if ($p->model->canReply || $p->model->closed)
<div class="f-actions-links">
@if ($p->model->closed)
<a class="f-btn f-btn-topic-closed" title="{!! __('Topic closed') !!}"><span>{!! __('Topic closed') !!}</span></a>
<a class="f-btn f-btn-topic-closed" title="{{ __('Topic closed') }}"><span>{!! __('Topic closed') !!}</span></a>
@endif
@if ($p->model->canReply)
<a class="f-btn f-btn-post-reply" title="{!! __('Post reply') !!}" href="{{ $p->model->linkReply }}"><span>{!! __('Post reply') !!}</span></a>
<a class="f-btn f-btn-post-reply" title="{{ __('Post reply') }}" href="{{ $p->model->linkReply }}"><span>{!! __('Post reply') !!}</span></a>
@endif
</div>
@endif
@ -57,7 +57,7 @@
<span class="f-post-posted"><time datetime="{{ \gmdate('c', $post->posted) }}">{{ dt($post->posted) }}</time></span>
@endif
@if ($post->edited)
<span class="f-post-edited" title="{!! __('Last edit', $post->editor, dt($post->edited)) !!}">{!! __('Edited') !!}</span>
<span class="f-post-edited" title="{{ __('Last edit', $post->editor, dt($post->edited)) }}">{!! __('Edited') !!}</span>
@endif
<span class="f-post-number"><a href="{{ $post->link }}" rel="bookmark">#{{ $post->postNumber }}</a></span>
</header>
@ -92,7 +92,7 @@
@if (! $post->user->isGuest && $p->user->showUserInfo)
<ul class="f-user-info-add">
@if ($p->user->isAdmMod && '' != $post->user->admin_note)
<li class="f-admin-note" title="{!! __('Admin note') !!}">{{ $post->user->admin_note }}</li>
<li class="f-admin-note" title="{{ __('Admin note') }}">{{ $post->user->admin_note }}</li>
@endif
<li>{!! __('Registered: %s', dt($post->user->registered, true)) !!}</li>
@if ($post->user->location)
@ -126,16 +126,16 @@
<div class="f-post-btns">
<ul>
@if ($post->canReport)
<li class="f-postreport"><a class="f-btn f-minor" title="{!! __('Report') !!}" href="{{ $post->linkReport }}"><span>{!! __('Report') !!}</span></a></li>
<li class="f-postreport"><a class="f-btn f-minor" title="{{ __('Report') }}" href="{{ $post->linkReport }}"><span>{!! __('Report') !!}</span></a></li>
@endif
@if ($post->canDelete)
<li class="f-postdelete"><a class="f-btn" title="{!! __('Delete') !!}" href="{{ $post->linkDelete }}"><span>{!! __('Delete') !!}</span></a></li>
<li class="f-postdelete"><a class="f-btn" title="{{ __('Delete') }}" href="{{ $post->linkDelete }}"><span>{!! __('Delete') !!}</span></a></li>
@endif
@if ($post->canEdit)
<li class="f-postedit"><a class="f-btn" title="{!! __('Edit') !!}" href="{{ $post->linkEdit }}"><span>{!! __('Edit') !!}</span></a></li>
<li class="f-postedit"><a class="f-btn" title="{{ __('Edit') }}" href="{{ $post->linkEdit }}"><span>{!! __('Edit') !!}</span></a></li>
@endif
@if ($post->canQuote)
<li class="f-postquote"><a class="f-btn" title="{!! __('Quote') !!}" href="{{ $post->linkQuote }}"><span>{!! __('Quote') !!}</span></a></li>
<li class="f-postquote"><a class="f-btn" title="{{ __('Quote') }}" href="{{ $post->linkQuote }}"><span>{!! __('Quote') !!}</span></a></li>
@endif
</ul>
</div>
@ -152,13 +152,13 @@
<div class="f-actions-links">
@if ($p->model->canSubscription)
@if ($p->model->is_subscribed)
<a class="f-btn f-btn-unsubscribe f-opacity" title="{!! __('Unsubscribe topic') !!}" href="{{ $p->model->linkUnsubscribe }}"><span>{!! __('Unsubscribe') !!}</span></a>
<a class="f-btn f-btn-unsubscribe f-opacity" title="{{ __('Unsubscribe topic') }}" href="{{ $p->model->linkUnsubscribe }}"><span>{!! __('Unsubscribe') !!}</span></a>
@else
<a class="f-btn f-btn-subscribe f-opacity" title="{!! __('Subscribe topic') !!}" href="{{ $p->model->linkSubscribe }}"><span>{!! __('Subscribe') !!}</span></a>
<a class="f-btn f-btn-subscribe f-opacity" title="{{ __('Subscribe topic') }}" href="{{ $p->model->linkSubscribe }}"><span>{!! __('Subscribe') !!}</span></a>
@endif
@endif
@if ($p->model->canReply)
<a class="f-btn f-btn-post-reply" title="{!! __('Post reply') !!}" href="{{ $p->model->linkReply }}"><span>{!! __('Post reply') !!}</span></a>
<a class="f-btn f-btn-post-reply" title="{{ __('Post reply') }}" href="{{ $p->model->linkReply }}"><span>{!! __('Post reply') !!}</span></a>
@endif
</div>
@endif

View file

@ -38,9 +38,9 @@
<article id="p{{ $post->id }}" class="f-post f-post-search @if (1 == $post->user->gender) f-user-male @elseif (2 == $post->user->gender) f-user-female @endif @if ($post->user->online) f-user-online @endif">
<header class="f-post-header">
<h3>
<span class="f-psh-forum"><a href="{{ $post->parent->parent->link }}" title="{!! __('Go to forum') !!}">{{ $post->parent->parent->forum_name }}</a></span>
<span class="f-psh-topic"><a href="{{ $post->parent->link }}" title="{!! __('Go to topic') !!}">@if ($post->id !== $post->parent->first_post_id) {!! __('Re') !!} @endif {{ $post->parent->censorSubject }}</a></span>
<span class="f-post-posted"><a href="{{ $post->link }}" title="{!! __('Go to post') !!}" rel="bookmark"><time datetime="{{ \gmdate('c', $post->posted) }}">{{ dt($post->posted) }}</time></a></span>
<span class="f-psh-forum"><a href="{{ $post->parent->parent->link }}" title="{{ __('Go to forum') }}">{{ $post->parent->parent->forum_name }}</a></span>
<span class="f-psh-topic"><a href="{{ $post->parent->link }}" title="{{ __('Go to topic') }}">@if ($post->id !== $post->parent->first_post_id) {!! __('Re') !!} @endif {{ $post->parent->censorSubject }}</a></span>
<span class="f-post-posted"><a href="{{ $post->link }}" title="{{ __('Go to post') }}" rel="bookmark"><time datetime="{{ \gmdate('c', $post->posted) }}">{{ dt($post->posted) }}</time></a></span>
</h3>
<span class="f-post-number">#{{ $post->postNumber }}</span>
</header>