2 /* vim: set expandtab sw=4 ts=4 sts=4: */
9 * Gets some core libraries
11 require_once 'libraries/common.inc.php';
12 require 'libraries/StorageEngine.class.php';
15 * Validate vulnerable POST parameters
17 if (! PMA_isValid($_POST['pdf_page_number'], 'numeric')) {
18 die('Attack stopped');
22 * get all variables needed for exporting relational schema
25 $cfgRelation = PMA_getRelationsParam();
27 require_once 'libraries/transformations.lib.php';
28 require_once 'libraries/Index.class.php';
29 require_once 'libraries/schema/Export_Relation_Schema.class.php';
32 * get all the export options and verify
33 * call and include the appropriate Schema Class depending on $export_type
38 'all_tables_same_width',
50 'show_table_dimension',
53 foreach ($post_params as $one_post_param) {
54 if (isset($_POST[$one_post_param])) {
55 $GLOBALS[$one_post_param] = $_POST[$one_post_param];
59 if (! isset($export_type) ||
! preg_match('/^[a-zA-Z]+$/', $export_type)) {
62 PMA_DBI_select_db($db);
64 $path = PMA_securePath(ucfirst($export_type));
65 if (!file_exists('libraries/schema/' . $path . '_Relation_Schema.class.php')) {
66 PMA_Export_Relation_Schema
::dieSchema(
69 __('File doesn\'t exist')
72 require "libraries/schema/".$path.'_Relation_Schema.class.php';
73 $obj_schema = eval("new PMA_".$path."_Relation_Schema();");