Merge remote-tracking branch 'origin/master'

This commit is contained in:
Pootle server 2011-09-30 22:40:11 +02:00
commit b17e29cb8f
65 changed files with 934 additions and 556 deletions

View File

@ -401,7 +401,7 @@ if ($db != 'mysql') {
<legend>
<?php
if ($cfg['PropertiesIconic']) {
echo '<img class="icon ic_b_edit" src="themes/dot.gif" alt="" />';
echo PMA_getImage('b_edit.png');
}
echo __('Rename database to') . ':';
?>
@ -427,7 +427,7 @@ if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase'])
<fieldset class="caution">
<legend><?php
if ($cfg['PropertiesIconic']) {
echo '<img class="icon ic_b_deltbl" src="themes/dot.gif" alt="" />';
echo PMA_getImage('b_deltbl.png');
}
echo __('Remove database');
?></legend>
@ -473,7 +473,7 @@ echo __('Remove database');
<legend>
<?php
if ($cfg['PropertiesIconic']) {
echo '<img class="icon ic_b_edit" src="themes/dot.gif" alt="" />';
echo PMA_getImage('b_edit.png');
}
echo __('Copy database to') . ':';
$drop_clause = 'DROP TABLE / DROP VIEW';
@ -537,7 +537,7 @@ echo __('Remove database');
. '<fieldset>' . "\n"
. ' <legend>';
if ($cfg['PropertiesIconic']) {
echo '<img class="icon ic_s_asci" src="themes/dot.gif" alt="" />';
echo PMA_getImage('s_asci.png');
}
echo ' <label for="select_db_collation">' . __('Collation') . ':</label>' . "\n"
. ' </legend>' . "\n"
@ -584,7 +584,7 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) { ?>
*/
echo '<div class="operations_full_width"><fieldset><a href="schema_edit.php?' . $url_query . '">';
if ($cfg['PropertiesIconic']) {
echo '<img class="icon ic_b_edit" src="themes/dot.gif" alt="" />';
echo PMA_getImage('b_edit.png');
}
echo __('Edit or export relational schema') . '</a></fieldset></div>';
} // end if

View File

@ -307,12 +307,14 @@ foreach ($tables as $keyname => $each_table) {
if (PMA_Tracker::isActive()) {
if (PMA_Tracker::isTracked($GLOBALS["db"], $truename)) {
$tracking_icon = '<a href="tbl_tracking.php?' . $url_query
. '&amp;table=' . $truename . '"><img class="icon ic_eye" src="themes/dot.gif" alt="'
. __('Tracking is active.') . '" title="' . __('Tracking is active.') . '" /></a>';
. '&amp;table=' . $truename . '">'
. PMA_getImage('eye.png', __('Tracking is active.'))
. '</a>';
} elseif (PMA_Tracker::getVersion($GLOBALS["db"], $truename) > 0) {
$tracking_icon = '<a href="tbl_tracking.php?' . $url_query
. '&amp;table=' . $truename . '"><img class="icon ic_eye" src="themes/dot.gif" alt="'
. __('Tracking is not active.') . '" title="' . __('Tracking is not active.') . '" /></a>';
. '&amp;table=' . $truename . '">'
. PMA_getImage('eye.png', __('Tracking is not active.'))
. '</a>';
}
}
@ -377,10 +379,10 @@ foreach ($tables as $keyname => $each_table) {
</th>
<?php if ($server_slave_status) { ?><td align="center"><?php
echo $ignored
? ' <img class="icon ic_s_cancel" src="themes/dot.gif" alt="NOT REPLICATED" />'
? PMA_getImage('s_cancel.png', 'NOT REPLICATED')
: ''.
$do
? ' <img class="icon ic_s_success" src="themes/dot.gif" alt="REPLICATED" />'
? PMA_getImage('s_success.png', 'REPLICATED')
: ''; ?></td><?php } ?>
<td align="center"><?php echo $browse_table; ?></td>
<td align="center">

View File

@ -98,7 +98,7 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) {
$drop_image_or_text = '';
if (true == $GLOBALS['cfg']['PropertiesIconic']) {
$drop_image_or_text .= '<img class="icon ic_b_drop" src="themes/dot.gif" alt="' . __('Delete tracking data for this table') . '" title="' . __('Delete tracking data for this table') . '" />';
$drop_image_or_text .= PMA_getImage('b_drop.png', __('Delete tracking data for this table'));
}
if ('both' === $GLOBALS['cfg']['PropertiesIconic'] || false === $GLOBALS['cfg']['PropertiesIconic']) {
$drop_image_or_text .= __('Drop');

View File

@ -88,7 +88,7 @@ $(document).ready(function() {
});
/** Hide the table link in the initial search result */
$("#table-info").prepend('<img id="table-image" class="icon ic_s_tbl" src="./themes/dot.gif" />').hide();
$("#table-info").prepend(PMA_getImage('s_tbl.png', '', {'id': 'table-image'}).toString()).hide();
/** Hide the browse and deleted results in the new search criteria */
$('#buttonGo').click(function(){

View File

@ -219,7 +219,7 @@ $(document).ready(function() {
PMA_ajaxShowMessage(data.message);
//Fetch inner span of this anchor
//and replace the icon with its disabled version
var span = $this_anchor.html().replace(/ic_b_empty/, 'ic_bd_empty');
var span = $this_anchor.html().replace(/b_empty/, 'bd_empty');
PMA_adjustTotals($this_anchor);
//To disable further attempts to truncate the table,

View File

@ -2843,7 +2843,7 @@ $(function() {
});
var img = topmenu.find('li:first-child img');
if (img.length) {
img.clone().attr('class', 'icon ic_b_more').prependTo(link);
$(PMA_getImage('b_more.png').toString()).prependTo(link);
}
var submenu = $('<li />', {'class': 'submenu'})
.append(link)

130
js/get_image.js.php Normal file
View File

@ -0,0 +1,130 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Provides the functionality for retreiving images
* which may be actual images or an icon from a sprite
*
* @package phpMyAdmin
*/
chdir('..');
// Send correct type:
header('Content-Type: text/javascript; charset=UTF-8');
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
// Avoid loading the full common.inc.php because this would add many
// non-js-compatible stuff like DOCTYPE
define('PMA_MINIMUM_COMMON', true);
require_once './libraries/common.inc.php';
// Get the data for the sprites, if it's available
if (is_readable($_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php')) {
include $_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php';
}
$sprites = array();
if (function_exists('PMA_sprites')) {
$sprites = PMA_sprites();
}
// We only need the keys from the array of sprites data,
// since they contain the (partial) class names
$keys = array();
foreach ($sprites as $key => $value) {
$keys[] = "'$key'";
}
?>
/**
* Returns an HTML IMG tag for a particular image from a theme,
* which may be an actual file or an icon from a sprite
*
* @param string image The name of the file to get
* @param string alternate Used to set 'alt' and 'title' attributes of the image
* @param object attributes An associative array of other attributes
*
* @return Object The requested image, this object has two methods:
* .toString() - Returns the IMG tag for the requested image
* .attr(name) - Returns a particular attribute of the IMG
* tag given it's name
* And one property:
* .isSprite - Whether the image is a sprite or not
*/
function PMA_getImage(image, alternate, attributes) {
var in_array = function (needle, haystack) {
for (i in haystack) {
if (haystack[i] == needle) {
return true;
}
}
return false;
};
var sprites = [
<?php echo implode($keys, ",\n ") . "\n"; ?>
];
// custom image object, it will eventually be returned by this functions
var retval = {
data: {
// this is private
alt: '',
title: '',
src: 'themes/dot.gif',
},
isSprite: true,
attr: function (name) {
if (this.data[name] == undefined) {
return '';
} else {
return this.data[name];
}
},
toString: function () {
var retval = '<' + 'img';
for (var i in this.data) {
retval += ' ' + i + '="' + this.data[i] + '"';
}
retval += ' /' + '>';
return retval;
}
};
// initialise missing parameters
if (attributes == undefined) {
attributes = {};
}
if (alternate == undefined) {
alternate = '';
}
// set alt
if (attributes.alt != undefined) {
retval.data.alt = attributes.alt;
} else {
retval.data.alt = alternate;
}
// set title
if (attributes.title != undefined) {
retval.data.title = attributes.title;
} else {
retval.data.title = alternate;
}
// set src
var klass = image.replace('.gif', '').replace('.png', '');
if (in_array(klass, sprites)) {
// it's an icon from a sprite
retval.data.class = 'icon ic_' + klass;
} else {
// it's an image file
retval.isSprite = false;
retval.data.src = "<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>" + image;
}
// set all other attrubutes
for (var i in attributes) {
if (i == 'src') {
// do not allow to override the 'src' attribute
continue;
} else if (i == 'class') {
retval.data[i] += ' ' + attributes[i];
} else {
retval.data[i] = attributes[i];
}
}
return retval;
};

View File

@ -29,13 +29,17 @@ function toggle(id, only_open)
if (el.style.display == 'none' || only_open) {
el.style.display = '';
if (img) {
img.className = 'icon ic_b_minus';
var newimg = PMA_getImage('b_minus.png');
img.className = newimg.attr('class');
img.src = newimg.attr('src');
img.alt = '-';
}
} else {
el.style.display = 'none';
if (img) {
img.className = 'icon ic_b_plus';
var newimg = PMA_getImage('b_plus.png');
img.className = newimg.attr('class');
img.src = newimg.attr('src');
img.alt = '+';
}
}

View File

@ -73,12 +73,12 @@ function display(init,finit)
else {
str +='<img src="' + pmaThemeImage + 'pmd/and_icon.png" onclick="and_or('+i+')" title="AND"/></td>';
}
str +='<td style="padding-left: 5px;" align="right"><img class="icon ic_b_sbrowse" src="themes/dot.gif" title="column name"/></td><td width="175" style="padding-left: 5px">' + history_array[i].get_column_name();
str +='<td style="padding-left: 5px;" align="right">' + PMA_getImage('b_sbrowse.png', 'column name') + '</td><td width="175" style="padding-left: 5px">' + history_array[i].get_column_name();
if (history_array[i].get_type() == "GroupBy" || history_array[i].get_type() == "OrderBy") {
str += '</td><td align="center"><img class="icon ic_b_info" src="themes/dot.gif" title="'+detail(i)+'"/><td title="' + detail(i) +'">' + history_array[i].get_type() + '</td></td><td onmouseover="this.className=\'history_table\';" onmouseout="this.className=\'history_table2\'" onclick=history_delete('+ i +')><img class="icon ic_b_drop" src="themes/dot.gif" title="Delete"></td></tr></thead>';
str += '</td><td align="center">' + PMA_getImage('b_info.png', detail(i)) + '<td title="' + detail(i) +'">' + history_array[i].get_type() + '</td></td><td onmouseover="this.className=\'history_table\';" onmouseout="this.className=\'history_table2\'" onclick=history_delete('+ i +')>' + PMA_getImage('b_drop.png', 'Delete') + '</td></tr></thead>';
}
else {
str += '</td><td align="center"><img class="icon ic_b_info" src="themes/dot.gif" title="'+detail(i)+'"/></td><td title="' + detail(i) +'">' + history_array[i]. get_type() + '</td><td <td onmouseover="this.className=\'history_table\';" onmouseout="this.className=\'history_table2\'" onclick=history_edit('+ i +')><img class="icon ic_b_edit" src="themes/dot.gif" title="Edit"/></td><td onmouseover="this.className=\'history_table\';" onmouseout="this.className=\'history_table2\'" onclick=history_delete('+ i +')><img src="themes/original/img/b_drop.png" title="Delete"></td></tr></thead>';
str += '</td><td align="center">' + PMA_getImage('b_info.png', detail(i)) + '</td><td title="' + detail(i) +'">' + history_array[i]. get_type() + '</td><td <td onmouseover="this.className=\'history_table\';" onmouseout="this.className=\'history_table2\'" onclick=history_edit('+ i +')>' + PMA_getImage('b_edit.png', PMA_messages['strEdit']) + '</td><td onmouseover="this.className=\'history_table\';" onmouseout="this.className=\'history_table2\'" onclick=history_delete('+ i +')><img src="themes/original/img/b_drop.png" title="Delete"></td></tr></thead>';
}
i++;
if(i >= history_array.length) {

View File

@ -715,7 +715,7 @@ function serverResponseError() {
};
$('#emptyDialog').attr('title', PMA_messages['strRefreshFailed']);
$('#emptyDialog').html(
'<img class="icon ic_s_attention" src="themes/dot.gif" alt=""> ' +
PMA_getImage('s_attention.png') +
PMA_messages['strInvalidResponseExplanation']
);
$('#emptyDialog').dialog({ buttons: btns });

View File

@ -585,9 +585,9 @@ $(function() {
$('a[href="#pauseCharts"]').click(function() {
runtime.redrawCharts = ! runtime.redrawCharts;
if (! runtime.redrawCharts) {
$(this).html('<img src="themes/dot.gif" class="icon ic_play" alt="" /> ' + PMA_messages['strResumeMonitor']);
$(this).html(PMA_getImage('play.png') + ' ' + PMA_messages['strResumeMonitor']);
} else {
$(this).html('<img src="themes/dot.gif" class="icon ic_pause" alt="" /> ' + PMA_messages['strPauseMonitor']);
$(this).html(PMA_getImage('pause.png') + ' ' + PMA_messages['strPauseMonitor']);
if (! runtime.charts) {
initGrid();
$('a[href="#settingsPopup"]').show();
@ -613,7 +613,7 @@ $(function() {
$.get('server_status.php?' + url_query, vars,
function(data) {
var logVars = $.parseJSON(data),
icon = 'ic_s_success', msg='', str='';
icon = PMA_getImage('s_success.png'), msg='', str='';
if (logVars['general_log'] == 'ON') {
if (logVars['slow_query_log'] == 'ON') {
@ -628,28 +628,28 @@ $(function() {
}
if (msg.length == 0) {
icon = 'ic_s_error';
icon = PMA_getImage('s_error.png');
msg = PMA_messages['strBothLogOff'];
}
str = '<b>' + PMA_messages['strCurrentSettings'] + '</b><br><div class="smallIndent">';
str += '<img src="themes/dot.gif" class="icon ' + icon + '" alt=""/> ' + msg + '<br />';
str += icon + msg + '<br />';
if (logVars['log_output'] != 'TABLE') {
str += '<img src="themes/dot.gif" class="icon ic_s_error" alt=""/> ' + PMA_messages['strLogOutNotTable'] + '<br />';
str += PMA_getImage('s_error.png') + ' ' + PMA_messages['strLogOutNotTable'] + '<br />';
} else {
str += '<img src="themes/dot.gif" class="icon ic_s_success" alt=""/> ' + PMA_messages['strLogOutIsTable'] + '<br />';
str += PMA_getImage('s_success.png') + ' ' + PMA_messages['strLogOutIsTable'] + '<br />';
}
if (logVars['slow_query_log'] == 'ON') {
if (logVars['long_query_time'] > 2) {
str += '<img src="themes/dot.gif" class="icon ic_s_attention" alt=""/> '
str += PMA_getImage('s_attention.png') + ' '
+ $.sprintf(PMA_messages['strSmallerLongQueryTimeAdvice'], logVars['long_query_time'])
+ '<br />';
}
if (logVars['long_query_time'] < 2) {
str += '<img src="themes/dot.gif" class="icon ic_s_success" alt=""/> '
str += PMA_getImage('s_success.png') + ' '
+ $.sprintf(PMA_messages['strLongQueryTimeSet'], logVars['long_query_time'])
+ '<br />';
}
@ -1660,7 +1660,7 @@ $(function() {
// Append a tooltip to the count column, if there exist one
if ($('#logTable th:last').html() == '#') {
$('#logTable th:last').append('&nbsp;<img class="qroupedQueryInfoIcon icon ic_b_docs" src="themes/dot.gif" alt="" />');
$('#logTable th:last').append('&nbsp;' + PMA_getImage('b_docs.png', '', {'class': 'qroupedQueryInfoIcon'}));
var qtipContent = PMA_messages['strCountColumnExplanation'];
if (groupInserts) {
@ -1861,4 +1861,4 @@ $(function() {
// Run the monitor once loaded
$(function() {
$('a[href="#pauseCharts"]').trigger('click');
});
});

View File

@ -96,8 +96,8 @@ function showDetails(i, update_size, insert_size, remove_size, insert_index, rem
insert_rows.align = "center";
var tick_image = document.createElement("img");
tick_image.src = 'themes/dot.gif';
tick_image.className = "icon ic_s_success";
tick_image.src = PMA_getImage('s_success.png').attr('src');
tick_image.className = PMA_getImage('s_success.png').attr('class');
if (update_size == '' && insert_size == '' && remove_size == '') {
/**

View File

@ -4,9 +4,9 @@ $(function() {
var $tmpDiv, charWidth;
// Global vars
editLink = '<a href="#" class="editLink" onclick="return editVariable(this);"><img class="icon ic_b_edit" src="themes/dot.gif" alt=""> '+PMA_messages['strEdit']+'</a>';
saveLink = '<a href="#" class="saveLink"><img class="icon ic_b_save" src="themes/dot.gif" alt=""> '+PMA_messages['strSave']+'</a> ';
cancelLink = '<a href="#" class="cancelLink"><img class="icon ic_b_close" src="themes/dot.gif" alt=""> '+PMA_messages['strCancel']+'</a> ';
editLink = '<a href="#" class="editLink" onclick="return editVariable(this);">' + PMA_getImage('b_edit.png') + ' ' + PMA_messages['strEdit'] + '</a>';
saveLink = '<a href="#" class="saveLink">' + PMA_getImage('b_save.png') + ' ' + PMA_messages['strSave'] + '</a> ';
cancelLink = '<a href="#" class="cancelLink">' + PMA_getImage('b_close.png') + ' ' + PMA_messages['strCancel'] + '</a> ';
$.ajaxSetup({
cache:false
@ -190,4 +190,4 @@ function editVariable(link)
});
return false;
}
}

View File

@ -120,7 +120,7 @@ $(document).ready(function() {
'ST_Intersects',
'ST_Overlaps',
'ST_Touches',
'ST_Within',
'ST_Within'
];
var tempArray = [

View File

@ -311,6 +311,18 @@ class PMA_Theme
}
include $_css_file;
if ($type != 'print') {
$_sprites_data_file = $this->getPath() . '/sprites.lib.php';
$_sprites_css_file = './themes/sprites.css.php';
if ( (file_exists($_sprites_data_file) && is_readable($_sprites_data_file))
&& (file_exists($_sprites_css_file) && is_readable($_sprites_css_file))
) {
include $_sprites_data_file;
include $_sprites_css_file;
}
}
return true;
}

View File

@ -132,8 +132,6 @@ function PMA_auth()
// Defines the charset to be used
header('Content-Type: text/html; charset=utf-8');
// Defines the "item" image depending on text direction
$item_img = 'ic_item_' . $GLOBALS['text_dir'];
/* HTML header; do not show here the PMA version to improve security */
$page_title = 'phpMyAdmin ';
@ -198,9 +196,9 @@ if (top != self) {
<?php
echo __('Log in');
echo '<a href="./Documentation.html" target="documentation" ' .
'title="' . __('phpMyAdmin documentation') . '">';
'title="' . __('phpMyAdmin documentation') . '"> ';
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
echo '<img class="icon ic_b_help_s" src="themes/dot.gif" alt="' . __('phpMyAdmin documentation') . '" />';
echo PMA_getImage('b_help.png', __('phpMyAdmin documentation'));
} else {
echo '(*)';
}

View File

@ -71,53 +71,106 @@ function PMA_pow($base, $exp, $use_function = false)
}
/**
* string PMA_getIcon(string $icon)
* Returns an HTML IMG tag for a particular icon from a theme,
* which may be an actual file or an icon from a sprite.
* This function takes into account the PropertiesIconic
* configuration setting and wraps the image tag in a span tag.
*
* @param string $icon name of icon file
* @param string $alternate alternate text
* @param boolean $force_text whether to force alternate text to be displayed
* @param boolean $noSprite If true, the image source will be not replaced
* with a CSS Sprite
*
* @return html img tag
* @return string an html snippet
*/
function PMA_getIcon($icon, $alternate = '', $force_text = false, $noSprite = false)
function PMA_getIcon($icon, $alternate = '', $force_text = false)
{
// $cfg['PropertiesIconic'] is true or both
$include_icon = ($GLOBALS['cfg']['PropertiesIconic'] !== false);
// $cfg['PropertiesIconic'] is false or both
// OR we have no $include_icon
$include_text = ($force_text || true !== $GLOBALS['cfg']['PropertiesIconic']);
$alternate = htmlspecialchars($alternate);
$button = '';
// Always use a span (we rely on this in js/sql.js)
$button .= '<span class="nowrap">';
$button = '<span class="nowrap">';
if ($include_icon) {
if ($noSprite) {
$button .= '<img src="' . $GLOBALS['pmaThemeImage'] . $icon . '"'
. ' class="icon" width="16" height="16" />';
} else {
$button .= '<img src="themes/dot.gif"' . ' title="'
. $alternate . '" alt="' . $alternate . '"' . ' class="icon ic_'
. str_replace(array('.gif','.png'), '', $icon) . '" />';
}
$button .= PMA_getImage($icon, $alternate);
}
if ($include_icon && $include_text) {
$button .= ' ';
}
if ($include_text) {
$button .= $alternate;
}
$button .= '</span>';
return $button;
}
/**
* Returns an HTML IMG tag for a particular image from a theme,
* which may be an actual file or an icon from a sprite
*
* @param string $image The name of the file to get
* @param string $alternate Used to set 'alt' and 'title' attributes of the image
* @param array $attributes An associative array of other attributes
*
* @return string an html IMG tag
*/
function PMA_getImage($image, $alternate = '', $attributes = array())
{
$url = '';
$is_sprite = false;
$alternate = htmlspecialchars($alternate);
// Check if we have the requested image as a sprite
// and set $url accordingly
if (is_readable($_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php')) {
include_once $_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php';
$sprites = PMA_sprites();
$class = str_replace(array('.gif','.png'), '', $image);
if (array_key_exists($class, $sprites)) {
$is_sprite = true;
$url = 'themes/dot.gif';
} else {
$url = $GLOBALS['pmaThemeImage'] . $image;
}
} else {
$url = $GLOBALS['pmaThemeImage'] . $image;
}
// set class attribute
if ($is_sprite) {
if (isset($attributes['class'])) {
$attributes['class'] = "icon ic_$class " . $attributes['class'];
} else {
$attributes['class'] = "icon ic_$class";
}
}
// set all other attributes
$attr_str = '';
foreach ($attributes as $key => $value) {
if (! in_array($key, array('alt', 'title'))) {
$attr_str .= " $key=\"$value\"";
}
}
// override the alt attribute
if (isset($attributes['alt'])) {
$alt = $attributes['alt'];
} else {
$alt = $alternate;
}
// override the title attribute
if (isset($attributes['title'])) {
$title = $attributes['title'];
} else {
$title = $alternate;
}
// generate the IMG tag
$template = '<img src="%s" title="%s" alt="%s"%s />';
$retval = sprintf($template, $url, $title, $alt, $attr_str);
return $retval;
}
/**
* Displays the maximum size for an upload
*
@ -409,11 +462,9 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju
if ($just_open) {
return $open_link;
} elseif ($big_icon) {
return $open_link . '<img class="icon ic_b_sqlhelp" src="themes/dot.gif" alt="'
. __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
return $open_link . PMA_getImage('b_sqlhelp.png', __('Documentation')) . '</a>';
} elseif ($GLOBALS['cfg']['ReplaceHelpImg']) {
return $open_link . '<img class="icon ic_b_help_s" src="themes/dot.gif" alt="'
. __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
return $open_link . PMA_getImage('b_help.png', __('Documentation')) . '</a>';
} else {
return '[' . $open_link . __('Documentation') . '</a>]';
}
@ -433,8 +484,8 @@ function PMA_showDocu($anchor)
{
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
return '<a href="Documentation.html#' . $anchor . '" target="documentation">'
. '<img class="icon ic_b_help_s" src="themes/dot.gif" alt="'
. __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
. PMA_getImage('b_help.png', __('Documentation'))
. '</a>';
} else {
return '[<a href="Documentation.html#' . $anchor . '" target="documentation">'
. __('Documentation') . '</a>]';
@ -456,8 +507,8 @@ function PMA_showPHPDocu($target)
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
return '<a href="' . $url . '" target="documentation">'
. '<img class="icon ic_b_help_s" src="themes/dot.gif" alt="'
. __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
. PMA_getImage('b_help.png', __('Documentation'))
. '</a>';
} else {
return '[<a href="' . $url . '" target="documentation">' . __('Documentation') . '</a>]';
}
@ -503,7 +554,7 @@ function PMA_showHint($message, $bbcode = false, $type = 'notice')
// footnotemarker used in js/tooltip.js
return '<sup class="footnotemarker">' . $nr . '</sup>' .
'<img class="footnotemarker footnote_' . $nr . ' ic_b_help" src="themes/dot.gif" alt="" />';
PMA_getImage('b_help.png', '', array('class' => 'footnotemarker footnote_' . $nr));
}
/**
@ -1686,9 +1737,8 @@ function PMA_generate_html_tab($tab, $url_params = array(), $base_dir='')
// avoid generating an alt tag, because it only illustrates
// the text that follows and if browser does not display
// images, the text is duplicated
$image = '<img class="icon %1$s" src="' . $base_dir . 'themes/dot.gif"'
.' width="16" height="16" alt="" />%2$s';
$tab['text'] = sprintf($image, htmlentities($tab['icon']), $tab['text']);
$tab['text'] = PMA_getImage(htmlentities($tab['icon'])) . $tab['text'];
} elseif (empty($tab['text'])) {
// check to not display an empty link-text
$tab['text'] = '?';

View File

@ -159,8 +159,8 @@ function display_input($path, $name, $description = '', $type, $value, $value_is
<label for="<?php echo htmlspecialchars($path) ?>"><?php echo $name ?></label>
<?php if (!empty($opts['doc']) || !empty($opts['wiki'])) { ?>
<span class="doc">
<?php if (!empty($opts['doc'])) { ?><a href="<?php echo $base_dir . $opts['doc'] ?>" target="documentation"><img class="icon ic_b_help_s" src="<?php echo $base_dir; ?>themes/dot.gif" alt="Doc" title="<?php echo __('Documentation') ?>" /></a><?php } ?>
<?php if (!empty($opts['wiki'])){ ?><a href="<?php echo $opts['wiki'] ?>" target="wiki"><img class="icon ic_b_info" src="<?php echo $base_dir; ?>themes/dot.gif" alt="Wiki" title="Wiki" /></a><?php } ?>
<?php if (!empty($opts['doc'])) { ?><a href="<?php echo $base_dir . $opts['doc'] ?>" target="documentation"><?php echo PMA_getImage('b_help.png', __('Documentation')); ?></a><?php } ?>
<?php if (!empty($opts['wiki'])){ ?><a href="<?php echo $opts['wiki'] ?>" target="wiki"><?php echo PMA_getImage('b_info.png', __('Wiki')) ?></a><?php } ?>
</span>
<?php } ?>
<?php if ($option_is_disabled) { ?>
@ -234,17 +234,17 @@ function display_input($path, $name, $description = '', $type, $value, $value_is
}
if ($is_setup_script && isset($opts['userprefs_comment']) && $opts['userprefs_comment']) {
?>
<a class="userprefs-comment" title="<?php echo htmlspecialchars($opts['userprefs_comment']) ?>"><img alt="comment" class="icon ic_b_tblops" src="<?php echo $base_dir; ?>themes/dot.gif" /></a>
<a class="userprefs-comment" title="<?php echo htmlspecialchars($opts['userprefs_comment']) ?>"><?php echo PMA_getImage('b_tblops.png', __('Comment')); ?></a>
<?php
}
if (isset($opts['setvalue']) && $opts['setvalue']) {
?>
<a class="set-value" href="#<?php echo htmlspecialchars("$path={$opts['setvalue']}") ?>" title="<?php echo sprintf(__('Set value: %s'), htmlspecialchars($opts['setvalue'])) ?>" style="display:none"><img alt="set-value" class="icon ic_b_edit" src="<?php echo $base_dir; ?>themes/dot.gif" /></a>
<a class="set-value" href="#<?php echo htmlspecialchars("$path={$opts['setvalue']}") ?>" title="<?php echo sprintf(__('Set value: %s'), htmlspecialchars($opts['setvalue'])) ?>" style="display:none"><?php echo PMA_getImage('b_edit.png'); ?></a>
<?php
}
if (isset($opts['show_restore_default']) && $opts['show_restore_default']) {
?>
<a class="restore-default" href="#<?php echo $path ?>" title="<?php echo __('Restore default value') ?>" style="display:none"><img alt="restore-default" class="icon ic_s_reload" src="<?php echo $base_dir; ?>themes/dot.gif" /></a>
<a class="restore-default" href="#<?php echo $path ?>" title="<?php echo __('Restore default value') ?>" style="display:none"><?php echo PMA_getImage('s_reload.png'); ?></a>
<?php
}
// this must match with displayErrors() in scripts/config.js
@ -411,4 +411,4 @@ function display_errors($name, $error_list)
}
echo '</dl>';
}
?>
?>

View File

@ -46,63 +46,63 @@ if ($num_tables == 0) {
$tab_structure['link'] = 'db_structure.php';
$tab_structure['text'] = __('Structure');
$tab_structure['icon'] = 'ic_b_props';
$tab_structure['icon'] = 'b_props.png';
$tab_sql['link'] = 'db_sql.php';
$tab_sql['args']['db_query_force'] = 1;
$tab_sql['text'] = __('SQL');
$tab_sql['icon'] = 'ic_b_sql';
$tab_sql['icon'] = 'b_sql.png';
$tab_export['text'] = __('Export');
$tab_export['icon'] = 'ic_b_export';
$tab_export['icon'] = 'b_export.png';
$tab_export['link'] = 'db_export.php';
$tab_search['text'] = __('Search');
$tab_search['icon'] = 'ic_b_search';
$tab_search['icon'] = 'b_search.png';
$tab_search['link'] = 'db_search.php';
if (PMA_Tracker::isActive()) {
$tab_tracking['text'] = __('Tracking');
$tab_tracking['icon'] = 'ic_eye';
$tab_tracking['icon'] = 'eye.png';
$tab_tracking['link'] = 'db_tracking.php';
}
$tab_qbe['text'] = __('Query');
$tab_qbe['icon'] = 'ic_s_db';
$tab_qbe['icon'] = 's_db.png';
$tab_qbe['link'] = 'db_qbe.php';
if ($cfgRelation['designerwork']) {
$tab_designer['text'] = __('Designer');
$tab_designer['icon'] = 'ic_b_relations';
$tab_designer['icon'] = 'b_relations.png';
$tab_designer['link'] = 'pmd_general.php';
}
if (! $db_is_information_schema) {
$tab_import['link'] = 'db_import.php';
$tab_import['text'] = __('Import');
$tab_import['icon'] = 'ic_b_import';
$tab_import['icon'] = 'b_import.png';
$tab_operation['link'] = 'db_operations.php';
$tab_operation['text'] = __('Operations');
$tab_operation['icon'] = 'ic_b_tblops';
$tab_operation['icon'] = 'b_tblops.png';
if ($is_superuser && !PMA_DRIZZLE) {
$tab_privileges['link'] = 'server_privileges.php';
$tab_privileges['args']['checkprivs'] = $db;
// stay on database view
$tab_privileges['args']['viewing_mode'] = 'db';
$tab_privileges['text'] = __('Privileges');
$tab_privileges['icon'] = 'ic_s_rights';
$tab_privileges['icon'] = 's_rights.png';
}
$tab_routines['link'] = 'db_routines.php';
$tab_routines['text'] = __('Routines');
$tab_routines['icon'] = 'ic_b_routines';
$tab_routines['icon'] = 'b_routines.png';
$tab_events['link'] = 'db_events.php';
$tab_events['text'] = __('Events');
$tab_events['icon'] = 'ic_b_events';
$tab_events['icon'] = 'b_events.png';
$tab_triggers['link'] = 'db_triggers.php';
$tab_triggers['text'] = __('Triggers');
$tab_triggers['icon'] = 'ic_b_triggers';
$tab_triggers['icon'] = 'b_triggers.png';
}
/**

View File

@ -94,19 +94,21 @@ function PMA_SortableTableHeader($title, $sort, $initial_sort_order = 'ASC')
if ($requested_sort_order == 'ASC') {
$future_sort_order = 'DESC';
// current sort order is ASC
$order_img = ' <img class="icon ic_s_asc" src="themes/dot.gif" alt="'. __('Ascending') . '" title="'. __('Ascending') . '" id="sort_arrow" />';
$order_img = ' ' . PMA_getImage('s_asc.png', __('Ascending'), array('class' => 'sort_arrow', 'title' => ''));
$order_img .= ' ' . PMA_getImage('s_desc.png', __('Descending'), array('class' => 'sort_arrow hide', 'title' => ''));
// but on mouse over, show the reverse order (DESC)
$order_link_params['onmouseover'] = 'if ($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_desc\'); }';
$order_link_params['onmouseover'] = "$('.sort_arrow').toggle();";
// on mouse out, show current sort order (ASC)
$order_link_params['onmouseout'] = 'if ($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_asc\'); }';
$order_link_params['onmouseout'] = "$('.sort_arrow').toggle();";
} else {
$future_sort_order = 'ASC';
// current sort order is DESC
$order_img = ' <img class="icon ic_s_desc" src="themes/dot.gif" alt="'. __('Descending') . '" title="'. __('Descending') . '" id="sort_arrow" />';
$order_img = ' ' . PMA_getImage('s_asc.png', __('Ascending'), array('class' => 'sort_arrow hide', 'title' => ''));
$order_img .= ' ' . PMA_getImage('s_desc.png', __('Descending'), array('class' => 'sort_arrow', 'title' => ''));
// but on mouse over, show the reverse order (ASC)
$order_link_params['onmouseover'] = 'if ($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_asc\'); }';
$order_link_params['onmouseover'] = "$('.sort_arrow').toggle();";
// on mouse out, show current sort order (DESC)
$order_link_params['onmouseout'] = 'if ($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_desc\'); }';
$order_link_params['onmouseout'] = "$('.sort_arrow').toggle();";
}
}

View File

@ -39,7 +39,7 @@ if ($is_create_db_priv) {
<strong><?php echo __('Create database') . ':&nbsp;' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
<?php
echo '<span class="noPrivileges">'
. ($cfg['ErrorIconic'] ? '<img class="icon ic_s_error2" src="themes/dot.gif" alt="" hspace="2" border="0" align="middle" />' : '')
. ($cfg['ErrorIconic'] ? PMA_getImage('s_error2.png', '', array('hspace' => 2, 'border' => 0, 'align' => 'middle')) : '')
. '' . __('No Privileges') .'</span>';
} // end create db form or message
?>

View File

@ -41,7 +41,7 @@ $is_create_table_priv = true;
<legend>
<?php
if ($GLOBALS['cfg']['PropertiesIconic']) {
echo '<img class="icon ic_b_newtbl" src="themes/dot.gif" alt="" />';
echo PMA_getImage('b_newtbl.png');
}
echo sprintf(__('Create table on database %s'), PMA_getDbLink());
?>

View File

@ -76,7 +76,7 @@ if (isset($_GET['sql_query'])) {
<div class="exportoptions" id="header">
<h2>
<img class="icon ic_b_export" src="themes/dot.gif" alt="export" />
<?php echo PMA_getImage('b_export.png', __('Export')); ?>
<?php
if ($export_type == 'server') {
echo __('Exporting databases from the current server');

View File

@ -123,7 +123,7 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
<div class="exportoptions" id="header">
<h2>
<img class="icon ic_b_import" src="themes/dot.gif" alt="import" />
<?php echo PMA_getImage('b_import.png', __('Import')); ?>
<?php
if ($import_type == 'server') {
echo __('Importing into the current server');

View File

@ -947,10 +947,12 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$order_img = '';
} elseif ('DESC' == $sort_direction) {
$sort_order .= ' ASC';
$order_img = ' <img class="icon ic_s_desc" src="themes/dot.gif" alt="'. __('Descending') . '" title="'. __('Descending') . '" id="soimg' . $i . '" />';
$order_img = ' ' . PMA_getImage('s_desc.png', __('Descending'), array('class' => "soimg$i", 'title' => ''));
$order_img .= ' ' . PMA_getImage('s_asc.png', __('Ascending'), array('class' => "soimg$i hide", 'title' => ''));
} else {
$sort_order .= ' DESC';
$order_img = ' <img class="icon ic_s_asc" src="themes/dot.gif" alt="'. __('Ascending') . '" title="'. __('Ascending') . '" id="soimg' . $i . '" />';
$order_img = ' ' . PMA_getImage('s_asc.png', __('Ascending'), array('class' => "soimg$i", 'title' => ''));
$order_img .= ' ' . PMA_getImage('s_desc.png', __('Descending'), array('class' => "soimg$i hide", 'title' => ''));
}
if (preg_match('@(.*)([[:space:]](LIMIT (.*)|PROCEDURE (.*)|FOR UPDATE|LOCK IN SHARE MODE))@is', $unsorted_sql_query, $regs3)) {
@ -971,11 +973,11 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$order_link_params = array();
if (isset($order_img) && $order_img!='') {
if (strstr($order_img, 'asc')) {
$order_link_params['onmouseover'] = 'if ($(\'#soimg' . $i . '\').length > 0) { $(\'#soimg' . $i . '\').attr(\'class\', \'icon ic_s_desc\'); }';
$order_link_params['onmouseout'] = 'if ($(\'#soimg' . $i . '\').length > 0) { $(\'#soimg' . $i . '\').attr(\'class\', \'icon ic_s_asc\'); }';
$order_link_params['onmouseover'] = "$('.soimg$i').toggle()";
$order_link_params['onmouseout'] = "$('.soimg$i').toggle()";
} elseif (strstr($order_img, 'desc')) {
$order_link_params['onmouseover'] = 'if ($(\'#soimg' . $i . '\').length > 0) { $(\'#soimg' . $i . '\').attr(\'class\', \'icon ic_s_asc\'); }';
$order_link_params['onmouseout'] = 'if ($(\'#soimg' . $i . '\').length > 0) { $(\'#soimg' . $i . '\').attr(\'class\', \'icon ic_s_desc\'); }';
$order_link_params['onmouseover'] = "$('.soimg$i').toggle()";
$order_link_params['onmouseout'] = "$('.soimg$i').toggle()";
}
}
if ($GLOBALS['cfg']['HeaderFlipType'] == 'auto') {

View File

@ -162,8 +162,7 @@ setURLHash("<?php echo PMA_generate_common_url($url_params, 'text', ''); ?>");
echo '<a href="index.php' . PMA_generate_common_url($url_params) . '"'
. ' title="' . __('Open new phpMyAdmin window') . '" target="_blank">';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
echo '<img class="icon ic_window-new" src="themes/dot.gif"'
. ' alt="' . __('Open new phpMyAdmin window') . '" />';
echo PMA_getImage('window-new.png', __('Open new phpMyAdmin window'));
}
if ($GLOBALS['cfg']['NavigationBarIconic'] !== true) {
echo __('Open new phpMyAdmin window');

View File

@ -115,13 +115,8 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) {
: ':' . $GLOBALS['cfg']['Server']['port']
)
);
$separator = "<span class='separator'>»</span>\n";
$item = '<a href="%1$s?%2$s" class="item">';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$separator = ' <span class="separator"><img class="icon ic_item_' . $GLOBALS['text_dir'] . '" src="themes/dot.gif" alt="-" /></span>' . "\n";
$item .= ' <img class="icon %5$s" src="themes/dot.gif" alt="" /> ' . "\n";
} else {
$separator = ' <span class="separator"> - </span>' . "\n";
}
if ($GLOBALS['cfg']['NavigationBarIconic'] !== true) {
$item .= '%4$s: ';
@ -129,34 +124,41 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) {
$item .= '%3$s</a>' . "\n";
echo '<div id="serverinfo">' . "\n";
if ($GLOBALS['cfg']['NavigationBarIconic']) {
echo PMA_getImage('s_host.png') . "\n";
}
printf($item,
$GLOBALS['cfg']['DefaultTabServer'],
PMA_generate_common_url(),
htmlspecialchars($server_info),
__('Server'),
'ic_s_host');
__('Server'));
if (strlen($GLOBALS['db'])) {
echo $separator;
if ($GLOBALS['cfg']['NavigationBarIconic']) {
echo PMA_getImage('s_db.png') . "\n";
}
printf($item,
$GLOBALS['cfg']['DefaultTabDatabase'],
PMA_generate_common_url($GLOBALS['db']),
htmlspecialchars($GLOBALS['db']),
__('Database'),
'ic_s_db');
__('Database'));
// if the table is being dropped, $_REQUEST['purge'] is set to '1'
// so do not display the table name in upper div
if (strlen($GLOBALS['table']) && ! (isset($_REQUEST['purge']) && $_REQUEST['purge'] == '1')) {
include_once './libraries/tbl_info.inc.php';
echo $separator;
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$icon = isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? 'b_views.png' : 's_tbl.png';
echo PMA_getImage($icon) . "\n";
}
printf($item,
$GLOBALS['cfg']['DefaultTabTable'],
PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']),
str_replace(' ', '&nbsp;', htmlspecialchars($GLOBALS['table'])),
(isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? __('View') : __('Table')),
(isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? 'ic_b_views' : 'ic_s_tbl'));
(isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? __('View') : __('Table')));
/**
* Displays table comment

View File

@ -41,6 +41,8 @@ if (isset($GLOBALS['db'])) {
$params['db'] = $GLOBALS['db'];
}
$GLOBALS['js_include'][] = 'messages.php' . PMA_generate_common_url($params);
// Append the theme id to this url to invalidate the cache on a theme change
$GLOBALS['js_include'][] = 'get_image.js.php?theme=' . urlencode($_SESSION['PMA_Theme']->getId());
/**
* Here we add a timestamp when loading the file, so that users who

View File

@ -56,7 +56,7 @@ if ($GLOBALS['cfg']['LeftDisplayLogo']) {
echo '<a href="main.php?' . $query_url . '"'
.' title="' . __('Home') . '">'
.($GLOBALS['cfg']['MainPageIconic']
? '<img class="icon ic_b_home" src="themes/dot.gif" alt="' . __('Home') . '" />'
? PMA_getImage('b_home.png', __('Home'))
: __('Home'))
.'</a>' . "\n";
// if we have chosen server
@ -68,7 +68,7 @@ if ($GLOBALS['cfg']['LeftDisplayLogo']) {
.urlencode($PHP_AUTH_USER) . '" target="_parent"'
.' title="' . __('Log out') . '" >'
.($GLOBALS['cfg']['MainPageIconic']
? '<img class="icon ic_s_loggoff" src="themes/dot.gif" alt="' . __('Log out') . '" />'
? PMA_getImage('s_loggoff.png', __('Log out'))
: __('Log out'))
.'</a>' . "\n";
} // end if ($GLOBALS['cfg']['Server']['auth_type'] != 'config'
@ -76,8 +76,7 @@ if ($GLOBALS['cfg']['LeftDisplayLogo']) {
$anchor = 'querywindow.php?' . PMA_generate_common_url($db, $table);
if ($GLOBALS['cfg']['MainPageIconic']) {
$query_frame_link_text =
'<img class="icon ic_b_selboard" src="themes/dot.gif" alt="' . __('Query window') . '" />';
$query_frame_link_text = PMA_getImage('b_selboard.png', __('Query window'));
} else {
echo '<br />' . "\n";
$query_frame_link_text = __('Query window');
@ -92,8 +91,7 @@ if ($GLOBALS['cfg']['LeftDisplayLogo']) {
.' title="' . __('phpMyAdmin documentation') . '" >';
if ($GLOBALS['cfg']['MainPageIconic']) {
echo '<img class="icon ic_b_docs" src="themes/dot.gif"'
.' alt="' . __('phpMyAdmin documentation') . '" />';
echo PMA_getImage('b_docs.png', __('phpMyAdmin documentation'));
}
echo '</a>';
echo ' ' . PMA_showMySQLDocu('', '', true) . "\n";
@ -104,9 +102,7 @@ if ($GLOBALS['cfg']['LeftDisplayLogo']) {
}
echo '<a href="navigation.php?' . PMA_generate_common_url($params) . '" target="frame_navigation">';
if ($GLOBALS['cfg']['MainPageIconic']) {
echo '<img class="icon ic_s_reload" src="themes/dot.gif"'
. ' title="' . __('Reload navigation frame') . '"'
. ' alt="' . __('Reload navigation frame') . '" />';
echo PMA_getImage('s_reload', __('Reload navigation frame'));
} else {
echo '<br />' . __('Reload navigation frame');
}

View File

@ -376,7 +376,7 @@ class PMA_User_Schema
<?php
echo PMA_generate_common_hidden_inputs($db);
if ($cfg['PropertiesIconic']) {
echo '<img class="icon ic_b_views" src="themes/dot.gif" />';
echo PMA_getImage('b_views.png');
}
echo __('Display relational schema');
?>:

View File

@ -38,15 +38,15 @@ if (!$GLOBALS['is_ajax_request']) {
*/
$tabs = array();
$tabs['databases']['icon'] = 'ic_s_db';
$tabs['databases']['icon'] = 's_db.png';
$tabs['databases']['link'] = 'server_databases.php';
$tabs['databases']['text'] = __('Databases');
$tabs['sql']['icon'] = 'ic_b_sql';
$tabs['sql']['icon'] = 'b_sql.png';
$tabs['sql']['link'] = 'server_sql.php';
$tabs['sql']['text'] = __('SQL');
$tabs['status']['icon'] = 'ic_s_status';
$tabs['status']['icon'] = 's_status.png';
$tabs['status']['link'] = 'server_status.php';
$tabs['status']['text'] = __('Status');
@ -55,55 +55,55 @@ if (!$GLOBALS['is_ajax_request']) {
$tabs['process']['text'] = __('Processes');*/
if ($is_superuser && !PMA_DRIZZLE) {
$tabs['rights']['icon'] = 'ic_s_rights';
$tabs['rights']['icon'] = 's_rights.png';
$tabs['rights']['link'] = 'server_privileges.php';
$tabs['rights']['text'] = __('Privileges');
}
$tabs['export']['icon'] = 'ic_b_export';
$tabs['export']['icon'] = 'b_export.png';
$tabs['export']['link'] = 'server_export.php';
$tabs['export']['text'] = __('Export');
$tabs['import']['icon'] = 'ic_b_import';
$tabs['import']['icon'] = 'b_import.png';
$tabs['import']['link'] = 'server_import.php';
$tabs['import']['text'] = __('Import');
$tabs['settings']['icon'] = 'ic_b_tblops';
$tabs['settings']['icon'] = 'b_tblops.png';
$tabs['settings']['link'] = 'prefs_manage.php';
$tabs['settings']['text'] = __('Settings');
$tabs['settings']['active'] = in_array(basename($GLOBALS['PMA_PHP_SELF']),
array('prefs_forms.php', 'prefs_manage.php'));
$tabs['synchronize']['icon'] = 'ic_s_sync';
$tabs['synchronize']['icon'] = 's_sync.png';
$tabs['synchronize']['link'] = 'server_synchronize.php';
$tabs['synchronize']['text'] = __('Synchronize');
if (! empty($binary_logs)) {
$tabs['binlog']['icon'] = 'ic_s_tbl';
$tabs['binlog']['icon'] = 's_tbl.png';
$tabs['binlog']['link'] = 'server_binlog.php';
$tabs['binlog']['text'] = __('Binary log');
}
if ($is_superuser && !PMA_DRIZZLE) {
$tabs['replication']['icon'] = 'ic_s_replication';
$tabs['replication']['icon'] = 's_replication.png';
$tabs['replication']['link'] = 'server_replication.php';
$tabs['replication']['text'] = __('Replication');
}
$tabs['vars']['icon'] = 'ic_s_vars';
$tabs['vars']['icon'] = 's_vars.png';
$tabs['vars']['link'] = 'server_variables.php';
$tabs['vars']['text'] = __('Variables');
$tabs['charset']['icon'] = 'ic_s_asci';
$tabs['charset']['icon'] = 's_asci.png';
$tabs['charset']['link'] = 'server_collations.php';
$tabs['charset']['text'] = __('Charsets');
if (PMA_DRIZZLE) {
$tabs['plugins']['icon'] = 'ic_b_engine';
$tabs['plugins']['icon'] = 'b_engine.png';
$tabs['plugins']['link'] = 'server_plugins.php';
$tabs['plugins']['text'] = __('Plugins');
} else {
$tabs['engine']['icon'] = 'ic_b_engine';
$tabs['engine']['icon'] = 'b_engine.png';
$tabs['engine']['link'] = 'server_engines.php';
$tabs['engine']['text'] = __('Engines');
}

View File

@ -381,8 +381,7 @@ function PMA_sqlQueryFormBookmark()
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
echo ' <a href="./Documentation.html#faqbookmark"'
.' target="documentation">'
.'<img class="icon ic_b_help_s" src="themes/dot.gif"'
.' alt="' . __('Documentation') . '" /></a> ';
. PMA_getImage('b_help.png', __('Documentation'));
} else {
echo ' (<a href="./Documentation.html#faqbookmark"'
.' target="documentation">' . __('Documentation') . '</a>): ';

View File

@ -51,30 +51,30 @@ if (! isset($db_is_information_schema)) {
*/
$tabs = array();
$tabs['browse']['icon'] = 'ic_b_browse';
$tabs['browse']['icon'] = 'b_browse.png';
$tabs['browse']['text'] = __('Browse');
$tabs['browse']['link'] = 'sql.php';
$tabs['browse']['args']['pos'] = 0;
$tabs['structure']['icon'] = 'ic_b_props';
$tabs['structure']['icon'] = 'b_props.png';
$tabs['structure']['link'] = 'tbl_structure.php';
$tabs['structure']['text'] = __('Structure');
$tabs['sql']['icon'] = 'ic_b_sql';
$tabs['sql']['icon'] = 'b_sql.png';
$tabs['sql']['link'] = 'tbl_sql.php';
$tabs['sql']['text'] = __('SQL');
$tabs['search']['icon'] = 'ic_b_search';
$tabs['search']['icon'] = 'b_search.png';
$tabs['search']['text'] = __('Search');
$tabs['search']['link'] = 'tbl_select.php';
if (!$db_is_information_schema) {
$tabs['insert']['icon'] = 'ic_b_insrow';
$tabs['insert']['icon'] = 'b_insrow.png';
$tabs['insert']['link'] = 'tbl_change.php';
$tabs['insert']['text'] = __('Insert');
}
$tabs['export']['icon'] = 'ic_b_tblexport';
$tabs['export']['icon'] = 'b_tblexport.png';
$tabs['export']['link'] = 'tbl_export.php';
$tabs['export']['args']['single_table'] = 'true';
$tabs['export']['text'] = __('Export');
@ -84,16 +84,16 @@ $tabs['export']['text'] = __('Export');
* for views and information_schema
*/
if (! $tbl_is_view && !$db_is_information_schema) {
$tabs['import']['icon'] = 'ic_b_tblimport';
$tabs['import']['icon'] = 'b_tblimport.png';
$tabs['import']['link'] = 'tbl_import.php';
$tabs['import']['text'] = __('Import');
$tabs['operation']['icon'] = 'ic_b_tblops';
$tabs['operation']['icon'] = 'b_tblops.png';
$tabs['operation']['link'] = 'tbl_operations.php';
$tabs['operation']['text'] = __('Operations');
}
if (PMA_Tracker::isActive()) {
$tabs['tracking']['icon'] = 'ic_eye';
$tabs['tracking']['icon'] = 'eye.png';
$tabs['tracking']['text'] = __('Tracking');
$tabs['tracking']['link'] = 'tbl_tracking.php';
}
@ -101,7 +101,7 @@ if (!$db_is_information_schema && !PMA_DRIZZLE) {
if (PMA_currentUserHasPrivilege('TRIGGER', $db, $table) && ! PMA_Table::isView($db, $table)) {
$tabs['triggers']['link'] = 'tbl_triggers.php';
$tabs['triggers']['text'] = __('Triggers');
$tabs['triggers']['icon'] = 'ic_b_triggers';
$tabs['triggers']['icon'] = 'b_triggers.png';
}
}
@ -109,7 +109,7 @@ if (!$db_is_information_schema && !PMA_DRIZZLE) {
* Views support a limited number of operations
*/
if ($tbl_is_view && !$db_is_information_schema) {
$tabs['operation']['icon'] = 'ic_b_tblops';
$tabs['operation']['icon'] = 'b_tblops.png';
$tabs['operation']['link'] = 'view_operations.php';
$tabs['operation']['text'] = __('Operations');
}

View File

@ -20,12 +20,12 @@ if (! isset($forms[$form_param])) {
$form_param = array_shift($forms_keys);
}
$tabs_icons = array(
'Features' => 'ic_b_tblops',
'Sql_queries' => 'ic_b_sql',
'Left_frame' => 'ic_b_select',
'Main_frame' => 'ic_b_props',
'Import' => 'ic_b_import',
'Export' => 'ic_b_export');
'Features' => 'b_tblops.png',
'Sql_queries' => 'b_sql.png',
'Left_frame' => 'b_select.png',
'Main_frame' => 'b_props.png',
'Import' => 'b_import.png',
'Export' => 'b_export.png');
echo '<ul id="topmenu2">';
echo PMA_generate_html_tab(
array(

View File

@ -110,6 +110,8 @@ require_once './libraries/header_http.inc.php';
echo PMA_includeJS('navigation.js');
echo PMA_includeJS('functions.js');
echo PMA_includeJS('messages.php');
// Append the theme id to this url to invalidate the cache on a theme change
echo PMA_includeJS('get_image.js.php?theme=' . urlencode($_SESSION['PMA_Theme']->getId()));
?>
<script type="text/javascript">
// <![CDATA[
@ -227,10 +229,8 @@ if (! $GLOBALS['server']) {
// or $GLOBALS['cfg']['Servers']['only_db'] is defined and is not an array)
// In this case, the database should not be collapsible/expandable
$img_plus = '<img class="icon ic_b_plus" id="el%dImg" src="themes/dot.gif"'
.' alt="+" />';
$img_minus = '<img class="icon ic_b_minus" id="el%dImg" src="themes/dot.gif"'
.' alt="-" />';
$img_plus = PMA_getImage('b_plus.png', '+', array('id' => 'el%dImg'));
$img_minus = PMA_getImage('b_minus.png', '-', array('id' => 'el%dImg'));
$href_left = '<a onclick="if (toggle(\'%d\')) return false;"'
.' href="navigation.php?%s" target="_self">';
@ -300,7 +300,7 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
$class = '';
$GLOBALS['cfg']['AjaxEnable'] ? $class="ajax" : '';
echo '<ul id="newtable"><li><a target="frame_content" href="tbl_create.php' . PMA_generate_common_url(array('db' => $GLOBALS['db'])) . '" class="'.$class .'" >'
.'<img class="icon ic_b_snewtbl" src="themes/dot.gif" id="icon_newtable" alt="' . _pgettext('short form', 'Create table') . '" />'
. PMA_getImage('b_snewtbl.png', _pgettext('short form', 'Create table'), array('id' => "icon_newtable"))
. _pgettext('short form', 'Create table') . '</a></li></ul>';
}
} elseif ($GLOBALS['cfg']['LeftFrameLight']) {
@ -594,15 +594,13 @@ function PMA_displayTableList($tables, $visible = false,
. $GLOBALS['common_url_query']
.'&amp;table=' . urlencode($table['Name'])
.'&amp;goto=' . $GLOBALS['cfg']['LeftDefaultTabTable']
. '" >'
.'<img src="themes/dot.gif"';
. '" >';
$attr = array('id' => 'icon_' . htmlspecialchars($table_db . '.' . $table['Name']));
if ('VIEW' === strtoupper($table['Comment'])) {
echo ' class="icon ic_s_views"';
echo PMA_getImage('s_views.png', htmlspecialchars($link_title), $attr);
} else {
echo ' class="icon ic_b_sbrowse"';
echo PMA_getImage('b_browse.png', htmlspecialchars($link_title), $attr);
}
echo ' id="icon_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
.' alt="' . htmlspecialchars($link_title) . '" /></a>' . "\n";
// link for the table name itself
$href = $GLOBALS['cfg']['DefaultTabTable'] . '?'

View File

@ -60,17 +60,17 @@ if ($no_js) {
$tabs = false;
} else {
$tabs = array();
$tabs['sql']['icon'] = 'ic_b_sql';
$tabs['sql']['icon'] = 'b_sql.png';
$tabs['sql']['text'] = __('SQL');
$tabs['sql']['fragment'] = '#';
$tabs['sql']['attr'] = 'onclick="PMA_querywindowCommit(\'sql\');return false;"';
$tabs['sql']['active'] = (bool) ($querydisplay_tab == 'sql');
$tabs['import']['icon'] = 'ic_b_import';
$tabs['import']['icon'] = 'b_import.png';
$tabs['import']['text'] = __('Import files');
$tabs['import']['fragment'] = '#';
$tabs['import']['attr'] = 'onclick="PMA_querywindowCommit(\'files\');return false;"';
$tabs['import']['active'] = (bool) ($querydisplay_tab == 'files');
$tabs['history']['icon'] = 'ic_b_bookmark';
$tabs['history']['icon'] = 'b_bookmark.png';
$tabs['history']['text'] = __('SQL history');
$tabs['history']['fragment'] = '#';
$tabs['history']['attr'] = 'onclick="PMA_querywindowCommit(\'history\');return false;"';

140
scripts/generate-sprites Executable file
View File

@ -0,0 +1,140 @@
#!/bin/sh
# vim: expandtab sw=4 ts=4 sts=4:
# Check for proper number of command line args.
if [ $# -ne 1 ]; then
echo "Usage: `basename $0` {path_to_pma_root_folder}"
exit 65
fi
# Check if we have ImageMagick
hash identify 2>&- || {
echo "ERROR: ImageMagick not found on the system!"
echo "Quitting..."
exit 1
}
# Compress image, if possible
HAVE_PNGCRUSH=1
hash pngcrush 2>&- || {
HAVE_PNGCRUSH=0
echo "WARNING: 'pngcrush' not found, will not be able to compress the sprites"
}
# Icons that should not be included in the sprite
BLACKLIST="vertical_line.png spacer.png"
# Output filename for the sprite image
OUTPUT="sprites.png"
# Library file that will contain the information about
# individual images that are part of the sprite
LIBRARY="../sprites.lib.php"
if [ -d $1/themes ]; then
cd $1/themes
# For each theme
for d in $(ls -d */); do
# Go to folder that contains the images
cd "$d"img
echo "Processing folder: $PWD"
FILES=''
for f in $(ls *.png); do
VALID=true
# Do not include blacklisted icons
for b in $BLACKLIST; do
if [ "$b" = "$f" ]; then
VALID=false
fi
done
if [ $VALID = false ]; then
continue
fi
DATA=$(identify -ping $f || echo "NULL")
if [ "$DATA" != "NULL" ]; then
SIZE=$(echo $DATA | cut -d ' ' -f 3 | sed 's/x/ /')
# Do not include icons that are larger than 16x16
for s in $SIZE; do
if [ $s -gt 16 ]; then
VALID=false
fi
done
if [ $VALID = true ]; then
# Build the list of valid icons
FILES="$FILES $f"
fi
fi
done
# Create an empty sprite of the correct size
NUM_FILES=''
for f in $FILES; do
NUM_FILES=$(($NUM_FILES+1))
done
convert -size 16x$(($NUM_FILES*16+16)) xc:none temp.png
# Add each icon to the sprite
CURRENT=1
for f in $FILES; do
convert temp.png $f -geometry +0+$(($CURRENT*16)) -composite temp.png
CURRENT=$(($CURRENT+1))
done
# Compress image, if possible
if [ $HAVE_PNGCRUSH -eq 1 ]; then
echo "Compressing file: $PWD/$OUTPUT"
pngcrush -brute temp.png $OUTPUT > /dev/null
rm -f temp.png
else
mv temp.png $OUTPUT
fi
# Generate the library file that contains the information
# about individual images that are part of the sprite
echo "<?php" > $LIBRARY
echo "/* AUTOGENERATED CONTENT - DO NOT EDIT */" >> $LIBRARY
echo "/* ALL CHANGES WILL BE UNDONE */" >> $LIBRARY
echo "/* RUN './scripts/generate-sprites' TO UPDATE THIS FILE */" >> $LIBRARY
echo "function PMA_sprites() {" >> $LIBRARY
echo " return array(" >> $LIBRARY
PADDING=0
for f in $FILES; do
if [ ${#f} -gt $PADDING ]; then
PADDING=${#f}
fi
done
PADDING=$(($PADDING-3))
CURRENT=1
for f in $FILES; do
# Add a CSS rule for each icon in the sprite
NAME=$(echo "'$f'" | sed 's/\.png//' | sed -e :a -e "s/^.\{1,$PADDING\}$/& /;ta")
DATA=$(identify -ping $f || echo "NULL")
if [ "$DATA" != "NULL" ]; then
SIZE=$(echo $DATA | cut -d ' ' -f 3 | sed 's/x/ /')
WIDTH=0
HEIGHT=0
for s in $SIZE; do
if [ $WIDTH = 0 ]; then
WIDTH=$s
else
HEIGHT=$s
fi
done
fi
echo " $NAME => array('position' => '$CURRENT', 'width' => '$WIDTH', 'height' => '$HEIGHT')," >> $LIBRARY
CURRENT=$(($CURRENT+1))
done
echo " );" >> $LIBRARY
echo "}" >> $LIBRARY
echo "?>" >> $LIBRARY
# Back to the parent folder
cd ../..
done
exit 0
else
echo "ERROR: could not find the 'themes' folder in '`readlink -f $1`'"
exit 1
fi

View File

@ -73,7 +73,7 @@ if (empty($_REQUEST['dontlimitchars'])) {
* Displays the sub-page heading
*/
echo '<h2>' . "\n"
. ($GLOBALS['cfg']['MainPageIconic'] ? '<img src="themes/dot.gif" class="icon ic_s_tbl" alt="" />' : '')
. ($GLOBALS['cfg']['MainPageIconic'] ? PMA_getImage('s_tbl.png') : '')
. ' ' . __('Binary log') . "\n"
. '</h2>' . "\n";

View File

@ -34,7 +34,7 @@ require './libraries/server_links.inc.php';
*/
echo '<h2>' . "\n"
. ' ' . ($GLOBALS['cfg']['MainPageIconic']
? '<img class="icon ic_s_asci" src="themes/dot.gif" alt="" />'
? PMA_getImage('s_asci.png')
: '')
. '' . __('Character Sets and Collations') . "\n"
. '</h2>' . "\n";

View File

@ -99,7 +99,7 @@ require './libraries/server_links.inc.php';
*/
echo '<h2>' . "\n"
. ($GLOBALS['cfg']['MainPageIconic']
? '<img class="icon ic_s_db" src="themes/dot.gif" alt="" />'
? PMA_getImage('s_db.png')
: '')
. ($dbstats ? __('Databases statistics') : __('Databases')) . "\n"
.'</h2>' . "\n";
@ -159,7 +159,7 @@ if ($databases_count > 0) {
. ($is_superuser || $cfg['AllowUserDropDatabase'] ? ' <th></th>' . "\n" : '')
. ' <th><a href="./server_databases.php' . PMA_generate_common_url($_url_params) . '">' . "\n"
. ' ' . __('Database') . "\n"
. ($sort_by == 'SCHEMA_NAME' ? ' <img class="icon ic_s_' . $sort_order . '" src="themes/dot.gif" alt="' . ($sort_order == 'asc' ? __('Ascending') : __('Descending')) . '" />' . "\n" : '')
. ($sort_by == 'SCHEMA_NAME' ? ' ' . PMA_getImage('s_' . $sort_order . '.png', ($sort_order == 'asc' ? __('Ascending') : __('Descending'))) . "\n" : '')
. ' </a></th>' . "\n";
$table_columns = 3;
foreach ($column_order as $stat_name => $stat) {
@ -176,7 +176,7 @@ if ($databases_count > 0) {
echo ' <th' . $colspan . '>'
.'<a href="./server_databases.php' . PMA_generate_common_url($_url_params) . '">' . "\n"
.' ' . $stat['disp_name'] . "\n"
.($sort_by == $stat_name ? ' <img class="icon ic_s_' . $sort_order . '" src="themes/dot.gif" alt="' . ($sort_order == 'asc' ? __('Ascending') : __('Descending')) . '" />' . "\n" : '')
.($sort_by == $stat_name ? ' ' . PMA_getImage('s_' . $sort_order . '.png', ($sort_order == 'asc' ? __('Ascending') : __('Descending'))) . "\n" : '')
.' </a></th>' . "\n";
}
}

View File

@ -41,8 +41,7 @@ if (empty($_REQUEST['engine'])
* Displays the sub-page heading
*/
echo '<h2>' . "\n"
. ($GLOBALS['cfg']['MainPageIconic']
? '<img class="icon ic_b_engine" src="themes/dot.gif" alt="" />' : '')
. ($GLOBALS['cfg']['MainPageIconic'] ? PMA_getImage('b_engine.png') : '')
. "\n" . __('Storage Engines') . "\n"
. '</h2>' . "\n";
@ -105,8 +104,7 @@ if (empty($_REQUEST['engine'])
$engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
echo '<h2>' . "\n"
. ($GLOBALS['cfg']['MainPageIconic']
? '<img class="icon ic_b_engine" src="themes/dot.gif" alt="" />' : '')
. ($GLOBALS['cfg']['MainPageIconic'] ? PMA_getImage('b_engine.png') : '')
. ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
. ' ' . PMA_showMySQLDocu('', $engine_plugin->getMysqlHelpPage()) . "\n"
. '</h2>' . "\n\n";

View File

@ -158,7 +158,7 @@ require './libraries/server_links.inc.php';
echo '<div id="replication">';
echo ' <h2>';
echo ' <img class="icon ic_s_replication" src="themes/dot.gif" alt="" />';
echo ' ' . PMA_getImage('s_replication.png');
echo __('Replication');
echo ' </h2>';

View File

@ -764,7 +764,7 @@ require './libraries/server_links.inc.php';
* Displays the sub-page heading
*/
if ($GLOBALS['cfg']['MainPageIconic']) {
echo '<img class="icon ic_s_status" src="themes/dot.gif" width="16" height="16" alt="" />';
echo PMA_getImage('s_status.png');
}
echo __('Runtime Information');
@ -889,8 +889,8 @@ echo __('Runtime Information');
<div id="statustabs_advisor" class="jsfeature">
<div class="tabLinks">
<img src="themes/dot.gif" class="icon ic_play" alt="" /> <a href="#startAnalyzer"><?php echo __('Run analyzer'); ?></a>
<img src="themes/dot.gif" class="icon ic_b_help" alt="" /> <a href="#openAdvisorInstructions"><?php echo __('Instructions'); ?></a>
<?php echo PMA_getImage('play.png'); ?> <a href="#startAnalyzer"><?php echo __('Run analyzer'); ?></a>
<?php echo PMA_getImage('b_help.png'); ?> <a href="#openAdvisorInstructions"><?php echo __('Instructions'); ?></a>
</div>
<div class="tabInnerContent clearfloat">
</div>
@ -1536,31 +1536,31 @@ function printMonitor()
?>
<div class="tabLinks" style="display:none;">
<a href="#pauseCharts">
<img src="themes/dot.gif" class="icon ic_play" alt="" />
<?php echo PMA_getImage('play.png'); ?>
<?php echo __('Start Monitor'); ?>
</a>
<a href="#settingsPopup" rel="popupLink" style="display:none;">
<img src="themes/dot.gif" class="icon ic_s_cog" alt="" />
<?php echo PMA_getImage('s_cog.png'); ?>
<?php echo __('Settings'); ?>
</a>
<?php if (!PMA_DRIZZLE) { ?>
<a href="#monitorInstructionsDialog">
<img src="themes/dot.gif" class="icon ic_b_help" alt="" />
<?php echo PMA_getImage('b_help.png'); ?>
<?php echo __('Instructions/Setup'); ?>
</a>
<?php } ?>
<a href="#endChartEditMode" style="display:none;">
<img src="themes/dot.gif" class="icon ic_s_okay" alt="" />
<?php echo PMA_getImage('s_okay.png'); ?>
<?php echo __('Done rearranging/editing charts'); ?>
</a>
</div>
<div class="popupContent settingsPopup">
<a href="#addNewChart">
<img src="themes/dot.gif" class="icon ic_b_chart" alt="" />
<?php echo PMA_getImage('b_chart.png'); ?>
<?php echo __('Add chart'); ?>
</a>
<a href="#rearrangeCharts"><img class="icon ic_b_tblops" src="themes/dot.gif" width="16" height="16" alt="" /><?php echo __('Rearrange/edit charts'); ?></a>
<a href="#rearrangeCharts"><?php echo PMA_getImage('b_tblops.png'); ?><?php echo __('Rearrange/edit charts'); ?></a>
<div class="clearfloat paddingtop"></div>
<div class="floatleft">
<?php
@ -1594,7 +1594,7 @@ function printMonitor()
<?php echo __('The phpMyAdmin Monitor can assist you in optimizing the server configuration and track down time intensive queries. For the latter you will need to set log_output to \'TABLE\' and have either the slow_query_log or general_log enabled. Note however, that the general_log produces a lot of data and increases server load by up to 15%'); ?>
<?php if (PMA_MYSQL_INT_VERSION < 50106) { ?>
<p>
<img class="icon ic_s_attention" src="themes/dot.gif" alt="" />
<?php echo PMA_getImage('s_attention.png'); ?>
<?php
echo __('Unfortunately your Database server does not support logging to table, which is a requirement for analyzing the database logs with phpMyAdmin. Logging to table is supported by MySQL 5.1.6 and onwards. You may still use the server charting features however.');
?>
@ -1617,7 +1617,7 @@ function printMonitor()
echo '</p>';
?>
<p>
<img class="icon ic_s_attention" src="themes/dot.gif" alt="" />
<?php echo PMA_getImage('s_attention.png'); ?>
<?php
echo '<strong>';
echo __('Please note:');

View File

@ -1149,7 +1149,7 @@ if (! isset($_REQUEST['submit_connect'])
* Displays the sub-page heading
*/
echo '<h2>' . ($GLOBALS['cfg']['MainPageIconic']
? '<img class="icon ic_s_sync" src="themes/dot.gif" alt="" />'
? PMA_getImage('s_sync.png')
: '')
. __('Synchronize')
.'</h2>';

View File

@ -95,7 +95,7 @@ require './libraries/server_links.inc.php';
* Displays the sub-page heading
*/
echo '<h2>' . "\n"
. ($cfg['MainPageIconic'] ? '<img class="icon ic_s_vars" src="themes/dot.gif" alt="" />' : '')
. ($cfg['MainPageIconic'] ? PMA_getImage('s_vars.png') : '')
. '' . __('Server variables and settings') . "\n"
. PMA_showMySQLDocu('server_system_variables', 'server_system_variables')
. '</h2>' . "\n";

View File

@ -266,9 +266,11 @@ if (isset($_REQUEST['do_save_data'])) {
if (PMA_Tracker::isActive()) {
$truename = str_replace(' ', '&nbsp;', htmlspecialchars($table));
if (PMA_Tracker::isTracked($db, $truename)) {
$new_table_string .= '<a href="tbl_tracking.php' . PMA_generate_common_url($tbl_url_params) . '"><img class="icon ic_eye" src="themes/dot.gif" alt="' . __('Tracking is active.') . '" title="' . __('Tracking is active.') . '" /></a>';
$new_table_string .= '<a href="tbl_tracking.php' . PMA_generate_common_url($tbl_url_params) . '">';
$new_table_string .= PMA_getImage('eye.png', __('Tracking is active.'));
} elseif (PMA_Tracker::getVersion($db, $truename) > 0) {
$new_table_string .= '<a href="tbl_tracking.php' . PMA_generate_common_url($tbl_url_params) . '"><img class="icon ic_eye_grey" src="themes/dot.gif" alt="' . __('Tracking is not active.') . '" title="' . __('Tracking is not active.') . '" /></a>';
$new_table_string .= '<a href="tbl_tracking.php' . PMA_generate_common_url($tbl_url_params) . '">';
$new_table_string .= PMA_getImage('eye_grey.png', __('Tracking is not active.'));
}
unset($truename);
}

View File

@ -462,7 +462,7 @@ foreach ($fields as $row) {
echo "\n";
?>
<td class="more_opts" id="more_opts<?php echo $rownum; ?>">
<?php echo __('More'); ?> <img class="icon ic_more" src="themes/dot.gif" alt="<?php echo __('Show more actions'); ?>" />
<?php echo PMA_getImage('more.png', __('Show more actions')); ?> <?php echo __('More'); ?>
<div class="structure_actions_dropdown" id="row_<?php echo $rownum; ?>">
<div class="action_browse">
@ -646,7 +646,7 @@ if (! $tbl_is_view && ! $db_is_information_schema) {
<?php
echo PMA_generate_common_hidden_inputs($db, $table);
if ($cfg['PropertiesIconic']) {
echo '<img class="icon ic_b_insrow" src="themes/dot.gif" alt="' . __('Add column') . '"/>';
echo PMA_getImage('b_insrow.png', __('Add column'));
}
echo sprintf(__('Add %s column(s)'), '<input type="text" name="num_fields" size="2" maxlength="2" value="1" onfocus="this.select()" />');

View File

@ -420,7 +420,7 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
// Prepare delete link content here
$drop_image_or_text = '';
if (true == $GLOBALS['cfg']['PropertiesIconic']) {
$drop_image_or_text .= '<img class="icon ic_b_drop" src="themes/dot.gif" alt="' . __('Delete tracking data row from report') . '" title="' . __('Delete tracking data row from report') . '" />';
$drop_image_or_text .= PMA_getImage('b_drop.png', __('Delete tracking data row from report'));
}
if ('both' === $GLOBALS['cfg']['PropertiesIconic'] || false === $GLOBALS['cfg']['PropertiesIconic']) {
$drop_image_or_text .= __('Delete');

View File

@ -12,12 +12,14 @@
* Include to test.
*/
require_once 'libraries/common.lib.php';
require_once 'libraries/Theme.class.php';
class PMA_buildActionTitles_test extends PHPUnit_Framework_TestCase
{
function setup()
{
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$GLOBALS['cfg'] = array('PropertiesIconic' => 'both');
$GLOBALS['pmaThemeImage'] = 'theme/';
}

View File

@ -12,9 +12,14 @@
* Include to test.
*/
require_once 'libraries/common.lib.php';
require_once 'libraries/Theme.class.php';
class PMA_getIcon_test extends PHPUnit_Framework_TestCase
{
function setup()
{
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
}
function testGetIconWithoutPropertiesIconic(){

View File

@ -12,15 +12,23 @@
* Include to test.
*/
require_once 'libraries/common.lib.php';
require_once 'libraries/Theme.class.php';
class PMA_showDocu_test extends PHPUnit_Framework_TestCase
{
function setup()
{
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
}
function testShowDocuReplaceHelpImg()
{
$GLOBALS['cfg']['ReplaceHelpImg'] = true;
$anchor = "relation";
$expected = '<a href="Documentation.html#' . $anchor . '" target="documentation"><img class="icon ic_b_help_s" src="themes/dot.gif" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
$expected = '<a href="Documentation.html#' . $anchor . '" target="documentation">'
. '<img src="themes/dot.gif" title="' . __('Documentation') . '" '
. 'alt="' . __('Documentation') . '" class="icon ic_b_help" /></a>';
$this->assertEquals($expected, PMA_showDocu($anchor));
@ -31,7 +39,9 @@ class PMA_showDocu_test extends PHPUnit_Framework_TestCase
$GLOBALS['cfg']['ReplaceHelpImg'] = false;
$anchor = "relation";
$expected = '[<a href="Documentation.html#' . $anchor . '" target="documentation">' . __('Documentation') . '</a>]';
$expected = '[<a href="Documentation.html#' . $anchor . '" target="documentation">'
. __('Documentation')
. '</a>]';
$this->assertEquals($expected, PMA_showDocu($anchor));

View File

@ -12,18 +12,24 @@
* Include to test.
*/
require_once 'libraries/common.lib.php';
require_once 'libraries/Theme.class.php';
class PMA_showPHPDocu_test extends PHPUnit_Framework_TestCase
{
function setup()
{
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
}
function testShwoPHPDocuReplaceHelpImg()
{
$GLOBALS['cfg']['ReplaceHelpImg'] = true;
$target = "docu";
$lang = _pgettext('PHP documentation language', 'en');
$expected = '<a href="http://php.net/manual/' . $lang . '/' . $target
. '" target="documentation"><img class="icon ic_b_help_s" src="themes/dot.gif" alt="'
. __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
$expected = '<a href="http://php.net/manual/' . $lang . '/' . $target
. '" target="documentation"><img src="themes/dot.gif" title="'
. __('Documentation') . '" alt="' . __('Documentation') . '" class="icon ic_b_help" /></a>';
$this->assertEquals($expected, PMA_showPHPDocu($target));
}

View File

@ -64,33 +64,6 @@ button {
display: inline;
}
/* Icon sprites */
.icon {
/* leave some space between icons and text */
vertical-align: middle;
margin-right: 0.3em;
margin-left: 0.3em;
width:16px;
height:16px;
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>iconsprites.png) no-repeat top left;
}
/* 2 px more on the menu icons, for being centered */
.ic_b_home { background-position: 2px -335px; }
.ic_b_selboard { background-position: 2px -688px; }
.ic_b_docs { background-position: 2px -142px; }
.ic_b_sqlhelp { background-position: 2px -772px; }
.ic_s_reload { background-position: 2px -1671px; }
.ic_s_loggoff { background-position: 2px -1604px; }
.ic_b_browse { background-position: 0 -18px; }
.ic_b_sbrowse { background-position: 0 -660px; width: 10px; height: 10px; }
.ic_b_view { background-position: 0 -1044px; }
.ic_b_minus { background-position: 0 -440px; width: 9px; height: 9px; }
.ic_b_plus { background-position: 0 -523px; width: 9px; height: 9px; }
.ic_b_snewtbl { background-position: 0 -726px; width: 10px; height: 10px; }
/******************************************************************************/
/* classes */
@ -159,9 +132,9 @@ div#leftframelinks .icon {
}
div#leftframelinks a img.icon {
margin: 0;
margin: 2px;
border: 0.1em solid <?php echo $GLOBALS['cfg']['NaviColor']; ?>;
padding: 2px;
padding: 0;
}
div#leftframelinks a:hover img {

View File

@ -144,146 +144,6 @@ button {
vertical-align: middle;
}
/* Icon sprites */
.icon, .footnotemarker {
vertical-align: -3px;
margin-right: 0.3em;
margin-left: 0.3em;
width:16px;
height:16px;
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>iconsprites.png) no-repeat top left;
}
.ic_b_bookmark { background-position: 0 0; }
.ic_b_browse { background-position: 0 -18px; }
.ic_b_calendar { background-position: 0 -36px; }
.ic_b_chart { background-position: 0 -54px; }
.ic_b_close { background-position: 0 -72px; }
.ic_b_comment { background-position: 0 -90px; }
.ic_b_dbstatistics { background-position: 0 -108px; }
.ic_b_deltbl { background-position: 0 -126px; }
.ic_b_docs { background-position: 0 -144px; }
.ic_b_drop { background-position: 0 -162px; }
.ic_b_edit { background-position: 0 -180px; }
.ic_b_empty { background-position: 0 -198px; }
.ic_b_engine { background-position: 0 -216px; }
.ic_b_event_add { background-position: 0 -234px; }
.ic_b_events { background-position: 0 -252px; }
.ic_b_export { background-position: 0 -270px; }
.ic_b_ftext { background-position: 0 -288px; }
.ic_b_globe { background-position: 0 -306px; }
.ic_b_help { background-position: 0 -324px; width: 11px; height: 11px; }
.ic_b_home { background-position: 0 -337px; }
.ic_b_import { background-position: 0 -355px; }
.ic_b_index { background-position: 0 -373px; }
.ic_b_info { background-position: 0 -391px; width: 11px; height: 11px; }
.ic_b_inline_edit { background-position: 0 -404px; }
.ic_b_insrow { background-position: 0 -422px; }
.ic_b_minus { background-position: 0 -440px; width: 9px; height: 9px; }
.ic_b_more { background-position: 0 -451px; }
.ic_b_newdb { background-position: 0 -469px; }
.ic_b_newtbl { background-position: 0 -487px; }
.ic_b_nextpage, .ic_play { background-position: 0 -505px; }
.ic_b_plus { background-position: 0 -523px; width: 9px; height: 9px; }
.ic_b_primary { background-position: 0 -534px; }
.ic_b_print { background-position: 0 -552px; }
.ic_b_props { background-position: 0 -570px; }
.ic_b_relations { background-position: 0 -588px; }
.ic_b_routine_add { background-position: 0 -606px; }
.ic_b_routines { background-position: 0 -624px; }
.ic_b_save { background-position: 0 -642px; }
.ic_b_sbrowse { background-position: 0 -660px; width: 10px; height: 10px; }
.ic_b_search { background-position: 0 -672px; }
.ic_b_selboard { background-position: 0 -690px; }
.ic_b_select { background-position: 0 -708px; }
.ic_b_snewtbl { background-position: 0 -726px; width: 10px; height: 10px; }
.ic_b_spatial { background-position: 0 -738px; }
.ic_b_sql { background-position: 0 -756px; }
.ic_b_sqlhelp { background-position: 0 -774px; }
.ic_b_tblanalyse { background-position: 0 -792px; }
.ic_b_tblexport { background-position: 0 -810px; }
.ic_b_tblimport { background-position: 0 -828px; }
.ic_b_tblops { background-position: 0 -846px; }
.ic_b_tbloptimize { background-position: 0 -864px; }
.ic_b_tipp { background-position: 0 -882px; }
.ic_b_trigger_add { background-position: 0 -900px; }
.ic_b_triggers { background-position: 0 -918px; }
.ic_b_unique { background-position: 0 -936px; }
.ic_b_usradd { background-position: 0 -954px; }
.ic_b_usrcheck { background-position: 0 -972px; }
.ic_b_usrdrop { background-position: 0 -990px; }
.ic_b_usredit { background-position: 0 -1008px; }
.ic_b_usrlist { background-position: 0 -1026px; }
.ic_b_view { background-position: 0 -1044px; }
.ic_b_views { background-position: 0 -1062px; }
.ic_bd_browse { background-position: 0 -1080px; }
.ic_bd_deltbl { background-position: 0 -1098px; }
.ic_bd_drop { background-position: 0 -1116px; }
.ic_bd_edit { background-position: 0 -1134px; }
.ic_bd_empty { background-position: 0 -1152px; }
.ic_bd_export { background-position: 0 -1170px; }
.ic_bd_ftext { background-position: 0 -1188px; }
.ic_bd_index { background-position: 0 -1206px; }
.ic_bd_insrow { background-position: 0 -1224px; }
.ic_bd_nextpage { background-position: 0 -1242px; width: 8px; height: 13px; }
.ic_bd_primary { background-position: 0 -1257px; }
.ic_bd_sbrowse { background-position: 0 -1275px; width: 10px; height: 10px; }
.ic_bd_select { background-position: 0 -1287px; }
.ic_bd_spatial { background-position: 0 -1305px; }
.ic_bd_unique { background-position: 0 -1323px; }
.ic_col_drop { background-position: 0 -1341px; }
.ic_eye { background-position: 0 -1359px; }
.ic_eye_grey { background-position: 0 -1377px; }
.ic_item_ltr { background-position: 0 -1395px; width: 5px; height: 9px; }
.ic_item_rtl { background-position: 0 -1406px; width: 5px; height: 9px; }
.ic_more { background-position: 0 -1417px; width: 13px; height: 8px; }
.ic_pause { background-position: 0 -1427px; }
.ic_s_asc { background-position: 0 -1445px; width: 11px; height: 9px; }
.ic_s_asci { background-position: 0 -1456px; }
.ic_s_cancel { background-position: 0 -1474px; }
.ic_s_cog { background-position: 0 -1492px; }
.ic_s_db { background-position: 0 -1510px; }
.ic_s_desc { background-position: 0 -1528px; width: 11px; height: 9px; }
.ic_s_error { background-position: 0 -1539px; }
.ic_s_error2 { background-position: 0 -1557px; width: 11px; height: 11px; }
.ic_s_host { background-position: 0 -1570px; }
.ic_s_lang { background-position: 0 -1588px; }
.ic_s_loggoff { background-position: 0 -1606px; }
.ic_s_notice { background-position: 0 -1624px; }
.ic_s_passwd { background-position: 0 -1642px; }
.ic_s_really { background-position: 0 -1660px; width: 11px; height: 11px; }
.ic_s_reload { background-position: 0 -1673px; }
.ic_s_replication { background-position: 0 -1691px; }
.ic_s_rights { background-position: 0 -1709px; }
.ic_s_sortable { background-position: 0 -1727px; }
.ic_s_status { background-position: 0 -1745px; }
.ic_s_success { background-position: 0 -1763px; }
.ic_s_sync { background-position: 0 -1781px; }
.ic_s_tbl { background-position: 0 -1799px; }
.ic_s_theme { background-position: 0 -1817px; }
.ic_s_vars { background-position: 0 -1835px; }
.ic_s_views { background-position: 0 -1853px; width: 10px; height: 10px; }
.ic_window-new { background-position: 0 -1865px; }
/* Same as s_notice */
.ic_s_attention { background-position: 0 -1624px; }
/* Same as ic_b_help, but applied to place where width=11, height=11 attributes were used */
.ic_b_help_s { background-position: -324px 0; width: 11px; height: 11px; }
/* Same as ic_s_sortable */
img.sortableIcon { background-position: -1727px 0; }
/* Same as s_asc */
th.headerSortUp img.sortableIcon { background-position: 0 -1528px; width: 11px; height: 9px; }
/* Same as s_desc */
th.headerSortDown img.sortableIcon { background-position: 0 -1445px; width: 11px; height: 9px; }
/* Fix position */
.ic_more { vertical-align: middle; }
/******************************************************************************/
/* classes */
.clearfloat {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,126 @@
<?php
/* AUTOGENERATED CONTENT - DO NOT EDIT */
/* ALL CHANGES WILL BE UNDONE */
/* RUN './scripts/generate-sprites' TO UPDATE THIS FILE */
function PMA_sprites() {
return array(
'b_bookmark' => array('position' => '1', 'width' => '16', 'height' => '16'),
'b_browse' => array('position' => '2', 'width' => '16', 'height' => '16'),
'b_calendar' => array('position' => '3', 'width' => '16', 'height' => '16'),
'b_chart' => array('position' => '4', 'width' => '16', 'height' => '16'),
'b_close' => array('position' => '5', 'width' => '16', 'height' => '16'),
'b_comment' => array('position' => '6', 'width' => '16', 'height' => '16'),
'bd_browse' => array('position' => '7', 'width' => '16', 'height' => '16'),
'b_dbstatistics' => array('position' => '8', 'width' => '16', 'height' => '16'),
'bd_deltbl' => array('position' => '9', 'width' => '16', 'height' => '16'),
'bd_drop' => array('position' => '10', 'width' => '16', 'height' => '16'),
'bd_edit' => array('position' => '11', 'width' => '16', 'height' => '16'),
'b_deltbl' => array('position' => '12', 'width' => '16', 'height' => '16'),
'bd_empty' => array('position' => '13', 'width' => '16', 'height' => '16'),
'bd_export' => array('position' => '14', 'width' => '16', 'height' => '16'),
'bd_ftext' => array('position' => '15', 'width' => '16', 'height' => '16'),
'bd_index' => array('position' => '16', 'width' => '16', 'height' => '16'),
'bd_insrow' => array('position' => '17', 'width' => '16', 'height' => '16'),
'bd_nextpage' => array('position' => '18', 'width' => '8', 'height' => '13'),
'b_docs' => array('position' => '19', 'width' => '16', 'height' => '16'),
'bd_primary' => array('position' => '20', 'width' => '16', 'height' => '16'),
'b_drop' => array('position' => '21', 'width' => '16', 'height' => '16'),
'bd_sbrowse' => array('position' => '22', 'width' => '10', 'height' => '10'),
'bd_select' => array('position' => '23', 'width' => '16', 'height' => '16'),
'bd_spatial' => array('position' => '24', 'width' => '16', 'height' => '16'),
'bd_unique' => array('position' => '25', 'width' => '16', 'height' => '16'),
'b_edit' => array('position' => '26', 'width' => '16', 'height' => '16'),
'b_empty' => array('position' => '27', 'width' => '16', 'height' => '16'),
'b_engine' => array('position' => '28', 'width' => '16', 'height' => '16'),
'b_event_add' => array('position' => '29', 'width' => '16', 'height' => '16'),
'b_events' => array('position' => '30', 'width' => '16', 'height' => '16'),
'b_export' => array('position' => '31', 'width' => '16', 'height' => '16'),
'b_ftext' => array('position' => '32', 'width' => '16', 'height' => '16'),
'b_help' => array('position' => '33', 'width' => '11', 'height' => '11'),
'b_home' => array('position' => '34', 'width' => '16', 'height' => '16'),
'b_import' => array('position' => '35', 'width' => '16', 'height' => '16'),
'b_index' => array('position' => '36', 'width' => '16', 'height' => '16'),
'b_info' => array('position' => '37', 'width' => '11', 'height' => '11'),
'b_inline_edit' => array('position' => '38', 'width' => '16', 'height' => '16'),
'b_insrow' => array('position' => '39', 'width' => '16', 'height' => '16'),
'b_minus' => array('position' => '40', 'width' => '9', 'height' => '9'),
'b_more' => array('position' => '41', 'width' => '16', 'height' => '16'),
'b_newdb' => array('position' => '42', 'width' => '16', 'height' => '16'),
'b_newtbl' => array('position' => '43', 'width' => '16', 'height' => '16'),
'b_nextpage' => array('position' => '44', 'width' => '16', 'height' => '16'),
'b_plus' => array('position' => '45', 'width' => '9', 'height' => '9'),
'b_primary' => array('position' => '46', 'width' => '16', 'height' => '16'),
'b_print' => array('position' => '47', 'width' => '16', 'height' => '16'),
'b_props' => array('position' => '48', 'width' => '16', 'height' => '16'),
'b_relations' => array('position' => '49', 'width' => '16', 'height' => '16'),
'b_routine_add' => array('position' => '50', 'width' => '16', 'height' => '16'),
'b_routines' => array('position' => '51', 'width' => '16', 'height' => '16'),
'b_save' => array('position' => '52', 'width' => '16', 'height' => '16'),
'b_sbrowse' => array('position' => '53', 'width' => '10', 'height' => '10'),
'b_search' => array('position' => '54', 'width' => '16', 'height' => '16'),
'b_selboard' => array('position' => '55', 'width' => '16', 'height' => '16'),
'b_select' => array('position' => '56', 'width' => '16', 'height' => '16'),
'b_snewtbl' => array('position' => '57', 'width' => '10', 'height' => '10'),
'b_spatial' => array('position' => '58', 'width' => '16', 'height' => '16'),
'b_sqlhelp' => array('position' => '59', 'width' => '16', 'height' => '16'),
'b_sql' => array('position' => '60', 'width' => '16', 'height' => '16'),
'b_tblanalyse' => array('position' => '61', 'width' => '16', 'height' => '16'),
'b_tblexport' => array('position' => '62', 'width' => '16', 'height' => '16'),
'b_tblimport' => array('position' => '63', 'width' => '16', 'height' => '16'),
'b_tblops' => array('position' => '64', 'width' => '16', 'height' => '16'),
'b_tbloptimize' => array('position' => '65', 'width' => '16', 'height' => '16'),
'b_tipp' => array('position' => '66', 'width' => '16', 'height' => '16'),
'b_trigger_add' => array('position' => '67', 'width' => '16', 'height' => '16'),
'b_triggers' => array('position' => '68', 'width' => '16', 'height' => '16'),
'b_unique' => array('position' => '69', 'width' => '16', 'height' => '16'),
'b_usradd' => array('position' => '70', 'width' => '16', 'height' => '16'),
'b_usrcheck' => array('position' => '71', 'width' => '16', 'height' => '16'),
'b_usrdrop' => array('position' => '72', 'width' => '16', 'height' => '16'),
'b_usredit' => array('position' => '73', 'width' => '16', 'height' => '16'),
'b_usrlist' => array('position' => '74', 'width' => '16', 'height' => '16'),
'b_view' => array('position' => '75', 'width' => '16', 'height' => '16'),
'b_views' => array('position' => '76', 'width' => '16', 'height' => '16'),
'col_drop' => array('position' => '77', 'width' => '16', 'height' => '16'),
'docs_menu_bg' => array('position' => '78', 'width' => '2', 'height' => '2'),
'eye_grey' => array('position' => '79', 'width' => '16', 'height' => '16'),
'eye' => array('position' => '80', 'width' => '16', 'height' => '16'),
'item_ltr' => array('position' => '81', 'width' => '5', 'height' => '9'),
'item_rtl' => array('position' => '82', 'width' => '5', 'height' => '9'),
'more' => array('position' => '83', 'width' => '13', 'height' => '16'),
'new_data_hovered' => array('position' => '84', 'width' => '16', 'height' => '16'),
'new_data' => array('position' => '85', 'width' => '16', 'height' => '16'),
'new_data_selected_hovered' => array('position' => '86', 'width' => '16', 'height' => '16'),
'new_data_selected' => array('position' => '87', 'width' => '16', 'height' => '16'),
'new_struct_hovered' => array('position' => '88', 'width' => '16', 'height' => '16'),
'new_struct' => array('position' => '89', 'width' => '16', 'height' => '16'),
'new_struct_selected_hovered' => array('position' => '90', 'width' => '16', 'height' => '16'),
'new_struct_selected' => array('position' => '91', 'width' => '16', 'height' => '16'),
's_asci' => array('position' => '92', 'width' => '16', 'height' => '16'),
's_asc' => array('position' => '93', 'width' => '11', 'height' => '9'),
's_cancel' => array('position' => '94', 'width' => '16', 'height' => '16'),
's_cog' => array('position' => '95', 'width' => '16', 'height' => '16'),
's_db' => array('position' => '96', 'width' => '16', 'height' => '16'),
's_desc' => array('position' => '97', 'width' => '11', 'height' => '9'),
's_error2' => array('position' => '98', 'width' => '11', 'height' => '11'),
's_error' => array('position' => '99', 'width' => '16', 'height' => '16'),
's_host' => array('position' => '100', 'width' => '16', 'height' => '16'),
's_lang' => array('position' => '101', 'width' => '16', 'height' => '16'),
's_loggoff' => array('position' => '102', 'width' => '16', 'height' => '16'),
's_notice' => array('position' => '103', 'width' => '16', 'height' => '16'),
's_passwd' => array('position' => '104', 'width' => '16', 'height' => '16'),
's_really' => array('position' => '105', 'width' => '11', 'height' => '11'),
's_reload' => array('position' => '106', 'width' => '16', 'height' => '16'),
's_replication' => array('position' => '107', 'width' => '16', 'height' => '16'),
's_rights' => array('position' => '108', 'width' => '16', 'height' => '16'),
's_sortable' => array('position' => '109', 'width' => '11', 'height' => '15'),
's_status' => array('position' => '110', 'width' => '16', 'height' => '16'),
's_success' => array('position' => '111', 'width' => '16', 'height' => '16'),
's_sync' => array('position' => '112', 'width' => '16', 'height' => '16'),
's_tbl' => array('position' => '113', 'width' => '16', 'height' => '16'),
's_theme' => array('position' => '114', 'width' => '16', 'height' => '16'),
's_vars' => array('position' => '115', 'width' => '16', 'height' => '16'),
's_views' => array('position' => '116', 'width' => '10', 'height' => '10'),
'window-new' => array('position' => '117', 'width' => '16', 'height' => '16'),
);
}
?>

View File

@ -65,32 +65,6 @@ button {
display: inline;
}
/* Icon sprites */
.icon {
/* leave some space between icons and text */
vertical-align: middle;
margin-right: 0.3em;
margin-left: 0.3em;
width:16px;
height:16px;
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>iconsprites.png) no-repeat top left;
}
.ic_b_home { background-position: -357px 0; }
.ic_b_selboard { background-position: -754px 0; }
.ic_b_docs { background-position: -136px 0; }
.ic_b_sqlhelp { background-position: -856px 0; }
.ic_s_reload { background-position: -1761px 0; }
.ic_s_loggoff { background-position: -1698px 0; }
.ic_b_browse, .ic_b_sbrowse { background-position: -34px 0; }
.ic_b_view { background-position: -1077px 0; }
.ic_b_plus { background-position: -573px 0; }
.ic_b_minus { background-position: -471px 0; }
.ic_b_views, .ic_s_views { background-position: -1094px 0; }
.ic_b_snewtbl { background-position: -788px 0; }
/******************************************************************************/
/* classes */

View File

@ -294,153 +294,6 @@ select[multiple] {
<?php echo $_SESSION['PMA_Theme']->getCssGradient('ffffff', 'f2f2f2'); ?>
}
/* Icon sprites */
.icon, .footnotemarker {
vertical-align: -3px;
margin-right: 0.3em;
margin-left: 0.3em;
width:16px;
height:16px;
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>iconsprites.png) no-repeat top left;
}
.ic_asc_order, .ic_s_desc { background-position: 0 0; }
.ic_b_bookmark { background-position: -17px 0; }
.ic_b_browse, .ic_b_sbrowse { background-position: -34px 0; }
.ic_b_calendar { background-position: -51px 0; }
.ic_b_chart, .ic_b_dbstatistics { background-position: -68px 0; }
.ic_b_close { background-position: -85px 0; }
.ic_b_comment { background-position: -102px 0; }
.ic_b_deltbl { background-position: -119px 0; }
.ic_b_docs { background-position: -136px 0; }
.ic_b_docsql { background-position: -153px 0; }
.ic_b_drop { background-position: -170px 0; }
.ic_b_edit { background-position: -187px 0; }
.ic_b_empty { background-position: -204px 0; }
.ic_b_engine { background-position: -221px 0; }
.ic_b_event_add { background-position: -238px 0; }
.ic_b_events { background-position: -255px 0; }
.ic_b_export, .ic_b_tblexport { background-position: -272px 0; }
.ic_b_firstpage { background-position: -289px 0; }
.ic_b_ftext { background-position: -306px 0; }
.ic_b_globe { background-position: -323px 0; }
.ic_b_help { background-position: -340px 0; }
.ic_b_help_s { background-position: -340px 0; }
.ic_b_home { background-position: -357px 0; }
.ic_b_import, .ic_b_tblimport { background-position: -374px 0; }
.ic_b_index { background-position: -391px 0; }
.ic_b_info { background-position: -408px 0; width: 11px; height: 11px; }
.ic_b_inline_edit { background-position: -420px 0; }
.ic_b_insrow { background-position: -437px 0; }
.ic_b_lastpage { background-position: -454px 0; }
.ic_b_minus { background-position: -471px 0; }
.ic_b_more, .ic_col_drop { background-position: -488px 0; }
.ic_b_newdb { background-position: -505px 0; }
.ic_b_newtbl { background-position: -522px 0; }
.ic_b_nextpage, .ic_play { background-position: -539px 0; }
.ic_b_pdfdoc { background-position: -556px 0; }
.ic_b_plus { background-position: -573px 0; }
.ic_b_prevpage { background-position: -590px 0; }
.ic_b_primary { background-position: -607px 0; }
.ic_b_print { background-position: -624px 0; }
.ic_b_props { background-position: -641px 0; }
.ic_b_relations { background-position: -658px 0; }
.ic_b_routine_add { background-position: -675px 0; }
.ic_b_routines { background-position: -692px 0; }
.ic_b_save { background-position: -709px 0; }
.ic_b_sdb { background-position: -726px 0; width: 10px; height: 10px; }
.ic_b_search { background-position: -737px 0; }
.ic_b_selboard { background-position: -754px 0; }
.ic_b_select { background-position: -771px 0; }
.ic_b_snewtbl { background-position: -788px 0; }
.ic_b_spatial { background-position: -805px 0; }
.ic_b_sql { background-position: -822px 0; }
.ic_b_sqldoc { background-position: -839px 0; }
.ic_b_sqlhelp { background-position: -856px 0; }
.ic_b_tblanalyse { background-position: -873px 0; }
.ic_b_tblops { background-position: -890px 0; }
.ic_b_tbloptimize { background-position: -907px 0; }
.ic_b_tipp { background-position: -924px 0; }
.ic_b_trigger_add { background-position: -941px 0; }
.ic_b_triggers { background-position: -958px 0; }
.ic_b_unique { background-position: -975px 0; }
.ic_b_usradd { background-position: -992px 0; }
.ic_b_usrcheck { background-position: -1009px 0; }
.ic_b_usrdrop { background-position: -1026px 0; }
.ic_b_usredit { background-position: -1043px 0; }
.ic_b_usrlist { background-position: -1060px 0; }
.ic_b_view { background-position: -1077px 0; }
.ic_b_views, .ic_s_views { background-position: -1094px 0; }
.ic_bd_browse { background-position: -1111px 0; }
.ic_bd_deltbl { background-position: -1128px 0; }
.ic_bd_drop { background-position: -1145px 0; }
.ic_bd_edit { background-position: -1162px 0; }
.ic_bd_empty { background-position: -1179px 0; }
.ic_bd_export { background-position: -1196px 0; }
.ic_bd_firstpage { background-position: -1213px 0; width: 16px; height: 13px; }
.ic_bd_ftext { background-position: -1230px 0; }
.ic_bd_index { background-position: -1247px 0; }
.ic_bd_insrow { background-position: -1264px 0; }
.ic_bd_lastpage { background-position: -1281px 0; width: 16px; height: 13px; }
.ic_bd_nextpage { background-position: -1298px 0; width: 8px; height: 13px; }
.ic_bd_prevpage { background-position: -1307px 0; width: 8px; height: 13px; }
.ic_bd_primary { background-position: -1316px 0; }
.ic_bd_sbrowse { background-position: -1333px 0; width: 10px; height: 10px; }
.ic_bd_select { background-position: -1344px 0; }
.ic_bd_spatial { background-position: -1361px 0; }
.ic_bd_unique { background-position: -1378px 0; }
.ic_database, .ic_s_db { background-position: -1395px 0; }
.ic_eye { background-position: -1412px 0; }
.ic_eye_grey { background-position: -1429px 0; }
.ic_item { background-position: -1446px 0; width: 9px; height: 9px; }
.ic_item_ltr { background-position: -1456px 0; width: 5px; height: 9px; }
.ic_item_rtl { background-position: -1462px 0; width: 5px; height: 9px; }
.ic_more { background-position: -1468px 0; width: 13px; height: 8px; }
.ic_pause { background-position: -1482px 0; }
.ic_php_sym { background-position: -1499px 0; }
.ic_s_asc { background-position: -1516px 0; }
.ic_s_asci { background-position: -1533px 0; }
.ic_s_attention, .ic_s_notice { background-position: -1550px 0; }
.ic_s_cancel { background-position: -1567px 0; }
.ic_s_cancel2 { background-position: -1584px 0; }
.ic_s_cog { background-position: -1601px 0; }
.ic_s_error { background-position: -1618px 0; }
.ic_s_error2 { background-position: -1635px 0; width: 11px; height: 11px; }
.ic_s_host { background-position: -1647px 0; }
.ic_s_info { background-position: -1664px 0; }
.ic_s_lang { background-position: -1681px 0; }
.ic_s_loggoff { background-position: -1698px 0; }
.ic_s_okay { background-position: -1715px 0; }
.ic_s_passwd { background-position: -1732px 0; }
.ic_s_really { background-position: -1749px 0; width: 11px; height: 11px; }
.ic_s_reload { background-position: -1761px 0; }
.ic_s_replication { background-position: -1778px 0; }
.ic_s_rights { background-position: -1795px 0; }
.ic_s_sortable { background-position: -1812px 0; }
.ic_s_status { background-position: -1829px 0; }
.ic_s_success { background-position: -1846px 0; }
.ic_s_sync { background-position: -1863px 0; }
.ic_s_tbl { background-position: -1880px 0; }
.ic_s_theme { background-position: -1897px 0; }
.ic_s_vars { background-position: -1914px 0; }
.ic_window-new { background-position: -1931px 0; }
/* Same as ic_b_help, but applied to place where width=11, height=11 attributes were used */
.ic_b_help_s { background-position: -340px 0; }
/* Same as ic_s_sortable */
img.sortableIcon { background-position: -1812px 0; }
/* Same as s_asc */
th.headerSortUp img.sortableIcon { background-position: 0 0; }
/* Same as s_desc */
th.headerSortDown img.sortableIcon { background-position: -1516px 0; }
/* Fix position */
.ic_more { vertical-align: middle; }
/******************************************************************************/
/* classes */
.clearfloat {
@ -456,6 +309,11 @@ th.headerSortDown img.sortableIcon { background-position: -1516px 0; }
padding-top: 1em;
}
.separator {
color: white;
text-shadow: 0 1px 0 black;
}
div.tools {
/* border: 1px solid #000000; */
padding: 0.2em;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -0,0 +1,147 @@
<?php
/* AUTOGENERATED CONTENT - DO NOT EDIT */
/* ALL CHANGES WILL BE UNDONE */
/* RUN './scripts/generate-sprites' TO UPDATE THIS FILE */
function PMA_sprites() {
return array(
'asc_order' => array('position' => '1', 'width' => '16', 'height' => '16'),
'b_bookmark' => array('position' => '2', 'width' => '16', 'height' => '16'),
'b_browse' => array('position' => '3', 'width' => '16', 'height' => '16'),
'b_calendar' => array('position' => '4', 'width' => '16', 'height' => '16'),
'b_chart' => array('position' => '5', 'width' => '16', 'height' => '16'),
'b_close' => array('position' => '6', 'width' => '16', 'height' => '16'),
'b_comment' => array('position' => '7', 'width' => '16', 'height' => '16'),
'bd_browse' => array('position' => '8', 'width' => '16', 'height' => '16'),
'b_dbstatistics' => array('position' => '9', 'width' => '16', 'height' => '16'),
'bd_deltbl' => array('position' => '10', 'width' => '16', 'height' => '16'),
'bd_drop' => array('position' => '11', 'width' => '16', 'height' => '16'),
'bd_edit' => array('position' => '12', 'width' => '16', 'height' => '16'),
'b_deltbl' => array('position' => '13', 'width' => '16', 'height' => '16'),
'bd_empty' => array('position' => '14', 'width' => '16', 'height' => '16'),
'bd_export' => array('position' => '15', 'width' => '16', 'height' => '16'),
'bd_firstpage' => array('position' => '16', 'width' => '16', 'height' => '13'),
'bd_ftext' => array('position' => '17', 'width' => '16', 'height' => '16'),
'bd_index' => array('position' => '18', 'width' => '16', 'height' => '16'),
'bd_insrow' => array('position' => '19', 'width' => '16', 'height' => '16'),
'bd_lastpage' => array('position' => '20', 'width' => '16', 'height' => '13'),
'bd_nextpage' => array('position' => '21', 'width' => '8', 'height' => '13'),
'b_docs' => array('position' => '22', 'width' => '16', 'height' => '16'),
'b_docsql' => array('position' => '23', 'width' => '16', 'height' => '16'),
'bd_prevpage' => array('position' => '24', 'width' => '8', 'height' => '13'),
'bd_primary' => array('position' => '25', 'width' => '16', 'height' => '16'),
'b_drop' => array('position' => '26', 'width' => '16', 'height' => '16'),
'bd_sbrowse' => array('position' => '27', 'width' => '10', 'height' => '10'),
'bd_select' => array('position' => '28', 'width' => '16', 'height' => '16'),
'bd_spatial' => array('position' => '29', 'width' => '16', 'height' => '16'),
'bd_unique' => array('position' => '30', 'width' => '16', 'height' => '16'),
'b_edit' => array('position' => '31', 'width' => '16', 'height' => '16'),
'b_empty' => array('position' => '32', 'width' => '16', 'height' => '16'),
'b_engine' => array('position' => '33', 'width' => '16', 'height' => '16'),
'b_event_add' => array('position' => '34', 'width' => '16', 'height' => '16'),
'b_events' => array('position' => '35', 'width' => '16', 'height' => '16'),
'b_export' => array('position' => '36', 'width' => '16', 'height' => '16'),
'b_firstpage' => array('position' => '37', 'width' => '16', 'height' => '16'),
'b_ftext' => array('position' => '38', 'width' => '16', 'height' => '16'),
'b_help' => array('position' => '39', 'width' => '16', 'height' => '16'),
'b_home' => array('position' => '40', 'width' => '16', 'height' => '16'),
'b_import' => array('position' => '41', 'width' => '16', 'height' => '16'),
'b_index' => array('position' => '42', 'width' => '16', 'height' => '16'),
'b_info' => array('position' => '43', 'width' => '11', 'height' => '11'),
'b_inline_edit' => array('position' => '44', 'width' => '16', 'height' => '16'),
'b_insrow' => array('position' => '45', 'width' => '16', 'height' => '16'),
'b_lastpage' => array('position' => '46', 'width' => '16', 'height' => '16'),
'b_minus' => array('position' => '47', 'width' => '16', 'height' => '16'),
'b_more' => array('position' => '48', 'width' => '16', 'height' => '16'),
'b_newdb' => array('position' => '49', 'width' => '16', 'height' => '16'),
'b_newtbl' => array('position' => '50', 'width' => '16', 'height' => '16'),
'b_nextpage' => array('position' => '51', 'width' => '16', 'height' => '16'),
'b_pdfdoc' => array('position' => '52', 'width' => '16', 'height' => '16'),
'b_plus' => array('position' => '53', 'width' => '16', 'height' => '16'),
'b_prevpage' => array('position' => '54', 'width' => '16', 'height' => '16'),
'b_primary' => array('position' => '55', 'width' => '16', 'height' => '16'),
'b_print' => array('position' => '56', 'width' => '16', 'height' => '16'),
'b_props' => array('position' => '57', 'width' => '16', 'height' => '16'),
'b_relations' => array('position' => '58', 'width' => '16', 'height' => '16'),
'b_routine_add' => array('position' => '59', 'width' => '16', 'height' => '16'),
'b_routines' => array('position' => '60', 'width' => '16', 'height' => '16'),
'b_save' => array('position' => '61', 'width' => '16', 'height' => '16'),
'b_sbrowse' => array('position' => '62', 'width' => '16', 'height' => '16'),
'b_sdb' => array('position' => '63', 'width' => '10', 'height' => '10'),
'b_search' => array('position' => '64', 'width' => '16', 'height' => '16'),
'b_selboard' => array('position' => '65', 'width' => '16', 'height' => '16'),
'b_select' => array('position' => '66', 'width' => '16', 'height' => '16'),
'b_snewtbl' => array('position' => '67', 'width' => '16', 'height' => '16'),
'b_spatial' => array('position' => '68', 'width' => '16', 'height' => '16'),
'b_sqldoc' => array('position' => '69', 'width' => '16', 'height' => '16'),
'b_sqlhelp' => array('position' => '70', 'width' => '16', 'height' => '16'),
'b_sql' => array('position' => '71', 'width' => '16', 'height' => '16'),
'b_tblanalyse' => array('position' => '72', 'width' => '16', 'height' => '16'),
'b_tblexport' => array('position' => '73', 'width' => '16', 'height' => '16'),
'b_tblimport' => array('position' => '74', 'width' => '16', 'height' => '16'),
'b_tblops' => array('position' => '75', 'width' => '16', 'height' => '16'),
'b_tbloptimize' => array('position' => '76', 'width' => '16', 'height' => '16'),
'b_tipp' => array('position' => '77', 'width' => '16', 'height' => '16'),
'b_trigger_add' => array('position' => '78', 'width' => '16', 'height' => '16'),
'b_triggers' => array('position' => '79', 'width' => '16', 'height' => '16'),
'b_unique' => array('position' => '80', 'width' => '16', 'height' => '16'),
'b_usradd' => array('position' => '81', 'width' => '16', 'height' => '16'),
'b_usrcheck' => array('position' => '82', 'width' => '16', 'height' => '16'),
'b_usrdrop' => array('position' => '83', 'width' => '16', 'height' => '16'),
'b_usredit' => array('position' => '84', 'width' => '16', 'height' => '16'),
'b_usrlist' => array('position' => '85', 'width' => '16', 'height' => '16'),
'b_view' => array('position' => '86', 'width' => '16', 'height' => '16'),
'b_views' => array('position' => '87', 'width' => '16', 'height' => '16'),
'col_drop' => array('position' => '88', 'width' => '16', 'height' => '16'),
'database' => array('position' => '89', 'width' => '16', 'height' => '16'),
'docs_menu_bg' => array('position' => '90', 'width' => '2', 'height' => '2'),
'eye_grey' => array('position' => '91', 'width' => '16', 'height' => '16'),
'eye' => array('position' => '92', 'width' => '16', 'height' => '16'),
'item_ltr' => array('position' => '93', 'width' => '5', 'height' => '9'),
'item' => array('position' => '94', 'width' => '9', 'height' => '9'),
'item_rtl' => array('position' => '95', 'width' => '5', 'height' => '9'),
'more' => array('position' => '96', 'width' => '13', 'height' => '16'),
'new_data_hovered' => array('position' => '97', 'width' => '16', 'height' => '16'),
'new_data' => array('position' => '98', 'width' => '16', 'height' => '16'),
'new_data_selected_hovered' => array('position' => '99', 'width' => '16', 'height' => '16'),
'new_data_selected' => array('position' => '100', 'width' => '16', 'height' => '16'),
'new_struct_hovered' => array('position' => '101', 'width' => '16', 'height' => '16'),
'new_struct' => array('position' => '102', 'width' => '16', 'height' => '16'),
'new_struct_selected_hovered' => array('position' => '103', 'width' => '16', 'height' => '16'),
'new_struct_selected' => array('position' => '104', 'width' => '16', 'height' => '16'),
'pause' => array('position' => '105', 'width' => '16', 'height' => '16'),
'php_sym' => array('position' => '106', 'width' => '16', 'height' => '16'),
'play' => array('position' => '107', 'width' => '16', 'height' => '16'),
's_asci' => array('position' => '108', 'width' => '16', 'height' => '16'),
's_asc' => array('position' => '109', 'width' => '16', 'height' => '16'),
's_attention' => array('position' => '110', 'width' => '16', 'height' => '16'),
's_cancel2' => array('position' => '111', 'width' => '16', 'height' => '16'),
's_cancel' => array('position' => '112', 'width' => '16', 'height' => '16'),
's_cog' => array('position' => '113', 'width' => '16', 'height' => '16'),
's_db' => array('position' => '114', 'width' => '16', 'height' => '16'),
's_desc' => array('position' => '115', 'width' => '16', 'height' => '16'),
's_error2' => array('position' => '116', 'width' => '11', 'height' => '11'),
's_error' => array('position' => '117', 'width' => '16', 'height' => '16'),
's_host' => array('position' => '118', 'width' => '16', 'height' => '16'),
's_info' => array('position' => '119', 'width' => '16', 'height' => '16'),
's_lang' => array('position' => '120', 'width' => '16', 'height' => '16'),
's_loggoff' => array('position' => '121', 'width' => '16', 'height' => '16'),
's_notice' => array('position' => '122', 'width' => '16', 'height' => '16'),
's_okay' => array('position' => '123', 'width' => '16', 'height' => '16'),
's_passwd' => array('position' => '124', 'width' => '16', 'height' => '16'),
's_process' => array('position' => '125', 'width' => '16', 'height' => '16'),
's_really' => array('position' => '126', 'width' => '11', 'height' => '11'),
's_reload' => array('position' => '127', 'width' => '16', 'height' => '16'),
's_replication' => array('position' => '128', 'width' => '16', 'height' => '16'),
's_rights' => array('position' => '129', 'width' => '16', 'height' => '16'),
's_sortable' => array('position' => '130', 'width' => '16', 'height' => '16'),
's_status' => array('position' => '131', 'width' => '16', 'height' => '16'),
's_success' => array('position' => '132', 'width' => '16', 'height' => '16'),
's_sync' => array('position' => '133', 'width' => '16', 'height' => '16'),
's_tbl' => array('position' => '134', 'width' => '16', 'height' => '16'),
's_theme' => array('position' => '135', 'width' => '16', 'height' => '16'),
's_vars' => array('position' => '136', 'width' => '16', 'height' => '16'),
's_views' => array('position' => '137', 'width' => '16', 'height' => '16'),
'window-new' => array('position' => '138', 'width' => '16', 'height' => '16'),
);
}
?>

81
themes/sprites.css.php Normal file
View File

@ -0,0 +1,81 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* This file generates the CSS code for the sprites of a theme
*
* @package phpMyAdmin-theme
*/
// unplanned execution path
if (!defined('PMA_MINIMUM_COMMON')) {
exit();
}
$bg = $_SESSION['PMA_Theme']->getImgPath() . 'sprites.png';
?>
/* Icon sprites */
.icon, .footnotemarker {
margin: 0 0.3em;
padding: 0 !important;
width: 16px;
height: 16px;
background-image: url('<?php echo $bg; ?>') !important;
background-repeat: no-repeat !important;
background-position: top left !important;
}
<?php
/* Check if there is a valid data file for sprites */
if (is_readable($_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php')) {
include_once $_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php';
$sprites = array();
if (function_exists('PMA_sprites')) {
$sprites = PMA_sprites();
}
$template = ".ic_%s { background-position: 0 -%upx !important;%s%s }\n";
foreach ($sprites as $name => $data) {
// generate the CSS code for each icon
$width = '';
$height = '';
// if either the height or width of an icon is 16px,
// then it's pointless to set this as a parameter,
//since it will be inherited from the "icon" class
if ($data['width'] != 16) {
$width = " width: " . $data['width'] . "px;";
}
if ($data['height'] != 16) {
$height = " height: " . $data['height'] . "px;";
}
printf(
$template,
$name,
($data['position'] * 16),
$width,
$height
);
}
// Here we map some of the classes that we
// defined above to other CSS selectors.
// The indexes of the array correspond to
// already defined classes and the values
// are the selectors that we want to map to.
$elements = array(
's_sortable' => 'img.sortableIcon',
's_asc' => 'th.headerSortUp img.sortableIcon',
's_desc' => 'th.headerSortDown img.sortableIcon'
);
$template = "%s { background-position: 0 -%upx; "
. "height: %upx; width: %upx; }\n";
foreach ($elements as $key => $value) {
if (isset($sprites[$key])) { // If the CSS class has been defined
printf(
$template,
$value,
($sprites[$key]['position'] * 16),
$sprites[$key]['height'],
$sprites[$key]['width']
);
}
}
}
?>