Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
php /
PhpMyAdmin /
SqlParser /
Statements /
Delete
Unzip
Name
Size
Permission
Date
Action
AlterStatement.php
3.96
KB
-rw-r--r--
2023-01-25 10:43
AnalyzeStatement.php
744
B
-rw-r--r--
2023-01-25 10:43
BackupStatement.php
631
B
-rw-r--r--
2023-01-25 10:43
CallStatement.php
716
B
-rw-r--r--
2023-01-25 10:43
CheckStatement.php
632
B
-rw-r--r--
2023-01-25 10:43
ChecksumStatement.php
553
B
-rw-r--r--
2023-01-25 10:43
CreateStatement.php
24.01
KB
-rw-r--r--
2023-01-25 10:43
DeleteStatement.php
11.19
KB
-rw-r--r--
2023-01-25 10:43
DropStatement.php
1.61
KB
-rw-r--r--
2023-01-25 10:43
ExplainStatement.php
6.31
KB
-rw-r--r--
2023-01-25 10:43
InsertStatement.php
7.2
KB
-rw-r--r--
2023-01-25 10:43
LoadStatement.php
11.05
KB
-rw-r--r--
2023-01-25 10:43
LockStatement.php
3.36
KB
-rw-r--r--
2023-01-25 10:43
MaintenanceStatement.php
1.47
KB
-rw-r--r--
2023-01-25 10:43
NotImplementedStatement.php
1.3
KB
-rw-r--r--
2023-01-25 10:43
OptimizeStatement.php
748
B
-rw-r--r--
2023-01-25 10:43
PurgeStatement.php
3.74
KB
-rw-r--r--
2023-01-25 10:43
RenameStatement.php
1.36
KB
-rw-r--r--
2023-01-25 10:43
RepairStatement.php
674
B
-rw-r--r--
2023-01-25 10:43
ReplaceStatement.php
4.97
KB
-rw-r--r--
2023-01-25 10:43
RestoreStatement.php
580
B
-rw-r--r--
2023-01-25 10:43
SelectStatement.php
7.83
KB
-rw-r--r--
2023-01-25 10:43
SetStatement.php
2.36
KB
-rw-r--r--
2023-01-25 10:43
ShowStatement.php
1.35
KB
-rw-r--r--
2023-01-25 10:43
TransactionStatement.php
2.39
KB
-rw-r--r--
2023-01-25 10:43
TruncateStatement.php
854
B
-rw-r--r--
2023-01-25 10:43
UpdateStatement.php
2.5
KB
-rw-r--r--
2023-01-25 10:43
WithStatement.php
11.07
KB
-rw-r--r--
2023-01-25 10:43
Save
Rename
<?php declare(strict_types=1); namespace PhpMyAdmin\SqlParser\Statements; use PhpMyAdmin\SqlParser\Components\Expression; use PhpMyAdmin\SqlParser\Parser; use PhpMyAdmin\SqlParser\Statement; use PhpMyAdmin\SqlParser\Token; use PhpMyAdmin\SqlParser\TokensList; use function in_array; use function trim; /** * `PURGE` statement. * * PURGE { BINARY | MASTER } LOGS * { TO 'log_name' | BEFORE datetime_expr } */ class PurgeStatement extends Statement { /** * The type of logs * * @var string|null */ public $log_type; /** * The end option of this query. * * @var string|null */ public $end_option; /** * The end expr of this query. * * @var string|null */ public $end_expr; /** * @return string */ public function build() { $ret = 'PURGE ' . $this->log_type . ' LOGS ' . ($this->end_option !== null ? ($this->end_option . ' ' . $this->end_expr) : ''); return trim($ret); } /** * @param Parser $parser the instance that requests parsing * @param TokensList $list the list of tokens to be parsed */ public function parse(Parser $parser, TokensList $list) { ++$list->idx; // Skipping `PURGE`. /** * The state of the parser. * * @var int */ $state = 0; $prevToken = null; for (; $list->idx < $list->count; ++$list->idx) { /** * Token parsed at this moment. */ $token = $list->tokens[$list->idx]; // End of statement. if ($token->type === Token::TYPE_DELIMITER) { break; } // Skipping whitespaces and comments. if (($token->type === Token::TYPE_WHITESPACE) || ($token->type === Token::TYPE_COMMENT)) { continue; } switch ($state) { case 0: // parse `{ BINARY | MASTER }` $this->log_type = self::parseExpectedKeyword($parser, $token, ['BINARY', 'MASTER']); break; case 1: // parse `LOGS` self::parseExpectedKeyword($parser, $token, ['LOGS']); break; case 2: // parse `{ TO | BEFORE }` $this->end_option = self::parseExpectedKeyword($parser, $token, ['TO', 'BEFORE']); break; case 3: // parse `expr` $this->end_expr = Expression::parse($parser, $list, []); break; default: $parser->error('Unexpected token.', $token); break; } $state++; $prevToken = $token; } // Only one possible end state if ($state === 4) { return; } $parser->error('Unexpected token.', $prevToken); } /** * Parse expected keyword (or throw relevant error) * * @param Parser $parser the instance that requests parsing * @param Token $token token to be parsed * @param string[] $expectedKeywords array of possibly expected keywords at this point * * @return mixed|null */ private static function parseExpectedKeyword($parser, $token, $expectedKeywords) { if ($token->type === Token::TYPE_KEYWORD) { if (in_array($token->keyword, $expectedKeywords)) { return $token->keyword; } $parser->error('Unexpected keyword', $token); } else { $parser->error('Unexpected token.', $token); } return null; } }