File manager - Edit - /home/jardides/www/Jardi-design/administrator/components/com_templateck/views/template/view.html.php
Back
<?php /** * @name Template Creator CK 3 * @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 defined('_JEXEC') or die; jimport('joomla.application.component.view'); /** * View to edit */ class TemplateckViewTemplate extends JViewLegacy { protected $state; protected $item; protected $form; protected $params; /** * Display the view */ public function display($tpl = null) { $app = JFactory::getApplication(); $user = JFactory::getUser(); if ($app->input->get('raw') == '1') { $authorised = $user->authorise('core.edit.own', 'com_templateck'); if ($authorised !== true) { // Redirect to the edit screen. $app->redirect(JURI::root() . 'index.php?option=com_templateck&view=login&template=templatecreatorck&tmpl=login&id=' . $this->item->id); return false; } parent::display($tpl); exit(); } // include the classes include_once JPATH_COMPONENT . '/helpers/creatorck.php'; include_once JPATH_COMPONENT . '/helpers/menustyles.php'; include_once JPATH_COMPONENT . '/helpers/stylescss.php'; include_once JPATH_COMPONENT . '/helpers/ZipArchiver.php'; JText::script('TEMPLATE_MUST_HAVE_NAME'); JText::script('TEMPLATE_MUST_HAVE_WIDTH'); JText::script('CK_LOADING'); JText::script('CK_LOAD_SUCCESS_STEP1'); JText::script('CK_LOAD_FAILURE_STEP1'); JText::script('CK_LOAD_SUCCESS_STEP_ARCHIVE'); JText::script('CK_LOAD_FAILURE_STEP_ARCHIVE'); JText::script('CK_LOAD_SUCCESS_STEP_XML'); JText::script('CK_LOAD_FAILURE_STEP_XML'); JText::script('CK_LOAD_SUCCESS_STEP_CSS'); JText::script('CK_LOAD_FAILURE_STEP_CSS'); JText::script('CK_PREVIEW_TEMPLATE'); JText::script('CK_ONLY_ONE_COMPONENT'); JText::script('CK_COPYTOCLIPBOARD'); JText::script('CK_COPYFROMCLIPBOARD'); JText::script('CK_CLIPBOARDEMPTY'); JText::script('TEMPLATE_MUST_HAVE_CONTENT'); JText::script('CK_INVALID_ID'); JText::script('CK_ENTER_VALID_ID'); JText::script('CK_ENTER_VALID_POSITION'); JText::script('CK_ENTER_UNIQUE_ID'); JText::script('CK_ENTER_UNIQUE_POSITION'); JText::script('CK_POSITION_ALREADY_USED'); JText::script('CK_CHOOSE_BLOC_TYPE'); JText::script('CK_ERASE_WITH_NEW_THEME'); JText::script('CK_ERASE_WITH_NEW_FAVORITE'); JText::script('CK_SUCCESS_CREATING_FAVORITEFILE'); JText::script('CK_SELECT_PALETTE'); JText::script('CK_OK'); JText::script('CK_CLEAR'); JText::script('CK_COPY'); JText::script('CK_PASTE'); $this->state = $this->get('State'); $this->item = $this->get('Data'); $this->form = $this->get('Form'); $this->isTemplateInstalled = $this->_checkIfTemplateInstalled($this->item->name); $this->imagespath = TEMPLATECREATORCK_MEDIA_URL . '/images/menustyles/'; // $this->params = $app->getParams('com_templateck'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } if ($this->_layout == 'edit' || !$this->item->id) { $authorised = $user->authorise('core.edit.own', 'com_templateck'); if ($authorised !== true) { // Redirect to the edit screen. $app->redirect(JURI::root() . 'index.php?option=com_templateck&view=login&template=templatecreatorck&tmpl=login&id=' . $this->item->id); return false; } } parent::display($tpl); exit(); } /** * private function to load the fonts in the page */ function _callfonts() { $fontstyles = ''; $fontsheets = ''; $db = JFactory::getDBO(); $query = "SELECT * FROM #__templateck_fonts "; $db->setQuery($query); $rows = $db->loadObjectList(); if (!$rows) return false; foreach ($rows as $row) { if (stristr($row->styles, '@import')) { $fontsheets .= str_replace(");", "' rel='stylesheet' type='text/css'>", str_replace("@import url(", "<link href='", $row->styles)); } else { $fontstyles .= str_replace("url('", "url('" . JURI::base(true) . "/components/com_templateck/fonts/" . $row->name . "/", $row->styles); } } if ($fontstyles) echo "<style type=\"text/css\">" . $fontstyles . "</style>"; if ($fontsheets) echo $fontsheets; } /** * private function to check if the template templatecreatorck is installed */ function _checkIfTemplateInstalled($name) { if (! JFolder::exists(JPATH_ROOT . '/templates/' . $name)) { return false; } else { return true; } return false; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings