mirror of
https://github.com/Karaka-Management/oms-Messages.git
synced 2026-02-07 21:18:41 +00:00
Simplify htmlescape
This commit is contained in:
parent
6af1266977
commit
97fccfe6cc
|
|
@ -37,26 +37,26 @@ echo $this->getData('nav')->render(); ?>
|
|||
<td><?= $this->getHtml('From') ?>
|
||||
<td><?= $this->getHtml('Date') ?>
|
||||
<tfoot>
|
||||
<tr><td colspan="5"><?= htmlspecialchars(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage']), ENT_COMPAT, 'utf-8'); ?> / <?= htmlspecialchars(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit']), ENT_COMPAT, 'utf-8'); ?>
|
||||
<tr><td colspan="5"><?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / <?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach($unseen as $key => $value) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/messages/mail/single?{?}&id=' . $value->uid); ?>
|
||||
<tr>
|
||||
<td><span class="check"><input type="checkbox"></span>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars(str_replace('_',' ', mb_decode_mimeheader($value->subject)), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars($value->from, ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars((new \DateTime($value->date))->format('Y-m-d H:i:s'), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml(str_replace('_',' ', mb_decode_mimeheader($value->subject))); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml($value->from); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml((new \DateTime($value->date))->format('Y-m-d H:i:s')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php foreach($seen as $key => $value) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/messages/mail/single?{?}&id=' . $value->uid); ?>
|
||||
<tr>
|
||||
<td><span class="check"><input type="checkbox"></span>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars(str_replace('_',' ', mb_decode_mimeheader($value->subject)), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars($value->from, ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars((new \DateTime($value->date))->format('Y-m-d H:i:s'), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml(str_replace('_',' ', mb_decode_mimeheader($value->subject))); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml($value->from); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml((new \DateTime($value->date))->format('Y-m-d H:i:s')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if($count < 1) : ?>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -36,16 +36,16 @@ echo $this->getData('nav')->render(); ?>
|
|||
<td><?= $this->getHtml('From') ?>
|
||||
<td><?= $this->getHtml('Date') ?>
|
||||
<tfoot>
|
||||
<tr><td colspan="5"><?= htmlspecialchars(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage']), ENT_COMPAT, 'utf-8'); ?> / <?= htmlspecialchars(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit']), ENT_COMPAT, 'utf-8'); ?>
|
||||
<tr><td colspan="5"><?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / <?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach($sent as $key => $value) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/messages/mail/single?{?}&id=' . $value->uid); ?>
|
||||
<tr>
|
||||
<td><span class="check"><input type="checkbox"></span>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars(str_replace('_',' ', mb_decode_mimeheader($value->subject)), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars($value->from, ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars((new \DateTime($value->date))->format('Y-m-d H:i:s'), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml(str_replace('_',' ', mb_decode_mimeheader($value->subject))); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml($value->from); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml((new \DateTime($value->date))->format('Y-m-d H:i:s')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if($count < 1) : ?>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -36,16 +36,16 @@ echo $this->getData('nav')->render(); ?>
|
|||
<td><?= $this->getHtml('From') ?>
|
||||
<td><?= $this->getHtml('Date') ?>
|
||||
<tfoot>
|
||||
<tr><td colspan="5"><?= htmlspecialchars(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage']), ENT_COMPAT, 'utf-8'); ?> / <?= htmlspecialchars(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit']), ENT_COMPAT, 'utf-8'); ?>
|
||||
<tr><td colspan="5"><?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / <?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach($sent as $key => $value) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/messages/mail/single?{?}&id=' . $value->uid); ?>
|
||||
<tr>
|
||||
<td><span class="check"><input type="checkbox"></span>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars(str_replace('_',' ', mb_decode_mimeheader($value->subject)), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars($value->from, ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars((new \DateTime($value->date))->format('Y-m-d H:i:s'), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml(str_replace('_',' ', mb_decode_mimeheader($value->subject))); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml($value->from); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml((new \DateTime($value->date))->format('Y-m-d H:i:s')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if($count < 1) : ?>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -36,16 +36,16 @@ echo $this->getData('nav')->render(); ?>
|
|||
<td><?= $this->getHtml('From') ?>
|
||||
<td><?= $this->getHtml('Date') ?>
|
||||
<tfoot>
|
||||
<tr><td colspan="5"><?= htmlspecialchars(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage']), ENT_COMPAT, 'utf-8'); ?> / <?= htmlspecialchars(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit']), ENT_COMPAT, 'utf-8'); ?>
|
||||
<tr><td colspan="5"><?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / <?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach($sent as $key => $value) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/messages/mail/single?{?}&id=' . $value->uid); ?>
|
||||
<tr>
|
||||
<td><span class="check"><input type="checkbox"></span>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars(str_replace('_',' ', mb_decode_mimeheader($value->subject)), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars($value->from, ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= htmlspecialchars($value->seen == 0 ? ' class="unseen"' : '', ENT_COMPAT, 'utf-8'); ?>><?= htmlspecialchars((new \DateTime($value->date))->format('Y-m-d H:i:s'), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml(str_replace('_',' ', mb_decode_mimeheader($value->subject))); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml($value->from); ?></a>
|
||||
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>><?= $this->printHtml((new \DateTime($value->date))->format('Y-m-d H:i:s')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if($count < 1) : ?>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ $mails = $mail->getEmail($this->getData('id'));
|
|||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="box w-100">
|
||||
<header><h1><?= htmlspecialchars(str_replace('_',' ', mb_decode_mimeheader($mails['overview'][0]->subject)), ENT_COMPAT, 'utf-8'); ?></h1></header>
|
||||
<header><h1><?= $this->printHtml(str_replace('_',' ', mb_decode_mimeheader($mails['overview'][0]->subject))); ?></h1></header>
|
||||
<div class="inner">
|
||||
<?= htmlspecialchars($mail::decode($mails['body'], $mails['encoding']->encoding), ENT_COMPAT, 'utf-8'); ?>
|
||||
<?= $this->printHtml($mail::decode($mails['body'], $mails['encoding']->encoding)); ?>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -26,35 +26,35 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tr><td><select id="iInbox" name="inbox">
|
||||
<option value=""><?= $this->getHtml('Select') ?>
|
||||
<?php foreach($boxes as $box) : ?>
|
||||
<option value="<?= htmlspecialchars($box, ENT_COMPAT, 'utf-8'); ?>"><?= htmlspecialchars($box, ENT_COMPAT, 'utf-8'); ?>
|
||||
<option value="<?= $this->printHtml($box); ?>"><?= $this->printHtml($box); ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<tr><td><label for="iOutbox"><?= $this->getHtml('Outbox') ?></label>
|
||||
<tr><td><select id="iOutbox" name="outbox">
|
||||
<option value=""><?= $this->getHtml('Select') ?>
|
||||
<?php foreach($boxes as $box) : ?>
|
||||
<option value="<?= htmlspecialchars($box, ENT_COMPAT, 'utf-8'); ?>"><?= htmlspecialchars($box, ENT_COMPAT, 'utf-8'); ?>
|
||||
<option value="<?= $this->printHtml($box); ?>"><?= $this->printHtml($box); ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<tr><td><label for="iDraft"><?= $this->getHtml('Draft') ?></label>
|
||||
<tr><td><select id="iDraft" name="draft">
|
||||
<option value=""><?= $this->getHtml('Select') ?>
|
||||
<?php foreach($boxes as $box) : ?>
|
||||
<option value="<?= htmlspecialchars($box, ENT_COMPAT, 'utf-8'); ?>"><?= htmlspecialchars($box, ENT_COMPAT, 'utf-8'); ?>
|
||||
<option value="<?= $this->printHtml($box); ?>"><?= $this->printHtml($box); ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<tr><td><label for="iTrash"><?= $this->getHtml('Trash') ?></label>
|
||||
<tr><td><select id="iTrash" name="trash">
|
||||
<option value=""><?= $this->getHtml('Select') ?>
|
||||
<?php foreach($boxes as $box) : ?>
|
||||
<option value="<?= htmlspecialchars($box, ENT_COMPAT, 'utf-8'); ?>"><?= htmlspecialchars($box, ENT_COMPAT, 'utf-8'); ?>
|
||||
<option value="<?= $this->printHtml($box); ?>"><?= $this->printHtml($box); ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<tr><td><label for="iSpam"><?= $this->getHtml('Spam') ?></label>
|
||||
<tr><td><select id="iSpam" name="spam">
|
||||
<option value=""><?= $this->getHtml('Select') ?>
|
||||
<?php foreach($boxes as $box) : ?>
|
||||
<option value="<?= htmlspecialchars($box, ENT_COMPAT, 'utf-8'); ?>"><?= htmlspecialchars($box, ENT_COMPAT, 'utf-8'); ?>
|
||||
<option value="<?= $this->printHtml($box); ?>"><?= $this->printHtml($box); ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<tr><td><input type="submit" value="<?= $this->getHtml('Save') ?>">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user