* @copyright * @license */ class PMA_Export_Relation_Schema { private $_pageTitle; // Title of the page private $_autoLayoutType; // Internal or Foreign Key Relations; protected $same_wide; public function setPageTitle($title) { $this->_pageTitle=$title; } public function setExportType($type) { $this->_pageTitle=$title; } public function setSameWidthTables($width) { $this->same_wide=$width; } public function getAllTables($db,$page_number) { global $cfgRelation; // Get All tables $tab_sql = 'SELECT table_name FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords']) . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'' . ' AND pdf_page_number = ' . $page_number; // echo $tab_sql; $tab_rs = PMA_query_as_controluser($tab_sql, null, PMA_DBI_QUERY_STORE); if (!$tab_rs || !PMA_DBI_num_rows($tab_rs) > 0) { $this->_die('',__('No tables')); } while ($curr_table = @PMA_DBI_fetch_assoc($tab_rs)) { $alltables[] = PMA_sqlAddslashes($curr_table['table_name']); } return $alltables; } public function initTable() { } /** * Displays an error message */ function _die($type = '',$error_message = '') { global $db; require_once './libraries/header.inc.php'; echo "

{$type} " . __("SCHEMA ERROR") . "

" . "\n"; if (!empty($error_message)) { $error_message = htmlspecialchars($error_message); } echo '

' . "\n"; echo ' ' . $error_message . "\n"; echo '

' . "\n"; echo '' . __('Back') . ''; echo "\n"; require_once './libraries/footer.inc.php'; } // end of the "PMA_PDF_die()" function } ?>