| Current Path : /home/g/i/t/giteleslfp/www/administrator/components/com_templateck/interfaces/ |
| Current File : /home/g/i/t/giteleslfp/www/administrator/components/com_templateck/interfaces/ajaxsavetheme.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 to this file
defined('TCK_LOADED') or die('Restricted access');
$blocs = $this->input->get('theme', null, null);
$path = TEMPLATECREATORCK_PATH . '/themes';
$themename = $this->input->get('themename');
$exportfiledest = $path . '/' . $themename . '.hck';
$exportfiletext = $blocs;
if (!TCK_File::write($exportfiledest, $exportfiletext)) {
$msg = '<p class="error">' . TCK_Text::_('CK_ERROR_CREATING_EXPORTFILE') . '</p>';
} else {
$msg = '<p class="successck">' . TCK_Text::_('CK_SUCCESS_CREATING_EXPORTFILE') . '</p>';
}
echo '<p>' . $msg . '</p>';
// create button to download the package
echo '<p style="padding: 15px;"><a class="ckdownload" target="_blank" href="' . JURI::root() . 'components/com_templateck/themes/' . $themename . '.hck">' . TCK_Text::_('CK_DOWNLOAD_THEME') . '</a></p>';