Sindbad~EG File Manager
<?php
/**
* @package RSDirectory!
* @copyright (C) 2013-2021 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/
// No direct access.
defined('_JEXEC') or die('Restricted access');
if ( !file_exists(JPATH_ADMINISTRATOR . '/components/com_rsdirectory/helpers/rsdirectory.php') )
return;
require_once JPATH_ADMINISTRATOR . '/components/com_rsdirectory/helpers/rsdirectory.php';
require_once dirname(__FILE__) . '/helper.php';
// Get the JInput object.
$jinput = JFactory::getApplication()->input;
// Load language.
$lang = JFactory::getLanguage();
$lang->load('com_rsdirectory');
RSDirectoryHelper::loadMedia();
if (!RSDirectoryHelper::isJ4())
{
JHtml::_('stylesheet', 'mod_rsdirectory_simple_search/style.css', array('relative' => true, 'version' => 'auto'));
}
if ( $params->get('show_categories') )
{
JHtml::_('script', 'mod_rsdirectory_simple_search/script.js', array('relative' => true, 'version' => 'auto'));
// Get categories.
$categories_list = RSDirectoryHelper::getSubcategories(0);
// Get the selected categories.
list($categories) = $jinput->get( 'categories', array(''), 'array' );
$selected_category_text = JText::_('MOD_RSDIRECTORY_SIMPLE_SEARCH_ALL_CATEGORIES');
$selected_category_value = 0;
if ($categories !== '')
{
$categories = explode(',', $categories);
if ( !isset($categories[1]) )
{
list($category_id) = $categories;
RSDirectoryHelper::findCategory($category_id, $categories_list, $category);
if ($category)
{
$selected_category_text = RSDirectoryHelper::escapeHTML($category->title);
$selected_category_value = $category_id;
}
}
}
}
// Get the custom itemid.
$itemid = $params->get('itemid');
// Get the search query.
list($q) = $jinput->get( 'q', array(''), 'array' );
// Sanitize the search query.
$q = urldecode($q);
$q = htmlspecialchars($q);
require JModuleHelper::getLayoutPath('mod_rsdirectory_simple_search', $params->get('layout', 'default'));
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists