File manager - Edit - /home/jardides/www/Jardi-design/administrator/components/com_templateck/views/template/tmpl/edit_favorite.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(); $user = JFactory::getUser(); $canEdit = $user->authorise('core.edit', 'com_templateck'); ?> <div id="popup_favoriteck" class="leftpanel"> <div class="panelheader"> <div style="float:right;"> <div class="ckclose black" onclick="closeFavoritePopup(true)"></div> <div class="ckclose ckstick" id="ckstick" onclick="$ck('#popup_favoriteck').toggleClass('stick');"></div> </div> <div class="ckpopupsubtitle"><?php echo JText::_('CK_FAVORITES') ?> <span class="subtitle">[ <span class="objid"></span> ]</span></div> <div class="clr"></div> </div> <div class="inner"> <div class="menulink2 current" tab="tab_suggestions"><?php echo JText::_('CK_SUGGESTIONS'); ?></div> <div class="menulink2" tab="tab_myfavorites"><?php echo JText::_('CK_MYFAVORITES'); ?></div> <div class="clr"></div> <div class="tab2 menustyles" id="tab_myfavorites" style="min-height: 450px;"> <?php if ($canEdit) { ?> <div class="ckbutton ckaddtofavorite" id="ckaddtofavorite" onclick="savefavorite()"><span class="fa fa-plus-circle"></span> <?php echo JText::_('CK_ADD_TO_FAVORITES_ACTION'); ?></div> <br /> <?php } ?> <div class="layoutinfostitle"><?php echo JText::_('CK_MYFAVORITES'); ?></div> <div id="showfavorites" class="clearfix"> <?php $path = JPATH_ROOT . '/administrator/components/com_templateck/favorites'; $files = JFolder::files($path, '.fck3', false, false); natsort($files); $files = array_reverse($files, true); $i = 1; // $nbthemes = count($files); echo '<div class="inner clearfix" style="min-height:35px;margin: 0 5px;">'; foreach ($files as $file) { $favorite = JFile::stripExt($file); $content = JFile::read($path . '/' . $file); $content = json_decode($content); $styles = str_replace('|ID|', 'ckmyfavorite' . $favorite, $content->style); $styles = str_replace('|di|', '#', $styles); $ckprops = ''; foreach ($content as $name => $prop) { if (substr($name, 0,7) == 'ckprops') { $ckprops .= '<div ' . str_replace('|di|', '#', $prop) . '></div>'; } } echo '<div class="ckmyfavoriterow clearfix">' . '<div id="ckmyfavorite' . $favorite . '" data-name="' . $favorite . '" style="" class="favoritethumb ckmyfavorite" data-merge="0" onmouseout="restoreBeforeFavorite()" onmouseover="previewFavoriteDirect(this)" onclick="loadFavorite(\'' . $favorite . '\', \'favorites\', 1, this)">' . '<div class="themeindice">' . $i . '</div>' . $ckprops . '<div class="ckstyle"><style>' . $styles . '</style></div>' . '<div class="inner">' // . '<style>' . $styles . '</style>' . 'Lorem ipsum dolor sit amet' . '<div class="favoritethumbstyles"><style>' . $content->style . '</style></div>' . '</div>' . '</div>' . ($canEdit ? '<div class="ckbutton" onclick="ckEditFavorite(this);"><span class="fa fa-edit"></span> ' . JText::_('CK_EDIT') . '</div>' : '') . ($canEdit ? '<div class="ckbutton" onclick="ckRemoveFavorite(this);"><span class="fa fa-remove" style="color:red;"></span> ' . JText::_('CK_DELETE') . '</div>' : '') . '</div>'; // echo '<div class="favoritethumb" data-merge="0" onmouseout="restoreBeforeFavorite()" onmouseover="previewFavoriteDirect(this)" onclick="loadFavorite(\'' . $favorite . '\', \'favorites\', 1, this)"><img src="' . Juri::base(true) . '/components/com_templateck/images/favorite.png" style="height:32px;width:32px;margin:0;padding:0;" />' // . '<div class="themeindice">' . $i . '</div>' // . '<div class="favoritethumbstyles"><style>' . $content->style . '</style></div>' // . '<div class="themeindice">' . $i . '</div>' // . '</div>'; $i++; } echo '</div>'; ?> </div> </div> <div class="tab2 menustyles current" id="tab_suggestions"> <div class="layoutinfostitle"><?php echo JText::_('CK_SUGGESTIONS'); ?></div> <div id="showsuggestions" class="clearfix"> <div class="menulink current" tab="tab_menus"><?php echo JText::_('CK_MENU'); ?></div> <div class="menulink" tab="tab_modules"><?php echo JText::_('CK_MODULE'); ?></div> <div class="menulink" tab="tab_shadows"><?php echo JText::_('CK_SHADOW'); ?></div> <div class="clr"></div> <div id="elementscontentfavorites"> <div class="clearfix" style="margin: 0 5px;"> <div class="tab menustyles current" id="tab_menus"> <?php $index = 'menu'; $path = JPATH_ROOT . '/administrator/components/com_templateck/suggestions'; $files = JFolder::files($path, '.fck3', false, false); natsort($files); $i = 1; $merge = 0; ?> <?php foreach ($files as $file) { $favorite = JFile::stripExt($file); $content = JFile::read($path . '/' . $file); $content = json_decode($content); if ($index == 'menu' && !stristr($file, "menu")) : $index = 'module'; ?> </div> <div class="tab menustyles" id="tab_modules"> <?php endif; if ($index == 'module' && !stristr($file, "module")) : $index = 'shadow'; $merge = '1'; ?> </div> <div class="tab menustyles" id="tab_shadows"> <?php endif; if (stristr($file, "shadow")) { $content->style = '/*shadow start*/' . $content->style . '/*shadow end*/'; } echo '<div class="favoritethumb" data-merge="' . $merge . '" onmouseout="restoreBeforeFavorite()" onmouseover="previewFavoriteDirect(this)" onclick="loadFavorite(\'' . $favorite . '\', \'suggestions\', 1, this)"><img src="' . Juri::base(true) . '/components/com_templateck/suggestions/' . $favorite . '.png" style="margin:0;padding:0;" />' . '<div class="themeindice">' . $i . '</div>' . '<div class="favoritethumbstyles"><style>' . $content->style . '</style></div>' . '</div>'; $i++; } ?> </div> </div> </div> </div> </div> </div> </div> <script language="javascript" type="text/javascript"> $ck('#elementscontentfavorites div.tab:not(.current)').hide(); $ck('.menulink', $ck('#popup_favoriteck')).each(function(i, tab) { $ck(tab).click(function() { $ck('#elementscontentfavorites div.tab').hide(); $ck('.menulink', $ck('#popup_favoriteck')).removeClass('current'); if ($ck('#' + $ck(tab).attr('tab')).length) $ck('#' + $ck(tab).attr('tab')).show(); $ck(this).addClass('current'); }); }); $ck('#popup_favoriteck div.tab2:not(.current)').hide(); $ck('.menulink2', $ck('#popup_favoriteck')).each(function(i, tab) { $ck(tab).click(function() { $ck('#popup_favoriteck div.tab2').hide(); $ck('.menulink2', $ck('#popup_favoriteck')).removeClass('current'); if ($ck('#' + $ck(tab).attr('tab')).length) $ck('#' + $ck(tab).attr('tab')).show(); $ck(this).addClass('current'); }); }); </script>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings