Translated using Weblate (Turkish)
[phpmyadmin.git] / schema_export.php
blobe150db190db338cd87307b9a3968fd7845e6fcd1
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Schema export handler
6 * @package PhpMyAdmin
7 */
9 /**
10 * Gets some core libraries
12 require_once 'libraries/common.inc.php';
13 require 'libraries/StorageEngine.class.php';
15 /**
16 * Validate vulnerable POST parameters
18 if (! PMA_isValid($_POST['pdf_page_number'], 'numeric')) {
19 die('Attack stopped');
22 /**
23 * get all variables needed for exporting relational schema
24 * in $cfgRelation
26 $cfgRelation = PMA_getRelationsParam();
28 require_once 'libraries/transformations.lib.php';
29 require_once 'libraries/Index.class.php';
30 require_once 'libraries/schema/User_Schema.class.php';
32 /**
33 * get all the export options and verify
34 * call and include the appropriate Schema Class depending on $export_type
35 * default is PDF
38 $post_params = array(
39 'all_tables_same_width',
40 'chpage',
41 'db',
42 'do',
43 'export_type',
44 'orientation',
45 'paper',
46 'names',
47 'pdf_page_number',
48 'show_color',
49 'show_grid',
50 'show_keys',
51 'show_table_dimension',
52 'with_doc'
54 foreach ($post_params as $one_post_param) {
55 if (isset($_POST[$one_post_param])) {
56 $GLOBALS[$one_post_param] = $_POST[$one_post_param];
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();