Update website

This commit is contained in:
Guilhem Lavaux 2025-03-24 09:27:39 +01:00
parent a0b0d3dae7
commit ae7ef6ad45
3151 changed files with 566766 additions and 48 deletions

View file

@ -0,0 +1,37 @@
<?php
/**
* Application OctetStream Download Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\DownloadTransformationsPlugin;
/**
* Handles the download transformation for application octetstream
*/
// @codingStandardsIgnoreLine
class Application_Octetstream_Download extends DownloadTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Application';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'OctetStream';
}
}

View file

@ -0,0 +1,37 @@
<?php
/**
* Application OctetStream Hex Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\HexTransformationsPlugin;
/**
* Handles the hex transformation for application octetstream
*/
// @codingStandardsIgnoreLine
class Application_Octetstream_Hex extends HexTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Application';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'OctetStream';
}
}

View file

@ -0,0 +1,37 @@
<?php
/**
* Image JPEG Inline Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\InlineTransformationsPlugin;
/**
* Handles the inline transformation for image jpeg
*/
// @codingStandardsIgnoreLine
class Image_JPEG_Inline extends InlineTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Image';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'JPEG';
}
}

View file

@ -0,0 +1,37 @@
<?php
/**
* Image JPEG Link Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\ImageLinkTransformationsPlugin;
/**
* Handles the link transformation for image jpeg
*/
// @codingStandardsIgnoreLine
class Image_JPEG_Link extends ImageLinkTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Image';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'JPEG';
}
}

View file

@ -0,0 +1,37 @@
<?php
/**
* Image PNG Inline Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\InlineTransformationsPlugin;
/**
* Handles the inline transformation for image png
*/
// @codingStandardsIgnoreLine
class Image_PNG_Inline extends InlineTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Image';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'PNG';
}
}

View file

@ -0,0 +1,37 @@
<?php
/**
* Blob SQL Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\SQLTransformationsPlugin;
/**
* Handles the sql transformation for blob data
*/
// @codingStandardsIgnoreLine
class Text_Octetstream_Sql extends SQLTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Octetstream';
}
}

View file

@ -0,0 +1,86 @@
<?php
/**
* Handles the binary to IPv4/IPv6 transformation for text plain
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\TransformationsPlugin;
use PhpMyAdmin\Utils\FormatConverter;
use stdClass;
use function stripos;
/**
* Handles the binary to IPv4/IPv6 transformation for text plain
*/
// @codingStandardsIgnoreLine
class Text_Plain_Binarytoip extends TransformationsPlugin
{
/**
* Gets the transformation description of the plugin
*
* @return string
*/
public static function getInfo()
{
return __(
'Converts an Internet network address stored as a binary string'
. ' into a string in Internet standard (IPv4/IPv6) format.'
);
}
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed. a binary string containing
* an IP address, as returned from MySQL's INET6_ATON
* function
* @param array $options transformation options
* @param stdClass|null $meta meta information
*
* @return string IP address
*/
public function applyTransformation($buffer, array $options = [], ?stdClass $meta = null)
{
$isBinary = false;
if ($meta !== null && stripos($meta->flags, 'binary') !== false) {
$isBinary = true;
}
return FormatConverter::binaryToIp($buffer, $isBinary);
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the plugin
*
* @return string
*/
public static function getName()
{
return 'Binary To IPv4/IPv6';
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,39 @@
<?php
/**
* Text Plain Bool2Text Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\Bool2TextTransformationsPlugin;
/**
* Handles the Boolean to Text transformation for text plain.
* Has one option: the output format (default 'T/F')
* or 'Y/N'
*/
// @codingStandardsIgnoreLine
class Text_Plain_Bool2Text extends Bool2TextTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,37 @@
<?php
/**
* Text Plain Date Format Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\DateFormatTransformationsPlugin;
/**
* Handles the date format transformation for text plain
*/
// @codingStandardsIgnoreLine
class Text_Plain_Dateformat extends DateFormatTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,37 @@
<?php
/**
* Text Plain External Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\ExternalTransformationsPlugin;
/**
* Handles the external transformation for text plain
*/
// @codingStandardsIgnoreLine
class Text_Plain_External extends ExternalTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,37 @@
<?php
/**
* Text Plain Formatted Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\FormattedTransformationsPlugin;
/**
* Handles the formatted transformation for text plain
*/
// @codingStandardsIgnoreLine
class Text_Plain_Formatted extends FormattedTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,37 @@
<?php
/**
* Text Plain Image Link Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\TextImageLinkTransformationsPlugin;
/**
* Handles the image link transformation for text plain
*/
// @codingStandardsIgnoreLine
class Text_Plain_Imagelink extends TextImageLinkTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,95 @@
<?php
/**
* Text Plain JSON Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\TransformationsPlugin;
use PhpMyAdmin\Response;
use stdClass;
use function htmlspecialchars;
/**
* Handles the json transformation for text plain
*/
// @codingStandardsIgnoreLine
class Text_Plain_Json extends TransformationsPlugin
{
public function __construct()
{
if (empty($GLOBALS['cfg']['CodemirrorEnable'])) {
return;
}
$response = Response::getInstance();
$scripts = $response->getHeader()
->getScripts();
$scripts->addFile('vendor/codemirror/lib/codemirror.js');
$scripts->addFile('vendor/codemirror/mode/javascript/javascript.js');
$scripts->addFile('vendor/codemirror/addon/runmode/runmode.js');
$scripts->addFile('transformations/json.js');
}
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public static function getInfo()
{
return __(
'Formats text as JSON with syntax highlighting.'
);
}
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param stdClass|null $meta meta information
*
* @return string
*/
public function applyTransformation($buffer, array $options = [], ?stdClass $meta = null)
{
return '<code class="json"><pre>' . "\n"
. htmlspecialchars($buffer) . "\n"
. '</pre></code>';
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public static function getName()
{
return 'JSON';
}
}

View file

@ -0,0 +1,53 @@
<?php
/**
* Text Plain SQL Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\SQLTransformationsPlugin;
use PhpMyAdmin\Response;
/**
* Handles the sql transformation for text plain
*/
// @codingStandardsIgnoreLine
class Text_Plain_Sql extends SQLTransformationsPlugin
{
public function __construct()
{
if (empty($GLOBALS['cfg']['CodemirrorEnable'])) {
return;
}
$response = Response::getInstance();
$scripts = $response->getHeader()
->getScripts();
$scripts->addFile('vendor/codemirror/lib/codemirror.js');
$scripts->addFile('vendor/codemirror/mode/sql/sql.js');
$scripts->addFile('vendor/codemirror/addon/runmode/runmode.js');
$scripts->addFile('functions.js');
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,95 @@
<?php
/**
* Text Plain XML Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\TransformationsPlugin;
use PhpMyAdmin\Response;
use stdClass;
use function htmlspecialchars;
/**
* Handles the XML transformation for text plain
*/
// @codingStandardsIgnoreLine
class Text_Plain_Xml extends TransformationsPlugin
{
public function __construct()
{
if (empty($GLOBALS['cfg']['CodemirrorEnable'])) {
return;
}
$response = Response::getInstance();
$scripts = $response->getHeader()
->getScripts();
$scripts->addFile('vendor/codemirror/lib/codemirror.js');
$scripts->addFile('vendor/codemirror/mode/xml/xml.js');
$scripts->addFile('vendor/codemirror/addon/runmode/runmode.js');
$scripts->addFile('transformations/xml.js');
}
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public static function getInfo()
{
return __(
'Formats text as XML with syntax highlighting.'
);
}
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param stdClass|null $meta meta information
*
* @return string
*/
public function applyTransformation($buffer, array $options = [], ?stdClass $meta = null)
{
return '<code class="xml"><pre>' . "\n"
. htmlspecialchars($buffer) . "\n"
. '</pre></code>';
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public static function getName()
{
return 'XML';
}
}