Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / share / phpmyadmin / themes / | server ip : 104.21.89.46 your ip : 172.70.179.210 H O M E |
Filename | /usr/share/phpmyadmin/themes/svg_gradient.php |
Size | 1.12 kb |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 10:12 |
Last modified | 05-Dec-2013 01:44 |
Last accessed | 05-Jul-2025 22:44 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
/**
* Theme based generator for SVG gradient.
*
* @package PhpMyAdmin-theme
*/
header('Content-Type: image/svg+xml');
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
function get_color($get_name, $default)
{
// get color from GET args, only alphanumeric chcracters
$opts = array('options' => array('regexp' => '/^[a-z0-9]+$/i'));
$color = filter_input(INPUT_GET, $get_name, FILTER_VALIDATE_REGEXP, $opts);
if (preg_match('/^[a-f0-9]{6}$/', $color)) {
return '#' . $color;
}
return $color ? $color : $default;
}
?>
<?php echo '<?xml version="1.0" ?>' ?>
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" version="1.0" width="100%" height="100%">
<defs>
<linearGradient id="linear-gradient" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="<?php echo get_color('from', 'white') ?>" stop-opacity="1" />
<stop offset="100%" stop-color="<?php echo get_color('to', 'black') ?>" stop-opacity="1" />
</linearGradient>
</defs>
<rect width="100%" height="100%" style="fill:url(#linear-gradient);" />
</svg>
/**
* Theme based generator for SVG gradient.
*
* @package PhpMyAdmin-theme
*/
header('Content-Type: image/svg+xml');
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
function get_color($get_name, $default)
{
// get color from GET args, only alphanumeric chcracters
$opts = array('options' => array('regexp' => '/^[a-z0-9]+$/i'));
$color = filter_input(INPUT_GET, $get_name, FILTER_VALIDATE_REGEXP, $opts);
if (preg_match('/^[a-f0-9]{6}$/', $color)) {
return '#' . $color;
}
return $color ? $color : $default;
}
?>
<?php echo '<?xml version="1.0" ?>' ?>
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" version="1.0" width="100%" height="100%">
<defs>
<linearGradient id="linear-gradient" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="<?php echo get_color('from', 'white') ?>" stop-opacity="1" />
<stop offset="100%" stop-color="<?php echo get_color('to', 'black') ?>" stop-opacity="1" />
</linearGradient>
</defs>
<rect width="100%" height="100%" style="fill:url(#linear-gradient);" />
</svg>