Merge branch 'QA_4_9' into QA_5_0
- Fixed css img urls for designer Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
commit
027f39057a
@ -34,33 +34,26 @@ $designerCommon = $containerBuilder->get('designer_common');
|
||||
|
||||
if (isset($_POST['dialog'])) {
|
||||
if ($_POST['dialog'] == 'edit') {
|
||||
$html = $databaseDesigner->getHtmlForEditOrDeletePages($db, 'editPage');
|
||||
$html = $databaseDesigner->getHtmlForEditOrDeletePages($_POST['db'], 'editPage');
|
||||
} elseif ($_POST['dialog'] == 'delete') {
|
||||
$html = $databaseDesigner->getHtmlForEditOrDeletePages($db, 'deletePage');
|
||||
$html = $databaseDesigner->getHtmlForEditOrDeletePages($_POST['db'], 'deletePage');
|
||||
} elseif ($_POST['dialog'] == 'save_as') {
|
||||
$html = $databaseDesigner->getHtmlForPageSaveAs($db);
|
||||
$html = $databaseDesigner->getHtmlForPageSaveAs($_POST['db']);
|
||||
} elseif ($_POST['dialog'] == 'export') {
|
||||
$html = $databaseDesigner->getHtmlForSchemaExport(
|
||||
$db,
|
||||
$_POST['db'],
|
||||
$_POST['selected_page']
|
||||
);
|
||||
} elseif ($_POST['dialog'] == 'add_table') {
|
||||
$script_display_field = $designerCommon->getTablesInfo();
|
||||
$required = $db . '.' . $GLOBALS['table'];
|
||||
$tab_column = $designerCommon->getColumnsInfo();
|
||||
$tables_all_keys = $designerCommon->getAllKeys();
|
||||
$tables_pk_or_unique_keys = $designerCommon->getPkOrUniqueKeys();
|
||||
|
||||
$req_key = array_search($required, $GLOBALS['designer']['TABLE_NAME']);
|
||||
|
||||
$GLOBALS['designer']['TABLE_NAME'] = [$GLOBALS['designer']['TABLE_NAME'][$req_key]];
|
||||
$GLOBALS['designer_url']['TABLE_NAME_SMALL'] = [$GLOBALS['designer_url']['TABLE_NAME_SMALL'][$req_key]];
|
||||
$GLOBALS['designer']['TABLE_NAME_SMALL'] = [$GLOBALS['designer']['TABLE_NAME_SMALL'][$req_key]];
|
||||
$GLOBALS['designer_out']['TABLE_NAME_SMALL'] = [$GLOBALS['designer_out']['TABLE_NAME_SMALL'][$req_key]];
|
||||
$GLOBALS['designer']['TABLE_TYPE'] = [$GLOBALS['designer_url']['TABLE_TYPE'][$req_key]];
|
||||
$GLOBALS['designer_out']['OWNER'] = [$GLOBALS['designer_out']['OWNER'][$req_key]];
|
||||
// Pass the db and table to the getTablesInfo so we only have the table we asked for
|
||||
$script_display_field = $designerCommon->getTablesInfo($_POST['db'], $_POST['table']);
|
||||
$tab_column = $designerCommon->getColumnsInfo($script_display_field);
|
||||
$tables_all_keys = $designerCommon->getAllKeys($script_display_field);
|
||||
$tables_pk_or_unique_keys = $designerCommon->getPkOrUniqueKeys($script_display_field);
|
||||
|
||||
$html = $databaseDesigner->getDatabaseTables(
|
||||
$_POST['db'],
|
||||
$script_display_field,
|
||||
[],
|
||||
-1,
|
||||
$tab_column,
|
||||
@ -83,7 +76,7 @@ if (isset($_POST['operation'])) {
|
||||
if ($_POST['save_page'] == 'same') {
|
||||
$page = $_POST['selected_page'];
|
||||
} else { // new
|
||||
$page = $designerCommon->createNewPage($_POST['selected_value'], $db);
|
||||
$page = $designerCommon->createNewPage($_POST['selected_value'], $_POST['db']);
|
||||
$response->addJSON('id', $page);
|
||||
}
|
||||
$success = $designerCommon->saveTablePositions($page);
|
||||
@ -129,11 +122,6 @@ if (isset($_POST['operation'])) {
|
||||
require ROOT_PATH . 'libraries/db_common.inc.php';
|
||||
|
||||
$script_display_field = $designerCommon->getTablesInfo();
|
||||
$tab_column = $designerCommon->getColumnsInfo();
|
||||
$script_tables = $designerCommon->getScriptTabs();
|
||||
$tables_pk_or_unique_keys = $designerCommon->getPkOrUniqueKeys();
|
||||
$tables_all_keys = $designerCommon->getAllKeys();
|
||||
$classes_side_menu = $databaseDesigner->returnClassNamesFromMenuButtons();
|
||||
|
||||
$display_page = -1;
|
||||
$selected_page = null;
|
||||
@ -149,7 +137,30 @@ if ($display_page != -1) {
|
||||
$selected_page = $designerCommon->getPageName($display_page);
|
||||
}
|
||||
$tab_pos = $designerCommon->getTablePositions($display_page);
|
||||
$script_contr = $designerCommon->getScriptContr();
|
||||
|
||||
$fullTableNames = [];
|
||||
|
||||
foreach ($script_display_field as $designerTable) {
|
||||
$fullTableNames[] = $designerTable->getDbTableString();
|
||||
}
|
||||
|
||||
foreach ($tab_pos as $position) {
|
||||
if (! in_array($position['dbName'] . '.' . $position['tableName'], $fullTableNames)) {
|
||||
foreach ($designerCommon->getTablesInfo($position['dbName'], $position['tableName']) as $designerTable) {
|
||||
$script_display_field[] = $designerTable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$tab_column = $designerCommon->getColumnsInfo($script_display_field);
|
||||
$script_tables = $designerCommon->getScriptTabs($script_display_field);
|
||||
$tables_pk_or_unique_keys = $designerCommon->getPkOrUniqueKeys($script_display_field);
|
||||
$tables_all_keys = $designerCommon->getAllKeys($script_display_field);
|
||||
$classes_side_menu = $databaseDesigner->returnClassNamesFromMenuButtons();
|
||||
|
||||
|
||||
$script_contr = $designerCommon->getScriptContr($script_display_field);
|
||||
|
||||
$params = ['lang' => $GLOBALS['lang']];
|
||||
if (isset($_GET['db'])) {
|
||||
@ -188,6 +199,7 @@ $response->addHTML(
|
||||
$databaseDesigner->getHtmlForMain(
|
||||
$db,
|
||||
$_GET['db'],
|
||||
$script_display_field,
|
||||
$script_tables,
|
||||
$script_contr,
|
||||
$script_display_field,
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
/* global DesignerHistory, historyArray, selectField */ // js/designer/history.js
|
||||
/* global contr, db, designerTablesEnabled, displayField, hTabs, jTabs, selectedPage:writable, server */ // js/designer/init.js
|
||||
/* global DesignerPage */ // js/designer/page.js
|
||||
/* global pmaThemeImage */ // js/messages.php
|
||||
|
||||
var DesignerMove = {};
|
||||
|
||||
@ -524,11 +525,65 @@ DesignerMove.toggleFullscreen = function () {
|
||||
DesignerMove.saveValueInConfig('full_screen', valueSent);
|
||||
};
|
||||
|
||||
DesignerMove.addTableToTablesList = function (index, tableDom) {
|
||||
var db = $(tableDom).find('.small_tab_pref').attr('db');
|
||||
var table = $(tableDom).find('.small_tab_pref').attr('table_name');
|
||||
var dbEncoded = $(tableDom).find('.small_tab_pref').attr('db_url');
|
||||
var tableEncoded = $(tableDom).find('.small_tab_pref').attr('table_name_url');
|
||||
var $newTableLine = $('<tr>' +
|
||||
' <td title="' + Messages.strStructure + '"' +
|
||||
' width="1px"' +
|
||||
' class="L_butt2_1">' +
|
||||
' <img alt=""' +
|
||||
' db="' + dbEncoded + '"' +
|
||||
' table_name="' + tableEncoded + '"' +
|
||||
' class="scroll_tab_struct"' +
|
||||
' src="' + pmaThemeImage + 'designer/exec.png"/>' +
|
||||
' </td>' +
|
||||
' <td width="1px">' +
|
||||
' <input class="scroll_tab_checkbox"' +
|
||||
' title="' + Messages.strHide + '"' +
|
||||
' id="check_vis_' + dbEncoded + '.' + tableEncoded + '"' +
|
||||
' style="margin:0;"' +
|
||||
' type="checkbox"' +
|
||||
' value="' + dbEncoded + '.' + tableEncoded + '"' +
|
||||
' checked="checked"' +
|
||||
' />' +
|
||||
' </td>' +
|
||||
' <td class="designer_Tabs"' +
|
||||
' designer_url_table_name="' + dbEncoded + '.' + tableEncoded + '">' + db + '.' + table + '</td>' +
|
||||
'</tr>');
|
||||
$('#id_scroll_tab table').first().append($newTableLine);
|
||||
$($newTableLine).find('.scroll_tab_struct').click(function () {
|
||||
DesignerMove.startTabUpd(db, table);
|
||||
});
|
||||
$($newTableLine).on('click', '.designer_Tabs2,.designer_Tabs', function () {
|
||||
DesignerMove.selectTab($(this).attr('designer_url_table_name'));
|
||||
});
|
||||
$($newTableLine).find('.scroll_tab_checkbox').click(function () {
|
||||
DesignerMove.visibleTab(this,$(this).val());
|
||||
});
|
||||
var $tablesCounter = $('#tables_counter');
|
||||
$tablesCounter.text(parseInt($tablesCounter.text(), 10) + 1);
|
||||
};
|
||||
|
||||
DesignerMove.addOtherDbTables = function () {
|
||||
var buttonOptions = {};
|
||||
buttonOptions[Messages.strGo] = function () {
|
||||
var db = $('#add_table_from').val();
|
||||
var table = $('#add_table').val();
|
||||
|
||||
// Check if table already imported or not.
|
||||
var $table = $('[id="' + encodeURIComponent(db) + '.' + encodeURIComponent(table) + '"]');
|
||||
if ($table.length !== 0) {
|
||||
Functions.ajaxShowMessage(
|
||||
Functions.sprintf(Messages.strTableAlreadyExists, db + '.' + table),
|
||||
undefined,
|
||||
'error'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
$.post('db_designer.php', {
|
||||
'ajax_request' : true,
|
||||
'dialog' : 'add_table',
|
||||
@ -539,18 +594,11 @@ DesignerMove.addOtherDbTables = function () {
|
||||
var $newTableDom = $(data.message);
|
||||
$newTableDom.find('a').first().remove();
|
||||
$('#container-form').append($newTableDom);
|
||||
$('.designer_tab').on('click','.tab_field_2,.tab_field_3,.tab_field', function () {
|
||||
var params = ($(this).attr('click_field_param')).split(',');
|
||||
DesignerMove.clickField(params[3], params[0], params[1], params[2]);
|
||||
});
|
||||
$('.designer_tab').on('click', '.select_all_store_col', function () {
|
||||
var params = ($(this).attr('store_column_param')).split(',');
|
||||
DesignerMove.storeColumn(params[0], params[1], params[2]);
|
||||
});
|
||||
$('.designer_tab').on('click', '.small_tab_pref_click_opt', function () {
|
||||
var params = ($(this).attr('Click_option_param')).split(',');
|
||||
DesignerMove.clickOption(params[0], params[1], params[2]);
|
||||
});
|
||||
DesignerMove.enableTableEvents(null, $newTableDom);
|
||||
DesignerMove.addTableToTablesList(null, $newTableDom);
|
||||
var dbEncoded = $($newTableDom).find('.small_tab_pref').attr('db_url');
|
||||
var tableEncoded = $($newTableDom).find('.small_tab_pref').attr('table_name_url');
|
||||
jTabs[dbEncoded + '.' + tableEncoded] = 1;
|
||||
});
|
||||
$(this).dialog('close');
|
||||
};
|
||||
@ -559,10 +607,10 @@ DesignerMove.addOtherDbTables = function () {
|
||||
};
|
||||
|
||||
var $selectDb = $('<select id="add_table_from"></select>');
|
||||
$selectDb.append('<option value="">None</option>');
|
||||
$selectDb.append('<option value="">' + Messages.strNone + '</option>');
|
||||
|
||||
var $selectTable = $('<select id="add_table"></select>');
|
||||
$selectTable.append('<option value="">None</option>');
|
||||
$selectTable.append('<option value="">' + Messages.strNone + '</option>');
|
||||
|
||||
$.post('sql.php', {
|
||||
'ajax_request' : true,
|
||||
@ -601,7 +649,11 @@ DesignerMove.addOtherDbTables = function () {
|
||||
'server': CommonParams.get('server')
|
||||
}, function (data) {
|
||||
$selectTable.html('');
|
||||
$(data.message).find('table.table_results.data.ajax').find('td.data').each(function () {
|
||||
var rows = $(data.message).find('table.table_results.data.ajax').find('td.data');
|
||||
if (rows.length === 0) {
|
||||
$selectTable.append('<option value="">' + Messages.strNone + '</option>');
|
||||
}
|
||||
rows.each(function () {
|
||||
var val = $(this)[0].innerHTML;
|
||||
$selectTable.append('<option value="' + val + '">' + val + '</option>');
|
||||
});
|
||||
@ -635,11 +687,15 @@ DesignerMove.getUrlPos = function (forceString) {
|
||||
if (designerTablesEnabled || forceString) {
|
||||
var poststr = '';
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
var i = 1;
|
||||
for (key in jTabs) {
|
||||
poststr += argsep + 't_x[' + key + ']=' + parseInt(document.getElementById(key).style.left, 10);
|
||||
poststr += argsep + 't_y[' + key + ']=' + parseInt(document.getElementById(key).style.top, 10);
|
||||
poststr += argsep + 't_v[' + key + ']=' + (document.getElementById('id_tbody_' + key).style.display === 'none' ? 0 : 1);
|
||||
poststr += argsep + 't_h[' + key + ']=' + (document.getElementById('check_vis_' + key).checked ? 1 : 0);
|
||||
poststr += argsep + 't_x[' + i + ']=' + parseInt(document.getElementById(key).style.left, 10);
|
||||
poststr += argsep + 't_y[' + i + ']=' + parseInt(document.getElementById(key).style.top, 10);
|
||||
poststr += argsep + 't_v[' + i + ']=' + (document.getElementById('id_tbody_' + key).style.display === 'none' ? 0 : 1);
|
||||
poststr += argsep + 't_h[' + i + ']=' + (document.getElementById('check_vis_' + key).checked ? 1 : 0);
|
||||
poststr += argsep + 't_db[' + i + ']=' + $(document.getElementById(key)).attr('db_url');
|
||||
poststr += argsep + 't_tbl[' + i + ']=' + $(document.getElementById(key)).attr('table_name_url');
|
||||
i++;
|
||||
}
|
||||
return poststr;
|
||||
} else {
|
||||
@ -648,7 +704,10 @@ DesignerMove.getUrlPos = function (forceString) {
|
||||
if (document.getElementById('check_vis_' + key).checked) {
|
||||
var x = parseInt(document.getElementById(key).style.left, 10);
|
||||
var y = parseInt(document.getElementById(key).style.top, 10);
|
||||
var tbCoords = new DesignerObjects.TableCoordinate(db, key.split('.')[1], -1, x, y);
|
||||
var tbCoords = new DesignerObjects.TableCoordinate(
|
||||
$(document.getElementById(key)).attr('db_url'),
|
||||
$(document.getElementById(key)).attr('table_name_url'),
|
||||
-1, x, y);
|
||||
coords.push(tbCoords);
|
||||
}
|
||||
}
|
||||
@ -659,8 +718,8 @@ DesignerMove.getUrlPos = function (forceString) {
|
||||
DesignerMove.save2 = function (callback) {
|
||||
if (designerTablesEnabled) {
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
var poststr = argsep + 'operation=savePage' + argsep + 'save_page=same' + argsep + 'ajax_request=true';
|
||||
poststr += argsep + 'server=' + server + argsep + 'db=' + db + argsep + 'selected_page=' + selectedPage;
|
||||
var poststr = 'operation=savePage' + argsep + 'save_page=same' + argsep + 'ajax_request=true';
|
||||
poststr += argsep + 'server=' + server + argsep + 'db=' + encodeURIComponent(db) + argsep + 'selected_page=' + selectedPage;
|
||||
poststr += DesignerMove.getUrlPos();
|
||||
|
||||
var $msgbox = Functions.ajaxShowMessage(Messages.strProcessingRequest);
|
||||
@ -1105,7 +1164,7 @@ DesignerMove.loadPage = function (page) {
|
||||
if (page !== null) {
|
||||
paramPage = argsep + 'page=' + page;
|
||||
}
|
||||
$('<a href="db_designer.php?server=' + server + argsep + 'db=' + encodeURI(db) + paramPage + '"></a>')
|
||||
$('<a href="db_designer.php?server=' + server + argsep + 'db=' + encodeURIComponent(db) + paramPage + '"></a>')
|
||||
.appendTo($('#page_content'))
|
||||
.trigger('click');
|
||||
} else {
|
||||
@ -1278,7 +1337,8 @@ DesignerMove.startTableNew = function () {
|
||||
CommonActions.refreshMain('tbl_create.php');
|
||||
};
|
||||
|
||||
DesignerMove.startTabUpd = function (table) {
|
||||
DesignerMove.startTabUpd = function (db, table) {
|
||||
CommonParams.set('db', db);
|
||||
CommonParams.set('table', table);
|
||||
CommonActions.refreshMain('tbl_structure.php');
|
||||
};
|
||||
@ -1287,24 +1347,23 @@ DesignerMove.startTabUpd = function (table) {
|
||||
// max/min all tables
|
||||
DesignerMove.smallTabAll = function (idThis) {
|
||||
var icon = idThis.children[0];
|
||||
var key;
|
||||
var valueSent = '';
|
||||
|
||||
if (icon.alt === 'v') {
|
||||
for (key in jTabs) {
|
||||
if (document.getElementById('id_hide_tbody_' + key).innerHTML === 'v') {
|
||||
DesignerMove.smallTab(key, 0);
|
||||
$('.designer_tab .small_tab,.small_tab2').each(function (index, element) {
|
||||
if ($(element).text() === 'v') {
|
||||
DesignerMove.smallTab($(element).attr('table_name'), 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
icon.alt = '>';
|
||||
icon.src = icon.dataset.right;
|
||||
valueSent = 'v';
|
||||
} else {
|
||||
for (key in jTabs) {
|
||||
if (document.getElementById('id_hide_tbody_' + key).innerHTML !== 'v') {
|
||||
DesignerMove.smallTab(key, 0);
|
||||
$('.designer_tab .small_tab,.small_tab2').each(function (index, element) {
|
||||
if ($(element).text() !== 'v') {
|
||||
DesignerMove.smallTab($(element).attr('table_name'), 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
icon.alt = 'v';
|
||||
icon.src = icon.dataset.down;
|
||||
valueSent = '>';
|
||||
@ -1885,6 +1944,64 @@ DesignerMove.addObject = function () {
|
||||
$('#ab').accordion('refresh');
|
||||
};
|
||||
|
||||
DesignerMove.enablePageContentEvents = function () {
|
||||
$('#page_content').off('mousedown');
|
||||
$('#page_content').off('mouseup');
|
||||
$('#page_content').off('mousemove');
|
||||
$('#page_content').on('mousedown', function (e) {
|
||||
DesignerMove.mouseDown(e);
|
||||
});
|
||||
$('#page_content').on('mouseup', function (e) {
|
||||
DesignerMove.mouseUp(e);
|
||||
});
|
||||
$('#page_content').on('mousemove', function (e) {
|
||||
DesignerMove.mouseMove(e);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* This function enables the events on table items.
|
||||
* It helps to enable them on page loading and when a table is added on the fly.
|
||||
*/
|
||||
DesignerMove.enableTableEvents = function (index, element) {
|
||||
$(element).on('click', '.select_all_1', function () {
|
||||
DesignerMove.selectAll($(this).attr('designer_url_table_name'), $(this).attr('designer_out_owner'));
|
||||
});
|
||||
$(element).on('click', '.small_tab,.small_tab2', function () {
|
||||
DesignerMove.smallTab($(this).attr('table_name'), 1);
|
||||
});
|
||||
$(element).on('click', '.small_tab_pref_1', function () {
|
||||
DesignerMove.startTabUpd($(this).attr('db'), $(this).attr('table_name_small'));
|
||||
});
|
||||
$(element).on('click', '.select_all_store_col', function () {
|
||||
var params = ($(this).attr('store_column_param')).split(',');
|
||||
DesignerMove.storeColumn(params[0], params[1], params[2]);
|
||||
});
|
||||
$(element).on('click', '.small_tab_pref_click_opt', function () {
|
||||
var params = ($(this).attr('Click_option_param')).split(',');
|
||||
DesignerMove.clickOption(params[0], params[1], params[2]);
|
||||
});
|
||||
$(element).on('click', '.tab_field_2,.tab_field_3,.tab_field', function () {
|
||||
var params = ($(this).attr('click_field_param')).split(',');
|
||||
DesignerMove.clickField(params[3], params[0], params[1], params[2]);
|
||||
});
|
||||
|
||||
$(element).find('.tab_zag_noquery').mouseover(function () {
|
||||
DesignerMove.tableOnOver($(this).attr('table_name'),0, $(this).attr('query_set'));
|
||||
});
|
||||
$(element).find('.tab_zag_noquery').mouseout(function () {
|
||||
DesignerMove.tableOnOver($(this).attr('table_name'),1, $(this).attr('query_set'));
|
||||
});
|
||||
$(element).find('.tab_zag_query').mouseover(function () {
|
||||
DesignerMove.tableOnOver($(this).attr('table_name'),0, 1);
|
||||
});
|
||||
$(element).find('.tab_zag_query').mouseout(function () {
|
||||
DesignerMove.tableOnOver($(this).attr('table_name'),1, 1);
|
||||
});
|
||||
|
||||
DesignerMove.enablePageContentEvents();
|
||||
};
|
||||
|
||||
AJAX.registerTeardown('designer/move.js', function () {
|
||||
$('#side_menu').off('mouseenter mouseleave');
|
||||
$('#key_Show_left_menu').off('click');
|
||||
@ -2036,49 +2153,11 @@ AJAX.registerOnload('designer/move.js', function () {
|
||||
DesignerMove.noHaveConstr(this);
|
||||
return false;
|
||||
});
|
||||
$('.scroll_tab_struct').on('click', function () {
|
||||
DesignerMove.startTabUpd($(this).attr('table_name'));
|
||||
});
|
||||
$('.scroll_tab_checkbox').on('click', function () {
|
||||
DesignerMove.visibleTab(this,$(this).val());
|
||||
});
|
||||
$('#id_scroll_tab').find('tr').on('click', '.designer_Tabs2,.designer_Tabs', function () {
|
||||
DesignerMove.selectTab($(this).attr('designer_url_table_name'));
|
||||
});
|
||||
$('.designer_tab').on('click', '.select_all_1', function () {
|
||||
DesignerMove.selectAll($(this).attr('designer_url_table_name'), $(this).attr('designer_out_owner'));
|
||||
});
|
||||
$('.designer_tab').on('click', '.small_tab,.small_tab2', function () {
|
||||
DesignerMove.smallTab($(this).attr('table_name'), 1);
|
||||
});
|
||||
$('.designer_tab').on('click', '.small_tab_pref_1', function () {
|
||||
DesignerMove.startTabUpd($(this).attr('table_name_small'));
|
||||
});
|
||||
$('.tab_zag_noquery').mouseover(function () {
|
||||
DesignerMove.tableOnOver($(this).attr('table_name'),0, $(this).attr('query_set'));
|
||||
});
|
||||
$('.tab_zag_noquery').mouseout(function () {
|
||||
DesignerMove.tableOnOver($(this).attr('table_name'),1, $(this).attr('query_set'));
|
||||
});
|
||||
$('.tab_zag_query').mouseover(function () {
|
||||
DesignerMove.tableOnOver($(this).attr('table_name'),0, 1);
|
||||
});
|
||||
$('.tab_zag_query').mouseout(function () {
|
||||
DesignerMove.tableOnOver($(this).attr('table_name'),1, 1);
|
||||
});
|
||||
$('.designer_tab').on('click','.tab_field_2,.tab_field_3,.tab_field', function () {
|
||||
var params = ($(this).attr('click_field_param')).split(',');
|
||||
DesignerMove.clickField(params[3], params[0], params[1], params[2]);
|
||||
});
|
||||
$('.designer_tab').on('click', '.select_all_store_col', function () {
|
||||
var params = ($(this).attr('store_column_param')).split(',');
|
||||
DesignerMove.storeColumn(params[0], params[1], params[2]);
|
||||
});
|
||||
$('.designer_tab').on('click', '.small_tab_pref_click_opt', function () {
|
||||
var params = ($(this).attr('Click_option_param')).split(',');
|
||||
DesignerMove.clickOption(params[0], params[1], params[2]);
|
||||
});
|
||||
$('input#del_button').on('click', function () {
|
||||
|
||||
$('.designer_tab').each(DesignerMove.enableTableEvents);
|
||||
$('.designer_tab').each(DesignerMove.addTableToTablesList);
|
||||
|
||||
$('input#del_button').click(function () {
|
||||
DesignerMove.updRelation();
|
||||
});
|
||||
$('input#cancel_button').on('click', function () {
|
||||
@ -2097,13 +2176,5 @@ AJAX.registerOnload('designer/move.js', function () {
|
||||
$('input#cancel_new_rel_panel').on('click', function () {
|
||||
document.getElementById('layer_new_relation').style.display = 'none';
|
||||
});
|
||||
$('#page_content').on('mousedown', function (e) {
|
||||
DesignerMove.mouseDown(e);
|
||||
});
|
||||
$('#page_content').on('mouseup', function (e) {
|
||||
DesignerMove.mouseUp(e);
|
||||
});
|
||||
$('#page_content').on('mousemove', function (e) {
|
||||
DesignerMove.mouseMove(e);
|
||||
});
|
||||
DesignerMove.enablePageContentEvents();
|
||||
});
|
||||
|
||||
@ -762,6 +762,11 @@ $js_messages['strStrong'] = __('Strong');
|
||||
$js_messages['strU2FTimeout'] = __('Timed out waiting for security key activation.');
|
||||
$js_messages['strU2FError'] = __('Failed security key activation (%s).');
|
||||
|
||||
/* Designer */
|
||||
$js_messages['strTableAlreadyExists'] = _pgettext('The table already exists in the designer and can not be added once more.', 'Table %s already exists!');
|
||||
$js_messages['strHide'] = __('Hide');
|
||||
$js_messages['strStructure'] = __('Structure');
|
||||
|
||||
echo "var Messages = [];\n";
|
||||
foreach ($js_messages as $name => $js_message) {
|
||||
Sanitize::printJsValue("Messages." . $name . "", $js_message);
|
||||
|
||||
@ -16,6 +16,7 @@ use PhpMyAdmin\Plugins\SchemaPlugin;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Database\Designer\DesignerTable;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@ -241,24 +242,28 @@ class Designer
|
||||
/**
|
||||
* Get HTML to display tables on designer page
|
||||
*
|
||||
* @param array $tab_pos tables positions
|
||||
* @param int $display_page page number of the selected page
|
||||
* @param array $tab_column table column info
|
||||
* @param array $tables_all_keys all indices
|
||||
* @param array $tables_pk_or_unique_keys unique or primary indices
|
||||
* @param string $db The database name from the request
|
||||
* @param DeseignerTable[] $designerTables The designer tables
|
||||
* @param array $tab_pos tables positions
|
||||
* @param int $display_page page number of the selected page
|
||||
* @param array $tab_column table column info
|
||||
* @param array $tables_all_keys all indices
|
||||
* @param array $tables_pk_or_unique_keys unique or primary indices
|
||||
*
|
||||
* @return string html
|
||||
*/
|
||||
public function getDatabaseTables(
|
||||
string $db,
|
||||
array $designerTables,
|
||||
array $tab_pos,
|
||||
$display_page,
|
||||
array $tab_column,
|
||||
array $tables_all_keys,
|
||||
array $tables_pk_or_unique_keys
|
||||
) {
|
||||
$table_names = $GLOBALS['designer']['TABLE_NAME'];
|
||||
$columns_type = [];
|
||||
foreach ($table_names as $table_name) {
|
||||
foreach ($designerTables as $designerTable) {
|
||||
$table_name = $designerTable->getDbTableString();
|
||||
$limit = count($tab_column[$table_name]['COLUMN_ID']);
|
||||
for ($j = 0; $j < $limit; $j++) {
|
||||
$table_column_name = $table_name . '.' . $tab_column[$table_name]['COLUMN_NAME'][$j];
|
||||
@ -284,20 +289,14 @@ class Designer
|
||||
}
|
||||
return $this->template->render('database/designer/database_tables', [
|
||||
'db' => $GLOBALS['db'],
|
||||
'get_db' => $_GET['db'],
|
||||
'get_db' => $db,
|
||||
'has_query' => isset($_REQUEST['query']),
|
||||
'tab_pos' => $tab_pos,
|
||||
'display_page' => $display_page,
|
||||
'tab_column' => $tab_column,
|
||||
'tables_all_keys' => $tables_all_keys,
|
||||
'tables_pk_or_unique_keys' => $tables_pk_or_unique_keys,
|
||||
'table_names' => $table_names,
|
||||
'table_names_url' => $GLOBALS['designer_url']['TABLE_NAME'],
|
||||
'table_names_small' => $GLOBALS['designer']['TABLE_NAME_SMALL'],
|
||||
'table_names_small_url' => $GLOBALS['designer_url']['TABLE_NAME_SMALL'],
|
||||
'table_names_small_out' => $GLOBALS['designer_out']['TABLE_NAME_SMALL'],
|
||||
'table_types' => $GLOBALS['designer']['TABLE_TYPE'],
|
||||
'owner_out' => $GLOBALS['designer_out']['OWNER'],
|
||||
'tables' => $designerTables,
|
||||
'columns_type' => $columns_type,
|
||||
'theme' => $GLOBALS['PMA_Theme'],
|
||||
]);
|
||||
@ -307,25 +306,27 @@ class Designer
|
||||
/**
|
||||
* Returns HTML for Designer page
|
||||
*
|
||||
* @param string $db database in use
|
||||
* @param string $getDb database in url
|
||||
* @param array $scriptTables array on foreign key support for each table
|
||||
* @param array $scriptContr initialization data array
|
||||
* @param array $scriptDisplayField display fields of each table
|
||||
* @param int $displayPage page number of the selected page
|
||||
* @param boolean $hasQuery whether this is visual query builder
|
||||
* @param string $selectedPage name of the selected page
|
||||
* @param array $paramsArray array with class name for various buttons on side menu
|
||||
* @param array|null $tabPos table positions
|
||||
* @param array $tabColumn table column info
|
||||
* @param array $tablesAllKeys all indices
|
||||
* @param array $tablesPkOrUniqueKeys unique or primary indices
|
||||
* @param string $db database in use
|
||||
* @param string $getDb database in url
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
* @param array $scriptTables array on foreign key support for each table
|
||||
* @param array $scriptContr initialization data array
|
||||
* @param array $scriptDisplayField display fields of each table
|
||||
* @param int $displayPage page number of the selected page
|
||||
* @param boolean $hasQuery whether this is visual query builder
|
||||
* @param string $selectedPage name of the selected page
|
||||
* @param array $paramsArray array with class name for various buttons on side menu
|
||||
* @param array|null $tabPos table positions
|
||||
* @param array $tabColumn table column info
|
||||
* @param array $tablesAllKeys all indices
|
||||
* @param array $tablesPkOrUniqueKeys unique or primary indices
|
||||
*
|
||||
* @return string html
|
||||
*/
|
||||
public function getHtmlForMain(
|
||||
string $db,
|
||||
string $getDb,
|
||||
array $designerTables,
|
||||
array $scriptTables,
|
||||
array $scriptContr,
|
||||
array $scriptDisplayField,
|
||||
@ -339,9 +340,9 @@ class Designer
|
||||
array $tablesPkOrUniqueKeys
|
||||
): string {
|
||||
$cfgRelation = $this->relation->getRelationsParam();
|
||||
$tableNames = $GLOBALS['designer']['TABLE_NAME'];
|
||||
$columnsType = [];
|
||||
foreach ($tableNames as $tableName) {
|
||||
foreach ($designerTables as $designerTable) {
|
||||
$tableName = $designerTable->getDbTableString();
|
||||
$limit = count($tabColumn[$tableName]['COLUMN_ID']);
|
||||
for ($j = 0; $j < $limit; $j++) {
|
||||
$tableColumnName = $tableName . '.' . $tabColumn[$tableName]['COLUMN_NAME'][$j];
|
||||
@ -388,14 +389,7 @@ class Designer
|
||||
'tab_column' => $tabColumn,
|
||||
'tables_all_keys' => $tablesAllKeys,
|
||||
'tables_pk_or_unique_keys' => $tablesPkOrUniqueKeys,
|
||||
'table_names' => $tableNames,
|
||||
'table_names_url' => $GLOBALS['designer_url']['TABLE_NAME'],
|
||||
'table_names_small' => $GLOBALS['designer']['TABLE_NAME_SMALL'],
|
||||
'table_names_small_url' => $GLOBALS['designer_url']['TABLE_NAME_SMALL'],
|
||||
'table_names_small_out' => $GLOBALS['designer_out']['TABLE_NAME_SMALL'],
|
||||
'table_names_out' => $GLOBALS['designer_out']['TABLE_NAME'],
|
||||
'table_types' => $GLOBALS['designer']['TABLE_TYPE'],
|
||||
'owner_out' => $GLOBALS['designer_out']['OWNER'],
|
||||
'designerTables' => $designerTables,
|
||||
'columns_type' => $columnsType,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -15,6 +15,7 @@ use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\Util;
|
||||
use function rawurlencode;
|
||||
use PhpMyAdmin\Database\Designer\DesignerTable;
|
||||
|
||||
/**
|
||||
* Common functions for Designer
|
||||
@ -46,113 +47,84 @@ class Common
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves table info and stores it in $GLOBALS['designer']
|
||||
* Retrieves table info and returns it
|
||||
*
|
||||
* @return array with table info
|
||||
* @param string $db (optional) Filter only a DB ($table is required if you use $db)
|
||||
* @param string $table (optional) Filter only a table ($db is now required)
|
||||
* @return DesignerTable[] with table info
|
||||
*/
|
||||
public function getTablesInfo()
|
||||
public function getTablesInfo(string $db = null, string $table = null): array
|
||||
{
|
||||
$retval = [];
|
||||
|
||||
$GLOBALS['designer']['TABLE_NAME'] = [];// that foreach no error
|
||||
$GLOBALS['designer']['OWNER'] = [];
|
||||
$GLOBALS['designer']['TABLE_NAME_SMALL'] = [];
|
||||
$GLOBALS['designer']['TABLE_TYPE'] = [];
|
||||
|
||||
$GLOBALS['designer_url']['TABLE_NAME'] = [];
|
||||
$GLOBALS['designer_url']['OWNER'] = [];
|
||||
$GLOBALS['designer_url']['TABLE_NAME_SMALL'] = [];
|
||||
|
||||
$GLOBALS['designer_out']['TABLE_NAME'] = [];
|
||||
$GLOBALS['designer_out']['OWNER'] = [];
|
||||
$GLOBALS['designer_out']['TABLE_NAME_SMALL'] = [];
|
||||
$tables = $this->dbi->getTablesFull($GLOBALS['db']);
|
||||
$designerTables = [];
|
||||
$db = ($db === null) ? $GLOBALS['db'] : $db;
|
||||
// seems to be needed later
|
||||
$this->dbi->selectDb($GLOBALS['db']);
|
||||
$i = 0;
|
||||
foreach ($tables as $one_table) {
|
||||
$GLOBALS['designer']['TABLE_NAME'][$i]
|
||||
= $GLOBALS['db'] . "." . $one_table['TABLE_NAME'];
|
||||
$GLOBALS['designer']['OWNER'][$i] = $GLOBALS['db'];
|
||||
$GLOBALS['designer']['TABLE_NAME_SMALL'][$i] = htmlspecialchars(
|
||||
$one_table['TABLE_NAME'],
|
||||
ENT_QUOTES
|
||||
);
|
||||
|
||||
$GLOBALS['designer_url']['TABLE_NAME'][$i]
|
||||
= $GLOBALS['db'] . "." . $one_table['TABLE_NAME'];
|
||||
$GLOBALS['designer_url']['OWNER'][$i] = $GLOBALS['db'];
|
||||
$GLOBALS['designer_url']['TABLE_NAME_SMALL'][$i]
|
||||
= $one_table['TABLE_NAME'];
|
||||
|
||||
$GLOBALS['designer_out']['TABLE_NAME'][$i] = htmlspecialchars(
|
||||
$GLOBALS['db'] . "." . $one_table['TABLE_NAME'],
|
||||
ENT_QUOTES
|
||||
);
|
||||
$GLOBALS['designer_out']['OWNER'][$i] = htmlspecialchars(
|
||||
$GLOBALS['db'],
|
||||
ENT_QUOTES
|
||||
);
|
||||
$GLOBALS['designer_out']['TABLE_NAME_SMALL'][$i] = htmlspecialchars(
|
||||
$one_table['TABLE_NAME'],
|
||||
ENT_QUOTES
|
||||
);
|
||||
|
||||
$GLOBALS['designer']['TABLE_TYPE'][$i] = mb_strtoupper(
|
||||
(string) $one_table['ENGINE']
|
||||
);
|
||||
|
||||
$DF = $this->relation->getDisplayField($GLOBALS['db'], $one_table['TABLE_NAME']);
|
||||
if ($DF != '') {
|
||||
$DF = rawurlencode((string) $DF);
|
||||
$retval[rawurlencode($GLOBALS['designer_url']["TABLE_NAME_SMALL"][$i])] = $DF;
|
||||
}
|
||||
|
||||
$i++;
|
||||
$this->dbi->selectDb($db);
|
||||
if ($db === null && $table === null) {
|
||||
$tables = $this->dbi->getTablesFull($db);
|
||||
} else {
|
||||
$tables = $this->dbi->getTablesFull($db, $table);
|
||||
}
|
||||
|
||||
return $retval;
|
||||
|
||||
foreach ($tables as $one_table) {
|
||||
$DF = $this->relation->getDisplayField($db, $one_table['TABLE_NAME']);
|
||||
$DF = ($DF !== '') ? $DF : null;
|
||||
$designerTables[] = new DesignerTable(
|
||||
$db,
|
||||
$one_table['TABLE_NAME'],
|
||||
$one_table['ENGINE'],
|
||||
$DF
|
||||
);
|
||||
}
|
||||
|
||||
return $designerTables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves table column info
|
||||
*
|
||||
* @return array table column nfo
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
* @return array table column nfo
|
||||
*/
|
||||
public function getColumnsInfo()
|
||||
public function getColumnsInfo(array $designerTables): array
|
||||
{
|
||||
$this->dbi->selectDb($GLOBALS['db']);
|
||||
$tab_column = [];
|
||||
for ($i = 0, $cnt = count($GLOBALS['designer']["TABLE_NAME"]); $i < $cnt; $i++) {
|
||||
$fields_rs = $this->dbi->query(
|
||||
//$this->dbi->selectDb($GLOBALS['db']);
|
||||
$tabColumn = [];
|
||||
|
||||
foreach ($designerTables as $designerTable) {
|
||||
$fieldsRs = $this->dbi->query(
|
||||
$this->dbi->getColumnsSql(
|
||||
$GLOBALS['db'],
|
||||
$GLOBALS['designer_url']["TABLE_NAME_SMALL"][$i],
|
||||
$designerTable->getDatabaseName(),
|
||||
$designerTable->getTableName(),
|
||||
null,
|
||||
true
|
||||
),
|
||||
DatabaseInterface::CONNECT_USER,
|
||||
DatabaseInterface::QUERY_STORE
|
||||
);
|
||||
$tbl_name_i = $GLOBALS['designer']['TABLE_NAME'][$i];
|
||||
$j = 0;
|
||||
while ($row = $this->dbi->fetchAssoc($fields_rs)) {
|
||||
$tab_column[$tbl_name_i]['COLUMN_ID'][$j] = $j;
|
||||
$tab_column[$tbl_name_i]['COLUMN_NAME'][$j] = $row['Field'];
|
||||
$tab_column[$tbl_name_i]['TYPE'][$j] = $row['Type'];
|
||||
$tab_column[$tbl_name_i]['NULLABLE'][$j] = $row['Null'];
|
||||
while ($row = $this->dbi->fetchAssoc($fieldsRs)) {
|
||||
if (! isset($tabColumn[$designerTable->getDbTableString()])) {
|
||||
$tabColumn[$designerTable->getDbTableString()] = [];
|
||||
}
|
||||
$tabColumn[$designerTable->getDbTableString()]['COLUMN_ID'][$j] = $j;
|
||||
$tabColumn[$designerTable->getDbTableString()]['COLUMN_NAME'][$j] = $row['Field'];
|
||||
$tabColumn[$designerTable->getDbTableString()]['TYPE'][$j] = $row['Type'];
|
||||
$tabColumn[$designerTable->getDbTableString()]['NULLABLE'][$j] = $row['Null'];
|
||||
$j++;
|
||||
}
|
||||
}
|
||||
return $tab_column;
|
||||
|
||||
return $tabColumn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns JavaScript code for initializing vars
|
||||
*
|
||||
* @return array JavaScript code
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
* @return array JavaScript code
|
||||
*/
|
||||
public function getScriptContr()
|
||||
public function getScriptContr(array $designerTables): array
|
||||
{
|
||||
$this->dbi->selectDb($GLOBALS['db']);
|
||||
$con = [];
|
||||
@ -199,6 +171,11 @@ class Common
|
||||
}
|
||||
}
|
||||
|
||||
$tableDbNames = [];
|
||||
foreach ($designerTables as $designerTable) {
|
||||
$tableDbNames[] = $designerTable->getDbTableString();
|
||||
}
|
||||
|
||||
$ti = 0;
|
||||
$retval = [];
|
||||
for ($i = 0, $cnt = count($con["C_NAME"]); $i < $cnt; $i++) {
|
||||
@ -206,9 +183,7 @@ class Common
|
||||
$dtn_i = $con['DTN'][$i];
|
||||
$retval[$ti] = [];
|
||||
$retval[$ti][$c_name_i] = [];
|
||||
if (in_array(rawurldecode($dtn_i), $GLOBALS['designer_url']["TABLE_NAME"])
|
||||
&& in_array(rawurldecode($con['STN'][$i]), $GLOBALS['designer_url']["TABLE_NAME"])
|
||||
) {
|
||||
if (in_array($dtn_i, $tableDbNames) && in_array($con['STN'][$i], $tableDbNames)) {
|
||||
$retval[$ti][$c_name_i][$dtn_i] = [];
|
||||
$retval[$ti][$c_name_i][$dtn_i][$con['DCN'][$i]] = [
|
||||
0 => $con['STN'][$i],
|
||||
@ -223,34 +198,36 @@ class Common
|
||||
/**
|
||||
* Returns UNIQUE and PRIMARY indices
|
||||
*
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
* @return array unique or primary indices
|
||||
*/
|
||||
public function getPkOrUniqueKeys()
|
||||
public function getPkOrUniqueKeys(array $designerTables): array
|
||||
{
|
||||
return $this->getAllKeys(true);
|
||||
return $this->getAllKeys($designerTables, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all indices
|
||||
*
|
||||
* @param bool $unique_only whether to include only unique ones
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
* @param bool $unique_only whether to include only unique ones
|
||||
*
|
||||
* @return array indices
|
||||
*/
|
||||
public function getAllKeys($unique_only = false)
|
||||
public function getAllKeys(array $designerTables, bool $unique_only = false): array
|
||||
{
|
||||
$keys = [];
|
||||
|
||||
foreach ($GLOBALS['designer']['TABLE_NAME_SMALL'] as $I => $table) {
|
||||
$schema = $GLOBALS['designer']['OWNER'][$I];
|
||||
foreach ($designerTables as $designerTable) {
|
||||
$schema = $designerTable->getDatabaseName();
|
||||
// for now, take into account only the first index segment
|
||||
foreach (Index::getFromTable($table, $schema) as $index) {
|
||||
foreach (Index::getFromTable($designerTable->getTableName(), $schema) as $index) {
|
||||
if ($unique_only && ! $index->isUnique()) {
|
||||
continue;
|
||||
}
|
||||
$columns = $index->getColumns();
|
||||
foreach ($columns as $column_name => $dummy) {
|
||||
$keys[$schema . '.' . $table . '.' . $column_name] = 1;
|
||||
$keys[$schema . '.' . $designerTable->getTableName() . '.' . $column_name] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -258,25 +235,24 @@ class Common
|
||||
}
|
||||
|
||||
/**
|
||||
* Return script to create j_tab and h_tab arrays
|
||||
* Return j_tab and h_tab arrays
|
||||
*
|
||||
* @param DesignerTable[] $designerTables The designer tables
|
||||
* @return array
|
||||
*/
|
||||
public function getScriptTabs()
|
||||
public function getScriptTabs(array $designerTables): array
|
||||
{
|
||||
$retval = [
|
||||
'j_tabs' => [],
|
||||
'h_tabs' => [],
|
||||
];
|
||||
|
||||
for ($i = 0, $cnt = count($GLOBALS['designer']['TABLE_NAME']); $i < $cnt; $i++) {
|
||||
$j = 0;
|
||||
if (Util::isForeignKeySupported($GLOBALS['designer']['TABLE_TYPE'][$i])) {
|
||||
$j = 1;
|
||||
}
|
||||
$retval['j_tabs'][rawurlencode($GLOBALS['designer_url']['TABLE_NAME'][$i])] = $j;
|
||||
$retval['h_tabs'][rawurlencode($GLOBALS['designer_url']['TABLE_NAME'][$i])] = 1;
|
||||
foreach ($designerTables as $designerTable) {
|
||||
$key = rawurlencode($designerTable->getDbTableString());
|
||||
$retval['j_tabs'][$key] = $designerTable->supportsForeignkeys() ? 1 : 0;
|
||||
$retval['h_tabs'][$key] = 1;
|
||||
}
|
||||
|
||||
return $retval;
|
||||
}
|
||||
|
||||
@ -296,6 +272,7 @@ class Common
|
||||
|
||||
$query = "
|
||||
SELECT CONCAT_WS('.', `db_name`, `table_name`) AS `name`,
|
||||
`db_name` as `dbName`, `table_name` as `tableName`,
|
||||
`x` AS `X`,
|
||||
`y` AS `Y`,
|
||||
1 AS `V`,
|
||||
@ -483,6 +460,10 @@ class Common
|
||||
*/
|
||||
public function saveTablePositions($pg)
|
||||
{
|
||||
$pageId = $this->dbi->escapeString($pg);
|
||||
|
||||
$db = $this->dbi->escapeString($_POST['db']);
|
||||
|
||||
$cfgRelation = $this->relation->getRelationsParam();
|
||||
if (! $cfgRelation['pdfwork']) {
|
||||
return false;
|
||||
@ -493,10 +474,7 @@ class Common
|
||||
. "." . Util::backquote(
|
||||
$GLOBALS['cfgRelation']['table_coords']
|
||||
)
|
||||
. " WHERE `db_name` = '" . $this->dbi->escapeString($_REQUEST['db'])
|
||||
. "'"
|
||||
. " AND `pdf_page_number` = '" . $this->dbi->escapeString($pg)
|
||||
. "'";
|
||||
. " WHERE `pdf_page_number` = '" . $pageId . "'";
|
||||
|
||||
$res = $this->relation->queryAsControlUser(
|
||||
$query,
|
||||
@ -508,8 +486,9 @@ class Common
|
||||
return (bool) $res;
|
||||
}
|
||||
|
||||
foreach ($_REQUEST['t_h'] as $key => $value) {
|
||||
list($DB, $TAB) = explode(".", $key);
|
||||
foreach ($_POST['t_h'] as $key => $value) {
|
||||
$DB = $_POST['t_db'][$key];
|
||||
$TAB = $_POST['t_tbl'][$key];
|
||||
if (! $value) {
|
||||
continue;
|
||||
}
|
||||
@ -521,9 +500,9 @@ class Common
|
||||
. " VALUES ("
|
||||
. "'" . $this->dbi->escapeString($DB) . "', "
|
||||
. "'" . $this->dbi->escapeString($TAB) . "', "
|
||||
. "'" . $this->dbi->escapeString($pg) . "', "
|
||||
. "'" . $this->dbi->escapeString($_REQUEST['t_x'][$key]) . "', "
|
||||
. "'" . $this->dbi->escapeString($_REQUEST['t_y'][$key]) . "')";
|
||||
. "'" . $pageId . "', "
|
||||
. "'" . $this->dbi->escapeString($_POST['t_x'][$key]) . "', "
|
||||
. "'" . $this->dbi->escapeString($_POST['t_y'][$key]) . "')";
|
||||
|
||||
$res = $this->relation->queryAsControlUser(
|
||||
$query,
|
||||
@ -830,7 +809,7 @@ class Common
|
||||
. Util::backquote($cfgDesigner['db'])
|
||||
. "." . Util::backquote($cfgDesigner['table'])
|
||||
. " (username, settings_data)"
|
||||
. " VALUES('" . $GLOBALS['dbi']->escapeString($cfgDesigner['user'])
|
||||
. " VALUES('" . $this->dbi->escapeString($cfgDesigner['user'])
|
||||
. "', '" . json_encode($save_data) . "');";
|
||||
|
||||
$success = $this->relation->queryAsControlUser($query);
|
||||
|
||||
93
libraries/classes/Database/Designer/DesignerTable.php
Normal file
93
libraries/classes/Database/Designer/DesignerTable.php
Normal file
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Holds the PhpMyAdmin\Database\Designer\DesignerTable class
|
||||
*
|
||||
* @package PhpMyAdmin-Designer
|
||||
*/
|
||||
namespace PhpMyAdmin\Database\Designer;
|
||||
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
/**
|
||||
* Common functions for Designer
|
||||
*
|
||||
* @package PhpMyAdmin-Designer
|
||||
*/
|
||||
class DesignerTable
|
||||
{
|
||||
private $tableName;
|
||||
private $databaseName;
|
||||
private $tableEngine;
|
||||
private $displayField;
|
||||
|
||||
/**
|
||||
* Create a new DesignerTable
|
||||
*
|
||||
* @param string $databaseName The database name
|
||||
* @param string $tableName The table name
|
||||
* @param string $tableEngine The table engine
|
||||
* @param string|null $displayField The display field if available
|
||||
*/
|
||||
public function __construct(
|
||||
string $databaseName,
|
||||
string $tableName,
|
||||
string $tableEngine,
|
||||
?string $displayField
|
||||
) {
|
||||
$this->databaseName = $databaseName;
|
||||
$this->tableName = $tableName;
|
||||
$this->tableEngine = $tableEngine;
|
||||
$this->displayField = $displayField;
|
||||
}
|
||||
|
||||
/**
|
||||
* The table engine supports or not foreign keys
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function supportsForeignkeys(): bool
|
||||
{
|
||||
return Util::isForeignKeySupported($this->tableEngine);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the database name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDatabaseName(): string
|
||||
{
|
||||
return $this->databaseName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the table name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTableName(): string
|
||||
{
|
||||
return $this->tableName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the table engine
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTableEngine(): string
|
||||
{
|
||||
return $this->tableEngine;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the db and table speparated with a dot
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDbTableString(): string
|
||||
{
|
||||
return $this->databaseName . '.' . $this->tableName;
|
||||
}
|
||||
}
|
||||
@ -1219,7 +1219,7 @@ class Export
|
||||
Core::fatalError(__('Bad type!'));
|
||||
}
|
||||
|
||||
$this->dbi->selectDb($GLOBALS['db']);
|
||||
$export_plugin->exportSchema($GLOBALS['db']);
|
||||
$this->dbi->selectDb($_POST['db']);
|
||||
$export_plugin->exportSchema($_POST['db']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2117,7 +2117,8 @@ class InsertEdit
|
||||
} elseif ($trueType == 'binary' || $trueType == 'varbinary') {
|
||||
$special_chars = bin2hex($column['Default']);
|
||||
} elseif ('text' === substr($trueType, -4)) {
|
||||
$special_chars = stripcslashes((string) substr($column['Default'], 1, -1));
|
||||
$textDefault = substr($column['Default'], 1, -1);
|
||||
$special_chars = stripcslashes($textDefault !== false ? $textDefault : $column['Default']);
|
||||
} else {
|
||||
$special_chars = htmlspecialchars($column['Default']);
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ namespace PhpMyAdmin\Plugins\Schema;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
use function rawurldecode;
|
||||
|
||||
/**
|
||||
* This class is inherited by all schema classes
|
||||
@ -248,13 +249,11 @@ class ExportRelationSchema
|
||||
protected function getTablesFromRequest()
|
||||
{
|
||||
$tables = [];
|
||||
$dbLength = mb_strlen($this->db);
|
||||
foreach ($_REQUEST['t_h'] as $key => $value) {
|
||||
if ($value) {
|
||||
$tables[] = mb_substr($key, $dbLength + 1);
|
||||
if (isset($_POST['t_tbl'])) {
|
||||
foreach ($_POST['t_tbl'] as $table) {
|
||||
$tables[] = rawurldecode($table);
|
||||
}
|
||||
}
|
||||
|
||||
return $tables;
|
||||
}
|
||||
|
||||
@ -303,7 +302,7 @@ class ExportRelationSchema
|
||||
echo ' ' , $error_message , "\n";
|
||||
echo '</p>' , "\n";
|
||||
echo '<a href="db_designer.php'
|
||||
, Url::getCommon(['db' => $GLOBALS['db']])
|
||||
, Url::getCommon(['db' => $GLOBALS['db'], 'server' => $GLOBALS['server']])
|
||||
, '&page=' . htmlspecialchars($pageNumber) , '">' , __('Back') , '</a>';
|
||||
echo "\n";
|
||||
exit;
|
||||
|
||||
@ -14,6 +14,7 @@ use PhpMyAdmin\Font;
|
||||
use PhpMyAdmin\Index;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Util;
|
||||
use function rawurldecode;
|
||||
|
||||
/**
|
||||
* Table preferences/statistics
|
||||
@ -146,11 +147,15 @@ abstract class TableStats
|
||||
*/
|
||||
protected function loadCoordinates()
|
||||
{
|
||||
foreach ($_REQUEST['t_h'] as $key => $value) {
|
||||
if ($this->db . '.' . $this->tableName == $key) {
|
||||
$this->x = (double) $_REQUEST['t_x'][$key];
|
||||
$this->y = (double) $_REQUEST['t_y'][$key];
|
||||
break;
|
||||
if (isset($_POST['t_h'])) {
|
||||
foreach ($_POST['t_h'] as $key => $value) {
|
||||
$db = rawurldecode($_POST['t_db'][$key]);
|
||||
$tbl = rawurldecode($_POST['t_tbl'][$key]);
|
||||
if ($this->db . '.' . $this->tableName === $db . '.' . $tbl) {
|
||||
$this->x = (double) $_POST['t_x'][$key];
|
||||
$this->y = (double) $_POST['t_y'][$key];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -322,7 +322,8 @@ for ($columnNumber = 0; $columnNumber < $num_fields; $columnNumber++) {
|
||||
$columnMeta['DefaultValue'] = $columnMeta['Default'];
|
||||
|
||||
if ('text' === substr($columnMeta['Type'], -4)) {
|
||||
$columnMeta['Default'] = stripcslashes((string) substr($columnMeta['Default'], 1, -1));
|
||||
$textDefault = substr($columnMeta['Default'], 1, -1);
|
||||
$columnMeta['Default'] = stripcslashes($textDefault !== false ? $textDefault : $columnMeta['Default']);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -25,7 +25,7 @@ require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
$relation = $containerBuilder->get('relation');
|
||||
$cfgRelation = $relation->getRelationsParam();
|
||||
|
||||
if (! isset($_REQUEST['export_type'])) {
|
||||
if (! isset($_POST['export_type'])) {
|
||||
Util::checkParameters(['export_type']);
|
||||
}
|
||||
|
||||
@ -35,4 +35,4 @@ if (! isset($_REQUEST['export_type'])) {
|
||||
*/
|
||||
/** @var Export $export */
|
||||
$export = $containerBuilder->get('export');
|
||||
$export->processExportSchema($_REQUEST['export_type']);
|
||||
$export->processExportSchema($_POST['export_type']);
|
||||
|
||||
@ -1,11 +1,14 @@
|
||||
{% for t_n in table_names %}
|
||||
{% for designerTable in tables %}
|
||||
{% set i = loop.index0 %}
|
||||
{% set t_n_url = table_names_url[i] %}
|
||||
<input name="t_x[{{ t_n_url|url_encode }}]" type="hidden" id="t_x_{{ t_n_url|url_encode }}_">
|
||||
<input name="t_y[{{ t_n_url|url_encode }}]" type="hidden" id="t_y_{{ t_n_url|url_encode }}_">
|
||||
<input name="t_v[{{ t_n_url|url_encode }}]" type="hidden" id="t_v_{{ t_n_url|url_encode }}_">
|
||||
<input name="t_h[{{ t_n_url|url_encode }}]" type="hidden" id="t_h_{{ t_n_url|url_encode }}_">
|
||||
<table id="{{ t_n_url|url_encode }}"
|
||||
{% set t_n_url = designerTable.getDbTableString()|escape('url') %}
|
||||
{% set t_n = designerTable.getDbTableString() %}
|
||||
<input name="t_x[{{ t_n_url }}]" type="hidden" id="t_x_{{ t_n_url }}_" />
|
||||
<input name="t_y[{{ t_n_url }}]" type="hidden" id="t_y_{{ t_n_url }}_" />
|
||||
<input name="t_v[{{ t_n_url }}]" type="hidden" id="t_v_{{ t_n_url }}_" />
|
||||
<input name="t_h[{{ t_n_url }}]" type="hidden" id="t_h_{{ t_n_url }}_" />
|
||||
<table id="{{ t_n_url }}"
|
||||
db_url="{{ designerTable.getDatabaseName()|escape('url') }}"
|
||||
table_name_url="{{ designerTable.getTableName()|escape('url') }}"
|
||||
cellpadding="0"
|
||||
cellspacing="0"
|
||||
class="designer_tab"
|
||||
@ -20,51 +23,50 @@
|
||||
<input class="select_all_1"
|
||||
type="checkbox"
|
||||
style="margin: 0;"
|
||||
value="select_all_{{ t_n_url|url_encode }}"
|
||||
id="select_all_{{ t_n_url|url_encode }}"
|
||||
value="select_all_{{ t_n_url }}"
|
||||
id="select_all_{{ t_n_url }}"
|
||||
title="select all"
|
||||
designer_url_table_name="{{ t_n_url|url_encode }}"
|
||||
designer_out_owner="{{ owner_out[i]|raw }}">
|
||||
designer_url_table_name="{{ t_n_url }}"
|
||||
designer_out_owner="{{ designerTable.getDatabaseName() }}">
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="small_tab"
|
||||
title="{% trans 'Show/hide columns' %}"
|
||||
id="id_hide_tbody_{{ t_n_url|url_encode }}"
|
||||
table_name="{{ t_n_url|url_encode }}">
|
||||
{{ tab_pos[t_n] is not defined or tab_pos[t_n]['V'] is not empty ? 'v' : '>' }}
|
||||
</td>
|
||||
id="id_hide_tbody_{{ t_n_url }}"
|
||||
table_name="{{ t_n_url }}">{{ tab_pos[t_n] is not defined or tab_pos[t_n]['V'] is not empty ? 'v' : '>' }}</td>
|
||||
<td class="small_tab_pref small_tab_pref_1"
|
||||
table_name_small="{{ table_names_small_url[i] }}">
|
||||
db="{{ designerTable.getDatabaseName() }}"
|
||||
db_url="{{ designerTable.getDatabaseName()|escape('url') }}"
|
||||
table_name="{{ designerTable.getTableName() }}"
|
||||
table_name_url="{{ designerTable.getTableName()|escape('url') }}">
|
||||
<img src="{{ theme.getImgPath('designer/exec_small.png') }}"
|
||||
title="{% trans 'See table structure' %}">
|
||||
</td>
|
||||
<td id="id_zag_{{ t_n_url|url_encode }}"
|
||||
<td id="id_zag_{{ t_n_url }}"
|
||||
class="tab_zag nowrap tab_zag_noquery"
|
||||
table_name="{{ t_n_url|url_encode }}"
|
||||
table_name="{{ t_n_url }}"
|
||||
query_set="{{ has_query ? 1 : 0 }}">
|
||||
<span class="owner">
|
||||
{{ owner_out[i]|raw }}
|
||||
</span>
|
||||
{{ table_names_small_out[i]|raw }}
|
||||
<span class="owner">{{ designerTable.getDatabaseName() }}</span>
|
||||
{{ designerTable.getTableName()|raw }}
|
||||
</td>
|
||||
{% if has_query %}
|
||||
<td class="tab_zag tab_zag_query"
|
||||
id="id_zag_{{ t_n_url|url_encode }}_2"
|
||||
table_name="{{ t_n_url|url_encode }}">
|
||||
id="id_zag_{{ t_n_url }}_2"
|
||||
table_name="{{ t_n_url }}">
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="id_tbody_{{ t_n_url|url_encode }}"
|
||||
<tbody id="id_tbody_{{ t_n_url }}"
|
||||
{{- tab_pos[t_n] is defined and tab_pos[t_n]['V'] is empty ? ' style="display: none"' }}>
|
||||
{% set display_field = get_display_field(get_db, table_names_small[i]) %}
|
||||
{% set display_field = get_display_field(get_db, t_n) %}
|
||||
{% for j in 0..tab_column[t_n]['COLUMN_ID']|length - 1 %}
|
||||
{% set tmp_column = t_n ~ '.' ~ tab_column[t_n]['COLUMN_NAME'][j] %}
|
||||
{% set click_field_param = [
|
||||
table_names_small_url[i],
|
||||
t_n,
|
||||
tab_column[t_n]['COLUMN_NAME'][j]|url_encode
|
||||
] %}
|
||||
{% if not is_foreign_key_supported(table_types[i]) %}
|
||||
{% if not designerTable.supportsForeignkeys() %}
|
||||
{% set click_field_param = click_field_param|merge([tables_pk_or_unique_keys[tmp_column] is defined ? 1 : 0]) %}
|
||||
{% else %}
|
||||
{# if foreign keys are supported, it's not necessary that the
|
||||
@ -72,23 +74,23 @@
|
||||
{% set click_field_param = click_field_param|merge([tables_all_keys[tmp_column] is defined ? 1 : 0]) %}
|
||||
{% endif %}
|
||||
{% set click_field_param = click_field_param|merge([db]) %}
|
||||
<tr id="id_tr_{{ table_names_small_url[i] }}.{{ tab_column[t_n]['COLUMN_NAME'][j] }}" class="tab_field
|
||||
<tr id="id_tr_{{ t_n }}.{{ tab_column[t_n]['COLUMN_NAME'][j] }}" class="tab_field
|
||||
{{- display_field == tab_column[t_n]['COLUMN_NAME'][j] ? '_3' }}" click_field_param="
|
||||
{{- click_field_param|join(',') }}">
|
||||
{% if has_query %}
|
||||
<td class="select_all">
|
||||
<input class="select_all_store_col"
|
||||
value="{{ t_n_url|url_encode }}{{ tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}"
|
||||
value="{{ t_n_url }}{{ tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}"
|
||||
type="checkbox"
|
||||
id="select_{{ t_n_url|url_encode }}._{{ tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}"
|
||||
id="select_{{ t_n_url }}._{{ tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}"
|
||||
style="margin: 0;"
|
||||
title="select_{{ tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}"
|
||||
store_column_param="{{ table_names_small_out[i]|url_encode }},
|
||||
store_column_param="{{ t_n_url }},
|
||||
{{- owner_out[i] }},
|
||||
{{- tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}">
|
||||
</td>
|
||||
{% endif %}
|
||||
<td width="10px" colspan="3" id="{{ t_n_url|url_encode }}.
|
||||
<td width="10px" colspan="3" id="{{ t_n_url }}.
|
||||
{{- tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}">
|
||||
<div class="nowrap">
|
||||
{% set type = columns_type[t_n ~ '.' ~ tab_column[t_n]['COLUMN_NAME'][j]] %}
|
||||
@ -100,7 +102,7 @@
|
||||
<td class="small_tab_pref small_tab_pref_click_opt"
|
||||
click_option_param="designer_optionse,
|
||||
{{- tab_column[t_n]['COLUMN_NAME'][j]|url_encode }},
|
||||
{{- table_names_small_out[i] }}">
|
||||
{{- t_n }}">
|
||||
<img src="{{ theme.getImgPath('designer/exec_small.png') }}" title="options">
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
@ -220,41 +220,11 @@ var designerConfig = {{ designer_config|raw }};
|
||||
</a>
|
||||
</div>
|
||||
<div id="id_scroll_tab" class="scroll_tab">
|
||||
<table width="100%" style="padding-left: 3px;">
|
||||
{% for i in 0..table_names|length - 1 %}
|
||||
<tr>
|
||||
<td title="{% trans 'Structure' %}"
|
||||
width="1px"
|
||||
class="L_butt2_1">
|
||||
<img alt=""
|
||||
table_name="{{ table_names_small_url[i]|url_encode }}"
|
||||
class="scroll_tab_struct"
|
||||
src="{{ theme.getImgPath('designer/exec.png') }}">
|
||||
</td>
|
||||
<td width="1px">
|
||||
<input class="scroll_tab_checkbox"
|
||||
title="{% trans 'Hide' %}"
|
||||
id="check_vis_{{ table_names_url[i]|url_encode }}"
|
||||
style="margin:0;"
|
||||
type="checkbox"
|
||||
value="{{ table_names_url[i]|url_encode }}"
|
||||
{% if (tab_pos[table_names[i]] is defined
|
||||
and tab_pos[table_names[i]]['H'])
|
||||
or display_page == -1 -%}
|
||||
checked="checked"
|
||||
{%- endif %}>
|
||||
</td>
|
||||
<td class="designer_Tabs"
|
||||
designer_url_table_name="{{ table_names_url[i]|url_encode }}">
|
||||
{{ table_names_out[i]|raw }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<table width="100%" style="padding-left: 3px;"></table>
|
||||
</div>
|
||||
{# end id_scroll_tab #}
|
||||
<div class="center">
|
||||
{% trans 'Number of tables:' %} {{ table_names|length }}
|
||||
{% trans 'Number of tables:' %} <span id="tables_counter">0</span>
|
||||
</div>
|
||||
<div id="layer_menu_sizer">
|
||||
<div class="floatleft">
|
||||
@ -274,14 +244,8 @@ var designerConfig = {{ designer_config|raw }};
|
||||
'tab_column': tab_column,
|
||||
'tables_all_keys': tables_all_keys,
|
||||
'tables_pk_or_unique_keys': tables_pk_or_unique_keys,
|
||||
'table_names': table_names,
|
||||
'table_names_url': table_names_url,
|
||||
'table_names_small': table_names_small,
|
||||
'table_names_small_url': table_names_small_url,
|
||||
'table_names_small_out': table_names_small_out,
|
||||
'table_types': table_types,
|
||||
'owner_out': owner_out,
|
||||
'columns_type': columns_type,
|
||||
'tables': designerTables,
|
||||
'theme': theme,
|
||||
} only %}
|
||||
</form>
|
||||
|
||||
@ -66,6 +66,7 @@ class CommonTest extends TestCase
|
||||
->with(
|
||||
"
|
||||
SELECT CONCAT_WS('.', `db_name`, `table_name`) AS `name`,
|
||||
`db_name` as `dbName`, `table_name` as `tableName`,
|
||||
`x` AS `X`,
|
||||
`y` AS `Y`,
|
||||
1 AS `V`,
|
||||
|
||||
@ -41,6 +41,8 @@ class DiaRelationSchemaTest extends PmaTestCase
|
||||
$_REQUEST['t_h'] = ['information_schema.files' => 1];
|
||||
$_REQUEST['t_x'] = ['information_schema.files' => 0];
|
||||
$_REQUEST['t_y'] = ['information_schema.files' => 0];
|
||||
$_POST['t_db'] = ['information_schema'];
|
||||
$_POST['t_tbl'] = ['files'];
|
||||
|
||||
$GLOBALS['server'] = 1;
|
||||
$GLOBALS['db'] = 'information_schema';
|
||||
|
||||
@ -42,6 +42,8 @@ class EpsRelationSchemaTest extends PmaTestCase
|
||||
$_REQUEST['t_h'] = ['information_schema.files' => 1];
|
||||
$_REQUEST['t_x'] = ['information_schema.files' => 0];
|
||||
$_REQUEST['t_y'] = ['information_schema.files' => 0];
|
||||
$_POST['t_db'] = ['information_schema'];
|
||||
$_POST['t_tbl'] = ['files'];
|
||||
|
||||
$GLOBALS['server'] = 1;
|
||||
$GLOBALS['db'] = 'information_schema';
|
||||
|
||||
@ -45,6 +45,8 @@ class PdfRelationSchemaTest extends PmaTestCase
|
||||
$_REQUEST['t_h'] = ['information_schema.files' => 1];
|
||||
$_REQUEST['t_x'] = ['information_schema.files' => 0];
|
||||
$_REQUEST['t_y'] = ['information_schema.files' => 0];
|
||||
$_POST['t_db'] = ['information_schema'];
|
||||
$_POST['t_tbl'] = ['files'];
|
||||
|
||||
$GLOBALS['server'] = 1;
|
||||
$GLOBALS['db'] = 'information_schema';
|
||||
|
||||
@ -41,6 +41,8 @@ class SvgRelationSchemaTest extends PmaTestCase
|
||||
$_REQUEST['t_h'] = ['information_schema.files' => 1];
|
||||
$_REQUEST['t_x'] = ['information_schema.files' => 0];
|
||||
$_REQUEST['t_y'] = ['information_schema.files' => 0];
|
||||
$_POST['t_db'] = ['information_schema'];
|
||||
$_POST['t_tbl'] = ['files'];
|
||||
|
||||
$GLOBALS['server'] = 1;
|
||||
$GLOBALS['db'] = 'information_schema';
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
$header-img: 'theme/pmahomme/img/designer/Header.png';
|
||||
$header-linked-img: 'theme/pmahomme/img/designer/Header_Linked.png';
|
||||
$minus-img: 'theme/pmahomme/img/designer/minus.png';
|
||||
$plus-img: 'theme/pmahomme/img/designer/plus.png';
|
||||
$left-panel-button-img: 'theme/pmahomme/img/designer/left_panel_butt.png';
|
||||
$top-panel-img: 'theme/pmahomme/img/designer/top_panel.png';
|
||||
$small-tab-img: 'theme/pmahomme/img/designer/small_tab.png';
|
||||
$frams1-img: 'theme/pmahomme/img/designer/1.png';
|
||||
$frams2-img: 'theme/pmahomme/img/designer/2.png';
|
||||
$frams3-img: 'theme/pmahomme/img/designer/3.png';
|
||||
$frams4-img: 'theme/pmahomme/img/designer/4.png';
|
||||
$frams5-img: 'theme/pmahomme/img/designer/5.png';
|
||||
$frams6-img: 'theme/pmahomme/img/designer/6.png';
|
||||
$frams7-img: 'theme/pmahomme/img/designer/7.png';
|
||||
$frams8-img: 'theme/pmahomme/img/designer/8.png';
|
||||
$resize-img: 'theme/pmahomme/img/designer/resize.png';
|
||||
$header-img: '../img/designer/Header.png';
|
||||
$header-linked-img: '../img/designer/Header_Linked.png';
|
||||
$minus-img: '../img/designer/minus.png';
|
||||
$plus-img: '../img/designer/plus.png';
|
||||
$left-panel-button-img: '../img/designer/left_panel_butt.png';
|
||||
$top-panel-img: '../img/designer/top_panel.png';
|
||||
$small-tab-img: '../img/designer/small_tab.png';
|
||||
$frams1-img: '../img/designer/1.png';
|
||||
$frams2-img: '../img/designer/2.png';
|
||||
$frams3-img: '../img/designer/3.png';
|
||||
$frams4-img: '../img/designer/4.png';
|
||||
$frams5-img: '../img/designer/5.png';
|
||||
$frams6-img: '../img/designer/6.png';
|
||||
$frams7-img: '../img/designer/7.png';
|
||||
$frams8-img: '../img/designer/8.png';
|
||||
$resize-img: '../img/designer/resize.png';
|
||||
|
||||
/* Designer */
|
||||
.input_tab {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user