Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin into OpenGIS
Conflicts: libraries/gis/pma_gis_geometrycollection.php
This commit is contained in:
commit
47fdfad336
@ -52,6 +52,8 @@ phpMyAdmin - ChangeLog
|
||||
- remove version number in /setup
|
||||
- bug #3367993 [usability] Missing "Generate Password" button
|
||||
- bug #3363221 [display] Missing Server Parameter on inline sql query
|
||||
- bug #3367986 [navi] Drop field -> lost active table
|
||||
- remove misleading comment on the "Rename database" interface
|
||||
|
||||
3.4.3.1 (2011-07-02)
|
||||
- [security] Fixed possible session manipulation in swekey authentication, see PMASA-2011-5
|
||||
|
||||
@ -46,6 +46,7 @@
|
||||
<exec executable="phpcpd">
|
||||
<arg line="--log-pmd ${basedir}/build/logs/pmd-cpd.xml
|
||||
--exclude test
|
||||
--exclude build
|
||||
--exclude libraries/PHPExcel
|
||||
--exclude libraries/tcpdf
|
||||
${source}" />
|
||||
@ -60,8 +61,8 @@
|
||||
|
||||
<target name="phpcs" description="Generate checkstyle.xml using PHP_CodeSniffer excluding test, PHPExcel, tcpdf directories">
|
||||
<exec executable="phpcs">
|
||||
<arg line="-v
|
||||
--ignore=*/PHPExcel/*,*/php-gettext/*,*/tcpdf/*
|
||||
<arg line="
|
||||
--ignore=*/PHPExcel/*,*/php-gettext/*,*/tcpdf/*,*/canvg/*,*/codemirror/*,*/highcharts/*,*/openlayers/*,*/jquery/*,*/build/*
|
||||
--report=checkstyle
|
||||
--report-file=${basedir}/build/logs/checkstyle.xml
|
||||
--standard=PEAR
|
||||
|
||||
@ -75,7 +75,7 @@ $replaces = array(
|
||||
=> '<a href="https://sourceforge.net/support/tracker.php?aid=\\1">bug #\\1</a>',
|
||||
|
||||
// all other 6+ digit numbers are treated as bugs
|
||||
'/(?<!BUG|RFE|patch) #?([0-9]{6,})/i'
|
||||
'/(?<!bug|RFE|patch) #?([0-9]{6,})/i'
|
||||
=> ' <a href="https://sourceforge.net/support/tracker.php?aid=\\1">bug #\\1</a>',
|
||||
|
||||
// CVE/CAN entries
|
||||
|
||||
@ -77,7 +77,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
|
||||
// the db name
|
||||
$procedure_names = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE');
|
||||
if ($procedure_names) {
|
||||
foreach($procedure_names as $procedure_name) {
|
||||
foreach ($procedure_names as $procedure_name) {
|
||||
PMA_DBI_select_db($db);
|
||||
$tmp_query = PMA_DBI_get_definition($db, 'PROCEDURE', $procedure_name);
|
||||
// collect for later display
|
||||
@ -89,7 +89,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
|
||||
|
||||
$function_names = PMA_DBI_get_procedures_or_functions($db, 'FUNCTION');
|
||||
if ($function_names) {
|
||||
foreach($function_names as $function_name) {
|
||||
foreach ($function_names as $function_name) {
|
||||
PMA_DBI_select_db($db);
|
||||
$tmp_query = PMA_DBI_get_definition($db, 'FUNCTION', $function_name);
|
||||
// collect for later display
|
||||
@ -234,7 +234,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
|
||||
// the db name
|
||||
$event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA= \'' . PMA_sqlAddSlashes($db,true) . '\';');
|
||||
if ($event_names) {
|
||||
foreach($event_names as $event_name) {
|
||||
foreach ($event_names as $event_name) {
|
||||
PMA_DBI_select_db($db);
|
||||
$tmp_query = PMA_DBI_get_definition($db, 'EVENT', $event_name);
|
||||
// collect for later display
|
||||
@ -398,24 +398,12 @@ if ($db != 'mysql') {
|
||||
<legend>
|
||||
<?php
|
||||
if ($cfg['PropertiesIconic']) {
|
||||
echo '<img class="icon" src="' . $pmaThemeImage . 'b_edit.png"'
|
||||
.' alt="" width="16" height="16" />';
|
||||
echo '<img class="icon ic_b_edit" src="themes/dot.gif" alt="" />';
|
||||
}
|
||||
echo __('Rename database to') . ':';
|
||||
?>
|
||||
</legend>
|
||||
<input id="new_db_name" type="text" name="newname" size="30" class="textfield" value="" />
|
||||
<?php
|
||||
echo '(' . __('Command') . ': ';
|
||||
/**
|
||||
* @todo (see explanations above in a previous todo)
|
||||
*/
|
||||
//if (PMA_MYSQL_INT_VERSION >= XYYZZ) {
|
||||
// echo 'RENAME DATABASE';
|
||||
//} else {
|
||||
echo 'INSERT INTO ... SELECT';
|
||||
//}
|
||||
echo ')'; ?>
|
||||
</fieldset>
|
||||
<fieldset class="tblFooters">
|
||||
<input id="rename_db_input" type="submit" value="<?php echo __('Go'); ?>" />
|
||||
@ -434,8 +422,7 @@ if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) && ! $db_is_info
|
||||
<fieldset class="caution">
|
||||
<legend><?php
|
||||
if ($cfg['PropertiesIconic']) {
|
||||
echo '<img class="icon" src="' . $pmaThemeImage . 'b_deltbl.png"'
|
||||
.' alt="" width="16" height="16" />';
|
||||
echo '<img class="icon ic_b_deltbl" src="themes/dot.gif" alt="" />';
|
||||
}
|
||||
echo __('Remove database');
|
||||
?></legend>
|
||||
@ -481,8 +468,7 @@ echo __('Remove database');
|
||||
<legend>
|
||||
<?php
|
||||
if ($cfg['PropertiesIconic']) {
|
||||
echo '<img class="icon" src="' . $pmaThemeImage . 'b_edit.png"'
|
||||
.' alt="" width="16" height="16" />';
|
||||
echo '<img class="icon ic_b_edit" src="themes/dot.gif" alt="" />';
|
||||
}
|
||||
echo __('Copy database to') . ':';
|
||||
$drop_clause = 'DROP TABLE / DROP VIEW';
|
||||
@ -546,8 +532,7 @@ echo __('Remove database');
|
||||
. '<fieldset>' . "\n"
|
||||
. ' <legend>';
|
||||
if ($cfg['PropertiesIconic']) {
|
||||
echo '<img class="icon" src="' . $pmaThemeImage . 's_asci.png"'
|
||||
.' alt="" width="16" height="16" />';
|
||||
echo '<img class="icon ic_s_asci" src="themes/dot.gif" alt="" />';
|
||||
}
|
||||
echo ' <label for="select_db_collation">' . __('Collation') . ':</label>' . "\n"
|
||||
. ' </legend>' . "\n"
|
||||
@ -594,8 +579,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" src="' . $pmaThemeImage . 'b_edit.png"'
|
||||
.' alt="" width="16" height="16" />';
|
||||
echo '<img class="icon ic_b_edit" src="themes/dot.gif" alt="" />';
|
||||
}
|
||||
echo __('Edit or export relational schema') . '</a></fieldset></div>';
|
||||
} // end if
|
||||
|
||||
@ -284,9 +284,9 @@ foreach ($tables as $keyname => $each_table) {
|
||||
$tracking_icon = '';
|
||||
if (PMA_Tracker::isActive()) {
|
||||
if (PMA_Tracker::isTracked($GLOBALS["db"], $truename)) {
|
||||
$tracking_icon = '<a href="tbl_tracking.php?' . $url_query.'&table=' . $truename . '"><img class="icon" width="14" height="14" src="' . $pmaThemeImage . 'eye.png" alt="' . __('Tracking is active.') . '" title="' . __('Tracking is active.') . '" /></a>';
|
||||
$tracking_icon = '<a href="tbl_tracking.php?' . $url_query.'&table=' . $truename . '"><img class="icon ic_eye" src="themes/dot.gif" alt="' . __('Tracking is active.') . '" title="' . __('Tracking is active.') . '" /></a>';
|
||||
} elseif (PMA_Tracker::getVersion($GLOBALS["db"], $truename) > 0) {
|
||||
$tracking_icon = '<a href="tbl_tracking.php?' . $url_query . '&table=' . $truename . '"><img class="icon" width="14" height="14" src="' . $pmaThemeImage . 'eye_grey.png" alt="' . __('Tracking is not active.') . '" title="' . __('Tracking is not active.') . '" /></a>';
|
||||
$tracking_icon = '<a href="tbl_tracking.php?' . $url_query . '&table=' . $truename . '"><img class="icon ic_eye" src="themes/dot.gif" alt="' . __('Tracking is not active.') . '" title="' . __('Tracking is not active.') . '" /></a>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -341,7 +341,7 @@ foreach ($tables as $keyname => $each_table) {
|
||||
<th><?php echo $browse_table_label; ?>
|
||||
<?php echo (! empty($tracking_icon) ? $tracking_icon : ''); ?>
|
||||
</th>
|
||||
<?php if ($server_slave_status) { ?><td align="center"><?php echo $ignored ? ' <img class="icon" src="' . $pmaThemeImage . 's_cancel.png" width="16" height="16" alt="NOT REPLICATED" />' : ''. $do ? ' <img class="icon" src="' . $pmaThemeImage . 's_success.png" width="16" height="16" alt="REPLICATED" />' : ''; ?></td><?php } ?>
|
||||
<?php if ($server_slave_status) { ?><td align="center"><?php echo $ignored ? ' <img class="icon ic_s_cancel" src="themes/dot.gif" alt="NOT REPLICATED" />' : ''. $do ? ' <img class="icon ic_s_success" src="themes/dot.gif" alt="REPLICATED" />' : ''; ?></td><?php } ?>
|
||||
<td align="center"><?php echo $browse_table; ?></td>
|
||||
<td align="center">
|
||||
<a href="tbl_structure.php?<?php echo $tbl_url_query; ?>">
|
||||
@ -548,15 +548,13 @@ PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'fr
|
||||
echo '<p>';
|
||||
echo '<a href="db_printview.php?' . $url_query . '">';
|
||||
if ($cfg['PropertiesIconic']) {
|
||||
echo '<img class="icon" src="' . $pmaThemeImage
|
||||
.'b_print.png" width="16" height="16" alt="" />';
|
||||
echo '<img class="icon ic_b_print" src="themes/dot.gif" alt="" />';
|
||||
}
|
||||
echo __('Print view') . '</a> ';
|
||||
|
||||
echo '<a href="./db_datadict.php?' . $url_query . '">';
|
||||
if ($cfg['PropertiesIconic']) {
|
||||
echo '<img class="icon" src="' . $pmaThemeImage
|
||||
.'b_tblanalyse.png" width="16" height="16" alt="" />';
|
||||
echo '<img class="icon ic_b_tblanalyse" src="themes/dot.gif" alt="" />';
|
||||
}
|
||||
echo __('Data Dictionary') . '</a>';
|
||||
echo '</p>';
|
||||
|
||||
@ -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" width="16" height="16" src="' . $pmaThemeImage . 'b_drop.png" alt="' . __('Delete tracking data for this table') . '" title="' . __('Delete tracking data for this table') . '" />';
|
||||
$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') . '" />';
|
||||
}
|
||||
if ('both' === $GLOBALS['cfg']['PropertiesIconic'] || false === $GLOBALS['cfg']['PropertiesIconic']) {
|
||||
$drop_image_or_text .= __('Drop');
|
||||
@ -198,7 +198,7 @@ if (isset($my_tables)) {
|
||||
$my_link = '<a href="tbl_tracking.php?' . $url_query . '&table=' . htmlspecialchars($tablename) .'">';
|
||||
|
||||
if ($cfg['PropertiesIconic']) {
|
||||
$my_link .= '<img class="icon" src="' . $pmaThemeImage . 'eye.png" width="16" height="16" alt="' . __('Track table') . '" /> ';
|
||||
$my_link .= '<img class="icon ic_eye" src="themes/dot.gif" alt="' . __('Track table') . '" /> ';
|
||||
}
|
||||
$my_link .= __('Track table') . '</a>';
|
||||
?>
|
||||
|
||||
@ -32,7 +32,7 @@ require_once './libraries/header_meta_style.inc.php';
|
||||
}
|
||||
// Display the values in text fields, excluding empty strings
|
||||
$field_counter = 0;
|
||||
foreach($values as $value) {
|
||||
foreach ($values as $value) {
|
||||
if(trim($value) != "") {
|
||||
$field_counter++;
|
||||
echo sprintf('<input type="text" size="30" value="%s" name="field' . $field_counter . '" />', htmlspecialchars(str_replace(array("''", '\\\\', "\\'"), array("'", '\\', "'"), substr($value, 1, -1))));
|
||||
|
||||
@ -400,7 +400,7 @@ if (!$save_on_server) {
|
||||
$_REQUEST['table_select'] = implode(",", $_REQUEST['table_select']);
|
||||
}
|
||||
|
||||
foreach($_REQUEST as $name => $value) {
|
||||
foreach ($_REQUEST as $name => $value) {
|
||||
$back_button .= '&' . urlencode($name) . '=' . urlencode($value);
|
||||
}
|
||||
$back_button .= '&repopulate=1">Back</a> ]</p>';
|
||||
@ -492,7 +492,7 @@ if ($export_type == 'server') {
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach($views as $view) {
|
||||
foreach ($views as $view) {
|
||||
// no data export for a view
|
||||
if ($GLOBALS[$what . '_structure_or_data'] == 'structure' || $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data') {
|
||||
if (!PMA_exportStructure($current_db, $view, $crlf, $err_url, $do_relation, $do_comments, $do_mime, $do_dates, 'create_view', $export_type)) {
|
||||
|
||||
@ -264,7 +264,7 @@ if ($import_file != 'none' && !$error) {
|
||||
$file_to_unlink = $import_file_new;
|
||||
}
|
||||
|
||||
$size = filesize($import_file);
|
||||
$size = filesize($import_file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -87,7 +87,7 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
/** Hide the table link in the initial search result */
|
||||
$("#table-info").prepend('<img id="table-image" src="./themes/original/img/s_tbl.png" />').hide();
|
||||
$("#table-info").prepend('<img id="table-image" class="icon ic_s_tbl" src="./themes/dot.gif" />').hide();
|
||||
|
||||
/** Hide the browse and deleted results in the new search criteria */
|
||||
$('#buttonGo').click(function(){
|
||||
|
||||
@ -57,15 +57,18 @@ $(document).ready(function() {
|
||||
* @uses PMA_ajaxShowMessage()
|
||||
* @see $cfg['AjaxEnable']
|
||||
*/
|
||||
var currrent_insert_table;
|
||||
var current_insert_table;
|
||||
$("td.insert_table a.ajax").live('click', function(event){
|
||||
event.preventDefault();
|
||||
currrent_insert_table = $(this);
|
||||
current_insert_table = $(this);
|
||||
var $url = $(this).attr("href");
|
||||
if ($url.substring(0, 15) == "tbl_change.php?") {
|
||||
$url = $url.substring(15);
|
||||
$url = $url.substring(15);
|
||||
}
|
||||
|
||||
if ($("#insert_table_dialog").length > 0) {
|
||||
$("#insert_table_dialog").remove();
|
||||
}
|
||||
var $div = $('<div id="insert_table_dialog"></div>');
|
||||
var target = "tbl_change.php";
|
||||
|
||||
@ -110,10 +113,12 @@ $(document).ready(function() {
|
||||
$dialog.find("#topmenucontainer").hide();
|
||||
//Adding the datetime pikers for the dialog
|
||||
$dialog.find('.datefield, .datetimefield').each(function () {
|
||||
PMA_addDatepicker($(this));
|
||||
PMA_addDatepicker($(this));
|
||||
});
|
||||
$(".insertRowTable").addClass("ajax");
|
||||
$("#buttonYes").addClass("ajax");
|
||||
$div = $("#insert_table_dialog");
|
||||
PMA_convertFootnotesToTooltips($div);
|
||||
}
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
}) // end $.get()
|
||||
@ -139,7 +144,7 @@ $(document).ready(function() {
|
||||
$("#insert_table_dialog").dialog("close").remove();
|
||||
}
|
||||
/**Update the row count at the tableForm*/
|
||||
currrent_insert_table.closest('tr').find('.value.tbl_rows').html(data.row_count);
|
||||
current_insert_table.closest('tr').find('.value.tbl_rows').html(data.row_count);
|
||||
}) // end $.post()
|
||||
}) // end insert table button "Go"
|
||||
|
||||
@ -165,7 +170,7 @@ $(document).ready(function() {
|
||||
}
|
||||
if (selected_after_insert == "new_insert") {
|
||||
/**Trigger the insert dialog for new_insert option*/
|
||||
currrent_insert_table.trigger('click');
|
||||
current_insert_table.trigger('click');
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -175,7 +180,7 @@ $(document).ready(function() {
|
||||
$("#insert_table_dialog").dialog("close").remove();
|
||||
}
|
||||
/**Update the row count at the tableForm*/
|
||||
currrent_insert_table.closest('tr').find('.value.tbl_rows').html(data.row_count);
|
||||
current_insert_table.closest('tr').find('.value.tbl_rows').html(data.row_count);
|
||||
}) // end $.post()
|
||||
});
|
||||
|
||||
@ -213,7 +218,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(/b_empty.png/, 'bd_empty.png');
|
||||
var span = $this_anchor.html().replace(/ic_b_empty/, 'ic_bd_empty');
|
||||
PMA_adjustTotals($this_anchor);
|
||||
|
||||
//To disable further attempts to truncate the table,
|
||||
|
||||
@ -135,14 +135,13 @@ function displayPasswordGenerateButton() {
|
||||
*
|
||||
* @param object $this_element a jQuery object pointing to the element
|
||||
*/
|
||||
function PMA_addDatepicker($this_element) {
|
||||
function PMA_addDatepicker($this_element, options) {
|
||||
var showTimeOption = false;
|
||||
if ($this_element.is('.datetimefield')) {
|
||||
showTimeOption = true;
|
||||
}
|
||||
|
||||
$this_element
|
||||
.datepicker({
|
||||
|
||||
var defaultOptions = {
|
||||
showOn: 'button',
|
||||
buttonImage: themeCalendarImage, // defined in js/messages.php
|
||||
buttonImageOnly: true,
|
||||
@ -157,9 +156,16 @@ function PMA_addDatepicker($this_element) {
|
||||
// Remember that we came from the datepicker; this is used
|
||||
// in tbl_change.js by verificationsAfterFieldChange()
|
||||
$this_element.data('comes_from', 'datepicker');
|
||||
|
||||
// Fix wrong timepicker z-index, doesn't work without timeout
|
||||
setTimeout(function() {
|
||||
$('#ui-timepicker-div').css('z-index',$('#ui-datepicker-div').css('z-index'))
|
||||
},0);
|
||||
},
|
||||
constrainInput: false
|
||||
});
|
||||
};
|
||||
|
||||
$this_element.datepicker($.extend(defaultOptions, options));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2237,7 +2243,9 @@ function displayMoreTableOpts() {
|
||||
}
|
||||
|
||||
}
|
||||
$(document).ready(initTooltips);
|
||||
$(document).ready(function(){
|
||||
PMA_convertFootnotesToTooltips();
|
||||
});
|
||||
|
||||
/**
|
||||
* Ensures indexes names are valid according to their type and, for a primary
|
||||
@ -2273,27 +2281,53 @@ function checkIndexName(form_id)
|
||||
return true;
|
||||
} // end of the 'checkIndexName()' function
|
||||
|
||||
|
||||
/* Displays tooltips */
|
||||
function initTooltips() {
|
||||
/**
|
||||
* function to convert the footnotes to tooltips
|
||||
*
|
||||
* @param jquery-Object $div a div jquery object which specifies the
|
||||
* domain for searching footnootes. If we
|
||||
* ommit this parameter the function searches
|
||||
* the footnotes in the whole body
|
||||
**/
|
||||
function PMA_convertFootnotesToTooltips($div) {
|
||||
// Hide the footnotes from the footer (which are displayed for
|
||||
// JavaScript-disabled browsers) since the tooltip is sufficient
|
||||
$(".footnotes").hide();
|
||||
$(".footnotes span").each(function() {
|
||||
|
||||
if ($div == undefined || ! $div instanceof jQuery || $div.length == 0) {
|
||||
$div = $("#serverinfo").parent();
|
||||
}
|
||||
|
||||
$footnotes = $div.find(".footnotes");
|
||||
|
||||
$footnotes.hide();
|
||||
$footnotes.find('span').each(function() {
|
||||
$(this).children("sup").remove();
|
||||
});
|
||||
// The border and padding must be removed otherwise a thin yellow box remains visible
|
||||
$(".footnotes").css("border", "none");
|
||||
$(".footnotes").css("padding", "0px");
|
||||
$footnotes.css("border", "none");
|
||||
$footnotes.css("padding", "0px");
|
||||
|
||||
// Replace the superscripts with the help icon
|
||||
$("sup[class='footnotemarker']").hide();
|
||||
$("img[class='footnotemarker']").show();
|
||||
$div.find("sup.footnotemarker").hide();
|
||||
$div.find("img.footnotemarker").show();
|
||||
|
||||
$("img[class='footnotemarker']").each(function() {
|
||||
var span_id = $(this).attr("id");
|
||||
span_id = span_id.split("_")[1];
|
||||
var tooltip_text = $(".footnotes span[id='footnote_" + span_id + "']").html();
|
||||
$div.find("img.footnotemarker").each(function() {
|
||||
var img_class = $(this).attr("class");
|
||||
/** img contains two classes, as example "footnotemarker footnote_1".
|
||||
* We split it by second class and take it for the id of span
|
||||
*/
|
||||
img_class = img_class.split(" ");
|
||||
for (i = 0; i < img_class.length; i++) {
|
||||
if (img_class[i].split("_")[0] == "footnote") {
|
||||
var span_id = img_class[i].split("_")[1];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Now we get the #id of the span with span_id variable. As an example if we
|
||||
* initially get the img class as "footnotemarker footnote_2", now we get
|
||||
* #2 as the span_id. Using that we can find footnote_2 in footnotes.
|
||||
* */
|
||||
var tooltip_text = $footnotes.find("span[id='footnote_" + span_id + "']").html();
|
||||
$(this).qtip({
|
||||
content: tooltip_text,
|
||||
show: { delay: 0 },
|
||||
@ -2376,7 +2410,7 @@ $(function() {
|
||||
});
|
||||
var img = topmenu.find('li:first-child img');
|
||||
if (img.length) {
|
||||
img.clone().attr('src', img.attr('src').replace(/\/[^\/]+$/, '/b_more.png')).prependTo(link);
|
||||
img.clone().attr('class', 'icon ic_b_more').prependTo(link);
|
||||
}
|
||||
var submenu = $('<li />', {'class': 'submenu'})
|
||||
.append(link)
|
||||
|
||||
@ -70,8 +70,9 @@
|
||||
dragMove: function(e) {
|
||||
if (this.colRsz) {
|
||||
var dx = e.pageX - this.colRsz.x0;
|
||||
if (this.colRsz.objWidth + dx > this.minColWidth)
|
||||
if (this.colRsz.objWidth + dx > this.minColWidth) {
|
||||
$(this.colRsz.obj).css('left', this.colRsz.objLeft + dx + 'px');
|
||||
}
|
||||
} else if (this.colMov) {
|
||||
// dragged column animation
|
||||
var dx = e.pageX - this.colMov.x0;
|
||||
|
||||
@ -28,13 +28,13 @@ function toggle(id, only_open) {
|
||||
if (el.style.display == 'none' || only_open) {
|
||||
el.style.display = '';
|
||||
if (img) {
|
||||
img.src = image_minus;
|
||||
img.className = 'icon ic_b_minus';
|
||||
img.alt = '-';
|
||||
}
|
||||
} else {
|
||||
el.style.display = 'none';
|
||||
if (img) {
|
||||
img.src = image_plus;
|
||||
img.className = 'icon ic_b_plus';
|
||||
img.alt = '+';
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ $(document).ready(function() {
|
||||
/* post request for get the updated userForm table */
|
||||
$.post($form.attr('action' ), url, function(priv_data) {
|
||||
|
||||
/*Remove the old userForm table*/
|
||||
/*Remove the old userForm table*/
|
||||
if ($('#userFormDiv').length != 0) {
|
||||
$('#userFormDiv').remove();
|
||||
} else {
|
||||
|
||||
@ -368,7 +368,7 @@ $(function() {
|
||||
switch(tab.attr('id')) {
|
||||
case 'statustabs_traffic':
|
||||
if(data != null) tab.find('.tabInnerContent').html(data);
|
||||
initTooltips();
|
||||
PMA_convertFootnotesToTooltips();
|
||||
break;
|
||||
case 'statustabs_queries':
|
||||
if(data != null) {
|
||||
@ -439,7 +439,7 @@ $(function() {
|
||||
});
|
||||
|
||||
$('#serverstatusqueriesdetails tr:first th')
|
||||
.append('<img class="sortableIcon" src="' + pmaThemeImage + 'cleardot.gif" alt="">');
|
||||
.append('<img class="icon sortableIcon" src="themes/dot.gif" alt="">');
|
||||
|
||||
break;
|
||||
|
||||
@ -453,7 +453,7 @@ $(function() {
|
||||
});
|
||||
|
||||
$('#serverstatusvariables tr:first th')
|
||||
.append('<img class="sortableIcon" src="' + pmaThemeImage + 'cleardot.gif" alt="">');
|
||||
.append('<img class="icon sortableIcon" src="themes/dot.gif" alt="">');
|
||||
|
||||
break;
|
||||
}
|
||||
@ -942,9 +942,9 @@ $(function() {
|
||||
$('a[href="#pauseCharts"]').click(function() {
|
||||
runtime.redrawCharts = ! runtime.redrawCharts;
|
||||
if(! runtime.redrawCharts)
|
||||
$(this).html('<img src="' + pmaThemeImage + 'play.png" alt="" /> ' + PMA_messages['strResumeMonitor']);
|
||||
$(this).html('<img src="themes/dot.gif" class="icon ic_play" alt="" /> ' + PMA_messages['strResumeMonitor']);
|
||||
else {
|
||||
$(this).html('<img src="' + pmaThemeImage + 'pause.png" alt="" /> ' + PMA_messages['strPauseMonitor']);
|
||||
$(this).html('<img src="themes/dot.gif" class="icon ic_pause" alt="" /> ' + PMA_messages['strPauseMonitor']);
|
||||
if(runtime.charts == null) {
|
||||
initGrid();
|
||||
$('a[href="#settingsPopup"]').show();
|
||||
@ -968,7 +968,7 @@ $(function() {
|
||||
$.get('server_status.php?' + url_query, vars,
|
||||
function(data) {
|
||||
var logVars = $.parseJSON(data),
|
||||
icon = 's_success.png', msg='', str='';
|
||||
icon = 'ic_s_success', msg='', str='';
|
||||
|
||||
if(logVars['general_log'] == 'ON') {
|
||||
if(logVars['slow_query_log'] == 'ON')
|
||||
@ -982,26 +982,26 @@ $(function() {
|
||||
}
|
||||
|
||||
if(msg.length == 0) {
|
||||
icon = 's_error.png';
|
||||
icon = 'ic_s_error';
|
||||
msg = PMA_messages['strBothLogOff'];
|
||||
}
|
||||
|
||||
str = '<b>' + PMA_messages['strCurrentSettings'] + '</b><br><div class="smallIndent">';
|
||||
str += '<img src="' + pmaThemeImage + icon + '" alt=""/> ' + msg + '<br />';
|
||||
str += '<img src="themes/dot.gif" class="icon ' + icon + '" alt=""/> ' + msg + '<br />';
|
||||
|
||||
if(logVars['log_output'] != 'TABLE')
|
||||
str += '<img src="' + pmaThemeImage + 's_error.png" alt=""/> ' + PMA_messages['strLogOutNotTable'] + '<br />';
|
||||
str += '<img src="themes/dot.gif" class="icon ic_s_error" alt=""/> ' + PMA_messages['strLogOutNotTable'] + '<br />';
|
||||
else
|
||||
str += '<img src="' + pmaThemeImage + 's_success.png" alt=""/> ' + PMA_messages['strLogOutIsTable'] + '<br />';
|
||||
str += '<img src="themes/dot.gif" class="icon ic_s_success" alt=""/> ' + PMA_messages['strLogOutIsTable'] + '<br />';
|
||||
|
||||
if(logVars['slow_query_log'] == 'ON') {
|
||||
if(logVars['long_query_time'] > 2)
|
||||
str += '<img src="' + pmaThemeImage + 's_attention.png" alt=""/> '
|
||||
str += '<img src="themes/dot.gif" class="icon ic_s_attention" alt=""/> '
|
||||
+ $.sprintf(PMA_messages['strSmallerLongQueryTimeAdvice'], logVars['long_query_time'])
|
||||
+ '<br />';
|
||||
|
||||
if(logVars['long_query_time'] < 2)
|
||||
str += '<img src="' + pmaThemeImage + 's_success.png" alt=""/> '
|
||||
str += '<img src="themes/dot.gif" class="icon ic_s_success" alt=""/> '
|
||||
+ $.sprintf(PMA_messages['strLongQueryTimeSet'], logVars['long_query_time'])
|
||||
+ '<br />';
|
||||
}
|
||||
@ -1261,27 +1261,47 @@ $(function() {
|
||||
|
||||
$('#logAnalyseDialog').html(
|
||||
'<p>' + PMA_messages['strSelectedTimeRange']
|
||||
+ Highcharts.dateFormat('%H:%M:%S',new Date(min)) + ' - '
|
||||
+ Highcharts.dateFormat('%H:%M:%S',new Date(max)) + '</p>'
|
||||
+ '<input type="text" name="dateStart" class="datetimefield" value="' + Highcharts.dateFormat('%Y-%m-%d %H:%M:%S',new Date(min)) + '" /> - '
|
||||
+ '<input type="text" name="dateEnd" class="datetimefield" value="' + Highcharts.dateFormat('%Y-%m-%d %H:%M:%S',new Date(max)) + '" /></p>'
|
||||
+ '<input type="checkbox" id="groupInserts" value="1" checked="checked" />'
|
||||
+ '<label for="groupData">' + PMA_messages['strGroupInserts'] + '</label>'
|
||||
+ PMA_messages['strLogAnalyseInfo']
|
||||
);
|
||||
|
||||
PMA_addDatepicker($('#logAnalyseDialog').find('input[name="dateStart"],input[name="dateEnd"]'), {
|
||||
showOn: 'focus',
|
||||
beforeShow: function() {
|
||||
// Fix wrong timepicker z-index, doesn't work without timeout
|
||||
setTimeout(function() {
|
||||
$('#ui-timepicker-div').css('z-index',$('#ui-datepicker-div').css('z-index'))
|
||||
},0);
|
||||
}
|
||||
});
|
||||
|
||||
var dlgBtns = { };
|
||||
|
||||
dlgBtns[PMA_messages['strFromSlowLog']] = function() {
|
||||
var dateStart = Date.parse($('#logAnalyseDialog input[name="dateStart"]').attr('value')) || min;
|
||||
var dateEnd = Date.parse($('#logAnalyseDialog input[name="dateEnd"]').attr('value')) || max;
|
||||
|
||||
loadLogStatistics(
|
||||
{ src: 'slow', start: min, end: max, groupInserts: $('input#groupInserts').attr('checked') }
|
||||
{ src: 'slow', start: dateStart, end: dateEnd, groupInserts: $('input#groupInserts').attr('checked') }
|
||||
);
|
||||
|
||||
$('#logAnalyseDialog').find('dateStart,dateEnd').datepicker('destroy');
|
||||
|
||||
$(this).dialog("close");
|
||||
}
|
||||
|
||||
dlgBtns[PMA_messages['strFromGeneralLog']] = function() {
|
||||
var dateStart = Date.parse($('#logAnalyseDialog input[name="dateStart"]').attr('value')) || min;
|
||||
var dateEnd = Date.parse($('#logAnalyseDialog input[name="dateEnd"]').attr('value')) || max;
|
||||
|
||||
loadLogStatistics(
|
||||
{ src: 'general', start: min, end: max, groupInserts: $('input#groupInserts').attr('checked') }
|
||||
{ src: 'general', start: dateStart, end: dateEnd, groupInserts: $('input#groupInserts').attr('checked') }
|
||||
);
|
||||
|
||||
$('#logAnalyseDialog').find('dateStart,dateEnd').datepicker('destroy');
|
||||
|
||||
$(this).dialog("close");
|
||||
}
|
||||
@ -1508,14 +1528,16 @@ $(function() {
|
||||
tableStr += '<td>' + formatValue(cols[j], rows[i][cols[j]]) + '</td>';
|
||||
tableStr += '</tr>';
|
||||
}
|
||||
|
||||
tableStr+='</tbody></table>';
|
||||
|
||||
|
||||
tableStr += '</tbody><tfoot>';
|
||||
tableStr += '<tr><th colspan="' + (cols.length - 1) + '">Sum of grouped rows: '+ data.numRows +'<span style="float:right">Total:</span></th><th align="right">' + data.sum.TOTAL + '</th></tr>';
|
||||
tableStr += '</tfoot></table>';
|
||||
|
||||
$('#logTable').html(tableStr);
|
||||
|
||||
// Append a tooltip to the count column, if there exist one
|
||||
if($('#logTable th:last').html() == '#') {
|
||||
$('#logTable th:last').append(' <img class="qroupedQueryInfoIcon" src="' + pmaThemeImage + 'b_docs.png" alt="" />');
|
||||
$('#logTable th:last').append(' <img class="qroupedQueryInfoIcon icon ic_b_docs" src="themes/dot.gif" alt="" />');
|
||||
|
||||
var qtipContent = PMA_messages['strCountColumnExplanation'];
|
||||
if(groupInserts) qtipContent += '<p>' + PMA_messages['strMoreCountColumnExplanation'] + '</p>';
|
||||
@ -1533,13 +1555,15 @@ $(function() {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('div#logTable table').tablesorter({
|
||||
sortList: [[0,1]],
|
||||
widgets: ['zebra']
|
||||
});
|
||||
|
||||
$('div#logTable table thead th')
|
||||
.append('<img class="sortableIcon" src="' + pmaThemeImage + 'cleardot.gif" alt="">');
|
||||
.append('<img class="icon sortableIcon" src="themes/dot.gif" alt="">');
|
||||
|
||||
|
||||
$('#loadingLogsDialog').html('<p>' + PMA_messages['strLogDataLoaded'] + '</p>');
|
||||
@ -1549,6 +1573,64 @@ $(function() {
|
||||
$('#loadingLogsDialog').append(key + ': ' + value + '<br/>');
|
||||
});
|
||||
|
||||
if(data.numRows > 12) {
|
||||
$('div#logTable').prepend(
|
||||
'<fieldset id="logDataFilter">' +
|
||||
' <legend>Filters</legend>' +
|
||||
' <div class="formelement">' +
|
||||
' <label for="filterQueryText">Filter queries by word/regexp:</label>' +
|
||||
' <input name="filterQueryText" type="text" id="filterQueryText" style="vertical-align: baseline;" />' +
|
||||
((data.numRows > 250) ? ' <button name="startFilterQueryText" id="startFilterQueryText">Filter</button>' : '') +
|
||||
' </div>' +
|
||||
'</fieldset>'
|
||||
);
|
||||
|
||||
if(data.numRows > 250) {
|
||||
$('div#logTable button#startFilterQueryText').click(filterQueries);
|
||||
} else {
|
||||
$('div#logTable input#filterQueryText').keyup(filterQueries);
|
||||
}
|
||||
|
||||
function filterQueries() {
|
||||
var odd_row=false, cell, textFilter;
|
||||
var val = $('div#logTable input#filterQueryText').val();
|
||||
|
||||
if(val.length == 0) textFilter = null;
|
||||
else textFilter = new RegExp(val, 'i');
|
||||
|
||||
var rowSum = 0, totalSum = 0;
|
||||
|
||||
$('div#logTable table tbody tr').each(function() {
|
||||
// We just assume the sql text is always in the second last column
|
||||
cell = $(this).children(':nth-child(' + (cols.length - 1) + ')');
|
||||
|
||||
if(textFilter==null || textFilter.exec(cell.text())) {
|
||||
// And that total count is right of the sql text
|
||||
totalSum += parseInt(cell.next().text());
|
||||
rowSum ++;
|
||||
|
||||
odd_row = !odd_row;
|
||||
$(this).css('display','');
|
||||
if(odd_row) {
|
||||
$(this).addClass('odd');
|
||||
$(this).removeClass('even');
|
||||
} else {
|
||||
$(this).addClass('even');
|
||||
$(this).removeClass('odd');
|
||||
}
|
||||
} else {
|
||||
$(this).css('display','none');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('div#logTable table tfoot tr')
|
||||
.html('<th colspan="' + (cols.length - 1) +
|
||||
'">Sum of grouped rows: '+ rowSum +'<span style="float:right">Total:</span></th><th align="right">' +
|
||||
totalSum + '</th>');
|
||||
};
|
||||
}
|
||||
|
||||
var dlgBtns = {};
|
||||
dlgBtns[PMA_messages['strJumpToTable']] = function() {
|
||||
$(this).dialog("close");
|
||||
@ -1595,4 +1677,4 @@ $(function() {
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -96,7 +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 = pmaThemeImage + "s_success.png";
|
||||
tick_image.src = 'themes/dot.gif';
|
||||
tick_image.className = "icon ic_s_success";
|
||||
|
||||
if (update_size == '' && insert_size == '' && remove_size == '') {
|
||||
/**
|
||||
|
||||
@ -54,9 +54,9 @@ $(function() {
|
||||
var charWidth;
|
||||
|
||||
// Global vars
|
||||
editLink = '<a href="#" class="editLink" onclick="return editVariable(this);"><img src="'+pmaThemeImage+'b_edit.png" alt="" width="16" height="16"> '+PMA_messages['strEdit']+'</a>';
|
||||
saveLink = '<a href="#" class="saveLink"><img src="'+pmaThemeImage+'b_save.png" alt="" width="16" height="16"> '+PMA_messages['strSave']+'</a> ';
|
||||
cancelLink = '<a href="#" class="cancelLink"><img src="'+pmaThemeImage+'b_close.png" alt="" width="16" height="16"> '+PMA_messages['strCancel']+'</a> ';
|
||||
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> ';
|
||||
|
||||
|
||||
$.ajaxSetup({
|
||||
|
||||
67
js/sql.js
67
js/sql.js
@ -65,8 +65,8 @@ function appendInlineAnchor() {
|
||||
|
||||
var $img_object = $cloned_anchor.find('img').attr('title', PMA_messages['strInlineEdit']);
|
||||
if ($img_object.length != 0) {
|
||||
var img_src = $img_object.attr('src').replace(/b_edit/,'b_inline_edit');
|
||||
$img_object.attr('src', img_src);
|
||||
var img_class = $img_object.attr('class').replace(/b_edit/,'b_inline_edit');
|
||||
$img_object.attr('class', img_class);
|
||||
$cloned_anchor.find('a').attr('href', '#');
|
||||
var $edit_span = $cloned_anchor.find('span:contains("' + PMA_messages['strEdit'] + '")');
|
||||
var $span = $cloned_anchor.find('a').find('span');
|
||||
@ -85,8 +85,8 @@ function appendInlineAnchor() {
|
||||
// the link was too big so <input type="image"> is there
|
||||
$img_object = $cloned_anchor.find('input:image').attr('title', PMA_messages['strInlineEdit']);
|
||||
if ($img_object.length > 0) {
|
||||
var img_src = $img_object.attr('src').replace(/b_edit/,'b_inline_edit');
|
||||
$img_object.attr('src', img_src);
|
||||
var img_class = $img_object.attr('class').replace(/b_edit/,'b_inline_edit');
|
||||
$img_object.attr('class', img_class);
|
||||
}
|
||||
$cloned_anchor
|
||||
.find('.clickprevimage')
|
||||
@ -143,7 +143,7 @@ $(document).ready(function() {
|
||||
.parent()
|
||||
.toggle($(this).attr('value').length > 0);
|
||||
}).trigger('keyup');
|
||||
|
||||
|
||||
/**
|
||||
* Attach the {@link appendInlineAnchor} function to a custom event, which
|
||||
* will be triggered manually everytime the table of results is reloaded
|
||||
@ -152,7 +152,7 @@ $(document).ready(function() {
|
||||
$("#sqlqueryresults").live('appendAnchor',function() {
|
||||
appendInlineAnchor();
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* Attach the {@link makegrid} function to a custom event, which will be
|
||||
* triggered manually everytime the table of results is reloaded
|
||||
@ -161,7 +161,7 @@ $(document).ready(function() {
|
||||
$("#sqlqueryresults").live('makegrid', function() {
|
||||
$('#table_results').makegrid();
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* Attach the {@link refreshgrid} function to a custom event, which will be
|
||||
* triggered manually everytime the table of results is manipulated (e.g., by inline edit)
|
||||
@ -281,10 +281,11 @@ $(document).ready(function() {
|
||||
if ($zero_row_results.length > 0) {
|
||||
$('#sqlquery').val($zero_row_results.val());
|
||||
} else {
|
||||
$sqlqueryresults.show();
|
||||
$sqlqueryresults.html(data);
|
||||
$sqlqueryresults.trigger('appendAnchor');
|
||||
$sqlqueryresults.trigger('makegrid');
|
||||
$sqlqueryresults
|
||||
.show()
|
||||
.html(data)
|
||||
.trigger('appendAnchor')
|
||||
.trigger('makegrid');
|
||||
$('#togglequerybox').show();
|
||||
if ($("#togglequerybox").siblings(":visible").length > 0) {
|
||||
$("#togglequerybox").trigger('click');
|
||||
@ -320,14 +321,13 @@ $(document).ready(function() {
|
||||
*/
|
||||
var $form = $(this).parent("form");
|
||||
|
||||
var $sqlqueryresults = $("#sqlqueryresults");
|
||||
|
||||
PMA_prepareForAjaxRequest($form);
|
||||
|
||||
$.post($form.attr('action'), $form.serialize(), function(data) {
|
||||
$sqlqueryresults.html(data);
|
||||
$sqlqueryresults.trigger('appendAnchor');
|
||||
$sqlqueryresults.trigger('makegrid');
|
||||
$("#sqlqueryresults")
|
||||
.html(data)
|
||||
.trigger('appendAnchor')
|
||||
.trigger('makegrid');
|
||||
PMA_init_slider();
|
||||
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
@ -341,22 +341,23 @@ $(document).ready(function() {
|
||||
* @see $cfg['AjaxEnable']
|
||||
*/
|
||||
$("#pageselector").live('change', function(event) {
|
||||
var $the_form = $(this).parent("form");
|
||||
var $form = $(this).parent("form");
|
||||
|
||||
if ($(this).hasClass('ajax')) {
|
||||
event.preventDefault();
|
||||
|
||||
var $msgbox = PMA_ajaxShowMessage();
|
||||
|
||||
$.post($the_form.attr('action'), $the_form.serialize() + '&ajax_request=true', function(data) {
|
||||
$("#sqlqueryresults").html(data);
|
||||
$("#sqlqueryresults").trigger('appendAnchor');
|
||||
$("#sqlqueryresults").trigger('makegrid');
|
||||
$.post($form.attr('action'), $form.serialize() + '&ajax_request=true', function(data) {
|
||||
$("#sqlqueryresults")
|
||||
.html(data)
|
||||
.trigger('appendAnchor')
|
||||
.trigger('makegrid');
|
||||
PMA_init_slider();
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
}) // end $.post()
|
||||
} else {
|
||||
$the_form.submit();
|
||||
$form.submit();
|
||||
}
|
||||
|
||||
})// end Paginate results with Page Selector
|
||||
@ -444,8 +445,8 @@ $(document).ready(function() {
|
||||
// If icons are displayed. See $cfg['PropertiesIconic']
|
||||
if ($img_object.length > 0) {
|
||||
$img_object.attr('title', PMA_messages['strSave']);
|
||||
var img_src = $img_object.attr('src').replace(/b_inline_edit/,'b_save');
|
||||
$img_object.attr('src', img_src);
|
||||
var img_class = $img_object.attr('class').replace(/b_inline_edit/,'b_save');
|
||||
$img_object.attr('class', img_class);
|
||||
$this_children.prepend($img_object);
|
||||
}
|
||||
|
||||
@ -464,8 +465,8 @@ $(document).ready(function() {
|
||||
// If icons are displayed. See $cfg['PropertiesIconic']
|
||||
if ($img_object.length > 0) {
|
||||
$img_object.attr('title', PMA_messages['strHide']);
|
||||
var img_src = $img_object.attr('src').replace(/b_save/,'b_close');
|
||||
$img_object.attr('src', img_src);
|
||||
var img_class = $img_object.attr('class').replace(/b_save/,'b_close');
|
||||
$img_object.attr('class', img_class);
|
||||
$hide_span.prepend($img_object);
|
||||
}
|
||||
|
||||
@ -496,7 +497,7 @@ $(document).ready(function() {
|
||||
$(this).prev().prev().remove();
|
||||
$(this).prev().remove();
|
||||
$(this).remove();
|
||||
|
||||
|
||||
// refresh the grid
|
||||
$("#sqlqueryresults").trigger('refreshgrid');
|
||||
});
|
||||
@ -710,10 +711,10 @@ $(document).ready(function() {
|
||||
$this_field.data('original_data', 'NULL');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// refresh the grid
|
||||
$("#sqlqueryresults").trigger('refreshgrid');
|
||||
|
||||
|
||||
}) // End On click, replace the current field with an input/textarea
|
||||
|
||||
/**
|
||||
@ -979,13 +980,13 @@ $(document).ready(function() {
|
||||
}
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
}) // end $.get()
|
||||
} else {
|
||||
} else {
|
||||
PMA_ajaxShowMessage(PMA_messages['strNoRowSelected']);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Click action for "Go" button in ajax dialog insertForm -> insertRowTable
|
||||
* Click action for "Go" button in ajax dialog insertForm -> insertRowTable
|
||||
*/
|
||||
$("#insertForm .insertRowTable.ajax input[value=Go]").live('click', function(event) {
|
||||
event.preventDefault();
|
||||
@ -1230,7 +1231,9 @@ $(document).ready(function() {
|
||||
* Profiling Chart
|
||||
*/
|
||||
function createProfilingChart() {
|
||||
if($('#profilingchart').length==0) return;
|
||||
if ($('#profilingchart').length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var cdata = new Array();
|
||||
$.each(jQuery.parseJSON($('#profilingchart').html()),function(key,value) {
|
||||
|
||||
@ -160,7 +160,7 @@ $(document).ready(function() {
|
||||
var url = $form.serialize()+"&ajax_request=true&submit_mult=change";
|
||||
/*Calling for the changeColumns fucntion*/
|
||||
changeColumns(action,url);
|
||||
} else {
|
||||
} else {
|
||||
PMA_ajaxShowMessage(PMA_messages['strNoRowSelected']);
|
||||
}
|
||||
});
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
*
|
||||
* Configuration handling.
|
||||
*
|
||||
* @package phpMyAdmin
|
||||
*/
|
||||
@ -359,7 +359,7 @@ class PMA_Config
|
||||
|
||||
if ($eval_result === false) {
|
||||
$this->error_config_file = true;
|
||||
} else {
|
||||
} else {
|
||||
$this->error_config_file = false;
|
||||
$this->source_mtime = filemtime($this->getSource());
|
||||
}
|
||||
@ -674,7 +674,7 @@ class PMA_Config
|
||||
* or the theme changes
|
||||
* must also check the pma_fontsize cookie in case there is no
|
||||
* config file
|
||||
* @return int Unix timestamp
|
||||
* @return int Summary of unix timestamps and fontsize, to be unique on theme parameters change
|
||||
*/
|
||||
function getThemeUniqueValue()
|
||||
{
|
||||
@ -691,8 +691,7 @@ class PMA_Config
|
||||
$this->default_source_mtime +
|
||||
$this->get('user_preferences_mtime') +
|
||||
$_SESSION['PMA_Theme']->mtime_info +
|
||||
$_SESSION['PMA_Theme']->filesize_info)
|
||||
. (isset($_SESSION['tmp_user_values']['custom_color']) ? substr($_SESSION['tmp_user_values']['custom_color'],1,6) : '');
|
||||
$_SESSION['PMA_Theme']->filesize_info);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -975,7 +974,7 @@ class PMA_Config
|
||||
// At first we try to parse REQUEST_URI, it might contain full URL,
|
||||
if (PMA_getenv('REQUEST_URI')) {
|
||||
$url = @parse_url(PMA_getenv('REQUEST_URI')); // produces E_WARNING if it cannot get parsed, e.g. '/foobar:/'
|
||||
if($url === false) {
|
||||
if ($url === false) {
|
||||
$url = array();
|
||||
}
|
||||
}
|
||||
@ -1068,7 +1067,9 @@ class PMA_Config
|
||||
/**
|
||||
* @todo finish
|
||||
*/
|
||||
function save() {}
|
||||
function save()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* returns options for font size selection
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* @todo replace error messages with localized string
|
||||
* @todo when uploading a file into a blob field, should we also consider using
|
||||
* chunks like in import? UPDATE `table` SET `field` = `field` + [chunk]
|
||||
* @package phpMyAdmin
|
||||
@ -208,7 +207,6 @@ class PMA_File
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo replace error message with localized string
|
||||
* @access public
|
||||
* @param string name of file uploaded
|
||||
* @return boolean success
|
||||
@ -219,7 +217,7 @@ class PMA_File
|
||||
|
||||
if (! $this->isUploaded()) {
|
||||
$this->setName(null);
|
||||
$this->_error_message = 'not an uploaded file';
|
||||
$this->_error_message = __('File was not an uploaded file.');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -258,7 +256,7 @@ class PMA_File
|
||||
}
|
||||
|
||||
if (! $bs_db || ! $bs_table) {
|
||||
$this->_error_message = $GLOBALS['strUploadErrorUnknown'];
|
||||
$this->_error_message = __('Unknown error while uploading.');
|
||||
return false;
|
||||
}
|
||||
$blob_url = PMA_BS_UpLoadFile($bs_db, $bs_table, $tmp_file_type, $tmp_filename);
|
||||
@ -319,7 +317,6 @@ class PMA_File
|
||||
* $file['error'] = [value]
|
||||
* </code>
|
||||
*
|
||||
* @todo re-check if requirements changes to PHP >= 4.2.0
|
||||
* @access public
|
||||
* @static
|
||||
* @param array $file the array
|
||||
@ -388,7 +385,7 @@ class PMA_File
|
||||
}
|
||||
|
||||
if (! $bs_db || !$bs_table) {
|
||||
$this->_error_message = $GLOBALS['strUploadErrorUnknown'];
|
||||
$this->_error_message = __('Unknown error while uploading.');
|
||||
return false;
|
||||
}
|
||||
$blob_url = PMA_BS_UpLoadFile($bs_db, $bs_table, $tmp_file_type, $tmp_filename);
|
||||
@ -483,7 +480,6 @@ class PMA_File
|
||||
* before opening it. The FAQ 1.11 explains how to create the "./tmp"
|
||||
* directory - if needed
|
||||
*
|
||||
* @todo replace error message with localized string
|
||||
* @todo move check of $cfg['TempDir'] into PMA_Config?
|
||||
* @access public
|
||||
* @return boolean whether uploaded fiel is fine or not
|
||||
@ -508,7 +504,7 @@ class PMA_File
|
||||
$move_uploaded_file_result = move_uploaded_file($this->getName(), $new_file_to_upload);
|
||||
ob_end_clean();
|
||||
if (! $move_uploaded_file_result) {
|
||||
$this->_error_message = 'error while moving uploaded file';
|
||||
$this->_error_message = __('Error while moving uploaded file.');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -516,7 +512,7 @@ class PMA_File
|
||||
$this->isTemp(true);
|
||||
|
||||
if (! $this->isReadable()) {
|
||||
$this->_error_message = 'cannot read (moved) upload file';
|
||||
$this->_error_message = __('Cannot read (moved) upload file.');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -71,8 +71,6 @@ require_once './libraries/List.class.php';
|
||||
|
||||
/**
|
||||
* checks if the configuration wants to hide some databases
|
||||
*
|
||||
* @todo temporaly use this docblock to test how to doc $GLOBALS
|
||||
*/
|
||||
protected function _checkHideDatabase()
|
||||
{
|
||||
@ -128,14 +126,14 @@ require_once './libraries/List.class.php';
|
||||
$this->_show_databases_disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($GLOBALS['cfg']['NaturalOrder']) {
|
||||
natsort($database_list);
|
||||
} else {
|
||||
// need to sort anyway, otherwise information_schema
|
||||
// goes at the top
|
||||
sort($database_list);
|
||||
}
|
||||
}
|
||||
|
||||
return $database_list;
|
||||
}
|
||||
@ -255,7 +253,7 @@ require_once './libraries/List.class.php';
|
||||
|
||||
$pos = false;
|
||||
|
||||
foreach($separators as $separator) {
|
||||
foreach ($separators as $separator) {
|
||||
// use strpos instead of strrpos; it seems more common to
|
||||
// have the db name, the separator, then the rest which
|
||||
// might contain a separator
|
||||
|
||||
@ -131,7 +131,7 @@ 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 = $GLOBALS['pmaThemeImage'] . 'item_' . $GLOBALS['text_dir'] . '.png';
|
||||
$item_img = 'ic_item_' . $GLOBALS['text_dir'];
|
||||
|
||||
/* HTML header; do not show here the PMA version to improve security */
|
||||
$page_title = 'phpMyAdmin ';
|
||||
@ -198,7 +198,7 @@ if (top != self) {
|
||||
echo '<a href="./Documentation.html" target="documentation" ' .
|
||||
'title="' . __('phpMyAdmin documentation') . '">';
|
||||
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
|
||||
echo '<img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_help.png" width="11" height="11" alt="' . __('phpMyAdmin documentation') . '" />';
|
||||
echo '<img class="icon ic_b_help_s" src="themes/dot.gif" alt="' . __('phpMyAdmin documentation') . '" />';
|
||||
} else {
|
||||
echo '(*)';
|
||||
}
|
||||
@ -332,7 +332,7 @@ function PMA_auth_check()
|
||||
// END Swekey Integration
|
||||
|
||||
if (defined('PMA_CLEAR_COOKIES')) {
|
||||
foreach($GLOBALS['cfg']['Servers'] as $key => $val) {
|
||||
foreach ($GLOBALS['cfg']['Servers'] as $key => $val) {
|
||||
$GLOBALS['PMA_Config']->removeCookie('pmaPass-' . $key);
|
||||
$GLOBALS['PMA_Config']->removeCookie('pmaServer-' . $key);
|
||||
$GLOBALS['PMA_Config']->removeCookie('pmaUser-' . $key);
|
||||
@ -352,7 +352,7 @@ function PMA_auth_check()
|
||||
session_destroy();
|
||||
// -> delete password cookie(s)
|
||||
if ($GLOBALS['cfg']['LoginCookieDeleteAll']) {
|
||||
foreach($GLOBALS['cfg']['Servers'] as $key => $val) {
|
||||
foreach ($GLOBALS['cfg']['Servers'] as $key => $val) {
|
||||
$GLOBALS['PMA_Config']->removeCookie('pmaPass-' . $key);
|
||||
if (isset($_COOKIE['pmaPass-' . $key])) {
|
||||
unset($_COOKIE['pmaPass-' . $key]);
|
||||
|
||||
@ -69,7 +69,7 @@ function PMA_Bookmark_getList($db)
|
||||
. ' ORDER BY label';
|
||||
$global = PMA_DBI_fetch_result($query, 'id', 'label', $controllink, PMA_DBI_QUERY_STORE);
|
||||
|
||||
foreach($global as $key => $val) {
|
||||
foreach ($global as $key => $val) {
|
||||
$global[$key] = $val . ' (' . __('shared') . ')';
|
||||
}
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ function PMA_remove_request_vars(&$whitelist)
|
||||
// strings
|
||||
$keys = array_keys(array_merge((array)$_REQUEST, (array)$_GET, (array)$_POST, (array)$_COOKIE));
|
||||
|
||||
foreach($keys as $key) {
|
||||
foreach ($keys as $key) {
|
||||
if (! in_array($key, $whitelist)) {
|
||||
unset($_REQUEST[$key], $_GET[$key], $_POST[$key], $GLOBALS[$key]);
|
||||
} else {
|
||||
|
||||
@ -176,7 +176,7 @@ $PMA_PHP_SELF = htmlspecialchars($PMA_PHP_SELF);
|
||||
/**
|
||||
* just to be sure there was no import (registering) before here
|
||||
* we empty the global space (but avoid unsetting $variables_list
|
||||
* and $key in the foreach(), we still need them!)
|
||||
* and $key in the foreach (), we still need them!)
|
||||
*/
|
||||
$variables_whitelist = array (
|
||||
'GLOBALS',
|
||||
@ -313,7 +313,7 @@ if (isset($_COOKIE)
|
||||
&& (isset($_COOKIE['pmaCookieVer'])
|
||||
&& $_COOKIE['pmaCookieVer'] < $pma_cookie_version)) {
|
||||
// delete all cookies
|
||||
foreach($_COOKIE as $cookie_name => $tmp) {
|
||||
foreach ($_COOKIE as $cookie_name => $tmp) {
|
||||
$GLOBALS['PMA_Config']->removeCookie($cookie_name);
|
||||
}
|
||||
$_COOKIE = array();
|
||||
|
||||
@ -9,10 +9,10 @@
|
||||
/**
|
||||
* Exponential expression / raise number into power
|
||||
*
|
||||
* @param string $base
|
||||
* @param string $exp
|
||||
* @param mixed $use_function pow function to use, or false for auto-detect
|
||||
* @return mixed string or float
|
||||
* @param string $base base to raise
|
||||
* @param string $exp exponent to use
|
||||
* @param mixed $use_function pow function to use, or false for auto-detect
|
||||
* @return mixed string or float
|
||||
*/
|
||||
function PMA_pow($base, $exp, $use_function = false)
|
||||
{
|
||||
@ -62,10 +62,10 @@ function PMA_pow($base, $exp, $use_function = false)
|
||||
/**
|
||||
* string PMA_getIcon(string $icon)
|
||||
*
|
||||
* @param string $icon name of icon file
|
||||
* @param string $alternate alternate text
|
||||
* @param boolean $container include in container
|
||||
* @param boolean $force_text whether to force alternate text to be displayed
|
||||
* @param string $icon name of icon file
|
||||
* @param string $alternate alternate text
|
||||
* @param boolean $container include in container
|
||||
* @param boolean $force_text whether to force alternate text to be displayed
|
||||
* @return html img tag
|
||||
*/
|
||||
function PMA_getIcon($icon, $alternate = '', $container = false, $force_text = false)
|
||||
@ -97,9 +97,9 @@ function PMA_getIcon($icon, $alternate = '', $container = false, $force_text = f
|
||||
$button .= '<span class="nowrap">';
|
||||
|
||||
if ($include_icon) {
|
||||
$button .= '<img src="' . $GLOBALS['pmaThemeImage'] . $icon . '"'
|
||||
$button .= '<img src="themes/dot.gif"'
|
||||
. ' title="' . $alternate . '" alt="' . $alternate . '"'
|
||||
. ' class="icon" width="16" height="16" />';
|
||||
. ' class="icon ic_' . str_replace('.png','',$icon) . '" />';
|
||||
}
|
||||
|
||||
if ($include_icon && $include_text) {
|
||||
@ -118,8 +118,8 @@ function PMA_getIcon($icon, $alternate = '', $container = false, $force_text = f
|
||||
/**
|
||||
* Displays the maximum size for an upload
|
||||
*
|
||||
* @param integer $max_upload_size the size
|
||||
* @return string the message
|
||||
* @param integer $max_upload_size the size
|
||||
* @return string the message
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
@ -135,8 +135,8 @@ function PMA_displayMaximumUploadSize($max_upload_size)
|
||||
* Generates a hidden field which should indicate to the browser
|
||||
* the maximum size for upload
|
||||
*
|
||||
* @param integer $max_size the size
|
||||
* @return string the INPUT field
|
||||
* @param integer $max_size the size
|
||||
* @return string the INPUT field
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
@ -149,13 +149,13 @@ function PMA_generateHiddenMaxFileSize($max_size)
|
||||
* Add slashes before "'" and "\" characters so a value containing them can
|
||||
* be used in a sql comparison.
|
||||
*
|
||||
* @param string $a_string the string to slash
|
||||
* @param bool $is_like whether the string will be used in a 'LIKE' clause
|
||||
* (it then requires two more escaped sequences) or not
|
||||
* @param bool $crlf whether to treat cr/lfs as escape-worthy entities
|
||||
* (converts \n to \\n, \r to \\r)
|
||||
* @param bool $php_code whether this function is used as part of the
|
||||
* "Create PHP code" dialog
|
||||
* @param string $a_string the string to slash
|
||||
* @param bool $is_like whether the string will be used in a 'LIKE' clause
|
||||
* (it then requires two more escaped sequences) or not
|
||||
* @param bool $crlf whether to treat cr/lfs as escape-worthy entities
|
||||
* (converts \n to \\n, \r to \\r)
|
||||
* @param bool $php_code whether this function is used as part of the
|
||||
* "Create PHP code" dialog
|
||||
*
|
||||
* @return string the slashed string
|
||||
*
|
||||
@ -190,8 +190,8 @@ function PMA_sqlAddSlashes($a_string = '', $is_like = false, $crlf = false, $php
|
||||
* database, table and field names.
|
||||
* Note: This function does not escape backslashes!
|
||||
*
|
||||
* @param string $name the string to escape
|
||||
* @return string the escaped string
|
||||
* @param string $name the string to escape
|
||||
* @return string the escaped string
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
@ -224,9 +224,9 @@ function PMA_unescape_mysql_wildcards($name)
|
||||
*
|
||||
* checks if the sting is quoted and removes this quotes
|
||||
*
|
||||
* @param string $quoted_string string to remove quotes from
|
||||
* @param string $quote type of quote to remove
|
||||
* @return string unqoted string
|
||||
* @param string $quoted_string string to remove quotes from
|
||||
* @param string $quote type of quote to remove
|
||||
* @return string unqoted string
|
||||
*/
|
||||
function PMA_unQuote($quoted_string, $quote = null)
|
||||
{
|
||||
@ -257,8 +257,8 @@ function PMA_unQuote($quoted_string, $quote = null)
|
||||
* format sql strings
|
||||
*
|
||||
* @todo move into PMA_Sql
|
||||
* @param mixed $parsed_sql pre-parsed SQL structure
|
||||
* @param string $unparsed_sql
|
||||
* @param mixed $parsed_sql pre-parsed SQL structure
|
||||
* @param string $unparsed_sql raw SQL string
|
||||
* @return string the formatted sql
|
||||
*
|
||||
* @global array the configuration array
|
||||
@ -314,11 +314,11 @@ function PMA_formatSql($parsed_sql, $unparsed_sql = '')
|
||||
/**
|
||||
* Displays a link to the official MySQL documentation
|
||||
*
|
||||
* @param string $chapter chapter of "HTML, one page per chapter" documentation
|
||||
* @param string $link contains name of page/anchor that is being linked
|
||||
* @param bool $big_icon whether to use big icon (like in left frame)
|
||||
* @param string $anchor anchor to page part
|
||||
* @param bool $just_open whether only the opening <a> tag should be returned
|
||||
* @param string $chapter chapter of "HTML, one page per chapter" documentation
|
||||
* @param string $link contains name of page/anchor that is being linked
|
||||
* @param bool $big_icon whether to use big icon (like in left frame)
|
||||
* @param string $anchor anchor to page part
|
||||
* @param bool $just_open whether only the opening <a> tag should be returned
|
||||
*
|
||||
* @return string the html link
|
||||
*
|
||||
@ -393,9 +393,9 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju
|
||||
if ($just_open) {
|
||||
return '<a href="' . PMA_linkURL($url) . '" target="mysql_doc">';
|
||||
} elseif ($big_icon) {
|
||||
return '<a href="' . PMA_linkURL($url) . '" target="mysql_doc"><img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_sqlhelp.png" width="16" height="16" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
|
||||
return '<a href="' . PMA_linkURL($url) . '" target="mysql_doc"><img class="icon ic_b_sqlhelp" src="themes/dot.gif" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
|
||||
} elseif ($GLOBALS['cfg']['ReplaceHelpImg']) {
|
||||
return '<a href="' . PMA_linkURL($url) . '" target="mysql_doc"><img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_help.png" width="11" height="11" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
|
||||
return '<a href="' . PMA_linkURL($url) . '" target="mysql_doc"><img class="icon ic_b_help_s" src="themes/dot.gif" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
|
||||
} else {
|
||||
return '[<a href="' . PMA_linkURL($url) . '" target="mysql_doc">' . __('Documentation') . '</a>]';
|
||||
}
|
||||
@ -412,7 +412,7 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju
|
||||
*/
|
||||
function PMA_showDocu($anchor) {
|
||||
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
|
||||
return '<a href="Documentation.html#' . $anchor . '" target="documentation"><img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_help.png" width="11" height="11" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
|
||||
return '<a href="Documentation.html#' . $anchor . '" target="documentation"><img class="icon ic_b_help_s" src="themes/dot.gif" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
|
||||
} else {
|
||||
return '[<a href="Documentation.html#' . $anchor . '" target="documentation">' . __('Documentation') . '</a>]';
|
||||
}
|
||||
@ -430,7 +430,7 @@ function PMA_showPHPDocu($target) {
|
||||
$url = PMA_getPHPDocLink($target);
|
||||
|
||||
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
|
||||
return '<a href="' . $url . '" target="documentation"><img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_help.png" width="11" height="11" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
|
||||
return '<a href="' . $url . '" target="documentation"><img class="icon ic_b_help_s" src="themes/dot.gif" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
|
||||
} else {
|
||||
return '[<a href="' . $url . '" target="documentation">' . __('Documentation') . '</a>]';
|
||||
}
|
||||
@ -459,18 +459,13 @@ function PMA_showHint($message, $bbcode = false, $type = 'notice')
|
||||
$GLOBALS['footnotes'] = array();
|
||||
}
|
||||
$nr = count($GLOBALS['footnotes']) + 1;
|
||||
// this is the first instance of this message
|
||||
$instance = 1;
|
||||
$GLOBALS['footnotes'][$key] = array(
|
||||
'note' => $message,
|
||||
'type' => $type,
|
||||
'nr' => $nr,
|
||||
'instance' => $instance
|
||||
);
|
||||
} else {
|
||||
$nr = $GLOBALS['footnotes'][$key]['nr'];
|
||||
// another instance of this message (to ensure ids are unique)
|
||||
$instance = ++$GLOBALS['footnotes'][$key]['instance'];
|
||||
}
|
||||
|
||||
if ($bbcode) {
|
||||
@ -479,8 +474,7 @@ function PMA_showHint($message, $bbcode = false, $type = 'notice')
|
||||
|
||||
// footnotemarker used in js/tooltip.js
|
||||
return '<sup class="footnotemarker">' . $nr . '</sup>' .
|
||||
'<img class="footnotemarker" id="footnote_' . $nr . '_' . $instance . '" src="' .
|
||||
$GLOBALS['pmaThemeImage'] . 'b_help.png" alt="" />';
|
||||
'<img class="footnotemarker ic_b_help footnote_' . $nr . '" src="themes/dot.gif" alt="" />';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1511,7 +1505,7 @@ function PMA_localisedDate($timestamp = -1, $format = '')
|
||||
* @return string html code for one tab, a link if valid otherwise a span
|
||||
* @access public
|
||||
*/
|
||||
function PMA_generate_html_tab($tab, $url_params = array())
|
||||
function PMA_generate_html_tab($tab, $url_params = array(), $base_dir='')
|
||||
{
|
||||
// default values
|
||||
$defaults = array(
|
||||
@ -1573,8 +1567,8 @@ function PMA_generate_html_tab($tab, $url_params = array())
|
||||
// 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" src="' . htmlentities($GLOBALS['pmaThemeImage'])
|
||||
.'%1$s" width="16" height="16" alt="" />%2$s';
|
||||
$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']);
|
||||
}
|
||||
// check to not display an empty link-text
|
||||
@ -1609,7 +1603,7 @@ function PMA_generate_html_tab($tab, $url_params = array())
|
||||
* @param string $url_params
|
||||
* @return string html-code for tab-navigation
|
||||
*/
|
||||
function PMA_generate_html_tabs($tabs, $url_params)
|
||||
function PMA_generate_html_tabs($tabs, $url_params, $base_dir='')
|
||||
{
|
||||
$tag_id = 'topmenu';
|
||||
$tab_navigation =
|
||||
@ -1617,7 +1611,7 @@ function PMA_generate_html_tabs($tabs, $url_params)
|
||||
.'<ul id="' . htmlentities($tag_id) . '">' . "\n";
|
||||
|
||||
foreach ($tabs as $tab) {
|
||||
$tab_navigation .= PMA_generate_html_tab($tab, $url_params);
|
||||
$tab_navigation .= PMA_generate_html_tab($tab, $url_params, $base_dir);
|
||||
}
|
||||
|
||||
$tab_navigation .=
|
||||
@ -1843,7 +1837,6 @@ function PMA_flipstring($string, $Separator = "<br />\n")
|
||||
* Not sure we could use a strMissingParameter message here,
|
||||
* would have to check if the error message file is always available
|
||||
*
|
||||
* @todo localize error message
|
||||
* @todo use PMA_fatalError() if $die === true?
|
||||
* @param array $params The names of the parameters needed by the calling script.
|
||||
* @param bool $die Stop the execution?
|
||||
@ -1874,7 +1867,8 @@ function PMA_checkParameters($params, $die = true, $request = true)
|
||||
|
||||
if (! isset($GLOBALS[$param])) {
|
||||
$error_message .= $reported_script_name
|
||||
. ': Missing parameter: ' . $param
|
||||
. ': ' . __('Missing parameter:') . ' '
|
||||
. $param
|
||||
. PMA_showDocu('faqmissingparameters')
|
||||
. '<br />';
|
||||
$found_error = true;
|
||||
@ -2774,7 +2768,7 @@ function PMA_expandUserString($string, $escape = null, $updates = array()) {
|
||||
$vars['phpmyadmin_version'] = 'phpMyAdmin ' . PMA_VERSION;
|
||||
|
||||
/* Update forced variables */
|
||||
foreach($updates as $key => $val) {
|
||||
foreach ($updates as $key => $val) {
|
||||
$vars[$key] = $val;
|
||||
}
|
||||
|
||||
@ -2798,7 +2792,7 @@ function PMA_expandUserString($string, $escape = null, $updates = array()) {
|
||||
|
||||
/* Optional escaping */
|
||||
if (!is_null($escape)) {
|
||||
foreach($replace as $key => $val) {
|
||||
foreach ($replace as $key => $val) {
|
||||
$replace[$key] = $escape($val);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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" src="<?php echo $img_path ?>b_help.png" width="11" height="11" alt="Doc" title="<?php echo __('Documentation') ?>" /></a><?php } ?>
|
||||
<?php if (!empty($opts['wiki'])){ ?><a href="<?php echo $opts['wiki'] ?>" target="wiki"><img class="icon" src="<?php echo $img_path ?>b_info.png" width="11" height="11" alt="Wiki" title="Wiki" /></a><?php } ?>
|
||||
<?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 } ?>
|
||||
</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" src="<?php echo $img_path ?>b_tblops.png" width="16" height="16" /></a>
|
||||
<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>
|
||||
<?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" src="<?php echo $img_path ?>b_edit.png" width="16" height="16" /></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"><img alt="set-value" class="icon ic_b_edit" src="<?php echo $base_dir; ?>themes/dot.gif" /></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" src="<?php echo $img_path ?>s_reload.png" width="16" height="16" /></a>
|
||||
<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>
|
||||
<?php
|
||||
}
|
||||
// this must match with displayErrors() in scripts/config.js
|
||||
|
||||
@ -364,7 +364,7 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals
|
||||
unset($sql_where_table, $sql);
|
||||
if ($sort_by == 'Name' && $GLOBALS['cfg']['NaturalOrder']) {
|
||||
// here, the array's first key is by schema name
|
||||
foreach($tables as $one_database_name => $one_database_tables) {
|
||||
foreach ($tables as $one_database_name => $one_database_tables) {
|
||||
uksort($one_database_tables, 'strnatcasecmp');
|
||||
|
||||
if ($sort_order == 'DESC') {
|
||||
@ -494,7 +494,7 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals
|
||||
// Note 2: Instead of array_merge(), simply use the + operator because
|
||||
// array_merge() renumbers numeric keys starting with 0, therefore
|
||||
// we would lose a db name thats consists only of numbers
|
||||
foreach($tables as $one_database => $its_tables) {
|
||||
foreach ($tables as $one_database => $its_tables) {
|
||||
if (isset(PMA_Table::$cache[$one_database])) {
|
||||
PMA_Table::$cache[$one_database] = PMA_Table::$cache[$one_database] + $tables[$one_database];
|
||||
} else {
|
||||
@ -1341,7 +1341,7 @@ function PMA_DBI_get_triggers($db, $table = '', $delimiter = '//')
|
||||
|
||||
// Sort results by name
|
||||
$name = array();
|
||||
foreach($result as $key => $value) {
|
||||
foreach ($result as $key => $value) {
|
||||
$name[] = $value['name'];
|
||||
}
|
||||
array_multisort($name, SORT_ASC, $result);
|
||||
|
||||
@ -46,64 +46,64 @@ if ($num_tables == 0) {
|
||||
|
||||
$tab_structure['link'] = 'db_structure.php';
|
||||
$tab_structure['text'] = __('Structure');
|
||||
$tab_structure['icon'] = 'b_props.png';
|
||||
$tab_structure['icon'] = 'ic_b_props';
|
||||
|
||||
$tab_sql['link'] = 'db_sql.php';
|
||||
$tab_sql['args']['db_query_force'] = 1;
|
||||
$tab_sql['text'] = __('SQL');
|
||||
$tab_sql['icon'] = 'b_sql.png';
|
||||
$tab_sql['icon'] = 'ic_b_sql';
|
||||
|
||||
$tab_export['text'] = __('Export');
|
||||
$tab_export['icon'] = 'b_export.png';
|
||||
$tab_export['icon'] = 'ic_b_export';
|
||||
$tab_export['link'] = 'db_export.php';
|
||||
|
||||
$tab_search['text'] = __('Search');
|
||||
$tab_search['icon'] = 'b_search.png';
|
||||
$tab_search['icon'] = 'ic_b_search';
|
||||
$tab_search['link'] = 'db_search.php';
|
||||
|
||||
if(PMA_Tracker::isActive())
|
||||
{
|
||||
$tab_tracking['text'] = __('Tracking');
|
||||
$tab_tracking['icon'] = 'eye.png';
|
||||
$tab_tracking['icon'] = 'ic_eye';
|
||||
$tab_tracking['link'] = 'db_tracking.php';
|
||||
}
|
||||
|
||||
$tab_qbe['text'] = __('Query');
|
||||
$tab_qbe['icon'] = 's_db.png';
|
||||
$tab_qbe['icon'] = 'ic_s_db';
|
||||
$tab_qbe['link'] = 'db_qbe.php';
|
||||
|
||||
if ($cfgRelation['designerwork']) {
|
||||
$tab_designer['text'] = __('Designer');
|
||||
$tab_designer['icon'] = 'b_relations.png';
|
||||
$tab_designer['icon'] = 'ic_b_relations';
|
||||
$tab_designer['link'] = 'pmd_general.php';
|
||||
}
|
||||
|
||||
if (! $db_is_information_schema) {
|
||||
$tab_import['link'] = 'db_import.php';
|
||||
$tab_import['text'] = __('Import');
|
||||
$tab_import['icon'] = 'b_import.png';
|
||||
$tab_import['icon'] = 'ic_b_import';
|
||||
$tab_operation['link'] = 'db_operations.php';
|
||||
$tab_operation['text'] = __('Operations');
|
||||
$tab_operation['icon'] = 'b_tblops.png';
|
||||
$tab_operation['icon'] = 'ic_b_tblops';
|
||||
if ($is_superuser) {
|
||||
$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'] = 's_rights.png';
|
||||
$tab_privileges['icon'] = 'ic_s_rights';
|
||||
}
|
||||
$tab_routines['link'] = 'db_routines.php';
|
||||
$tab_routines['text'] = __('Routines');
|
||||
$tab_routines['icon'] = 'b_routines.png';
|
||||
$tab_routines['icon'] = 'ic_b_routines';
|
||||
|
||||
$tab_events['link'] = 'db_events.php';
|
||||
$tab_events['text'] = __('Events');
|
||||
$tab_events['icon'] = 'b_events.png';
|
||||
$tab_events['icon'] = 'ic_b_events';
|
||||
|
||||
$tab_triggers['link'] = 'db_triggers.php';
|
||||
$tab_triggers['text'] = __('Triggers');
|
||||
$tab_triggers['icon'] = 'b_triggers.png';
|
||||
$tab_triggers['icon'] = 'ic_b_triggers';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -94,19 +94,19 @@ 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" src="' . $GLOBALS['pmaThemeImage'] . 's_asc.png" width="11" height="9" alt="'. __('Ascending') . '" title="'. __('Ascending') . '" id="sort_arrow" />';
|
||||
$order_img = ' <img class="icon ic_s_asc" src="themes/dot.gif" alt="'. __('Ascending') . '" title="'. __('Ascending') . '" id="sort_arrow" />';
|
||||
// but on mouse over, show the reverse order (DESC)
|
||||
$order_link_params['onmouseover'] = 'if(document.getElementById(\'sort_arrow\')){ document.getElementById(\'sort_arrow\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_desc.png\'; }';
|
||||
$order_link_params['onmouseover'] = 'if($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_desc\'); }';
|
||||
// on mouse out, show current sort order (ASC)
|
||||
$order_link_params['onmouseout'] = 'if(document.getElementById(\'sort_arrow\')){ document.getElementById(\'sort_arrow\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_asc.png\'; }';
|
||||
$order_link_params['onmouseout'] = 'if($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_asc\'); }';
|
||||
} else {
|
||||
$future_sort_order = 'ASC';
|
||||
// current sort order is DESC
|
||||
$order_img = ' <img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 's_desc.png" width="11" height="9" alt="'. __('Descending') . '" title="'. __('Descending') . '" id="sort_arrow" />';
|
||||
$order_img = ' <img class="icon ic_s_desc" src="themes/dot.gif" alt="'. __('Descending') . '" title="'. __('Descending') . '" id="sort_arrow" />';
|
||||
// but on mouse over, show the reverse order (ASC)
|
||||
$order_link_params['onmouseover'] = 'if(document.getElementById(\'sort_arrow\')){ document.getElementById(\'sort_arrow\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_asc.png\'; }';
|
||||
$order_link_params['onmouseover'] = 'if($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_asc\'); }';
|
||||
// on mouse out, show current sort order (DESC)
|
||||
$order_link_params['onmouseout'] = 'if(document.getElementById(\'sort_arrow\')){ document.getElementById(\'sort_arrow\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_desc.png\'; }';
|
||||
$order_link_params['onmouseout'] = 'if($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_desc\'); }';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ if ($is_create_db_priv) {
|
||||
<strong><?php echo __('Create database') . ': ' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
|
||||
<?php
|
||||
echo '<span class="noPrivileges">'
|
||||
. ($cfg['ErrorIconic'] ? '<img src="' . $pmaThemeImage . 's_error2.png" alt="" width="11" height="11" hspace="2" border="0" align="middle" />' : '')
|
||||
. ($cfg['ErrorIconic'] ? '<img class="icon ic_s_error2" src="themes/dot.gif" alt="" hspace="2" border="0" align="middle" />' : '')
|
||||
. '' . __('No Privileges') .'</span>';
|
||||
} // end create db form or message
|
||||
?>
|
||||
|
||||
@ -41,7 +41,7 @@ $is_create_table_priv = true;
|
||||
<legend>
|
||||
<?php
|
||||
if ($GLOBALS['cfg']['PropertiesIconic']) {
|
||||
echo '<img class="icon" src="' . $pmaThemeImage . 'b_newtbl.png" width="16" height="16" alt="" />';
|
||||
echo '<img class="icon ic_b_newtbl" src="themes/dot.gif" alt="" />';
|
||||
}
|
||||
echo sprintf(__('Create table on database %s'), PMA_getDbLink());
|
||||
?>
|
||||
|
||||
@ -74,7 +74,7 @@ if(isset($_GET['sql_query'])) {
|
||||
|
||||
<div class="exportoptions" id="header">
|
||||
<h2>
|
||||
<img src="<?php echo $GLOBALS['pmaThemeImage'];?>b_export.png" alt="export" />
|
||||
<img class="icon ic_b_export" src="themes/dot.gif" alt="export" />
|
||||
<?php
|
||||
if($export_type == 'server') {
|
||||
echo __('Exporting databases from the current server');
|
||||
|
||||
@ -123,7 +123,7 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
|
||||
|
||||
<div class="exportoptions" id="header">
|
||||
<h2>
|
||||
<img src="<?php echo $GLOBALS['pmaThemeImage'];?>b_import.png" alt="import" />
|
||||
<img class="icon ic_b_import" src="themes/dot.gif" alt="import" />
|
||||
<?php
|
||||
if($import_type == 'server') {
|
||||
echo __('Importing into the current server');
|
||||
|
||||
@ -28,12 +28,12 @@ require_once './libraries/Index.class.php';
|
||||
* the "display printable view" option.
|
||||
* Of course '0'/'1' means the feature won't/will be enabled.
|
||||
*
|
||||
* @param string the synthetic value for display_mode (see a few
|
||||
* lines above for explanations)
|
||||
* @param integer the total number of rows returned by the SQL query
|
||||
* without any programmatically appended "LIMIT" clause
|
||||
* (just a copy of $unlim_num_rows if it exists, else
|
||||
* computed inside this function)
|
||||
* @param string &$the_disp_mode the synthetic value for display_mode (see a few
|
||||
* lines above for explanations)
|
||||
* @param integer &$the_total the total number of rows returned by the SQL query
|
||||
* without any programmatically appended "LIMIT" clause
|
||||
* (just a copy of $unlim_num_rows if it exists, else
|
||||
* computed inside this function)
|
||||
*
|
||||
* @return array an array with explicit indexes for all the display
|
||||
* elements
|
||||
@ -70,8 +70,8 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
|
||||
// 2. Display mode is not "false for all elements" -> updates the
|
||||
// display mode
|
||||
if ($the_disp_mode != 'nnnn000000') {
|
||||
// 2.0 Print view -> set all elements to false!
|
||||
if (isset($GLOBALS['printview']) && $GLOBALS['printview'] == '1') {
|
||||
// 2.0 Print view -> set all elements to false!
|
||||
$do_display['edit_lnk'] = 'nn'; // no edit link
|
||||
$do_display['del_lnk'] = 'nn'; // no delete link
|
||||
$do_display['sort_lnk'] = (string) '0';
|
||||
@ -80,11 +80,10 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
|
||||
$do_display['bkm_form'] = (string) '0';
|
||||
$do_display['text_btn'] = (string) '0';
|
||||
$do_display['pview_lnk'] = (string) '0';
|
||||
}
|
||||
// 2.1 Statement is a "SELECT COUNT", a
|
||||
// "CHECK/ANALYZE/REPAIR/OPTIMIZE", an "EXPLAIN" one or
|
||||
// contains a "PROC ANALYSE" part
|
||||
elseif ($GLOBALS['is_count'] || $GLOBALS['is_analyse'] || $GLOBALS['is_maint'] || $GLOBALS['is_explain']) {
|
||||
} elseif ($GLOBALS['is_count'] || $GLOBALS['is_analyse'] || $GLOBALS['is_maint'] || $GLOBALS['is_explain']) {
|
||||
// 2.1 Statement is a "SELECT COUNT", a
|
||||
// "CHECK/ANALYZE/REPAIR/OPTIMIZE", an "EXPLAIN" one or
|
||||
// contains a "PROC ANALYSE" part
|
||||
$do_display['edit_lnk'] = 'nn'; // no edit link
|
||||
$do_display['del_lnk'] = 'nn'; // no delete link
|
||||
$do_display['sort_lnk'] = (string) '0';
|
||||
@ -97,9 +96,8 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
|
||||
$do_display['text_btn'] = (string) '0';
|
||||
}
|
||||
$do_display['pview_lnk'] = (string) '1';
|
||||
}
|
||||
// 2.2 Statement is a "SHOW..."
|
||||
elseif ($GLOBALS['is_show']) {
|
||||
} elseif ($GLOBALS['is_show']) {
|
||||
// 2.2 Statement is a "SHOW..."
|
||||
/**
|
||||
* 2.2.1
|
||||
* @todo defines edit/delete links depending on show statement
|
||||
@ -120,11 +118,10 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
|
||||
$do_display['bkm_form'] = (string) '1';
|
||||
$do_display['text_btn'] = (string) '1';
|
||||
$do_display['pview_lnk'] = (string) '1';
|
||||
}
|
||||
// 2.3 Other statements (ie "SELECT" ones) -> updates
|
||||
// $do_display['edit_lnk'], $do_display['del_lnk'] and
|
||||
// $do_display['text_btn'] (keeps other default values)
|
||||
else {
|
||||
} else {
|
||||
// 2.3 Other statements (ie "SELECT" ones) -> updates
|
||||
// $do_display['edit_lnk'], $do_display['del_lnk'] and
|
||||
// $do_display['text_btn'] (keeps other default values)
|
||||
$prev_table = $fields_meta[0]->table;
|
||||
$do_display['text_btn'] = (string) '1';
|
||||
for ($i = 0; $i < $GLOBALS['fields_cnt']; $i++) {
|
||||
@ -207,19 +204,19 @@ function PMA_isSelect()
|
||||
* Displays a navigation button
|
||||
*
|
||||
*
|
||||
* @param string iconic caption for button
|
||||
* @param string text for button
|
||||
* @param integer position for next query
|
||||
* @param string query ready for display
|
||||
* @param string optional onsubmit clause
|
||||
* @param string optional hidden field for special treatment
|
||||
* @param string optional onclick clause
|
||||
* @param string $caption iconic caption for button
|
||||
* @param string $title text for button
|
||||
* @param integer $pos position for next query
|
||||
* @param string $html_sql_query query ready for display
|
||||
* @param string $onsubmit optional onsubmit clause
|
||||
* @param string $input_for_real_end optional hidden field for special treatment
|
||||
* @param string $onclick optional onclick clause
|
||||
*
|
||||
* @global string $db the database name
|
||||
* @global string $table the table name
|
||||
* @global string $goto the URL to go back in case of errors
|
||||
* @global string $db the database name
|
||||
* @global string $table the table name
|
||||
* @global string $goto the URL to go back in case of errors
|
||||
*
|
||||
* @access private
|
||||
* @access private
|
||||
*
|
||||
* @see PMA_displayTableNavigation()
|
||||
*/
|
||||
@ -254,10 +251,10 @@ function PMA_displayTableNavigationOneButton($caption, $title, $pos, $html_sql_q
|
||||
/**
|
||||
* Displays a navigation bar to browse among the results of a SQL query
|
||||
*
|
||||
* @param integer the offset for the "next" page
|
||||
* @param integer the offset for the "previous" page
|
||||
* @param string the URL-encoded query
|
||||
* @param string the id for the direction dropdown
|
||||
* @param integer $pos_next the offset for the "next" page
|
||||
* @param integer $pos_prev the offset for the "previous" page
|
||||
* @param string $sql_query the URL-encoded query
|
||||
* @param string $id_for_direction_dropdown the id for the direction dropdown
|
||||
*
|
||||
* @global string $db the database name
|
||||
* @global string $table the table name
|
||||
@ -310,7 +307,7 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
|
||||
$pageNow = @floor($_SESSION['tmp_user_values']['pos'] / $_SESSION['tmp_user_values']['max_rows']) + 1;
|
||||
$nbTotalPage = @ceil($unlim_num_rows / $_SESSION['tmp_user_values']['max_rows']);
|
||||
|
||||
if ($nbTotalPage > 1){ //if2
|
||||
if ($nbTotalPage > 1) { //if2
|
||||
?>
|
||||
<td>
|
||||
<?php
|
||||
@ -324,14 +321,14 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
|
||||
// and also to know what to execute when the selector changes
|
||||
echo '<form action="sql.php' . PMA_generate_common_url($_url_params). '" method="post">';
|
||||
echo PMA_pageselector(
|
||||
$_SESSION['tmp_user_values']['max_rows'],
|
||||
$pageNow,
|
||||
$nbTotalPage,
|
||||
200,
|
||||
5,
|
||||
5,
|
||||
20,
|
||||
10
|
||||
$_SESSION['tmp_user_values']['max_rows'],
|
||||
$pageNow,
|
||||
$nbTotalPage,
|
||||
200,
|
||||
5,
|
||||
5,
|
||||
20,
|
||||
10
|
||||
);
|
||||
?>
|
||||
</form>
|
||||
@ -388,7 +385,7 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
|
||||
} // end move toward
|
||||
|
||||
// show separator if pagination happen
|
||||
if ($nbTotalPage > 1){
|
||||
if ($nbTotalPage > 1) {
|
||||
echo '<td><div class="navigation_separator">|</div></td>';
|
||||
}
|
||||
?>
|
||||
@ -892,10 +889,10 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|
||||
$order_img = '';
|
||||
} elseif ('DESC' == $sort_direction) {
|
||||
$sort_order .= ' ASC';
|
||||
$order_img = ' <img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 's_desc.png" width="11" height="9" alt="'. __('Descending') . '" title="'. __('Descending') . '" id="soimg' . $i . '" />';
|
||||
$order_img = ' <img class="icon ic_s_desc" src="themes/dot.gif" alt="'. __('Descending') . '" title="'. __('Descending') . '" id="soimg' . $i . '" />';
|
||||
} else {
|
||||
$sort_order .= ' DESC';
|
||||
$order_img = ' <img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 's_asc.png" width="11" height="9" alt="'. __('Ascending') . '" title="'. __('Ascending') . '" id="soimg' . $i . '" />';
|
||||
$order_img = ' <img class="icon ic_s_asc" src="themes/dot.gif" alt="'. __('Ascending') . '" title="'. __('Ascending') . '" id="soimg' . $i . '" />';
|
||||
}
|
||||
|
||||
if (preg_match('@(.*)([[:space:]](LIMIT (.*)|PROCEDURE (.*)|FOR UPDATE|LOCK IN SHARE MODE))@is', $unsorted_sql_query, $regs3)) {
|
||||
@ -916,11 +913,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(document.getElementById(\'soimg' . $i . '\')){ document.getElementById(\'soimg' . $i . '\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_desc.png\'; }';
|
||||
$order_link_params['onmouseout'] = 'if(document.getElementById(\'soimg' . $i . '\')){ document.getElementById(\'soimg' . $i . '\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_asc.png\'; }';
|
||||
$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\'); }';
|
||||
} elseif (strstr($order_img, 'desc')) {
|
||||
$order_link_params['onmouseover'] = 'if(document.getElementById(\'soimg' . $i . '\')){ document.getElementById(\'soimg' . $i . '\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_asc.png\'; }';
|
||||
$order_link_params['onmouseout'] = 'if(document.getElementById(\'soimg' . $i . '\')){ document.getElementById(\'soimg' . $i . '\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_desc.png\'; }';
|
||||
$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\'); }';
|
||||
}
|
||||
}
|
||||
if ($GLOBALS['cfg']['HeaderFlipType'] == 'auto') {
|
||||
@ -1391,7 +1388,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
||||
$is_field_truncated = false;
|
||||
//If the previous column had blob data, we need to reset the class
|
||||
// to $inline_edit_class
|
||||
$class = 'data ' . $inline_edit_class . ' ' . $not_null_class . ' ' . $relation_class; //' ' . $alternating_color_class .
|
||||
$class = 'data ' . $inline_edit_class . ' ' . $not_null_class . ' ' . $relation_class; //' ' . $alternating_color_class .
|
||||
|
||||
// See if this column should get highlight because it's used in the
|
||||
// where-query.
|
||||
@ -2141,7 +2138,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
|
||||
// find the sorted column index in row result
|
||||
// (this might be a multi-table query)
|
||||
$sorted_column_index = false;
|
||||
foreach($fields_meta as $key => $meta) {
|
||||
foreach ($fields_meta as $key => $meta) {
|
||||
if ($meta->table == $sort_table && $meta->name == $sort_column) {
|
||||
$sorted_column_index = $key;
|
||||
break;
|
||||
|
||||
@ -123,8 +123,8 @@ function PMA_exportDBCreate($db)
|
||||
*/
|
||||
function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
|
||||
{
|
||||
global $CG_FORMATS, $CG_HANDLERS;
|
||||
$format = cgGetOption("format");
|
||||
global $CG_FORMATS, $CG_HANDLERS, $what;
|
||||
$format = $GLOBALS[$what . '_format'];
|
||||
if (isset($CG_FORMATS[$format])) {
|
||||
return PMA_exportOutputHandler($CG_HANDLERS[$format]($db, $table, $crlf));
|
||||
}
|
||||
@ -242,80 +242,93 @@ class TableProperty
|
||||
function handleNHibernateCSBody($db, $table, $crlf)
|
||||
{
|
||||
$lines=array();
|
||||
$result=PMA_DBI_query(sprintf("DESC %s.%s", PMA_backquote($db), PMA_backquote($table)));
|
||||
if ($result)
|
||||
{
|
||||
$result=PMA_DBI_query(sprintf('DESC %s.%s', PMA_backquote($db), PMA_backquote($table)));
|
||||
if ($result) {
|
||||
$tableProperties=array();
|
||||
while ($row = PMA_DBI_fetch_row($result))
|
||||
while ($row = PMA_DBI_fetch_row($result)) {
|
||||
$tableProperties[] = new TableProperty($row);
|
||||
$lines[] = "using System;";
|
||||
$lines[] = "using System.Collections;";
|
||||
$lines[] = "using System.Collections.Generic;";
|
||||
$lines[] = "using System.Text;";
|
||||
$lines[] = "namespace ".cgMakeIdentifier($db);
|
||||
$lines[] = "{";
|
||||
$lines[] = " #region ".cgMakeIdentifier($table);
|
||||
$lines[] = " public class ".cgMakeIdentifier($table);
|
||||
$lines[] = " {";
|
||||
$lines[] = " #region Member Variables";
|
||||
foreach ($tableProperties as $tablePropertie)
|
||||
$lines[] = $tablePropertie->formatCs(" protected #dotNetPrimitiveType# _#name#;");
|
||||
$lines[] = " #endregion";
|
||||
$lines[] = " #region Constructors";
|
||||
$lines[] = " public ".cgMakeIdentifier($table)."() { }";
|
||||
$temp = array();
|
||||
foreach ($tableProperties as $tablePropertie)
|
||||
if (! $tablePropertie->isPK())
|
||||
$temp[] = $tablePropertie->formatCs("#dotNetPrimitiveType# #name#");
|
||||
$lines[] = " public ".cgMakeIdentifier($table)."(".implode(", ", $temp).")";
|
||||
$lines[] = " {";
|
||||
foreach ($tableProperties as $tablePropertie)
|
||||
if (! $tablePropertie->isPK())
|
||||
$lines[] = $tablePropertie->formatCs(" this._#name#=#name#;");
|
||||
$lines[] = " }";
|
||||
$lines[] = " #endregion";
|
||||
$lines[] = " #region Public Properties";
|
||||
foreach ($tableProperties as $tablePropertie)
|
||||
$lines[] = $tablePropertie->formatCs(" public virtual #dotNetPrimitiveType# #ucfirstName#\n {\n get {return _#name#;}\n set {_#name#=value;}\n }");
|
||||
$lines[] = " #endregion";
|
||||
$lines[] = " }";
|
||||
$lines[] = " #endregion";
|
||||
$lines[] = "}";
|
||||
}
|
||||
PMA_DBI_free_result($result);
|
||||
$lines[] = 'using System;';
|
||||
$lines[] = 'using System.Collections;';
|
||||
$lines[] = 'using System.Collections.Generic;';
|
||||
$lines[] = 'using System.Text;';
|
||||
$lines[] = 'namespace ' . cgMakeIdentifier($db);
|
||||
$lines[] = '{';
|
||||
$lines[] = ' #region ' . cgMakeIdentifier($table);
|
||||
$lines[] = ' public class ' . cgMakeIdentifier($table);
|
||||
$lines[] = ' {';
|
||||
$lines[] = ' #region Member Variables';
|
||||
foreach ($tableProperties as $tablePropertie) {
|
||||
$lines[] = $tablePropertie->formatCs(' protected #dotNetPrimitiveType# _#name#;');
|
||||
}
|
||||
$lines[] = ' #endregion';
|
||||
$lines[] = ' #region Constructors';
|
||||
$lines[] = ' public ' . cgMakeIdentifier($table).'() { }';
|
||||
$temp = array();
|
||||
foreach ($tableProperties as $tablePropertie) {
|
||||
if (! $tablePropertie->isPK()) {
|
||||
$temp[] = $tablePropertie->formatCs('#dotNetPrimitiveType# #name#');
|
||||
}
|
||||
}
|
||||
$lines[] = ' public ' . cgMakeIdentifier($table) . '(' . implode(', ', $temp) . ')';
|
||||
$lines[] = ' {';
|
||||
foreach ($tableProperties as $tablePropertie) {
|
||||
if (! $tablePropertie->isPK()) {
|
||||
$lines[] = $tablePropertie->formatCs(' this._#name#=#name#;');
|
||||
}
|
||||
}
|
||||
$lines[] = ' }';
|
||||
$lines[] = ' #endregion';
|
||||
$lines[] = ' #region Public Properties';
|
||||
foreach ($tableProperties as $tablePropertie) {
|
||||
$lines[] = $tablePropertie->formatCs(''
|
||||
. ' public virtual #dotNetPrimitiveType# #ucfirstName#' . "\n"
|
||||
. ' {' . "\n"
|
||||
. ' get {return _#name#;}' . "\n"
|
||||
. ' set {_#name#=value;}' . "\n"
|
||||
. ' }'
|
||||
);
|
||||
}
|
||||
$lines[] = ' #endregion';
|
||||
$lines[] = ' }';
|
||||
$lines[] = ' #endregion';
|
||||
$lines[] = '}';
|
||||
}
|
||||
return implode("\n", $lines);
|
||||
}
|
||||
|
||||
function handleNHibernateXMLBody($db, $table, $crlf)
|
||||
{
|
||||
$lines=array();
|
||||
$lines[] = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
|
||||
$lines[] = "<hibernate-mapping xmlns=\"urn:nhibernate-mapping-2.2\" namespace=\"".cgMakeIdentifier($db)."\" assembly=\"".cgMakeIdentifier($db)."\">";
|
||||
$lines[] = " <class name=\"".cgMakeIdentifier($table)."\" table=\"".cgMakeIdentifier($table)."\">";
|
||||
$lines = array();
|
||||
$lines[] = '<?xml version="1.0" encoding="utf-8" ?' . '>';
|
||||
$lines[] = '<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" '
|
||||
. 'namespace="' . cgMakeIdentifier($db) . '" '
|
||||
. 'assembly="' . cgMakeIdentifier($db) . '">';
|
||||
$lines[] = ' <class '
|
||||
. 'name="' . cgMakeIdentifier($table) . '" '
|
||||
. 'table="' . cgMakeIdentifier($table) . '">';
|
||||
$result = PMA_DBI_query(sprintf("DESC %s.%s", PMA_backquote($db), PMA_backquote($table)));
|
||||
if ($result)
|
||||
{
|
||||
$tableProperties = array();
|
||||
while ($row = PMA_DBI_fetch_row($result))
|
||||
$tableProperties[] = new TableProperty($row);
|
||||
foreach ($tableProperties as $tablePropertie)
|
||||
{
|
||||
if ($result) {
|
||||
while ($row = PMA_DBI_fetch_row($result)) {
|
||||
$tablePropertie = new TableProperty($row);
|
||||
if ($tablePropertie->isPK())
|
||||
$lines[] = $tablePropertie->formatXml(" <id name=\"#ucfirstName#\" type=\"#dotNetObjectType#\" unsaved-value=\"0\">\n <column name=\"#name#\" sql-type=\"#type#\" not-null=\"#notNull#\" unique=\"#unique#\" index=\"PRIMARY\"/>\n <generator class=\"native\" />\n </id>");
|
||||
$lines[] = $tablePropertie->formatXml(''
|
||||
. ' <id name="#ucfirstName#" type="#dotNetObjectType#" unsaved-value="0">' . "\n"
|
||||
. ' <column name="#name#" sql-type="#type#" not-null="#notNull#" unique="#unique#" index="PRIMARY"/>' . "\n"
|
||||
. ' <generator class="native" />' . "\n"
|
||||
. ' </id>');
|
||||
else
|
||||
$lines[] = $tablePropertie->formatXml(" <property name=\"#ucfirstName#\" type=\"#dotNetObjectType#\">\n <column name=\"#name#\" sql-type=\"#type#\" not-null=\"#notNull#\" #indexName#/>\n </property>");
|
||||
$lines[] = $tablePropertie->formatXml(''
|
||||
. ' <property name="#ucfirstName#" type="#dotNetObjectType#">' . "\n"
|
||||
. ' <column name="#name#" sql-type="#type#" not-null="#notNull#" #indexName#/>' . "\n"
|
||||
. ' </property>');
|
||||
}
|
||||
PMA_DBI_free_result($result);
|
||||
}
|
||||
$lines[]=" </class>";
|
||||
$lines[]="</hibernate-mapping>";
|
||||
$lines[] = ' </class>';
|
||||
$lines[] = '</hibernate-mapping>';
|
||||
return implode("\n", $lines);
|
||||
}
|
||||
|
||||
function cgGetOption($optionName)
|
||||
{
|
||||
global $what;
|
||||
return $GLOBALS[$what . "_" . $optionName];
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -27,7 +27,9 @@ if (isset($plugin_list)) {
|
||||
'mime_type' => 'text/x-sql',
|
||||
'options' => array());
|
||||
|
||||
$plugin_list['sql']['options'][] = array('type' => 'begin_group', 'name' => 'general_opts');
|
||||
$plugin_list['sql']['options'][] = array(
|
||||
'type' => 'begin_group',
|
||||
'name' => 'general_opts');
|
||||
|
||||
/* comments */
|
||||
$plugin_list['sql']['options'][] = array(
|
||||
@ -77,7 +79,10 @@ if (isset($plugin_list)) {
|
||||
'type' => 'bool',
|
||||
'name' => 'disable_fk',
|
||||
'text' => __('Disable foreign key checks'),
|
||||
'doc' => array('manual_MySQL_Database_Administration', 'server-system-variables', 'sysvar_foreign_key_checks')
|
||||
'doc' => array(
|
||||
'manual_MySQL_Database_Administration',
|
||||
'server-system-variables',
|
||||
'sysvar_foreign_key_checks')
|
||||
);
|
||||
|
||||
$plugin_list['sql']['options_text'] = __('Options');
|
||||
@ -86,7 +91,7 @@ if (isset($plugin_list)) {
|
||||
$compats = PMA_DBI_getCompatibilities();
|
||||
if (count($compats) > 0) {
|
||||
$values = array();
|
||||
foreach($compats as $val) {
|
||||
foreach ($compats as $val) {
|
||||
$values[$val] = $val;
|
||||
}
|
||||
$plugin_list['sql']['options'][] = array(
|
||||
@ -94,7 +99,9 @@ if (isset($plugin_list)) {
|
||||
'name' => 'compatibility',
|
||||
'text' => __('Database system or older MySQL server to maximize output compatibility with:'),
|
||||
'values' => $values,
|
||||
'doc' => array('manual_MySQL_Database_Administration', 'Server_SQL_mode')
|
||||
'doc' => array(
|
||||
'manual_MySQL_Database_Administration',
|
||||
'Server_SQL_mode')
|
||||
);
|
||||
unset($values);
|
||||
}
|
||||
@ -322,11 +329,14 @@ function PMA_exportRoutines($db) {
|
||||
. PMA_exportComment(__('Procedures'))
|
||||
. PMA_exportComment();
|
||||
|
||||
foreach($procedure_names as $procedure_name) {
|
||||
foreach ($procedure_names as $procedure_name) {
|
||||
if (! empty($GLOBALS['sql_drop_table'])) {
|
||||
$text .= 'DROP PROCEDURE IF EXISTS ' . PMA_backquote($procedure_name) . $delimiter . $crlf;
|
||||
$text .= 'DROP PROCEDURE IF EXISTS '
|
||||
. PMA_backquote($procedure_name)
|
||||
. $delimiter . $crlf;
|
||||
}
|
||||
$text .= PMA_DBI_get_definition($db, 'PROCEDURE', $procedure_name) . $delimiter . $crlf . $crlf;
|
||||
$text .= PMA_DBI_get_definition($db, 'PROCEDURE', $procedure_name)
|
||||
. $delimiter . $crlf . $crlf;
|
||||
}
|
||||
}
|
||||
|
||||
@ -336,11 +346,14 @@ function PMA_exportRoutines($db) {
|
||||
. PMA_exportComment(__('Functions'))
|
||||
. PMA_exportComment();
|
||||
|
||||
foreach($function_names as $function_name) {
|
||||
foreach ($function_names as $function_name) {
|
||||
if (! empty($GLOBALS['sql_drop_table'])) {
|
||||
$text .= 'DROP FUNCTION IF EXISTS ' . PMA_backquote($function_name) . $delimiter . $crlf;
|
||||
$text .= 'DROP FUNCTION IF EXISTS '
|
||||
. PMA_backquote($function_name)
|
||||
. $delimiter . $crlf;
|
||||
}
|
||||
$text .= PMA_DBI_get_definition($db, 'FUNCTION', $function_name) . $delimiter . $crlf . $crlf;
|
||||
$text .= PMA_DBI_get_definition($db, 'FUNCTION', $function_name)
|
||||
. $delimiter . $crlf . $crlf;
|
||||
}
|
||||
}
|
||||
|
||||
@ -469,7 +482,7 @@ function PMA_exportHeader()
|
||||
// backslash and n, as explained on the export interface
|
||||
$lines = explode('\n', $GLOBALS['sql_header_comment']);
|
||||
$head .= PMA_exportComment();
|
||||
foreach($lines as $one_line) {
|
||||
foreach ($lines as $one_line) {
|
||||
$head .= PMA_exportComment($one_line);
|
||||
}
|
||||
$head .= PMA_exportComment();
|
||||
@ -609,7 +622,7 @@ function PMA_exportDBFooter($db)
|
||||
. PMA_exportComment(__('Events'))
|
||||
. PMA_exportComment();
|
||||
|
||||
foreach($event_names as $event_name) {
|
||||
foreach ($event_names as $event_name) {
|
||||
if (! empty($GLOBALS['sql_drop_table'])) {
|
||||
$text .= 'DROP EVENT ' . PMA_backquote($event_name) . $delimiter . $crlf;
|
||||
}
|
||||
@ -650,7 +663,7 @@ function PMA_getTableDefStandIn($db, $view, $crlf) {
|
||||
$create_query .= PMA_backquote($view) . ' (' . $crlf;
|
||||
$tmp = array();
|
||||
$columns = PMA_DBI_get_columns_full($db, $view);
|
||||
foreach($columns as $column_name => $definition) {
|
||||
foreach ($columns as $column_name => $definition) {
|
||||
$tmp[] = PMA_backquote($column_name) . ' ' . $definition['Type'] . $crlf;
|
||||
}
|
||||
$create_query .= implode(',', $tmp) . ');';
|
||||
|
||||
@ -162,7 +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" src="'. $GLOBALS['pmaThemeImage'] . 'window-new.png"'
|
||||
echo '<img class="icon ic_window-new" src="themes/dot.gif"'
|
||||
. ' alt="' . __('Open new phpMyAdmin window') . '" />';
|
||||
}
|
||||
if ($GLOBALS['cfg']['NavigationBarIconic'] !== true) {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Factory class that handles the creation of geometric objects.
|
||||
*
|
||||
* @package phpMyAdmin
|
||||
* @package phpMyAdmin-GIS
|
||||
*/
|
||||
class PMA_GIS_Factory
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Base class for all GIS data type classes.
|
||||
*
|
||||
* @package phpMyAdmin
|
||||
* @package phpMyAdmin-GIS
|
||||
*/
|
||||
abstract class PMA_GIS_Geometry
|
||||
{
|
||||
@ -36,26 +36,27 @@ abstract class PMA_GIS_Geometry
|
||||
*
|
||||
* @param string $spatial GIS data object
|
||||
* @param string $label Label for the GIS data object
|
||||
* @param string $line_color Color for the GIS data object
|
||||
* @param string $color Color for the GIS data object
|
||||
* @param array $scale_data Array containing data related to scaling
|
||||
* @param image $pdf TCPDF instance
|
||||
*
|
||||
* @return the modified TCPDF instance
|
||||
*/
|
||||
public abstract function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf);
|
||||
public abstract function prepareRowAsPdf($spatial, $label, $color, $scale_data, $pdf);
|
||||
|
||||
/**
|
||||
* Prepares the JavaScript related to a row in the GIS dataset to visualize it with OpenLayers.
|
||||
* Prepares the JavaScript related to a row in the GIS dataset
|
||||
* to visualize it with OpenLayers.
|
||||
*
|
||||
* @param string $spatial GIS data object
|
||||
* @param int $srid Spatial reference ID
|
||||
* @param string $label Label for the GIS data object
|
||||
* @param string $point_color Color for the GIS data object
|
||||
* @param array $scale_data Array containing data related to scaling
|
||||
* @param string $spatial GIS data object
|
||||
* @param int $srid Spatial reference ID
|
||||
* @param string $label Label for the GIS data object
|
||||
* @param string $color Color for the GIS data object
|
||||
* @param array $scale_data Array containing data related to scaling
|
||||
*
|
||||
* @return the JavaScript related to a row in the GIS dataset
|
||||
*/
|
||||
public abstract function prepareRowAsOl($spatial, $srid, $label, $point_color, $scale_data);
|
||||
public abstract function prepareRowAsOl($spatial, $srid, $label, $color, $scale_data);
|
||||
|
||||
/**
|
||||
* Scales each row.
|
||||
@ -77,9 +78,11 @@ abstract class PMA_GIS_Geometry
|
||||
protected function getBoundsForOl($srid, $scale_data)
|
||||
{
|
||||
return 'bound = new OpenLayers.Bounds(); bound.extend(new OpenLayers.LonLat('
|
||||
. $scale_data['minX'] . ', ' . $scale_data['minY'] . ').transform(new OpenLayers.Projection("EPSG:'
|
||||
. $scale_data['minX'] . ', ' . $scale_data['minY']
|
||||
. ').transform(new OpenLayers.Projection("EPSG:'
|
||||
. $srid . '"), map.getProjectionObject())); bound.extend(new OpenLayers.LonLat('
|
||||
. $scale_data['maxX'] . ', ' . $scale_data['maxY'] . ').transform(new OpenLayers.Projection("EPSG:'
|
||||
. $scale_data['maxX'] . ', ' . $scale_data['maxY']
|
||||
. ').transform(new OpenLayers.Projection("EPSG:'
|
||||
. $srid . '"), map.getProjectionObject()));';
|
||||
}
|
||||
|
||||
@ -152,10 +155,53 @@ abstract class PMA_GIS_Geometry
|
||||
$points_arr[] = $x;
|
||||
$points_arr[] = $y;
|
||||
}
|
||||
unset($cordinate_arr);
|
||||
}
|
||||
|
||||
return $points_arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates JavaScriipt for adding points for OpenLayers polygon.
|
||||
*
|
||||
* @param string $polygon points of a polygon in WKT form
|
||||
* @param string $srid spatial reference id
|
||||
*
|
||||
* @return JavaScriipt for adding points for OpenLayers polygon
|
||||
*/
|
||||
protected function addPointsForOpenLayersPolygon($polygon, $srid)
|
||||
{
|
||||
$row = 'new OpenLayers.Geometry.Polygon(new Array(';
|
||||
// If the polygon doesnt have an inner polygon
|
||||
if (strpos($polygon, "),(") === false) {
|
||||
$points_arr = $this->extractPoints($polygon, null);
|
||||
$row .= 'new OpenLayers.Geometry.LinearRing(new Array(';
|
||||
foreach ($points_arr as $point) {
|
||||
$row .= '(new OpenLayers.Geometry.Point('
|
||||
. $point[0] . ', ' . $point[1] . '))'
|
||||
. '.transform(new OpenLayers.Projection("EPSG:'
|
||||
. $srid . '"), map.getProjectionObject()), ';
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
$row .= '))';
|
||||
} else {
|
||||
// Seperate outer and inner polygons
|
||||
$parts = explode("),(", $polygon);
|
||||
foreach ($parts as $ring) {
|
||||
$points_arr = $this->extractPoints($ring, null);
|
||||
$row .= 'new OpenLayers.Geometry.LinearRing(new Array(';
|
||||
foreach ($points_arr as $point) {
|
||||
$row .= '(new OpenLayers.Geometry.Point('
|
||||
. $point[0] . ', ' . $point[1] . '))'
|
||||
. '.transform(new OpenLayers.Projection("EPSG:'
|
||||
. $srid . '"), map.getProjectionObject()), ';
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
$row .= ')), ';
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
}
|
||||
$row .= ')), ';
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Handles the visualization of GIS GEOMETRYCOLLECTION objects.
|
||||
*
|
||||
* @package phpMyAdmin
|
||||
* @package phpMyAdmin-GIS
|
||||
*/
|
||||
class PMA_GIS_Geometrycollection extends PMA_GIS_Geometry
|
||||
{
|
||||
@ -24,8 +24,8 @@ class PMA_GIS_Geometrycollection extends PMA_GIS_Geometry
|
||||
public static function singleton()
|
||||
{
|
||||
if (!isset(self::$_instance)) {
|
||||
$c = __CLASS__;
|
||||
self::$_instance = new $c;
|
||||
$class = __CLASS__;
|
||||
self::$_instance = new $class;
|
||||
}
|
||||
|
||||
return self::$_instance;
|
||||
@ -139,7 +139,7 @@ class PMA_GIS_Geometrycollection extends PMA_GIS_Geometry
|
||||
if (! $gis_obj) {
|
||||
continue;
|
||||
}
|
||||
$image = $gis_obj->prepareRowAsPdf($sub_part, $label, $color, $scale_data, $pdf);
|
||||
$pdf = $gis_obj->prepareRowAsPdf($sub_part, $label, $color, $scale_data, $pdf);
|
||||
}
|
||||
return $pdf;
|
||||
}
|
||||
@ -177,7 +177,8 @@ class PMA_GIS_Geometrycollection extends PMA_GIS_Geometry
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers.
|
||||
* Prepares JavaScript related to a row in the GIS dataset
|
||||
* to visualize it with OpenLayers.
|
||||
*
|
||||
* @param string $spatial GIS GEOMETRYCOLLECTION object
|
||||
* @param int $srid Spatial reference ID
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Handles the visualization of GIS LINESTRING objects.
|
||||
*
|
||||
* @package phpMyAdmin
|
||||
* @package phpMyAdmin-GIS
|
||||
*/
|
||||
class PMA_GIS_Linestring extends PMA_GIS_Geometry
|
||||
{
|
||||
@ -24,8 +24,8 @@ class PMA_GIS_Linestring extends PMA_GIS_Geometry
|
||||
public static function singleton()
|
||||
{
|
||||
if (!isset(self::$_instance)) {
|
||||
$c = __CLASS__;
|
||||
self::$_instance = new $c;
|
||||
$class = __CLASS__;
|
||||
self::$_instance = new $class;
|
||||
}
|
||||
|
||||
return self::$_instance;
|
||||
@ -59,10 +59,10 @@ class PMA_GIS_Linestring extends PMA_GIS_Geometry
|
||||
public function prepareRowAsPng($spatial, $label, $line_color, $scale_data, $image)
|
||||
{
|
||||
// allocate colors
|
||||
$r = hexdec(substr($line_color, 1, 2));
|
||||
$g = hexdec(substr($line_color, 3, 2));
|
||||
$b = hexdec(substr($line_color, 4, 2));
|
||||
$color = imagecolorallocate($image, $r, $g, $b);
|
||||
$red = hexdec(substr($line_color, 1, 2));
|
||||
$green = hexdec(substr($line_color, 3, 2));
|
||||
$blue = hexdec(substr($line_color, 4, 2));
|
||||
$color = imagecolorallocate($image, $red, $green, $blue);
|
||||
|
||||
// Trim to remove leading 'LINESTRING(' and trailing ')'
|
||||
$linesrting = substr($spatial, 11, (strlen($spatial) - 12));
|
||||
@ -94,10 +94,10 @@ class PMA_GIS_Linestring extends PMA_GIS_Geometry
|
||||
public function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf)
|
||||
{
|
||||
// allocate colors
|
||||
$r = hexdec(substr($line_color, 1, 2));
|
||||
$g = hexdec(substr($line_color, 3, 2));
|
||||
$b = hexdec(substr($line_color, 4, 2));
|
||||
$line = array('width' => 1.5, 'color' => array($r, $g, $b));
|
||||
$red = hexdec(substr($line_color, 1, 2));
|
||||
$green = hexdec(substr($line_color, 3, 2));
|
||||
$blue = hexdec(substr($line_color, 4, 2));
|
||||
$line = array('width' => 1.5, 'color' => array($red, $green, $blue));
|
||||
|
||||
// Trim to remove leading 'LINESTRING(' and trailing ')'
|
||||
$linesrting = substr($spatial, 11, (strlen($spatial) - 12));
|
||||
@ -154,7 +154,8 @@ class PMA_GIS_Linestring extends PMA_GIS_Geometry
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers.
|
||||
* Prepares JavaScript related to a row in the GIS dataset
|
||||
* to visualize it with OpenLayers.
|
||||
*
|
||||
* @param string $spatial GIS LINESTRING object
|
||||
* @param int $srid Spatial reference ID
|
||||
@ -183,8 +184,9 @@ class PMA_GIS_Linestring extends PMA_GIS_Geometry
|
||||
|
||||
$row = 'new Array(';
|
||||
foreach ($points_arr as $point) {
|
||||
$row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))'
|
||||
. '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), ';
|
||||
$row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', '
|
||||
. $point[1] . ')).transform(new OpenLayers.Projection("EPSG:'
|
||||
. $srid . '"), map.getProjectionObject()), ';
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
$row .= ')';
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Handles the visualization of GIS MULTILINESTRING objects.
|
||||
*
|
||||
* @package phpMyAdmin
|
||||
* @package phpMyAdmin-GIS
|
||||
*/
|
||||
class PMA_GIS_Multilinestring extends PMA_GIS_Geometry
|
||||
{
|
||||
@ -24,8 +24,8 @@ class PMA_GIS_Multilinestring extends PMA_GIS_Geometry
|
||||
public static function singleton()
|
||||
{
|
||||
if (!isset(self::$_instance)) {
|
||||
$c = __CLASS__;
|
||||
self::$_instance = new $c;
|
||||
$class = __CLASS__;
|
||||
self::$_instance = new $class;
|
||||
}
|
||||
|
||||
return self::$_instance;
|
||||
@ -68,10 +68,10 @@ class PMA_GIS_Multilinestring extends PMA_GIS_Geometry
|
||||
public function prepareRowAsPng($spatial, $label, $line_color, $scale_data, $image)
|
||||
{
|
||||
// allocate colors
|
||||
$r = hexdec(substr($line_color, 1, 2));
|
||||
$g = hexdec(substr($line_color, 3, 2));
|
||||
$b = hexdec(substr($line_color, 4, 2));
|
||||
$color = imagecolorallocate($image, $r, $g, $b);
|
||||
$red = hexdec(substr($line_color, 1, 2));
|
||||
$green = hexdec(substr($line_color, 3, 2));
|
||||
$blue = hexdec(substr($line_color, 4, 2));
|
||||
$color = imagecolorallocate($image, $red, $green, $blue);
|
||||
|
||||
// Trim to remove leading 'MULTILINESTRING((' and trailing '))'
|
||||
$multilinestirng = substr($spatial, 17, (strlen($spatial) - 19));
|
||||
@ -108,10 +108,10 @@ class PMA_GIS_Multilinestring extends PMA_GIS_Geometry
|
||||
public function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf)
|
||||
{
|
||||
// allocate colors
|
||||
$r = hexdec(substr($line_color, 1, 2));
|
||||
$g = hexdec(substr($line_color, 3, 2));
|
||||
$b = hexdec(substr($line_color, 4, 2));
|
||||
$line = array('width' => 1.5, 'color' => array($r, $g, $b));
|
||||
$red = hexdec(substr($line_color, 1, 2));
|
||||
$green = hexdec(substr($line_color, 3, 2));
|
||||
$blue = hexdec(substr($line_color, 4, 2));
|
||||
$line = array('width' => 1.5, 'color' => array($red, $green, $blue));
|
||||
|
||||
// Trim to remove leading 'MULTILINESTRING((' and trailing '))'
|
||||
$multilinestirng = substr($spatial, 17, (strlen($spatial) - 19));
|
||||
@ -179,7 +179,8 @@ class PMA_GIS_Multilinestring extends PMA_GIS_Geometry
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers.
|
||||
* Prepares JavaScript related to a row in the GIS dataset
|
||||
* to visualize it with OpenLayers.
|
||||
*
|
||||
* @param string $spatial GIS MULTILINESTRING object
|
||||
* @param int $srid Spatial reference ID
|
||||
@ -213,8 +214,9 @@ class PMA_GIS_Multilinestring extends PMA_GIS_Geometry
|
||||
$points_arr = $this->extractPoints($linestring, null);
|
||||
$row .= 'new OpenLayers.Geometry.LineString(new Array(';
|
||||
foreach ($points_arr as $point) {
|
||||
$row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))'
|
||||
. '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), ';
|
||||
$row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', '
|
||||
. $point[1] . ')).transform(new OpenLayers.Projection("EPSG:'
|
||||
. $srid . '"), map.getProjectionObject()), ';
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
$row .= ')), ';
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Handles the visualization of GIS MULTIPOINT objects.
|
||||
*
|
||||
* @package phpMyAdmin
|
||||
* @package phpMyAdmin-GIS
|
||||
*/
|
||||
class PMA_GIS_Multipoint extends PMA_GIS_Geometry
|
||||
{
|
||||
@ -24,8 +24,8 @@ class PMA_GIS_Multipoint extends PMA_GIS_Geometry
|
||||
public static function singleton()
|
||||
{
|
||||
if (!isset(self::$_instance)) {
|
||||
$c = __CLASS__;
|
||||
self::$_instance = new $c;
|
||||
$class = __CLASS__;
|
||||
self::$_instance = new $class;
|
||||
}
|
||||
|
||||
return self::$_instance;
|
||||
@ -48,21 +48,21 @@ class PMA_GIS_Multipoint extends PMA_GIS_Geometry
|
||||
/**
|
||||
* Adds to the PNG image object, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS MULTIPOINT object
|
||||
* @param string $label Label for the GIS MULTIPOINT object
|
||||
* @param string $line_color Color for the GIS MULTIPOINT object
|
||||
* @param array $scale_data Array containing data related to scaling
|
||||
* @param image $image Image object
|
||||
* @param string $spatial GIS MULTIPOINT object
|
||||
* @param string $label Label for the GIS MULTIPOINT object
|
||||
* @param string $point_color Color for the GIS MULTIPOINT object
|
||||
* @param array $scale_data Array containing data related to scaling
|
||||
* @param image $image Image object
|
||||
*
|
||||
* @return the modified image object
|
||||
*/
|
||||
public function prepareRowAsPng($spatial, $label, $line_color, $scale_data, $image)
|
||||
public function prepareRowAsPng($spatial, $label, $point_color, $scale_data, $image)
|
||||
{
|
||||
// allocate colors
|
||||
$r = hexdec(substr($line_color, 1, 2));
|
||||
$g = hexdec(substr($line_color, 3, 2));
|
||||
$b = hexdec(substr($line_color, 4, 2));
|
||||
$color = imagecolorallocate($image, $r, $g, $b);
|
||||
$red = hexdec(substr($point_color, 1, 2));
|
||||
$green = hexdec(substr($point_color, 3, 2));
|
||||
$blue = hexdec(substr($point_color, 4, 2));
|
||||
$color = imagecolorallocate($image, $red, $green, $blue);
|
||||
|
||||
// Trim to remove leading 'MULTIPOINT(' and trailing ')'
|
||||
$multipoint = substr($spatial, 11, (strlen($spatial) - 12));
|
||||
@ -78,21 +78,21 @@ class PMA_GIS_Multipoint extends PMA_GIS_Geometry
|
||||
/**
|
||||
* Adds to the TCPDF instance, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS MULTIPOINT object
|
||||
* @param string $label Label for the GIS MULTIPOINT object
|
||||
* @param string $line_color Color for the GIS MULTIPOINT object
|
||||
* @param array $scale_data Array containing data related to scaling
|
||||
* @param image $pdf TCPDF instance
|
||||
* @param string $spatial GIS MULTIPOINT object
|
||||
* @param string $label Label for the GIS MULTIPOINT object
|
||||
* @param string $point_color Color for the GIS MULTIPOINT object
|
||||
* @param array $scale_data Array containing data related to scaling
|
||||
* @param image $pdf TCPDF instance
|
||||
*
|
||||
* @return the modified TCPDF instance
|
||||
*/
|
||||
public function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf)
|
||||
public function prepareRowAsPdf($spatial, $label, $point_color, $scale_data, $pdf)
|
||||
{
|
||||
// allocate colors
|
||||
$r = hexdec(substr($line_color, 1, 2));
|
||||
$g = hexdec(substr($line_color, 3, 2));
|
||||
$b = hexdec(substr($line_color, 4, 2));
|
||||
$line = array('width' => 1.25, 'color' => array($r, $g, $b));
|
||||
$red = hexdec(substr($point_color, 1, 2));
|
||||
$green = hexdec(substr($point_color, 3, 2));
|
||||
$blue = hexdec(substr($point_color, 4, 2));
|
||||
$line = array('width' => 1.25, 'color' => array($red, $green, $blue));
|
||||
|
||||
// Trim to remove leading 'MULTIPOINT(' and trailing ')'
|
||||
$multipoint = substr($spatial, 11, (strlen($spatial) - 12));
|
||||
@ -143,7 +143,8 @@ class PMA_GIS_Multipoint extends PMA_GIS_Geometry
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers.
|
||||
* Prepares JavaScript related to a row in the GIS dataset
|
||||
* to visualize it with OpenLayers.
|
||||
*
|
||||
* @param string $spatial GIS MULTIPOINT object
|
||||
* @param int $srid Spatial reference ID
|
||||
@ -175,8 +176,9 @@ class PMA_GIS_Multipoint extends PMA_GIS_Geometry
|
||||
|
||||
$row = 'new Array(';
|
||||
foreach ($points_arr as $point) {
|
||||
$row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))'
|
||||
. '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), ';
|
||||
$row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1]
|
||||
. ')).transform(new OpenLayers.Projection("EPSG:' . $srid
|
||||
. '"), map.getProjectionObject()), ';
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
$row .= ')';
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Handles the visualization of GIS MULTIPOLYGON objects.
|
||||
*
|
||||
* @package phpMyAdmin
|
||||
* @package phpMyAdmin-GIS
|
||||
*/
|
||||
class PMA_GIS_Multipolygon extends PMA_GIS_Geometry
|
||||
{
|
||||
@ -24,8 +24,8 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry
|
||||
public static function singleton()
|
||||
{
|
||||
if (!isset(self::$_instance)) {
|
||||
$c = __CLASS__;
|
||||
self::$_instance = new $c;
|
||||
$class = __CLASS__;
|
||||
self::$_instance = new $class;
|
||||
}
|
||||
|
||||
return self::$_instance;
|
||||
@ -82,10 +82,10 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry
|
||||
public function prepareRowAsPng($spatial, $label, $fill_color, $scale_data, $image)
|
||||
{
|
||||
// allocate colors
|
||||
$r = hexdec(substr($fill_color, 1, 2));
|
||||
$g = hexdec(substr($fill_color, 3, 2));
|
||||
$b = hexdec(substr($fill_color, 4, 2));
|
||||
$color = imagecolorallocate($image, $r, $g, $b);
|
||||
$red = hexdec(substr($fill_color, 1, 2));
|
||||
$green = hexdec(substr($fill_color, 3, 2));
|
||||
$blue = hexdec(substr($fill_color, 4, 2));
|
||||
$color = imagecolorallocate($image, $red, $green, $blue);
|
||||
|
||||
// Trim to remove leading 'MULTIPOLYGON(((' and trailing ')))'
|
||||
$multipolygon = substr($spatial, 15, (strlen($spatial) - 18));
|
||||
@ -130,10 +130,10 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry
|
||||
public function prepareRowAsPdf($spatial, $label, $fill_color, $scale_data, $pdf)
|
||||
{
|
||||
// allocate colors
|
||||
$r = hexdec(substr($fill_color, 1, 2));
|
||||
$g = hexdec(substr($fill_color, 3, 2));
|
||||
$b = hexdec(substr($fill_color, 4, 2));
|
||||
$color = array($r, $g, $b);
|
||||
$red = hexdec(substr($fill_color, 1, 2));
|
||||
$green = hexdec(substr($fill_color, 3, 2));
|
||||
$blue = hexdec(substr($fill_color, 4, 2));
|
||||
$color = array($red, $green, $blue);
|
||||
|
||||
// Trim to remove leading 'MULTIPOLYGON(((' and trailing ')))'
|
||||
$multipolygon = substr($spatial, 15, (strlen($spatial) - 18));
|
||||
@ -154,7 +154,8 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry
|
||||
|
||||
foreach ($inner as $inner_poly) {
|
||||
$points_arr = array_merge(
|
||||
$points_arr, $this->extractPoints($inner_poly, $scale_data, true)
|
||||
$points_arr,
|
||||
$this->extractPoints($inner_poly, $scale_data, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -223,7 +224,8 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers.
|
||||
* Prepares JavaScript related to a row in the GIS dataset
|
||||
* to visualize it with OpenLayers.
|
||||
*
|
||||
* @param string $spatial GIS MULTIPOLYGON object
|
||||
* @param int $srid Spatial reference ID
|
||||
@ -257,33 +259,7 @@ class PMA_GIS_Multipolygon extends PMA_GIS_Geometry
|
||||
. 'new OpenLayers.Geometry.MultiPolygon(new Array(';
|
||||
|
||||
foreach ($polygons as $polygon) {
|
||||
$row .= 'new OpenLayers.Geometry.Polygon(new Array(';
|
||||
// If the polygon doesnt have an inner polygon
|
||||
if (strpos($polygon, "),(") === false) {
|
||||
$points_arr = $this->extractPoints($polygon, null);
|
||||
$row .= 'new OpenLayers.Geometry.LinearRing(new Array(';
|
||||
foreach ($points_arr as $point) {
|
||||
$row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))'
|
||||
. '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), ';
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
$row .= '))';
|
||||
} else {
|
||||
// Seperate outer and inner polygons
|
||||
$parts = explode("),(", $polygon);
|
||||
foreach ($parts as $ring) {
|
||||
$points_arr = $this->extractPoints($ring, null);
|
||||
$row .= 'new OpenLayers.Geometry.LinearRing(new Array(';
|
||||
foreach ($points_arr as $point) {
|
||||
$row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))'
|
||||
. '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), ';
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
$row .= ')), ';
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
}
|
||||
$row .= ')), ';
|
||||
$row .= $this->addPointsForOpenLayersPolygon($polygon, $srid);
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
$row .= ')), null, ' . json_encode($style_options) . '));';
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Handles the visualization of GIS POINT objects.
|
||||
*
|
||||
* @package phpMyAdmin
|
||||
* @package phpMyAdmin-GIS
|
||||
*/
|
||||
class PMA_GIS_Point extends PMA_GIS_Geometry
|
||||
{
|
||||
@ -24,8 +24,8 @@ class PMA_GIS_Point extends PMA_GIS_Geometry
|
||||
public static function singleton()
|
||||
{
|
||||
if (!isset(self::$_instance)) {
|
||||
$c = __CLASS__;
|
||||
self::$_instance = new $c;
|
||||
$class = __CLASS__;
|
||||
self::$_instance = new $class;
|
||||
}
|
||||
|
||||
return self::$_instance;
|
||||
@ -48,21 +48,21 @@ class PMA_GIS_Point extends PMA_GIS_Geometry
|
||||
/**
|
||||
* Adds to the PNG image object, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS POINT object
|
||||
* @param string $label Label for the GIS POINT object
|
||||
* @param string $line_color Color for the GIS POINT object
|
||||
* @param array $scale_data Array containing data related to scaling
|
||||
* @param image $image Image object
|
||||
* @param string $spatial GIS POINT object
|
||||
* @param string $label Label for the GIS POINT object
|
||||
* @param string $point_color Color for the GIS POINT object
|
||||
* @param array $scale_data Array containing data related to scaling
|
||||
* @param image $image Image object
|
||||
*
|
||||
* @return the modified image object
|
||||
*/
|
||||
public function prepareRowAsPng($spatial, $label, $line_color, $scale_data, $image)
|
||||
public function prepareRowAsPng($spatial, $label, $point_color, $scale_data, $image)
|
||||
{
|
||||
// allocate colors
|
||||
$r = hexdec(substr($line_color, 1, 2));
|
||||
$g = hexdec(substr($line_color, 3, 2));
|
||||
$b = hexdec(substr($line_color, 4, 2));
|
||||
$color = imagecolorallocate($image, $r, $g, $b);
|
||||
$red = hexdec(substr($point_color, 1, 2));
|
||||
$green = hexdec(substr($point_color, 3, 2));
|
||||
$blue = hexdec(substr($point_color, 4, 2));
|
||||
$color = imagecolorallocate($image, $red, $green, $blue);
|
||||
|
||||
// Trim to remove leading 'POINT(' and trailing ')'
|
||||
$point = substr($spatial, 6, (strlen($spatial) - 7));
|
||||
@ -76,21 +76,21 @@ class PMA_GIS_Point extends PMA_GIS_Geometry
|
||||
/**
|
||||
* Adds to the TCPDF instance, the data related to a row in the GIS dataset.
|
||||
*
|
||||
* @param string $spatial GIS POINT object
|
||||
* @param string $label Label for the GIS POINT object
|
||||
* @param string $line_color Color for the GIS POINT object
|
||||
* @param array $scale_data Array containing data related to scaling
|
||||
* @param image $pdf TCPDF instance
|
||||
* @param string $spatial GIS POINT object
|
||||
* @param string $label Label for the GIS POINT object
|
||||
* @param string $point_color Color for the GIS POINT object
|
||||
* @param array $scale_data Array containing data related to scaling
|
||||
* @param image $pdf TCPDF instance
|
||||
*
|
||||
* @return the modified TCPDF instance
|
||||
*/
|
||||
public function prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf)
|
||||
public function prepareRowAsPdf($spatial, $label, $point_color, $scale_data, $pdf)
|
||||
{
|
||||
// allocate colors
|
||||
$r = hexdec(substr($line_color, 1, 2));
|
||||
$g = hexdec(substr($line_color, 3, 2));
|
||||
$b = hexdec(substr($line_color, 4, 2));
|
||||
$line = array('width' => 1.25, 'color' => array($r, $g, $b));
|
||||
$red = hexdec(substr($point_color, 1, 2));
|
||||
$green = hexdec(substr($point_color, 3, 2));
|
||||
$blue = hexdec(substr($point_color, 4, 2));
|
||||
$line = array('width' => 1.25, 'color' => array($red, $green, $blue));
|
||||
|
||||
// Trim to remove leading 'POINT(' and trailing ')'
|
||||
$point = substr($spatial, 6, (strlen($spatial) - 7));
|
||||
@ -136,7 +136,8 @@ class PMA_GIS_Point extends PMA_GIS_Geometry
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers.
|
||||
* Prepares JavaScript related to a row in the GIS dataset
|
||||
* to visualize it with OpenLayers.
|
||||
*
|
||||
* @param string $spatial GIS POINT object
|
||||
* @param int $srid Spatial reference ID
|
||||
@ -167,9 +168,10 @@ class PMA_GIS_Point extends PMA_GIS_Geometry
|
||||
$points_arr = $this->extractPoints($point, null);
|
||||
|
||||
$result .= 'vectorLayer.addFeatures(new OpenLayers.Feature.Vector(('
|
||||
. 'new OpenLayers.Geometry.Point(' . $points_arr[0][0] . ', ' . $points_arr[0][1] . ')'
|
||||
. '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject())),'
|
||||
. ' null, ' . json_encode($style_options) . '));';
|
||||
. 'new OpenLayers.Geometry.Point(' . $points_arr[0][0] . ', '
|
||||
. $points_arr[0][1] . ').transform(new OpenLayers.Projection("EPSG:'
|
||||
. $srid . '"), map.getProjectionObject())), null, '
|
||||
. json_encode($style_options) . '));';
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Handles the visualization of GIS POLYGON objects.
|
||||
*
|
||||
* @package phpMyAdmin
|
||||
* @package phpMyAdmin-GIS
|
||||
*/
|
||||
class PMA_GIS_Polygon extends PMA_GIS_Geometry
|
||||
{
|
||||
@ -24,8 +24,8 @@ class PMA_GIS_Polygon extends PMA_GIS_Geometry
|
||||
public static function singleton()
|
||||
{
|
||||
if (!isset(self::$_instance)) {
|
||||
$c = __CLASS__;
|
||||
self::$_instance = new $c;
|
||||
$class = __CLASS__;
|
||||
self::$_instance = new $class;
|
||||
}
|
||||
|
||||
return self::$_instance;
|
||||
@ -77,10 +77,10 @@ class PMA_GIS_Polygon extends PMA_GIS_Geometry
|
||||
public function prepareRowAsPng($spatial, $label, $fill_color, $scale_data, $image)
|
||||
{
|
||||
// allocate colors
|
||||
$r = hexdec(substr($fill_color, 1, 2));
|
||||
$g = hexdec(substr($fill_color, 3, 2));
|
||||
$b = hexdec(substr($fill_color, 4, 2));
|
||||
$color = imagecolorallocate($image, $r, $g, $b);
|
||||
$red = hexdec(substr($fill_color, 1, 2));
|
||||
$green = hexdec(substr($fill_color, 3, 2));
|
||||
$blue = hexdec(substr($fill_color, 4, 2));
|
||||
$color = imagecolorallocate($image, $red, $green, $blue);
|
||||
|
||||
// Trim to remove leading 'POLYGON((' and trailing '))'
|
||||
$polygon = substr($spatial, 9, (strlen($spatial) - 11));
|
||||
@ -122,10 +122,10 @@ class PMA_GIS_Polygon extends PMA_GIS_Geometry
|
||||
public function prepareRowAsPdf($spatial, $label, $fill_color, $scale_data, $pdf)
|
||||
{
|
||||
// allocate colors
|
||||
$r = hexdec(substr($fill_color, 1, 2));
|
||||
$g = hexdec(substr($fill_color, 3, 2));
|
||||
$b = hexdec(substr($fill_color, 4, 2));
|
||||
$color = array($r, $g, $b);
|
||||
$red = hexdec(substr($fill_color, 1, 2));
|
||||
$green = hexdec(substr($fill_color, 3, 2));
|
||||
$blue = hexdec(substr($fill_color, 4, 2));
|
||||
$color = array($red, $green, $blue);
|
||||
|
||||
// Trim to remove leading 'POLYGON((' and trailing '))'
|
||||
$polygon = substr($spatial, 9, (strlen($spatial) - 11));
|
||||
@ -206,7 +206,8 @@ class PMA_GIS_Polygon extends PMA_GIS_Geometry
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers.
|
||||
* Prepares JavaScript related to a row in the GIS dataset
|
||||
* to visualize it with OpenLayers.
|
||||
*
|
||||
* @param string $spatial GIS POLYGON object
|
||||
* @param int $srid Spatial reference ID
|
||||
@ -234,34 +235,9 @@ class PMA_GIS_Polygon extends PMA_GIS_Geometry
|
||||
// Trim to remove leading 'POLYGON((' and trailing '))'
|
||||
$polygon = substr($spatial, 9, (strlen($spatial) - 11));
|
||||
|
||||
$row .= 'vectorLayer.addFeatures(new OpenLayers.Feature.Vector('
|
||||
. 'new OpenLayers.Geometry.Polygon(new Array(';
|
||||
// If the polygon doesnt have an inner polygon
|
||||
if (strpos($polygon, "),(") === false) {
|
||||
$points_arr = $this->extractPoints($polygon, null);
|
||||
$row .= 'new OpenLayers.Geometry.LinearRing(new Array(';
|
||||
foreach ($points_arr as $point) {
|
||||
$row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))'
|
||||
. '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), ';
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
$row .= '))';
|
||||
} else {
|
||||
// Seperate outer and inner polygons
|
||||
$parts = explode("),(", $polygon);
|
||||
foreach ($parts as $ring) {
|
||||
$points_arr = $this->extractPoints($ring, null);
|
||||
$row .= 'new OpenLayers.Geometry.LinearRing(new Array(';
|
||||
foreach ($points_arr as $point) {
|
||||
$row .= '(new OpenLayers.Geometry.Point(' . $point[0] . ', ' . $point[1] . '))'
|
||||
. '.transform(new OpenLayers.Projection("EPSG:' . $srid . '"), map.getProjectionObject()), ';
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
$row .= ')), ';
|
||||
}
|
||||
$row = substr($row, 0, strlen($row) - 2);
|
||||
}
|
||||
$row .= ')), null, ' . json_encode($style_options) . '));';
|
||||
$row .= 'vectorLayer.addFeatures(new OpenLayers.Feature.Vector(';
|
||||
$row .= $this->addPointsForOpenLayersPolygon($polygon, $srid);
|
||||
$row .= 'null, ' . json_encode($style_options) . '));';
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Generates the JavaScripts needed to visualize GIS data.
|
||||
*
|
||||
* @package phpMyAdmin
|
||||
* @package phpMyAdmin-GIS
|
||||
*/
|
||||
class PMA_GIS_Visualization
|
||||
{
|
||||
@ -74,6 +74,8 @@ class PMA_GIS_Visualization
|
||||
|
||||
/**
|
||||
* All the variable initialization, options handling has to be done here.
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
protected function init()
|
||||
{
|
||||
@ -83,6 +85,8 @@ class PMA_GIS_Visualization
|
||||
/**
|
||||
* A function which handles passed parameters. Useful if desired
|
||||
* chart needs to be a little bit different from the default one.
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
private function _handleOptions()
|
||||
{
|
||||
@ -121,6 +125,8 @@ class PMA_GIS_Visualization
|
||||
* @param string $file_name file name
|
||||
* @param string $type mime type
|
||||
* @param string $ext extension of the file
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
private function _toFile($file_name, $type, $ext)
|
||||
{
|
||||
@ -179,6 +185,8 @@ class PMA_GIS_Visualization
|
||||
* Saves as a SVG image to a file.
|
||||
*
|
||||
* @param string $file_name File name
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
public function toFileAsSvg($file_name)
|
||||
{
|
||||
@ -201,7 +209,10 @@ class PMA_GIS_Visualization
|
||||
|
||||
// fill the background
|
||||
$bg = imagecolorallocate($image, 229, 229, 229);
|
||||
imagefilledrectangle($image, 0, 0, $this->_settings['width'] - 1, $this->_settings['height'] - 1, $bg);
|
||||
imagefilledrectangle(
|
||||
$image, 0, 0, $this->_settings['width'] - 1,
|
||||
$this->_settings['height'] - 1, $bg
|
||||
);
|
||||
|
||||
$scale_data = $this->_scaleDataSet($this->_data);
|
||||
$image = $this->_prepareDataSet($this->_data, 0, $scale_data, 'png', $image);
|
||||
@ -234,6 +245,8 @@ class PMA_GIS_Visualization
|
||||
* Saves as a PNG image to a file.
|
||||
*
|
||||
* @param string $file_name File name
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
public function toFileAsPng($file_name)
|
||||
{
|
||||
@ -286,6 +299,8 @@ class PMA_GIS_Visualization
|
||||
* Saves as a PDF to a file.
|
||||
*
|
||||
* @param string $file_name File name
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
public function toFileAsPdf($file_name)
|
||||
{
|
||||
@ -457,4 +472,4 @@ class PMA_GIS_Visualization
|
||||
return $results;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@ -110,8 +110,8 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) {
|
||||
);
|
||||
$item = '<a href="%1$s?%2$s" class="item">';
|
||||
if ($GLOBALS['cfg']['NavigationBarIconic']) {
|
||||
$separator = ' <span class="separator"><img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'item_' . $GLOBALS['text_dir'] . '.png" width="5" height="9" alt="-" /></span>' . "\n";
|
||||
$item .= ' <img class="icon" src="' . $GLOBALS['pmaThemeImage'] . '%5$s" width="16" height="16" alt="" /> ' . "\n";
|
||||
$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";
|
||||
}
|
||||
@ -127,7 +127,7 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) {
|
||||
PMA_generate_common_url(),
|
||||
htmlspecialchars($server_info),
|
||||
__('Server'),
|
||||
's_host.png');
|
||||
'ic_s_host');
|
||||
|
||||
if (strlen($GLOBALS['db'])) {
|
||||
|
||||
@ -137,11 +137,10 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) {
|
||||
PMA_generate_common_url($GLOBALS['db']),
|
||||
htmlspecialchars($GLOBALS['db']),
|
||||
__('Database'),
|
||||
's_db.png');
|
||||
// if the table is being dropped, $_REQUEST['purge'] is set
|
||||
// (it always contains "1")
|
||||
'ic_s_db');
|
||||
// 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']))) {
|
||||
if (strlen($GLOBALS['table']) && ! (isset($_REQUEST['purge']) && $_REQUEST['purge'] == '1')) {
|
||||
require_once './libraries/tbl_info.inc.php';
|
||||
|
||||
echo $separator;
|
||||
@ -150,7 +149,7 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) {
|
||||
PMA_generate_common_url($GLOBALS['db'], $GLOBALS['table']),
|
||||
str_replace(' ', ' ', htmlspecialchars($GLOBALS['table'])),
|
||||
(isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? __('View') : __('Table')),
|
||||
(isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? 'b_views' : 's_tbl') . '.png');
|
||||
(isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view'] ? 'ic_b_views' : 'ic_s_tbl'));
|
||||
|
||||
/**
|
||||
* Displays table comment
|
||||
|
||||
@ -22,7 +22,7 @@ if (isset($plugin_list)) {
|
||||
$compats = PMA_DBI_getCompatibilities();
|
||||
if (count($compats) > 0) {
|
||||
$values = array();
|
||||
foreach($compats as $val) {
|
||||
foreach ($compats as $val) {
|
||||
$values[$val] = $val;
|
||||
}
|
||||
$plugin_list['sql']['options'] = array(
|
||||
|
||||
@ -145,7 +145,7 @@ if (isset($namespaces['pma'])) {
|
||||
$create = array();
|
||||
|
||||
foreach ($struct as $tier1 => $val1) {
|
||||
foreach($val1 as $tier2 => $val2) {
|
||||
foreach ($val1 as $tier2 => $val2) {
|
||||
/* Need to select the correct database for the creation of tables, views, triggers, etc. */
|
||||
/**
|
||||
* @todo Generating a USE here blocks importing of a table
|
||||
|
||||
@ -56,8 +56,7 @@ if ($GLOBALS['cfg']['LeftDisplayLogo']) {
|
||||
echo '<a href="main.php?' . $query_url . '"'
|
||||
.' title="' . __('Home') . '">'
|
||||
.($GLOBALS['cfg']['MainPageIconic']
|
||||
? '<img class="icon" src="' . $pmaThemeImage . 'b_home.png" width="16" '
|
||||
.' height="16" alt="' . __('Home') . '" />'
|
||||
? '<img class="icon ic_b_home" src="themes/dot.gif" alt="' . __('Home') . '" />'
|
||||
: __('Home'))
|
||||
.'</a>' . "\n";
|
||||
// if we have chosen server
|
||||
@ -69,8 +68,7 @@ if ($GLOBALS['cfg']['LeftDisplayLogo']) {
|
||||
.urlencode($PHP_AUTH_USER) . '" target="_parent"'
|
||||
.' title="' . __('Log out') . '" >'
|
||||
.($GLOBALS['cfg']['MainPageIconic']
|
||||
? '<img class="icon" src="' . $pmaThemeImage . 's_loggoff.png" '
|
||||
.' width="16" height="16" alt="' . __('Log out') . '" />'
|
||||
? '<img class="icon ic_s_loggoff" src="themes/dot.gif" alt="' . __('Log out') . '" />'
|
||||
: __('Log out'))
|
||||
.'</a>' . "\n";
|
||||
} // end if ($GLOBALS['cfg']['Server']['auth_type'] != 'config'
|
||||
@ -79,8 +77,7 @@ if ($GLOBALS['cfg']['LeftDisplayLogo']) {
|
||||
|
||||
if ($GLOBALS['cfg']['MainPageIconic']) {
|
||||
$query_frame_link_text =
|
||||
'<img class="icon" src="' . $pmaThemeImage . 'b_selboard.png"'
|
||||
.' width="16" height="16" alt="' . __('Query window') . '" />';
|
||||
'<img class="icon ic_b_selboard" src="themes/dot.gif" alt="' . __('Query window') . '" />';
|
||||
} else {
|
||||
echo '<br />' . "\n";
|
||||
$query_frame_link_text = __('Query window');
|
||||
@ -95,7 +92,7 @@ if ($GLOBALS['cfg']['LeftDisplayLogo']) {
|
||||
.' title="' . __('phpMyAdmin documentation') . '" >';
|
||||
|
||||
if ($GLOBALS['cfg']['MainPageIconic']) {
|
||||
echo '<img class="icon" src="' . $pmaThemeImage . 'b_docs.png" width="16" height="16"'
|
||||
echo '<img class="icon ic_b_docs" src="themes/dot.gif"'
|
||||
.' alt="' . __('phpMyAdmin documentation') . '" />';
|
||||
}
|
||||
echo '</a>';
|
||||
@ -107,7 +104,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" src="'. $GLOBALS['pmaThemeImage'] . 's_reload.png"'
|
||||
echo '<img class="icon ic_s_reload" src="themes/dot.gif"'
|
||||
. ' title="' . __('Reload navigation frame') . '"'
|
||||
. ' alt="' . __('Reload navigation frame') . '" />';
|
||||
} else {
|
||||
|
||||
@ -89,7 +89,7 @@ function PMA_pluginGetDefault($section, $opt)
|
||||
/* Possibly replace localised texts */
|
||||
if (preg_match_all('/(str[A-Z][A-Za-z0-9]*)/', $GLOBALS['cfg'][$section][$opt], $matches)) {
|
||||
$val = $GLOBALS['cfg'][$section][$opt];
|
||||
foreach($matches[0] as $match) {
|
||||
foreach ($matches[0] as $match) {
|
||||
if (isset($GLOBALS[$match])) {
|
||||
$val = str_replace($match, $GLOBALS[$match], $val);
|
||||
}
|
||||
@ -217,7 +217,7 @@ function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
|
||||
$ret .= '<select name="' . $plugin_name . '_' . $opt['name'] . '"'
|
||||
. ' id="select_' . $plugin_name . '_' . $opt['name'] . '">';
|
||||
$default = PMA_pluginGetDefault($section, $plugin_name . '_' . $opt['name']);
|
||||
foreach($opt['values'] as $key => $val) {
|
||||
foreach ($opt['values'] as $key => $val) {
|
||||
$ret .= '<option value="' . $key . '"';
|
||||
if ($key == $default) {
|
||||
$ret .= ' selected="selected"';
|
||||
@ -227,7 +227,7 @@ function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
|
||||
$ret .= '</select>';
|
||||
} elseif ($opt['type'] == 'radio') {
|
||||
$default = PMA_pluginGetDefault($section, $plugin_name . '_' . $opt['name']);
|
||||
foreach($opt['values'] as $key => $val) {
|
||||
foreach ($opt['values'] as $key => $val) {
|
||||
$ret .= '<li><input type="radio" name="' . $plugin_name . '_' . $opt['name'] . '" value="' . $key
|
||||
. '" id="radio_' . $plugin_name . '_' . $opt['name'] . '_' . $key . '"';
|
||||
if($key == $default) {
|
||||
|
||||
@ -336,8 +336,7 @@ class PMA_User_Schema
|
||||
<?php
|
||||
echo PMA_generate_common_hidden_inputs($db);
|
||||
if ($cfg['PropertiesIconic']) {
|
||||
echo '<img class="icon" src="' . $pmaThemeImage . 'b_view.png"'
|
||||
.' alt="" width="16" height="16" />';
|
||||
echo '<img class="icon ic_b_views" src="themes/dot.gif" />';
|
||||
}
|
||||
echo __('Display relational schema');
|
||||
?>:
|
||||
@ -638,7 +637,7 @@ class PMA_User_Schema
|
||||
*/
|
||||
$tables = PMA_DBI_get_tables_full($db);
|
||||
$foreignkey_tables = array();
|
||||
foreach($tables as $table_name => $table_properties) {
|
||||
foreach ($tables as $table_name => $table_properties) {
|
||||
if (PMA_foreignkey_supported($table_properties['ENGINE'])) {
|
||||
$foreignkey_tables[] = $table_name;
|
||||
}
|
||||
|
||||
@ -38,15 +38,15 @@ if (!$GLOBALS['is_ajax_request']) {
|
||||
*/
|
||||
$tabs = array();
|
||||
|
||||
$tabs['databases']['icon'] = 's_db.png';
|
||||
$tabs['databases']['icon'] = 'ic_s_db';
|
||||
$tabs['databases']['link'] = 'server_databases.php';
|
||||
$tabs['databases']['text'] = __('Databases');
|
||||
|
||||
$tabs['sql']['icon'] = 'b_sql.png';
|
||||
$tabs['sql']['icon'] = 'ic_b_sql';
|
||||
$tabs['sql']['link'] = 'server_sql.php';
|
||||
$tabs['sql']['text'] = __('SQL');
|
||||
|
||||
$tabs['status']['icon'] = 's_status.png';
|
||||
$tabs['status']['icon'] = 'ic_s_status';
|
||||
$tabs['status']['link'] = 'server_status.php';
|
||||
$tabs['status']['text'] = __('Status');
|
||||
|
||||
@ -55,50 +55,50 @@ if (!$GLOBALS['is_ajax_request']) {
|
||||
$tabs['process']['text'] = __('Processes');*/
|
||||
|
||||
if ($is_superuser) {
|
||||
$tabs['rights']['icon'] = 's_rights.png';
|
||||
$tabs['rights']['icon'] = 'ic_s_rights';
|
||||
$tabs['rights']['link'] = 'server_privileges.php';
|
||||
$tabs['rights']['text'] = __('Privileges');
|
||||
}
|
||||
|
||||
$tabs['export']['icon'] = 'b_export.png';
|
||||
$tabs['export']['icon'] = 'ic_b_export';
|
||||
$tabs['export']['link'] = 'server_export.php';
|
||||
$tabs['export']['text'] = __('Export');
|
||||
|
||||
$tabs['import']['icon'] = 'b_import.png';
|
||||
$tabs['import']['icon'] = 'ic_b_import';
|
||||
$tabs['import']['link'] = 'server_import.php';
|
||||
$tabs['import']['text'] = __('Import');
|
||||
|
||||
$tabs['settings']['icon'] = 'b_tblops.png';
|
||||
$tabs['settings']['icon'] = 'ic_b_tblops';
|
||||
$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'] = 's_sync.png';
|
||||
$tabs['synchronize']['icon'] = 'ic_s_sync';
|
||||
$tabs['synchronize']['link'] = 'server_synchronize.php';
|
||||
$tabs['synchronize']['text'] = __('Synchronize');
|
||||
|
||||
if (! empty($binary_logs)) {
|
||||
$tabs['binlog']['icon'] = 's_tbl.png';
|
||||
$tabs['binlog']['icon'] = 'ic_s_tbl';
|
||||
$tabs['binlog']['link'] = 'server_binlog.php';
|
||||
$tabs['binlog']['text'] = __('Binary log');
|
||||
}
|
||||
|
||||
if ($is_superuser) {
|
||||
$tabs['replication']['icon'] = 's_replication.png';
|
||||
$tabs['replication']['icon'] = 'ic_s_replication';
|
||||
$tabs['replication']['link'] = 'server_replication.php';
|
||||
$tabs['replication']['text'] = __('Replication');
|
||||
}
|
||||
|
||||
$tabs['vars']['icon'] = 's_vars.png';
|
||||
$tabs['vars']['icon'] = 'ic_s_vars';
|
||||
$tabs['vars']['link'] = 'server_variables.php';
|
||||
$tabs['vars']['text'] = __('Variables');
|
||||
|
||||
$tabs['charset']['icon'] = 's_asci.png';
|
||||
$tabs['charset']['icon'] = 'ic_s_asci';
|
||||
$tabs['charset']['link'] = 'server_collations.php';
|
||||
$tabs['charset']['text'] = __('Charsets');
|
||||
|
||||
$tabs['engine']['icon'] = 'b_engine.png';
|
||||
$tabs['engine']['icon'] = 'ic_b_engine';
|
||||
$tabs['engine']['link'] = 'server_engines.php';
|
||||
$tabs['engine']['text'] = __('Engines');
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -383,8 +383,7 @@ function PMA_sqlQueryFormBookmark()
|
||||
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
|
||||
echo ' <a href="./Documentation.html#faqbookmark"'
|
||||
.' target="documentation">'
|
||||
.'<img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_help.png"'
|
||||
.' border="0" width="11" height="11" align="middle"'
|
||||
.'<img class="icon ic_b_help_s" src="themes/dot.gif"'
|
||||
.' alt="' . __('Documentation') . '" /></a> ';
|
||||
} else {
|
||||
echo ' (<a href="./Documentation.html#faqbookmark"'
|
||||
|
||||
@ -362,7 +362,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
if (class_exists('PMA_Message') && $GLOBALS['is_ajax_request'] != true) {
|
||||
PMA_Message::notice(__('Automatically appended backtick to the end of query!'))->display();
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
$debugstr = __('Unclosed quote') . ' @ ' . $startquotepos. "\n"
|
||||
. 'STR: ' . htmlspecialchars($quotetype);
|
||||
PMA_SQP_throwError($debugstr, $sql);
|
||||
|
||||
@ -115,7 +115,7 @@ class Linux {
|
||||
$mem['MemUsed'] = $mem['MemTotal'] - $mem['MemFree'] - $mem['Cached'] - $mem['Buffers'];
|
||||
$mem['SwapUsed'] = $mem['SwapTotal'] - $mem['SwapFree'] - $mem['SwapCached'];
|
||||
|
||||
foreach($mem as $idx=>$value)
|
||||
foreach ($mem as $idx=>$value)
|
||||
$mem[$idx] = intval($value);
|
||||
|
||||
return $mem;
|
||||
|
||||
@ -51,30 +51,30 @@ if (! isset($db_is_information_schema)) {
|
||||
*/
|
||||
$tabs = array();
|
||||
|
||||
$tabs['browse']['icon'] = 'b_browse.png';
|
||||
$tabs['browse']['icon'] = 'ic_b_browse';
|
||||
$tabs['browse']['text'] = __('Browse');
|
||||
$tabs['browse']['link'] = 'sql.php';
|
||||
$tabs['browse']['args']['pos'] = 0;
|
||||
|
||||
$tabs['structure']['icon'] = 'b_props.png';
|
||||
$tabs['structure']['icon'] = 'ic_b_props';
|
||||
$tabs['structure']['link'] = 'tbl_structure.php';
|
||||
$tabs['structure']['text'] = __('Structure');
|
||||
|
||||
$tabs['sql']['icon'] = 'b_sql.png';
|
||||
$tabs['sql']['icon'] = 'ic_b_sql';
|
||||
$tabs['sql']['link'] = 'tbl_sql.php';
|
||||
$tabs['sql']['text'] = __('SQL');
|
||||
|
||||
$tabs['search']['icon'] = 'b_search.png';
|
||||
$tabs['search']['icon'] = 'ic_b_search';
|
||||
$tabs['search']['text'] = __('Search');
|
||||
$tabs['search']['link'] = 'tbl_select.php';
|
||||
|
||||
if (!$db_is_information_schema) {
|
||||
$tabs['insert']['icon'] = 'b_insrow.png';
|
||||
$tabs['insert']['icon'] = 'ic_b_insrow';
|
||||
$tabs['insert']['link'] = 'tbl_change.php';
|
||||
$tabs['insert']['text'] = __('Insert');
|
||||
}
|
||||
|
||||
$tabs['export']['icon'] = 'b_tblexport.png';
|
||||
$tabs['export']['icon'] = 'ic_b_tblexport';
|
||||
$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'] = 'b_tblimport.png';
|
||||
$tabs['import']['icon'] = 'ic_b_tblimport';
|
||||
$tabs['import']['link'] = 'tbl_import.php';
|
||||
$tabs['import']['text'] = __('Import');
|
||||
|
||||
$tabs['operation']['icon'] = 'b_tblops.png';
|
||||
$tabs['operation']['icon'] = 'ic_b_tblops';
|
||||
$tabs['operation']['link'] = 'tbl_operations.php';
|
||||
$tabs['operation']['text'] = __('Operations');
|
||||
}
|
||||
if(PMA_Tracker::isActive()) {
|
||||
$tabs['tracking']['icon'] = 'eye.png';
|
||||
$tabs['tracking']['icon'] = 'ic_eye';
|
||||
$tabs['tracking']['text'] = __('Tracking');
|
||||
$tabs['tracking']['link'] = 'tbl_tracking.php';
|
||||
}
|
||||
@ -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'] = 'b_tblops.png';
|
||||
$tabs['operation']['icon'] = 'ic_b_tblops';
|
||||
$tabs['operation']['link'] = 'view_operations.php';
|
||||
$tabs['operation']['text'] = __('Operations');
|
||||
}
|
||||
|
||||
@ -8437,7 +8437,7 @@ class TCPDF {
|
||||
//Pages root
|
||||
$out = $this->_getobj(1)."\n";
|
||||
$out .= '<< /Type /Pages /Kids [';
|
||||
foreach($this->page_obj_id as $page_obj) {
|
||||
foreach ($this->page_obj_id as $page_obj) {
|
||||
$out .= ' '.$page_obj.' 0 R';
|
||||
}
|
||||
$out .= ' ] /Count '.$nb.' >>';
|
||||
@ -8902,7 +8902,7 @@ class TCPDF {
|
||||
}
|
||||
if (isset($pl['opt']['mk']['bc']) AND (is_array($pl['opt']['mk']['bc']))) {
|
||||
$annots .= ' /BC [';
|
||||
foreach($pl['opt']['mk']['bc'] AS $col) {
|
||||
foreach ($pl['opt']['mk']['bc'] AS $col) {
|
||||
$col = intval($col);
|
||||
$color = $col <= 0 ? 0 : ($col >= 255 ? 1 : $col / 255);
|
||||
$annots .= sprintf(' %.2F', $color);
|
||||
@ -8911,7 +8911,7 @@ class TCPDF {
|
||||
}
|
||||
if (isset($pl['opt']['mk']['bg']) AND (is_array($pl['opt']['mk']['bg']))) {
|
||||
$annots .= ' /BG [';
|
||||
foreach($pl['opt']['mk']['bg'] AS $col) {
|
||||
foreach ($pl['opt']['mk']['bg'] AS $col) {
|
||||
$col = intval($col);
|
||||
$color = $col <= 0 ? 0 : ($col >= 255 ? 1 : $col / 255);
|
||||
$annots .= sprintf(' %.2F', $color);
|
||||
@ -8988,7 +8988,7 @@ class TCPDF {
|
||||
if (is_array($pl['opt']['ff'])) {
|
||||
// array of bit settings
|
||||
$flag = 0;
|
||||
foreach($pl['opt']['ff'] as $val) {
|
||||
foreach ($pl['opt']['ff'] as $val) {
|
||||
$flag += 1 << ($val - 1);
|
||||
}
|
||||
} else {
|
||||
@ -9052,7 +9052,7 @@ class TCPDF {
|
||||
}
|
||||
if (isset($pl['opt']['opt']) AND (is_array($pl['opt']['opt'])) AND !empty($pl['opt']['opt'])) {
|
||||
$annots .= ' /Opt [';
|
||||
foreach($pl['opt']['opt'] AS $copt) {
|
||||
foreach ($pl['opt']['opt'] AS $copt) {
|
||||
if (is_array($copt)) {
|
||||
$annots .= ' ['.$this->_textstring($copt[0], $annot_obj_id).' '.$this->_textstring($copt[1], $annot_obj_id).']';
|
||||
} else {
|
||||
@ -9066,7 +9066,7 @@ class TCPDF {
|
||||
}
|
||||
if (isset($pl['opt']['i']) AND (is_array($pl['opt']['i'])) AND !empty($pl['opt']['i'])) {
|
||||
$annots .= ' /I [';
|
||||
foreach($pl['opt']['i'] AS $copt) {
|
||||
foreach ($pl['opt']['i'] AS $copt) {
|
||||
$annots .= intval($copt).' ';
|
||||
}
|
||||
$annots .= ']';
|
||||
@ -10595,7 +10595,7 @@ class TCPDF {
|
||||
$objrefs .= $this->sig_obj_id.' 0 R';
|
||||
}
|
||||
if (!empty($this->form_obj_id)) {
|
||||
foreach($this->form_obj_id as $objid) {
|
||||
foreach ($this->form_obj_id as $objid) {
|
||||
$objrefs .= ' '.$objid.' 0 R';
|
||||
}
|
||||
}
|
||||
@ -17875,7 +17875,7 @@ class TCPDF {
|
||||
protected function getTagStyleFromCSS($dom, $key, $css) {
|
||||
$tagstyle = ''; // style to be returned
|
||||
// get all styles that apply
|
||||
foreach($css as $selector => $style) {
|
||||
foreach ($css as $selector => $style) {
|
||||
// remove specificity
|
||||
$selector = substr($selector, strpos($selector, ' '));
|
||||
// check if this selector apply to current tag
|
||||
@ -23789,7 +23789,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
$patterns_array = preg_split('/[\s]+/', $data);
|
||||
// create new language array of patterns
|
||||
$patterns = array();
|
||||
foreach($patterns_array as $val) {
|
||||
foreach ($patterns_array as $val) {
|
||||
if (!$this->empty_string($val)) {
|
||||
$val = trim($val);
|
||||
$val = str_replace('\'', '\\\'', $val);
|
||||
@ -25077,12 +25077,12 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
$gradient['coords'][4] /= $w;
|
||||
}
|
||||
} elseif ($gradient['mode'] == 'percentage') {
|
||||
foreach($gradient['coords'] as $key => $val) {
|
||||
foreach ($gradient['coords'] as $key => $val) {
|
||||
$gradient['coords'][$key] = (intval($val) / 100);
|
||||
}
|
||||
}
|
||||
// fix values
|
||||
foreach($gradient['coords'] as $key => $val) {
|
||||
foreach ($gradient['coords'] as $key => $val) {
|
||||
if ($val < 0) {
|
||||
$gradient['coords'][$key] = 0;
|
||||
} elseif ($val > 1) {
|
||||
|
||||
@ -20,7 +20,7 @@ function PMA_transformation_application_octetstream__download(&$buffer, $options
|
||||
$cn = $options[0]; // filename
|
||||
} else {
|
||||
if (isset($options[1]) && !empty($options[1])) {
|
||||
foreach($fields_meta as $key => $val) {
|
||||
foreach ($fields_meta as $key => $val) {
|
||||
if ($val->name == $options[1]) {
|
||||
$pos = $key;
|
||||
break;
|
||||
|
||||
@ -20,12 +20,12 @@ if (! isset($forms[$form_param])) {
|
||||
$form_param = array_shift($forms_keys);
|
||||
}
|
||||
$tabs_icons = array(
|
||||
'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');
|
||||
'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');
|
||||
echo '<ul id="topmenu2">';
|
||||
echo PMA_generate_html_tab(array(
|
||||
'link' => 'prefs_manage.php',
|
||||
|
||||
@ -113,9 +113,6 @@ require_once './libraries/header_http.inc.php';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var image_minus = '<?php echo $GLOBALS['pmaThemeImage']; ?>b_minus.png';
|
||||
var image_plus = '<?php echo $GLOBALS['pmaThemeImage']; ?>b_plus.png';
|
||||
|
||||
// INIT PMA_setFrameSize
|
||||
var onloadCnt = 0;
|
||||
var onLoadHandler = window.onload;
|
||||
@ -230,9 +227,9 @@ 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" id="el%dImg" src="' . $pmaThemeImage . 'b_plus.png"'
|
||||
$img_plus = '<img class="icon ic_b_plus" id="el%dImg" src="themes/dot.gif"'
|
||||
.' alt="+" />';
|
||||
$img_minus = '<img class="icon" id="el%dImg" src="' . $pmaThemeImage . 'b_minus.png"'
|
||||
$img_minus = '<img class="icon ic_b_minus" id="el%dImg" src="themes/dot.gif"'
|
||||
.' alt="-" />';
|
||||
|
||||
$href_left = '<a onclick="if (toggle(\'%d\')) return false;"'
|
||||
@ -303,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" src="' . $GLOBALS['pmaThemeImage'] . 'b_snewtbl.png" id="icon_newtable" alt="' . _pgettext('short form', 'Create table') . '" />'
|
||||
.'<img class="icon ic_b_snewtbl" src="themes/dot.gif" id="icon_newtable" alt="' . _pgettext('short form', 'Create table') . '" />'
|
||||
. _pgettext('short form', 'Create table') . '</a></li></ul>';
|
||||
}
|
||||
} elseif ($GLOBALS['cfg']['LeftFrameLight']) {
|
||||
@ -597,11 +594,11 @@ function PMA_displayTableList($tables, $visible = false,
|
||||
.'&table=' . urlencode($table['Name'])
|
||||
.'&goto=' . $GLOBALS['cfg']['LeftDefaultTabTable']
|
||||
. '" >'
|
||||
.'<img class="icon"';
|
||||
.'<img src="themes/dot.gif"';
|
||||
if ('VIEW' === strtoupper($table['Comment'])) {
|
||||
echo ' src="' . $GLOBALS['pmaThemeImage'] . 's_views.png"';
|
||||
echo ' class="icon ic_s_views"';
|
||||
} else {
|
||||
echo ' src="' . $GLOBALS['pmaThemeImage'] . 'b_sbrowse.png"';
|
||||
echo ' class="icon ic_b_sbrowse"';
|
||||
}
|
||||
echo ' id="icon_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
|
||||
.' alt="' . htmlspecialchars($link_title) . '" /></a>' . "\n";
|
||||
|
||||
@ -71,12 +71,12 @@ function display(init,final) {
|
||||
else {
|
||||
str +='<img src="pmd/images/and_icon.png" onclick="and_or('+i+')" title="AND"/></td>';
|
||||
}
|
||||
str +='<td style="padding-left: 5px;" align="right"><img src="./themes/original/img/b_sbrowse.png" 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"><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();
|
||||
if (history_array[i].get_type() == "GroupBy" || history_array[i].get_type() == "OrderBy") {
|
||||
str += '</td><td align="center"><img src="themes/original/img/b_info.png" 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 src="themes/original/img/b_drop.png" title="Delete"></td></tr></thead>';
|
||||
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>';
|
||||
}
|
||||
else {
|
||||
str += '</td><td align="center"><img src="themes/original/img/b_info.png" 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 src="themes/original/img/b_edit.png" 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"><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>';
|
||||
}
|
||||
i++;
|
||||
if(i >= history_array.length) {
|
||||
|
||||
1068
po/be@latin.po
1068
po/be@latin.po
File diff suppressed because it is too large
Load Diff
1206
po/en_GB.po
1206
po/en_GB.po
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user