Translated using Weblate.
[phpmyadmin.git] / schema_edit.php
blobb0816480ba24800b9f504d3a158db71cfe78f5c0
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package PhpMyAdmin
6 */
8 /**
9 * Gets some core libraries
12 require_once './libraries/common.inc.php';
13 require_once './libraries/db_common.inc.php';
14 require './libraries/StorageEngine.class.php';
16 $active_page = 'db_operations.php';
17 require_once './libraries/db_common.inc.php';
18 $url_query .= '&amp;goto=schema_edit.php';
19 require_once './libraries/db_info.inc.php';
21 /**
22 * Includ settings for relation stuff
23 * get all variables needed for exporting relational schema
24 * in $cfgRelation
26 require_once './libraries/relation.lib.php';
27 $cfgRelation = PMA_getRelationsParam();
29 /**
30 * Now in ./libraries/relation.lib.php we check for all tables
31 * that we need, but if we don't find them we are quiet about it
32 * so people can't work without relational variables.
33 * This page is absolutely useless if you didn't set up your tables
34 * correctly, so it is a good place to see which tables we can and
35 * complain ;-)
37 if (! $cfgRelation['relwork']) {
38 echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'relation', 'config.inc.php') . '<br />' . "\n"
39 . PMA_showDocu('relation') . "\n";
40 include_once './libraries/footer.inc.php';
43 if (! $cfgRelation['displaywork']) {
44 echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'table_info', 'config.inc.php') . '<br />' . "\n"
45 . PMA_showDocu('table_info') . "\n";
46 include_once './libraries/footer.inc.php';
49 if (! isset($cfgRelation['table_coords'])) {
50 echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'table_coords', 'config.inc.php') . '<br />' . "\n"
51 . PMA_showDocu('table_coords') . "\n";
52 include_once './libraries/footer.inc.php';
54 if (! isset($cfgRelation['pdf_pages'])) {
55 echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'pdf_page', 'config.inc.php') . '<br />' . "\n"
56 . PMA_showDocu('pdf_pages') . "\n";
57 include_once './libraries/footer.inc.php';
60 if ($cfgRelation['pdfwork']) {
62 /**
63 * User object created for presenting the HTML options
64 * so, user can interact with it and perform export of relations schema
67 include_once './libraries/schema/User_Schema.class.php';
68 $user_schema = new PMA_User_Schema();
70 /**
71 * This function will process the user defined pages
72 * and tables which will be exported as Relational schema
73 * you can set the table positions on the paper via scratchboard
74 * for table positions, put the x,y co-ordinates
76 * @param string $do It tells what the Schema is supposed to do
77 * create and select a page, generate schema etc
79 if (isset($_REQUEST['do'])) {
80 $user_schema->setAction($_REQUEST['do']);
81 $user_schema->processUserChoice();
84 /**
85 * Show some possibility to select a page for the export of relation schema
86 * Lists all pages created before and can select and edit from them
89 $user_schema->selectPage();
91 /**
92 * Create a new page where relations will be drawn
95 $user_schema->showCreatePageDialog($db);
97 /**
98 * After selection of page or creating a page
99 * It will show you the list of tables
100 * A dashboard will also be shown where you can position the tables
103 $user_schema->showTableDashBoard();
105 if (isset($_REQUEST['do'])
106 && ($_REQUEST['do'] == 'edcoord'
107 || ($_REQUEST['do']== 'selectpage' && isset($user_schema->chosenPage) && $user_schema->chosenPage != 0)
108 || ($_REQUEST['do'] == 'createpage' && isset($user_schema->chosenPage) && $user_schema->chosenPage != 0))) {
111 * show Export schema generation options
113 $user_schema->displaySchemaGenerationOptions();
115 if ((isset($showwysiwyg) && $showwysiwyg == '1')) {
117 <script type="text/javascript">
118 //<![CDATA[
119 ToggleDragDrop('pdflayout');
120 //]]>
121 </script>
122 <?php
124 } // end if
125 } // end if ($cfgRelation['pdfwork'])
128 * Displays the footer
130 echo "\n";
131 require_once './libraries/footer.inc.php';