alert('Pages not found!');history.go(-2);"); } $pmd_table = PMA_Util::backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_Util::backquote($GLOBALS['cfgRelation']['designer_coords']); $pma_table = PMA_Util::backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_Util::backquote($cfgRelation['table_coords']); $scale_q = PMA_Util::sqlAddSlashes($scale); if ('create_export' == $mode) { $pdf_page_number = PMA_REL_createPage($newpage, $cfgRelation, $db); if ($pdf_page_number > 0) { $message = PMA_Message::success(__('Page has been created')); $mode = 'export'; } else { $message = PMA_Message::error(__('Page creation failed')); } } $pdf_page_number_q = PMA_Util::sqlAddSlashes($pdf_page_number); if ('export' == $mode) { $sql = "REPLACE INTO " . $pma_table . " (db_name, table_name, pdf_page_number, x, y)" . " SELECT db_name, table_name, " . $pdf_page_number_q . "," . " ROUND(x/" . $scale_q . ") , ROUND(y/" . $scale_q . ") y" . " FROM " . $pmd_table . " WHERE db_name = '" . PMA_Util::sqlAddSlashes($db) . "'"; PMA_queryAsControlUser($sql, true, PMA_DBI_QUERY_STORE); } if ('import' == $mode) { PMA_queryAsControlUser( 'UPDATE ' . $pma_table . ',' . $pmd_table . ' SET ' . $pmd_table . '.`x`= ' . $pma_table . '.`x` * '. $scale_q . ', ' . $pmd_table . '.`y`= ' . $pma_table . '.`y` * '. $scale_q .' WHERE ' . $pmd_table . '.`db_name`=' . $pma_table . '.`db_name` AND ' . $pmd_table . '.`table_name` = ' . $pma_table . '.`table_name` AND ' . $pmd_table . '.`db_name`=\''. PMA_Util::sqlAddSlashes($db) . '\' AND pdf_page_number = ' . $pdf_page_number_q . ';', true, PMA_DBI_QUERY_STORE ); } } $response = PMA_Response::getInstance(); $response->getFooter()->setMinimal(); ?>
display(); } ?>
'; echo '
' . __('Import/Export coordinates for PDF schema') . ''; $choices = array(); $table_info_result = PMA_queryAsControlUser( 'SELECT * FROM ' . PMA_Util::backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_Util::backquote($cfgRelation['pdf_pages']) . ' WHERE db_name = \'' . PMA_Util::sqlAddSlashes($db) . '\'' ); if (PMA_DBI_num_rows($table_info_result) > 0) { echo '

' . __('Page') . ':'; echo ''; echo '

'; $choices['import'] = __('Import from selected page'); $choices['export'] = __('Export to selected page'); } $choices['create_export'] = __('Create a page and export to it'); if (1 == count($choices)) { echo $choices['create_export']; echo ''; } else { echo PMA_Util::getRadioFields( 'mode', $choices, $checked_choice = '', $line_break = true, $escape_label = false, $class = '' ); } echo '
'; echo ''; echo ''; echo '

' . __('Export/Import to scale') . ':'; ?>