File manager - Edit - /home/jardides/www/Jardi-design/sitetest/plugins/system/slideshowckparams/elements/ckslidesfromfolderimport.php
Back
<?php /** * @copyright Copyright (C) 2013 Cedric KEIFLIN alias ced1870 * http://www.joomlack.fr * @license GNU/GPL * */ // no direct access defined('_JEXEC') or die('Restricted access'); jimport('joomla.filesystem.folder'); class JFormFieldCkslidesfromfolderimport extends JFormField { protected $type = 'ckslidesfromfolderimport'; protected function getInput() { $document = JFactory::getDocument(); $path = 'modules/mod_slideshowck/elements/ckslidesfromfoldermanager/'; JHtml::_('script', $path . 'ckslidesfromfoldermanager.js'); JHtml::_('stylesheet', $path . 'ckslidesfromfoldermanager.css'); $this->value = $this->value ? $this->value : 'modules/mod_slideshowck/images/slides2'; $imgdir = JPATH_ROOT . '/' . trim($this->value, "/"); $imgs = JFolder::files($imgdir, '.jpg|.png|.jpeg|.gif|.JPG|.JPEG|.jpeg', false, true); $imgs = str_replace(JPATH_ROOT, "", $imgs); $imgs = str_replace("\\", "/", $imgs); foreach ($imgs as &$img) { $img = trim($img, "/"); } $imgs = json_encode($imgs); $imgs = str_replace("\"", "|qq|", $imgs); $html = ''; $icon = $this->element['icon']; $html .= $icon ? '<img src="' . JURI::root() . 'modules/mod_slideshowck/elements/images/' . $icon . '" style="margin-right:5px;" />' : '<div style="float:left;width:15px;margin-right:5px;"> </div>'; $html .= '<input name="' . $this->name . '" id="' . $this->name . '" type="text" value="' . $this->value . '" style="width:100px;border-radius:3px;-moz-border-radius:3px;padding:1px;"/>' . '<input type="button" onclick="importfromfolderck(\'' . $imgs . '\');" value="' . JText::_('PLG_SLIDESHOWCK_IMPORT') . '" style="width:100px;border-radius:3px;-moz-border-radius:3px;padding:1px;"/>'; return $html; } protected function getPathToImages() { $localpath = dirname(__FILE__); $rootpath = JPATH_ROOT; $httppath = trim(JURI::root(), "/"); $pathtoimages = str_replace("\\", "/", str_replace($rootpath, $httppath, $localpath)); return $pathtoimages; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings