Server IP : 195.201.23.43 / Your IP : 3.137.210.249 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/kdecoratie/public_html/administrator/components/com_media/views/media/ |
Upload File : |
<?php /** * @package Joomla.Administrator * @subpackage com_media * * @copyright (C) 2007 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Media component * * @since 1.0 */ class MediaViewMedia extends JViewLegacy { /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. * * @since 1.0 */ public function display($tpl = null) { $app = JFactory::getApplication(); $config = JComponentHelper::getParams('com_media'); if (!$app->isClient('administrator')) { return $app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'warning'); } /* * Display form for FTP credentials? * Don't set them here, as there are other functions called before this one if there is any file write operation */ $ftp = !JClientHelper::hasCredentials('ftp'); $session = JFactory::getSession(); $state = $this->get('state'); $this->session = $session; $this->config = &$config; $this->state = &$state; $this->require_ftp = $ftp; $this->folders_id = ' id="media-tree"'; $this->folders = $this->get('folderTree'); $this->sidebar = JHtmlSidebar::render(); // Set the toolbar $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { // Get the toolbar object instance $bar = JToolbar::getInstance('toolbar'); $user = JFactory::getUser(); // Set the titlebar text JToolbarHelper::title(JText::_('COM_MEDIA'), 'images mediamanager'); // Add an upload button if ($user->authorise('core.create', 'com_media')) { // Instantiate a new JLayoutFile instance and render the layout $layout = new JLayoutFile('toolbar.uploadmedia'); $bar->appendButton('Custom', $layout->render(array()), 'upload'); JToolbarHelper::divider(); } // Add a create folder button if ($user->authorise('core.create', 'com_media')) { // Instantiate a new JLayoutFile instance and render the layout $layout = new JLayoutFile('toolbar.newfolder'); $bar->appendButton('Custom', $layout->render(array()), 'create'); JToolbarHelper::divider(); } // Add a delete button if ($user->authorise('core.delete', 'com_media')) { // Instantiate a new JLayoutFile instance and render the layout $layout = new JLayoutFile('toolbar.deletemedia'); $bar->appendButton('Custom', $layout->render(array()), 'delete'); JToolbarHelper::divider(); } // Add a preferences button if ($user->authorise('core.admin', 'com_media') || $user->authorise('core.options', 'com_media')) { JToolbarHelper::preferences('com_media'); JToolbarHelper::divider(); } JToolbarHelper::help('JHELP_CONTENT_MEDIA_MANAGER'); } /** * Display a folder level * * @param array $folder Array with folder data * * @return string * * @since 1.0 */ protected function getFolderLevel($folder) { $this->folders_id = null; $txt = null; if (isset($folder['children']) && count($folder['children'])) { $tmp = $this->folders; $this->folders = $folder; $txt = $this->loadTemplate('folders'); $this->folders = $tmp; } return $txt; } }Private