Translated using Weblate (Estonian)
[phpmyadmin.git] / schema_export.php
blob2817c384dc00e5b6c7858a90afb3c914b8b04be0
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package PhpMyAdmin
6 */
8 /**
9 * Gets some core libraries
11 require_once 'libraries/common.inc.php';
12 require 'libraries/StorageEngine.class.php';
14 /**
15 * Validate vulnerable POST parameters
17 if (! PMA_isValid($_POST['pdf_page_number'], 'numeric')) {
18 die('Attack stopped');
21 /**
22 * get all variables needed for exporting relational schema
23 * in $cfgRelation
25 $cfgRelation = PMA_getRelationsParam();
27 require_once 'libraries/transformations.lib.php';
28 require_once 'libraries/Index.class.php';
29 require_once 'libraries/schema/User_Schema.class.php';
31 /**
32 * get all the export options and verify
33 * call and include the appropriate Schema Class depending on $export_type
34 * default is PDF
37 $post_params = array(
38 'all_tables_same_width',
39 'chpage',
40 'db',
41 'do',
42 'export_type',
43 'orientation',
44 'paper',
45 'names',
46 'pdf_page_number',
47 'show_color',
48 'show_grid',
49 'show_keys',
50 'show_table_dimension',
51 'with_doc'
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 include_once 'libraries/schema/User_Schema.class.php';
60 $user_schema = new PMA_User_Schema();
62 /**
63 * This function will process the user defined pages
64 * and tables which will be exported as Relational schema
65 * you can set the table positions on the paper via scratchboard
66 * for table positions, put the x,y co-ordinates
68 * @param string $do It tells what the Schema is supposed to do
69 * create and select a page, generate schema etc
71 if (isset($_REQUEST['do'])) {
72 $user_schema->setAction($_REQUEST['do']);
73 $user_schema->processUserChoice();