__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\HTML\Helpers;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * HTML utility class for building a dropdown menu
 *
 * @since  3.0
 */
abstract class Dropdown
{
    /**
     * @var    array  Array containing information for loaded files
     * @since  3.0
     */
    protected static $loaded = [];

    /**
     * @var    string  HTML markup for the dropdown list
     * @since  3.0
     */
    protected static $dropDownList = null;

    /**
     * Method to inject needed script
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function init()
    {
        // Only load once
        if (isset(static::$loaded[__METHOD__])) {
            return;
        }

        // Depends on Bootstrap
        HTMLHelper::_('bootstrap.framework');

        Factory::getDocument()->addScriptDeclaration("
			(function($){
				$(document).ready(function (){
					$('.has-context')
					.mouseenter(function (){
						$('.btn-group',$(this)).show();
					})
					.mouseleave(function (){
						$('.btn-group',$(this)).hide();
						$('.btn-group',$(this)).removeClass('open');
					});

					contextAction =function (cbId, task)
					{
						$('input[name=\"cid[]\"]').removeAttr('checked');
						$('#' + cbId).attr('checked','checked');
						Joomla.submitbutton(task);
					}
				});
			})(jQuery);
			");

        // Set static array
        static::$loaded[__METHOD__] = true;
    }

    /**
     * Method to start a new dropdown menu
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function start()
    {
        // Only start once
        if (isset(static::$loaded[__METHOD__]) && static::$loaded[__METHOD__] == true) {
            return;
        }

        $dropDownList = '<div class="btn-group" style="margin-left:6px;display:none">
							<a href="#" data-bs-toggle="dropdown" class="dropdown-toggle btn btn-secondary btn-sm">
								<span class="caret"></span>
							</a>
							<ul class="dropdown-menu">';
        static::$dropDownList       = $dropDownList;
        static::$loaded[__METHOD__] = true;
    }

    /**
     * Method to render current dropdown menu
     *
     * @return  string  HTML markup for the dropdown list
     *
     * @since   3.0
     */
    public static function render()
    {
        $dropDownList  = static::$dropDownList;
        $dropDownList .= '</ul></div>';

        static::$dropDownList                  = null;
        static::$loaded[__CLASS__ . '::start'] = false;

        return $dropDownList;
    }

    /**
     * Append an edit item to the current dropdown menu
     *
     * @param   integer  $id          Record ID
     * @param   string   $prefix      Task prefix
     * @param   string   $customLink  The custom link if dont use default Joomla action format
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function edit($id, $prefix = '', $customLink = '')
    {
        static::start();

        if (!$customLink) {
            $option = Factory::getApplication()->getInput()->getCmd('option');
            $link   = 'index.php?option=' . $option;
        } else {
            $link = $customLink;
        }

        $link .= '&task=' . $prefix . 'edit&id=' . $id;
        $link = Route::_($link);

        static::addCustomItem(Text::_('JACTION_EDIT'), $link);
    }

    /**
     * Append a publish item to the current dropdown menu
     *
     * @param   string  $checkboxId  ID of corresponding checkbox of the record
     * @param   string  $prefix      The task prefix
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function publish($checkboxId, $prefix = '')
    {
        $task = $prefix . 'publish';
        static::addCustomItem(Text::_('JTOOLBAR_PUBLISH'), 'javascript:void(0)', 'onclick="contextAction(\'' . $checkboxId . '\', \'' . $task . '\')"');
    }

    /**
     * Append an unpublish item to the current dropdown menu
     *
     * @param   string  $checkboxId  ID of corresponding checkbox of the record
     * @param   string  $prefix      The task prefix
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function unpublish($checkboxId, $prefix = '')
    {
        $task = $prefix . 'unpublish';
        static::addCustomItem(Text::_('JTOOLBAR_UNPUBLISH'), 'javascript:void(0)', 'onclick="contextAction(\'' . $checkboxId . '\', \'' . $task . '\')"');
    }

    /**
     * Append a featured item to the current dropdown menu
     *
     * @param   string  $checkboxId  ID of corresponding checkbox of the record
     * @param   string  $prefix      The task prefix
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function featured($checkboxId, $prefix = '')
    {
        $task = $prefix . 'featured';
        static::addCustomItem(Text::_('JFEATURED'), 'javascript:void(0)', 'onclick="contextAction(\'' . $checkboxId . '\', \'' . $task . '\')"');
    }

    /**
     * Append an unfeatured item to the current dropdown menu
     *
     * @param   string  $checkboxId  ID of corresponding checkbox of the record
     * @param   string  $prefix      The task prefix
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function unfeatured($checkboxId, $prefix = '')
    {
        $task = $prefix . 'unfeatured';
        static::addCustomItem(Text::_('JUNFEATURED'), 'javascript:void(0)', 'onclick="contextAction(\'' . $checkboxId . '\', \'' . $task . '\')"');
    }

    /**
     * Append an archive item to the current dropdown menu
     *
     * @param   string  $checkboxId  ID of corresponding checkbox of the record
     * @param   string  $prefix      The task prefix
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function archive($checkboxId, $prefix = '')
    {
        $task = $prefix . 'archive';
        static::addCustomItem(Text::_('JTOOLBAR_ARCHIVE'), 'javascript:void(0)', 'onclick="contextAction(\'' . $checkboxId . '\', \'' . $task . '\')"');
    }

    /**
     * Append an unarchive item to the current dropdown menu
     *
     * @param   string  $checkboxId  ID of corresponding checkbox of the record
     * @param   string  $prefix      The task prefix
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function unarchive($checkboxId, $prefix = '')
    {
        $task = $prefix . 'unpublish';
        static::addCustomItem(Text::_('JTOOLBAR_UNARCHIVE'), 'javascript:void(0)', 'onclick="contextAction(\'' . $checkboxId . '\', \'' . $task . '\')"');
    }

    /**
     * Append a trash item to the current dropdown menu
     *
     * @param   string  $checkboxId  ID of corresponding checkbox of the record
     * @param   string  $prefix      The task prefix
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function trash($checkboxId, $prefix = '')
    {
        $task = $prefix . 'trash';
        static::addCustomItem(Text::_('JTOOLBAR_TRASH'), 'javascript:void(0)', 'onclick="contextAction(\'' . $checkboxId . '\', \'' . $task . '\')"');
    }

    /**
     * Append an untrash item to the current dropdown menu
     *
     * @param   string  $checkboxId  ID of corresponding checkbox of the record
     * @param   string  $prefix      The task prefix
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function untrash($checkboxId, $prefix = '')
    {
        $task = $prefix . 'publish';
        static::addCustomItem(Text::_('JTOOLBAR_UNTRASH'), 'javascript:void(0)', 'onclick="contextAction(\'' . $checkboxId . '\', \'' . $task . '\')"');
    }

    /**
     * Append a checkin item to the current dropdown menu
     *
     * @param   string  $checkboxId  ID of corresponding checkbox of the record
     * @param   string  $prefix      The task prefix
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function checkin($checkboxId, $prefix = '')
    {
        $task = $prefix . 'checkin';
        static::addCustomItem(Text::_('JTOOLBAR_CHECKIN'), 'javascript:void(0)', 'onclick="contextAction(\'' . $checkboxId . '\', \'' . $task . '\')"');
    }

    /**
     * Writes a divider between dropdown items
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function divider()
    {
        static::$dropDownList .= '<li class="divider"></li>';
    }

    /**
     * Append a custom item to current dropdown menu
     *
     * @param   string   $label           The label of item
     * @param   string   $link            The link of item
     * @param   string   $linkAttributes  Custom link attributes
     * @param   string   $className       Class name of item
     * @param   boolean  $ajaxLoad        True if using ajax load when item clicked
     * @param   string   $jsCallBackFunc  Javascript function name, called when ajax load successfully
     *
     * @return  void
     *
     * @since   3.0
     */
    public static function addCustomItem(
        $label,
        $link = 'javascript:void(0)',
        $linkAttributes = '',
        $className = '',
        $ajaxLoad = false,
        $jsCallBackFunc = null
    ) {
        static::start();

        if ($ajaxLoad) {
            $href = ' href = "javascript:void(0)" onclick="loadAjax(\'' . $link . '\', \'' . $jsCallBackFunc . '\')"';
        } else {
            $href = ' href = "' . $link . '" ';
        }

        $dropDownList = static::$dropDownList;
        $dropDownList .= '<li class="' . $className . '"><a ' . $linkAttributes . $href . ' >';
        $dropDownList .= $label;
        $dropDownList .= '</a></li>';
        static::$dropDownList = $dropDownList;
    }
}

Filemanager

Name Type Size Permission Actions
Access.php File 10.07 KB 0664
ActionsDropdown.php File 6.69 KB 0664
AdminLanguage.php File 1.69 KB 0664
Behavior.php File 11.32 KB 0664
Bootstrap.php File 32.54 KB 0664
Category.php File 7.66 KB 0664
Content.php File 2.97 KB 0664
ContentLanguage.php File 2.11 KB 0664
Date.php File 2.48 KB 0664
Debug.php File 1.75 KB 0664
DraggableList.php File 2.36 KB 0664
Dropdown.php File 9.84 KB 0664
Email.php File 2.47 KB 0664
Form.php File 2.02 KB 0664
FormBehavior.php File 5.63 KB 0664
Grid.php File 9.65 KB 0664
Icons.php File 2.02 KB 0664
JGrid.php File 19.81 KB 0664
Jquery.php File 2.75 KB 0664
Links.php File 3.21 KB 0664
ListHelper.php File 8.5 KB 0664
Menu.php File 13.81 KB 0664
Number.php File 4.02 KB 0664
SearchTools.php File 4 KB 0664
Select.php File 29.31 KB 0664
Sidebar.php File 3.62 KB 0664
SortableList.php File 1.76 KB 0664
StringHelper.php File 10.87 KB 0664
Tag.php File 7.38 KB 0664
Telephone.php File 2.54 KB 0664
UiTab.php File 3.13 KB 0664
User.php File 2.21 KB 0664
WorkflowStage.php File 2.4 KB 0664
Filemanager