| Current Path : /home/g/i/t/giteleslfp/www/administrator/components/com_templateck/helpers/ |
| Current File : /home/g/i/t/giteleslfp/www/administrator/components/com_templateck/helpers/frontedition.php |
<?php
/**
* @name Template Creator CK
* @copyright Copyright (C) since 2011. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr
*/
// No direct access
defined('_JEXEC') or die;
if (! defined('TCK_LOADED')) define('TCK_LOADED', 1);
require_once 'ckinput.php';
require_once 'cktext.php';
require_once 'ckpath.php';
require_once 'ckfile.php';
require_once 'ckfolder.php';
require_once 'ckfof.php';
use Templatecreatorck\CKFof;
/**
* Front Edition helper
*/
class TCK_FrontEdition {
public static function init() {
$user = CKFof::getUser();
$input = CKFof::getInput();
// if user logged in
if ($user->id && $input->get('tckedition', 0, 'int') === 1) {
// self::renderMenu();
// get current uri
$uri = JFactory::getURI();
$current_url = $uri->toString();
CKFof::redirect(JUri::root(true) . '/index.php?option=com_templateck&view=frontedition&url=' . urlencode($current_url));
}
}
/*public static function renderMenu() {
?>
<div id="ckheader">
<div class="ckheaderlogo"><img width="161" height="36" src="<?php echo JUri::root(true) ?>/administrator/components/com_templateck/images/logo_ck.png" /></div>
<div class="ckheadermenu">
<a href="javascript:void(0);" class="ckheadermenuitem" onclick="ckShowResponsiveEdition();">
<span class="fa fa-mobile"></span>
<span class="ckheadermenuitemtext"><?php echo TCK_Text::_('CK_RESPONSIVE_PARAMS'); ?></span>
</a>
<a href="<?php echo JRoute::_('index.php?option=com_templateck'); ?>" class="ckheadermenuitem ckcancel" >
<span class="fa fa-times"></span>
<span class="ckheadermenuitemtext"><?php echo TCK_Text::_('CK_EXIT') ?></span>
</a>
<a href="javascript:void(0);" class="ckheadermenuitem cksave" onclick="ckTemplateEditionSave()">
<span class="fa fa-check"></span>
<span class="ckheadermenuitemtext"><?php echo TCK_Text::_('CK_SAVE') ?></span>
</a>
</div>
</div>
<style>
#menuck {
top: 66px;
}
html {
padding-top: 66px! important;
}
</style>
<?php
}*/
}
// autoload the edition
TCK_FrontEdition::init();