__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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
/**
 * CustomTables Joomla! 3.x/4.x/5.x Component
 * @package Custom Tables
 * @subpackage administrator/components/com_customtables/controller
 * @author Ivan Komlev <[email protected]>
 * @link https://joomlaboat.com
 * @copyright (C) 2018-2024. Ivan Komlev
 * @license GNU/GPL Version 2 or later - https://www.gnu.org/licenses/gpl-2.0.html
 **/

// No direct access to this file
defined('_JEXEC') or die();

use CustomTables\common;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Router\Route;

/**
 * General Controller of Customtables component
 */
class CustomtablesController extends BaseController
{
	public function __construct($config = array())
	{
		// set the default view
		$config['default_view'] = 'customtables';
		parent::__construct($config);
	}

	function display($cachable = false, $urlparams = false)
	{
		// set default view if not set
		$view = common::inputGetCmd('view', 'customtables');
		$data = $this->getViewRelation($view);
		$layout = common::inputGet('layout', null, 'WORD');
		$id = common::inputGetCmd('id');

		// Check for edit form.
		if (CustomtablesHelper::checkArray($data)) {
			if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_customtables.edit.' . $data['view'], $id)) {
				// Somehow the person just went to the form - we don't allow that.

				Factory::getApplication()->enqueueMessage(common::translate('JLIB_APPLICATION_ERROR_UNHELD_ID', $id), 'error');

				// check if item was opened from other than its own list view
				$ref = common::inputGetCmd('ref', 0);
				$refid = common::inputGetInt('refid', 0);
				// set redirect
				if ($refid > 0 && common::checkString($ref)) {
					// redirect to item of ref
					if ($ref == 'records') {
						$refid = common::inputGetCmd('refid', 0);
						$this->setRedirect(Route::_('index.php?option=com_customtables&view=' . $ref . '&layout=edit&id=' . $refid, false));
					} else
						$this->setRedirect(Route::_('index.php?option=com_customtables&view=' . $ref . '&layout=edit&id=' . $refid, false));
				} elseif (common::checkString($ref)) {

					// redirect to ref
					$this->setRedirect(Route::_('index.php?option=com_customtables&view=' . $ref, false));
				} else {
					// normal redirect back to the list view
					$this->setRedirect(Route::_('index.php?option=com_customtables&view=' . $data['views'], false));
				}

				return false;
			}
		}

		return parent::display($cachable, $urlparams);
	}

	protected function getViewRelation($view)
	{
		if (common::checkString($view)) {
			// the view relationships
			$views = array(
				'categories' => 'listofcategories',
				'tables' => 'listoftables',
				'layouts' => 'listoflayouts',
				'fields' => 'listoffields',
				'records' => 'listofrecords',
				'documentation' => 'documentation',
				'databasecheck' => 'databasecheck'
			);
			// check if this is a list view
			if (in_array($view, $views)) {
				// this is a list view
				return array('edit' => false, 'view' => array_search($view, $views), 'views' => $view);
			} // check if it is an edit view
			elseif (array_key_exists($view, $views)) {
				// this is an edit view
				return array('edit' => true, 'view' => $view, 'views' => $views[$view]);
			}
		}
		return false;
	}

	protected function checkEditId($context, $id): bool
	{
		if ($id) {
			$values = (array)Factory::getApplication()->getUserState($context . '.id');

			//To support both int and cmd IDs
			return \in_array($id, $values);
		}

		// No id for a new item.
		return true;
	}
}

Filemanager

Name Type Size Permission Actions
controllers Folder 0775
helpers Folder 0775
layouts Folder 0775
models Folder 0775
tables Folder 0775
views Folder 0775
access.xml File 3.44 KB 0664
config.xml File 4.8 KB 0664
controller.php File 3.56 KB 0664
customtables.php File 1.48 KB 0664
customtables.xml File 7.18 KB 0664
index.html File 43 B 0664
script.php File 4.48 KB 0664
Filemanager