File manager - Edit - /home/jardides/www/Jardi-design/administrator/components/com_templateck/views/template/tmpl/ajaxmoduleselect.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 to this file defined('_JEXEC') or die('Restricted access'); $input = JFactory::getApplication()->input; $position= $input->get('blockposition', '', 'string'); $blockid = $input->get('blockid', '', 'string'); // $module = str_replace('module-', '', $type); // $module = 'mod_' . $module; $db = JFactory::getDbo(); $query = "SELECT *,element AS module FROM #__extensions WHERE type='module' AND client_id = 0 AND enabled= 1 ORDER BY name"; $db->setQuery((string) $query); try { $items = $db->loadObjectList(); } catch (Exception $e) { echo '<div class=alert><b>SQL ERROR FROM TEMPLATE CREATOR CK - SELECTION OF MODULES : </b>'. $e->getMessage().'</div>'; exit; } $client = JApplicationHelper::getClientInfo(0); $lang = JFactory::getLanguage(); // Loop through the results to add the XML metadata, // and load language support. foreach ($items as &$item) { $path = JPath::clean($client->path.'/modules/'.$item->module.'/'.$item->module.'.xml'); if (file_exists($path)) { $item->xml = simplexml_load_file($path); } else { $item->xml = null; } // 1.5 Format; Core files or language packs then // 1.6 3PD Extension Support $lang->load($item->module.'.sys', $client->path, null, false, false) || $lang->load($item->module.'.sys', $client->path.'/modules/'.$item->module, null, false, false) || $lang->load($item->module.'.sys', $client->path, $lang->getDefault(), false, false) || $lang->load($item->module.'.sys', $client->path.'/modules/'.$item->module, $lang->getDefault(), false, false); $item->name = JText::_($item->name); if (isset($item->xml) && $text = trim($item->xml->description)) { $item->desc = JText::_($text); } else { $item->desc = JText::_('COM_MODULES_NODESCRIPTION'); } } $items = JArrayHelper::sortObjects($items, 'name', 1, true, $lang->getLocale()); ?> <div id="ckmodulesselectlist"> <h3><?php echo JText::_('CK_MODULES_SELECT') ?></h3> <p><?php echo JText::sprintf('CK_MODULES_SELECT_DESC', '<b>' . $position . '</b>') ?></p> <table style="width: 100%;vertical-align: middle;" class="cktable cktable-striped cktable-bordered cktable-hover"> <tr> <td colspan="1"><b><?php echo JText::_('CK_TYPE') ?></b></td> <td colspan="1"><b><?php echo JText::_('CK_DESCRIPTION') ?></b></td> <td colspan="1"><b><?php echo JText::_('CK_ACTION') ?></b></td> </tr> <?php foreach ($items as $item) { // Prepare variables for the link. $link = 'javascript:void(0)'; // $link = 'index.php?option=com_modules&task=module.add&eid='. $item->extension_id; $name = $this->escape($item->name); $desc = JHTML::_('string.truncate', ($this->escape($item->desc)), 200); $short_desc = JHTML::_('string.truncate', ($this->escape($item->desc)), 90); ?> <tr> <td><b><?php echo $name ?></b></td> <td><?php echo $desc ?></td> <td><div class="ckbutton ckbutton-success" onclick="ckAddModule('<?php echo $item->element ?>', '<?php echo $position ?>', '<?php echo $blockid ?>')"><span class="fa fa-plus"> </span><?php echo JText::_('CK_CREATE') ?></div></td> </tr> <?php } ?> </div> <script> setTooltip(); </script>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings