| Current Path : /home/giteleslfp/www/administrator/components/com_templateck/interfaces/ |
| Current File : /home/giteleslfp/www/administrator/components/com_templateck/interfaces/ajaxsavecustomcode.php |
<?php
/**
* @name Template Creator CK
* @package com_templateck
* @copyright Copyright (C) 2013. 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');
$templateid = $this->input->get('templateid', '', 'int');
$customcode = $this->input->get('customcode', '', 'raw');
$customcodeendbody = $this->input->get('customcodeendbody', '', 'raw');
$templatename = $this->input->get('templatename', '', 'string');
$path = TEMPLATECREATORCK_TEMPLATES_PATH . '/' . $templatename;
if (TCK_File::write($path . '/customheader.php', $customcode)) {
$msg = TCK_Text::_('CK_CUSTOMCODE_SAVE_SUCCESS');
} else {
$msg = TCK_Text::_('CK_CUSTOMCODE_SAVE_FAILED');
}
echo $msg;
if (TCK_File::write($path . '/customendbody.php', $customcodeendbody)) {
$msg = TCK_Text::_('CK_CUSTOMCODE_SAVE_SUCCESS');
} else {
$msg = TCK_Text::_('CK_CUSTOMCODE_SAVE_FAILED');
}
echo $msg;