Viewing File: /usr/local/cpanel/base/frontend/jupiter/ls_web_cache_manager/core/View/Tpl/Main.tpl
<?php
use LsUserPanel\View\Model\MainViewModel as ViewModel;
$pluginVersion = $this->viewModel->getTplData(ViewModel::FLD_PLUGIN_VER);
$vhCacheDir = $this->viewModel->getTplData(ViewModel::FLD_VH_CACHE_DIR);
$vhCacheDirExists =
$this->viewModel->getTplData(ViewModel::FLD_VH_CACHE_DIR_EXISTS);
$ecCertAllowed = $this->viewModel->getTplData(ViewModel::FLD_EC_ALLOWED);
$iconDir = $this->viewModel->getTplData(ViewModel::FLD_ICON_DIR);
$cageType = $this->viewModel->getTplData(ViewModel::FLD_CAGE_TYPE);
$redisOnly = $this->viewModel->getTplData(ViewModel::FLD_REDIS_ONLY);
$redisEnabled = $this->viewModel->getTplData(ViewModel::FLD_REDIS_ENABLED);
$cagedRedisMsg =
$this->viewModel->getTplData(ViewModel::FLD_CAGED_REDIS_MSG);
$errMsgs = $this->viewModel->getTplData(ViewModel::FLD_ERR_MSGS);
$succMsgs = $this->viewModel->getTplData(ViewModel::FLD_SUCC_MSGS);
?>
<script type="text/javascript">
console.log('lswsIsRedis: ' + lswsIsRedis());
</script>
<input type="hidden" name="lsredis" value='0'/>
<div class="uk-container">
<?php
$errMsgCnt = count($errMsgs);
$succMsgCnt = count($succMsgs);
$msgsDisplay = ($errMsgCnt > 0 || $succMsgCnt > 0) ? 'initial' : 'none';
?>
<div id="display-msgs" style="display:<?php echo $msgsDisplay; ?>;">
<button
class="accordion accordion-error"
type="button"
style="display: <?php echo ($errMsgCnt > 0) ? 'initial' : 'none'; ?>"
>
<?php echo _('Error Messages'); ?>
<span id ="errMsgCnt" class="badge errMsg-badge">
<?php echo $errMsgCnt; ?>
</span>
</button>
<div class="panel panel-error">
<?php
$this->loadTplBlock(
'DivMsgBox.tpl',
[
'id' => 'errMsgs',
'msgs' => $errMsgs,
'class' => 'scrollable'
]
);
?>
</div>
<div
id="succMsgs"
style="display: <?php echo ($succMsgCnt > 0) ? 'initial' : 'none'; ?>"
>
<ul>
<?php
if ( !is_array($succMsgs) ) {
$succMsgs = [ $succMsgs ];
}
foreach( array_map('htmlspecialchars', $succMsgs) as $succMsg ):
?>
<li><?php echo $succMsg; ?></li>
<?php endforeach; ?>
</ul>
</div>
</div>
<p class="uk-text-large uk-margin-large-bottom">
<?php
echo sprintf(
_('Welcome to %1$s for easily deploying %2$s.'),
'LiteSpeed\'s Web Cache Management plugin',
'LiteSpeed Cache (LSCache)'
);
?>
<a
href="https://docs.litespeedtech.com/lsws/cp/cpanel/whm-litespeed-plugin/cpanel-plugin/"
class="ls-link-small"
target="_blank"
rel="noopener"
>
<?php echo _('Learn More'); ?> >>
</a>
</p>
</div>
<?php if ( !$redisOnly ) : ?>
<div class="uk-container">
<h2 class="uk-margin-bottom-remove ls-text-bold ls-text-slateblue">
<i class="uk-icon uk-icon-question ls-text-skyblue"> </i>
<?php echo sprintf(_('Why Use %s'), 'LSCache'); ?>
</h2>
<hr
class="uk-margin-top-remove uk-width-large-3-10 uk-width-medium-1-1
uk-width-small-1-1 ls-border"
/>
<div class="uk-text-muted uk-margin-left">
<p>
<?php
echo sprintf(
_(
'%1$s\'s built-in server-level cache (%2$s) is a '
. 'highly-customizable caching solution.'
),
'LiteSpeed',
'LSCache'
);
?>
</p>
<p><?php echo sprintf(_('With %s, you can:'), 'LSCache'); ?></p>
<ul>
<li><?php echo _('dramatically reduce page load times'); ?></li>
<li><?php echo _('provide an exceptional user experience'); ?></li>
<li><?php echo _('handle traffic spikes with ease'); ?></li>
<li>
<?php
echo _(
'manage cache with minimal fuss and powerful Smart Purge technology'
);
?>
</li>
</ul>
<p>
<?php
echo sprintf(
_(
'Free %s plugins are available for a variety of popular web apps. '
. 'Hyper-charge your sites today!'
),
'LSCache'
);
?>
</p>
</div>
<div>
<label
class="uk-link uk-pull-1-10 uk-align-right"
accesskey=""
for="modal-1"
>
<u><?php echo sprintf(_('Available %s Plugins'), 'LSCache'); ?> ></u>
</label>
</div>
</div>
<div class="uk-container"><hr class="uk-margin-large-bottom ls-hr-dotted"></div>
<div>
<input class="modal-state" id="modal-1" type="checkbox" />
<div class="modal">
<label class="modal__bg" for="modal-1"></label>
<div class="modal__inner">
<label class="modal__close" for="modal-1"></label>
<h2 class="uk-text-warning uk-margin-small-bottom uk-text-center-small">
<?php echo sprintf(_('Available %s Caching Solutions'), 'LiteSpeed'); ?>
<span class="uk-link uk-h4">
<a
href="https://litespeedtech.com/products/cache-plugins"
class="ls-link-small"
target='_blank'
rel="noopener"
>
<u><?php echo _('More Info'); ?> >></u>
</a>
</span>
</h2>
<hr class="uk-margin-top-remove" />
<div class="uk-container uk-margin-large-top">
<ul
class="uk-grid uk-grid-width-xlarge-1-3 uk-grid-width-large-1-2
uk-grid-width-medium-1-2 uk-grid-width-small-1-1 uk-grid-match
uk-grid-large"
data-uk-grid-match="{target:'.uk-panel'}"
>
<li>
<div class="uk-panel">
<figure class="uk-text-center">
<!--suppress HtmlUnknownTarget -->
<img
src="<?php echo $iconDir; ?>/icon-lscwp.png"
alt="lscwp_img"
class="uk-margin-top"
/>
</figure>
<div class="uk-text-center">
<h4
class="uk-text-muted uk-margin-small-bottom uk-text-bold
uk-text-center"
>
<?php
echo sprintf(_('%1$s for %2$s'), 'LSCache', 'WordPress');
?>
</h4>
<p class="uk-margin-small-top">
<?php
echo _(
'Public, private, and ESI cache; cache crawler; image '
. 'optimization, CDN support, minification, more!'
);
?>
</p>
</div>
<hr class="ls-hr-dotted">
</div>
</li>
<li>
<div class="uk-panel">
<figure class="uk-text-center">
<!--suppress HtmlUnknownTarget -->
<img
src="<?php echo $iconDir; ?>/icon-prestashop.png"
alt="lscps_img"
class="uk-margin-top"
/>
</figure>
<div class="uk-text-center">
<h4
class="uk-text-muted uk-margin-small-bottom uk-text-bold
uk-text-center"
>
<?php
echo sprintf(_('%1$s for %2$s'), 'LSCache', 'PrestaShop');
?>
</h4>
<p class="uk-margin-small-top">
<?php
echo sprintf(
_(
'Supports guest and logged-in users with ESI, an '
. 'eCommerce must! For %1$s & %2$s.'
),
'PrestaShop 1.6',
'1.7'
);
?>
</p>
</div>
<hr class="ls-hr-dotted">
</div>
</li>
<li>
<div class="uk-panel">
<figure class="uk-text-center">
<!--suppress HtmlUnknownTarget -->
<img
src="<?php echo $iconDir; ?>/icon-xenforo.png"
alt="lscxf_img"
class="uk-margin-top"
/>
</figure>
<div class="uk-text-center">
<h4
class="uk-text-muted uk-margin-small-bottom uk-text-bold
uk-text-center"
>
<?php
echo sprintf(_('%1$s for %2$s'), 'LSCache', 'Xenforo');
?>
</h4>
<p class="uk-margin-small-top">
<?php
echo sprintf(
_(
'Accelerate your forums! Serve forum visitors cached '
. 'public content on %1$s and %2$s.'
),
'XenForo 1.x',
'2.x'
);
?>
</p>
</div>
<hr class="ls-hr-dotted">
</div>
</li>
<li>
<div class="uk-panel">
<figure class="uk-text-center">
<!--suppress HtmlUnknownTarget -->
<img
src="<?php echo $iconDir; ?>/icon-litemage.png"
alt="litemage_img"
class="uk-margin-top"
/>
</figure>
<div class="uk-text-center">
<h4
class="uk-text-muted uk-margin-small-bottom uk-text-bold
uk-text-center"
>
<?php
echo sprintf(_('%1$s for %2$s'), 'LiteMage', 'Magento');
?>
</h4>
<p class="uk-margin-small-top">
<?php
echo sprintf(
_(
'Public cache, private cache, and ESI for %1$s and %2$s; '
. 'crawler to keep cache warm.'
),
'Magento 1.x',
'2.x'
);
?>
</p>
</div>
<hr class="ls-hr-dotted">
</div>
</li>
<li>
<div class="uk-panel">
<figure class="uk-text-center">
<!--suppress HtmlUnknownTarget -->
<img
src="<?php echo $iconDir; ?>/icon-lscjml.png"
alt="joomla_img"
class="uk-margin-top"
/>
</figure>
<div class="uk-text-center">
<h4
class="uk-text-muted uk-margin-small-bottom uk-text-bold
uk-text-center"
>
<?php
echo sprintf(_('%1$s for %2$s'), 'LSCache', 'Joomla');
?>
</h4>
<p class="uk-margin-small-top">
<?php
echo sprintf(
_(
'Cache guest and logged-in users; punch holes with ESI. '
. 'Serve %s content fast!'
),
'Joomla 3.x'
);
?>
</p>
</div>
<hr class="ls-hr-dotted">
</div>
</li>
<li>
<div class="uk-panel">
<figure class="uk-text-center">
<!--suppress HtmlUnknownTarget -->
<img
src="<?php echo $iconDir; ?>/icon-lscdpl.png"
alt="drupal_img"
class="uk-margin-top"
/>
</figure>
<div class="uk-text-center">
<h4
class="uk-text-muted uk-margin-small-bottom uk-text-bold
uk-text-center"
>
<?php
echo sprintf(_('%1$s for %2$s'), 'LSCache', 'Drupal');
?>
</h4>
<p class="uk-margin-small-top">
<?php
echo sprintf(
_(
'Speed up your %s site and serve cached content to '
. 'logged-out and logged-in users alike.'
),
'Drupal 8.x'
);
?>
</p>
</div>
<hr class="ls-hr-dotted">
</div>
</li>
<li>
<div class="uk-panel">
<figure class="uk-text-center">
<!--suppress HtmlUnknownTarget -->
<img
src="<?php echo $iconDir; ?>/icon-lscmwk.png"
alt="mediawiki_img"
class="uk-margin-top"
/>
</figure>
<div class="uk-text-center">
<h4
class="uk-text-muted uk-margin-small-bottom uk-text-bold
uk-text-center"
>
<?php
echo sprintf(_('%1$s for %2$s'), 'LSCache', 'MediaWiki');
?>
</h4>
<p class="uk-margin-small-top">
<?php
echo sprintf(
_(
'Serve cached pages to both logged-in and guest users. '
. 'Speed up %s.'
),
'MediaWiki 1.25+'
);
?>
</p>
</div>
<hr class="ls-hr-dotted">
</div>
</li>
<li>
<div class="uk-panel">
<figure class="uk-text-center">
<!--suppress HtmlUnknownTarget -->
<img
src="<?php echo $iconDir; ?>/icon-lscoc.png"
alt="opencart_img"
class="uk-margin-top"
/>
</figure>
<div class="uk-text-center">
<h4
class="uk-text-muted uk-margin-small-bottom uk-text-bold
uk-text-center"
>
<?php
echo sprintf(_('%1$s for %2$s'), 'LSCache', 'OpenCart');
?>
</h4>
<p class="uk-margin-small-top">
<?php
echo sprintf(
_(
'Serve fully-cached content to guests and logged-in '
. 'shoppers in %s.'
),
'OpenCart 2.3+'
);
?>
</p>
</div>
<hr class="ls-hr-dotted">
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="uk-container">
<h2 class="uk-margin-bottom-remove ls-text-bold ls-text-slateblue">
<i class="uk-icon uk-icon-trash ls-text-skyblue"> </i>
<?php echo sprintf(_('Flush %s'), 'LSCache'); ?>
</h2>
<hr
class="uk-margin-top-remove uk-width-large-3-10 uk-width-medium-1-1
uk-width-small-1-1 ls-border"
/>
<div class="uk-text-muted uk-grid uk-margin-bottom">
<div
class="uk-width-large-2-3 uk-width-medium-1-1 uk-width-small-1-1
uk-margin-bottom"
>
<div style="margin-top: 1.5em; margin-bottom: .25em;">
<?php
$this->loadTplBlock(
'FlushBtn.tpl',
[
'vhCacheDir' => $vhCacheDir,
'vhCacheDirExists' => $vhCacheDirExists,
'extraClasses' => [ 'uk-margin-left' ]
]
);
?>
</div>
<p class="uk-margin-left">
<?php
echo sprintf(
_(
'Caution: This will clear the cache for all owned %s enabled '
. 'sites.'
),
'LSCache'
);
?>
<br />
<?php
echo sprintf(
_(
'If you would like to flush %s for a single site, please do so '
. 'through the administrator backend/dashboard for that site.'
),
'LSCache'
);
?>
</p>
</div>
</div>
</div>
<div class="uk-container"><hr class="uk-margin-large-bottom ls-hr-dotted"></div>
<div class="uk-container">
<h2 class="uk-margin-bottom-remove ls-text-bold ls-text-slateblue">
<i class="uk-icon uk-icon-folder-open ls-text-skyblue"> </i>
<?php echo sprintf(_('%s Management'), 'LiteSpeed Cache'); ?>
</h2>
<hr
class="uk-margin-top-remove uk-width-large-3-10 uk-width-medium-1-1
uk-width-small-1-1 ls-border"
/>
<div class="uk-margin-large-top uk-margin uk-margin-left">
<a
href="?do=lscwp_manage"
title="<?php
echo sprintf(
_('Manage %1$s for known %2$s installations.'),
'LSCache',
'WordPress'
);
?>"
>
<!--suppress HtmlUnknownTarget -->
<img
src="<?php echo $iconDir; ?>/icon-wordpress.png"
alt="WordPress_Cache_Manager_Icon"
style="height:auto;"
width="35"
/>
<span
class="uk-text-large uk-button-link uk-text-primary
uk-margin-small-left uk-text-middle"
>
WordPress Cache
</span>
</a>
</div>
</div>
<div class="uk-container"><hr class="uk-margin-large-bottom ls-hr-dotted"></div>
<?php
endif;
if ( $redisOnly ) :
if ( $cageType > 0 ) :
?>
<div class="uk-container">
<h2 class="uk-margin-bottom-remove ls-text-bold ls-text-slateblue">
<i class="uk-icon uk-icon-folder-open ls-text-skyblue"> </i>
<?php echo sprintf(_('%s Management'), 'Redis'); ?>
</h2>
<hr
class="uk-margin-top-remove uk-width-large-3-10 uk-width-medium-1-1
uk-width-small-1-1 ls-border"
/>
<?php
echo sprintf(
_(
'For use with %1$s. Follow '
. '<a href="%2$s" target="_blank" rel="noopener">these instructions</a> '
. 'for configuration, using socket %3$s.'
),
'LiteSpeed WordPress Cache',
'https://docs.litespeedtech.com/lsws/cp/cpanel/whm-litespeed-plugin/wp-cache-management/'
. '#configuring-cache-to-use-redis',
'/tmp/redis.sock'
);
?>
<br>
<div class="uk-margin-large-top uk-margin uk-margin-left">
<script type="text/javascript">
console.log('href: ' + window.location.href);
</script>
<?php ob_start(); ?>
<!--suppress HtmlUnknownTarget -->
<img
src="<?php echo $iconDir; ?>/cache-for-redis_48.png"
alt="Redis Users Icon"
style="height:auto;"
width="35"
>
<span
class="uk-text-large uk-button-link uk-text-primary
uk-margin-small-left uk-text-middle"
>
<?php
if ( $cagedRedisMsg == '' ) {
echo sprintf(_('%s must be configured for you by your administrator'), 'Redis');
} else {
echo $cagedRedisMsg;
}
?>
</span>
<?php
$redisContent = ob_get_clean();
if ( $cagedRedisMsg != '' ) :
?>
<a
href="?do=toggleRedis&lsredis=<?php echo $redisOnly; ?>"
onclick="return confirm('<?php echo sprintf(_('Ok to %s'), $cagedRedisMsg); ?>');"
title="<?php echo $cagedRedisMsg; ?>"
>
<?php echo $redisContent; ?>
</a>
<?php else : ?>
<p><?php echo $redisContent; ?></p>
<?php
endif;
if ( $redisEnabled ) :
?>
<br/><br/>
<!--suppress JSUnresolvedReference -->
<button
class="input-button"
type="button"
title="<?php echo _('Flush cache'); ?>"
id="redis_flush"
onclick="lswsform.do.value = 'redisFlushCache';
lswsform.lsredis.value = (ls_redis ? '1' : '0');
lswsform.submit();"
>
<?php echo _('Flush Cache'); ?>
</button>
</div>
<?php endif; ?>
</div>
<div class="uk-container"><hr class="uk-margin-large-bottom ls-hr-dotted"></div>
<?php
else :
?>
<div class="uk-container">
<h2 class="uk-margin-bottom-remove ls-text-bold ls-text-slateblue">
<i class="uk-icon uk-icon-folder-open ls-text-skyblue"> </i>
<?php echo sprintf(_('%s Management'), 'Redis'); ?>
</h2>
<hr
class="uk-margin-top-remove uk-width-large-3-10 uk-width-medium-1-1
uk-width-small-1-1 ls-border"
/>
<?php
echo sprintf(
_(
'%s support is only available in caged environments '
. '(after administrator configuration)'
),
'Redis'
);
?>
<br/>
</div>
<?php
endif;
elseif ( $ecCertAllowed ) :
?>
<div class="uk-container">
<h2 class="uk-margin-bottom-remove ls-text-bold ls-text-slateblue">
<i class="uk-icon uk-icon-folder-open ls-text-skyblue"> </i>
<?php echo _('EC Certificate Management'); ?>
</h2>
<hr
class="uk-margin-top-remove uk-width-large-3-10 uk-width-medium-1-1
uk-width-small-1-1 ls-border"
/>
<div class="uk-margin-large-top uk-margin uk-margin-left">
<a
href="?do=ec_cert_manage"
title="<?php echo _('Manage generated EC Certificates.'); ?>"
>
<!--suppress HtmlUnknownTarget -->
<img
src="<?php echo $iconDir; ?>/icon-ec-cert-manage.png"
alt="EC Certificate Management Icon"
style="height:auto;"
width="35"
/>
<span
class="uk-text-large uk-button-link uk-text-primary
uk-margin-small-left uk-text-middle"
>
<?php echo _('Manage EC Certificates'); ?>
</span>
</a>
</div>
</div>
<div class="uk-container"><hr class="uk-margin-large-bottom ls-hr-dotted"></div>
<?php endif; ?>
<div class="uk-container">
<h4>
<i class="uk-icon uk-icon-cog ls-text-silver"> </i>
<a href="?do=settings&lsredis=<?php echo $redisOnly; ?>">
<u><?php echo _('Settings'); ?></u>
</a>
<i class="uk-icon ls-icon-cogs ls-text-silver"> </i>
<a href="?do=advanced&lsredis=<?php echo $redisOnly; ?>">
<u><?php echo _('Advanced'); ?></u>
</a>
</h4>
<div style="text-align: right;">
<a
href="https://docs.litespeedtech.com/lsws/cp/cpanel/whm-litespeed-plugin/cpanel-plugin/"
target="_blank"
rel="noopener"
class="plugin-ver"
>
LiteSpeed Web Cache Manager Plugin v<?php echo $pluginVersion; ?>
</a>
</div>
</div>
<script type="text/javascript">lswsInitDropdownBoxes();</script>
Back to Directory
File Manager