Hi guys,
I want to show the status of the website (online or maintenance mode) in the admin panel.
I have a welcome page (template) where i show some information (updates, date and time and more)
The struggle now is that i can show the status of the website but i need to refresh the welcome.php page in a browser to change the information. And as this is a not visible page in the front end is this a problem.
Please feel free to check the code from the welcompage
Thanks
Bert
I want to show the status of the website (online or maintenance mode) in the admin panel.
I have a welcome page (template) where i show some information (updates, date and time and more)
The struggle now is that i can show the status of the website but i need to refresh the welcome.php page in a browser to change the information. And as this is a not visible page in the front end is this a problem.
Please feel free to check the code from the welcompage
Thanks
Bert
- Code: Select all
<?php
require_once( '../admin/cms.php' );
require_once( '../admin/config.php' );
?>
<cms:template title='Welcome' icon='home' order='1'>
<cms:config_form_view>
<cms:field 'my_message' >
<cms:set site_offline="<?php echo K_SITE_OFFLINE; ?>" />
<cms:if site_offline == '0'>
<div class="alert alert-icon alert-success">
<svg class="i"><use xlink:href="<cms:show svg_link />globe"></use></svg>
<h2>Site is online.</h2>
</div>
</cms:if>
<cms:if site_offline == '1'>
<div class="alert alert-icon alert-error">
<svg class="i"><use xlink:href="<cms:show svg_link />wrench"></use></svg>
<h2>Site is in maintenance mode</h2>
</div>
</cms:if>
</cms:config_form_view>
<cms:editable name='hiddener' type='message'>
<style>
#header-title, #tabs, #k_label_f_my_message, #settings-panel, #btn_view, #btn_submit {display: none;}
</style>
</cms:editable>
</cms:template>
<?php COUCH::invoke(); ?>