User_Schema class : removed tabs + commented code + organized structure, Delete listing of schema classes in process relation schema file
This commit is contained in:
@@ -20,20 +20,24 @@ $url_query .= '&goto=export_relation_schema.php';
|
||||
require_once './libraries/db_info.inc.php';
|
||||
|
||||
/**
|
||||
* Settings for relation stuff
|
||||
* Includ settings for relation stuff
|
||||
* get all variables needed for exporting relational schema
|
||||
* in $cfgRelation
|
||||
*/
|
||||
require_once './libraries/relation.lib.php';
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
// This is to avoid "Command out of sync" errors. Before switching this to
|
||||
// a value of 0 (for MYSQLI_USE_RESULT), please check the logic
|
||||
// to free results wherever needed.
|
||||
/**
|
||||
* This is to avoid "Command out of sync" errors. Before switching this to
|
||||
* a value of 0 (for MYSQLI_USE_RESULT), please check the logic
|
||||
* to free results wherever needed.
|
||||
*/
|
||||
$query_default_option = PMA_DBI_QUERY_STORE;
|
||||
|
||||
/**
|
||||
* Now in ./libraries/relation.lib.php we check for all tables
|
||||
* that we need, but if we don't find them we are quiet about it
|
||||
* so people can work without.
|
||||
* so people can't work without relational variables.
|
||||
* This page is absolutely useless if you didn't set up your tables
|
||||
* correctly, so it is a good place to see which tables we can and
|
||||
* complain ;-)
|
||||
@@ -63,44 +67,48 @@ if (!isset($cfgRelation['pdf_pages'])) {
|
||||
|
||||
if ($cfgRelation['pdfwork']) {
|
||||
|
||||
/**
|
||||
* User Object Created for displaying the HTML options
|
||||
* so, user can play with it and perform export of relations schema
|
||||
*/
|
||||
/**
|
||||
* User object created for presenting the HTML options
|
||||
* so, user can interact with it and perform export of relations schema
|
||||
*/
|
||||
|
||||
require_once './libraries/schema/user_schema.php';
|
||||
$user_schema = new PMA_User_Schema();
|
||||
require_once './libraries/schema/User_Schema.class.php';
|
||||
$user_schema = new PMA_User_Schema();
|
||||
|
||||
/**
|
||||
* This function will process the user input
|
||||
*
|
||||
*/
|
||||
$user_schema->userInputProcess($do);
|
||||
/**
|
||||
* This function will process the user input
|
||||
*/
|
||||
|
||||
/**
|
||||
* Now first show some possibility to select a page for the export of relation schema
|
||||
*/
|
||||
$user_schema->selectPage();
|
||||
$user_schema->processUserPreferences($do);
|
||||
|
||||
/**
|
||||
* Possibility to create a new page:
|
||||
*/
|
||||
$user_schema->createPage();
|
||||
/**
|
||||
* Now first show some possibility to select a page for the export of relation schema
|
||||
*/
|
||||
|
||||
/**
|
||||
* After selection of page or creating a page
|
||||
* It will show you the list of tables
|
||||
* A dashboard will also be shown where you can position the tables
|
||||
*/
|
||||
$user_schema->showTableDashBoard();
|
||||
$user_schema->selectPage();
|
||||
|
||||
/**
|
||||
* Possibility to create a new page:
|
||||
*/
|
||||
|
||||
$user_schema->createPage();
|
||||
|
||||
/**
|
||||
* After selection of page or creating a page
|
||||
* It will show you the list of tables
|
||||
* A dashboard will also be shown where you can position the tables
|
||||
*/
|
||||
|
||||
$user_schema->showTableDashBoard();
|
||||
|
||||
if (isset($do)
|
||||
&& ($do == 'edcoord'
|
||||
|| ($do == 'selectpage' && isset($chpage))
|
||||
|| ($do == 'createpage' && isset($chpage)))) {
|
||||
/**
|
||||
* show Export schema generation options
|
||||
*/
|
||||
|| ($do == 'selectpage' && isset($chpage) && $chpage != 0)
|
||||
|| ($do == 'createpage' && isset($chpage) && $chpage != 0))) {
|
||||
|
||||
/**
|
||||
* show Export schema generation options
|
||||
*/
|
||||
$user_schema->displaySchemaGenerationOptions();
|
||||
|
||||
if ((isset($showwysiwyg) && $showwysiwyg == '1')) {
|
||||
@@ -110,8 +118,8 @@ if ($cfgRelation['pdfwork']) {
|
||||
ToggleDragDrop('pdflayout');
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
<?php
|
||||
}
|
||||
} // end if
|
||||
} // end if ($cfgRelation['pdfwork'])
|
||||
|
||||
|
@@ -1,5 +1,16 @@
|
||||
<?php
|
||||
include_once("Export_Relation_Schema.class.php");
|
||||
|
||||
class PMA_DIA extends XMLWriter
|
||||
{
|
||||
public $title;
|
||||
public $author;
|
||||
public $font;
|
||||
public $fontSize;
|
||||
|
||||
|
||||
}
|
||||
|
||||
class PMA_Dia_Relation_Schema extends PMA_Export_Relation_Schema
|
||||
{
|
||||
|
||||
|
@@ -325,7 +325,7 @@ class PMA_PDF extends TCPDF {
|
||||
$this->_out('/First ' . ($this->n + 1) . ' 0 R');
|
||||
$this->_out('/Last ' . ($this->n + $last - $i) . ' 0 R');
|
||||
$this->_out('/Count -' . $kids);
|
||||
}tur
|
||||
}
|
||||
$this->_out('>>');
|
||||
$this->_out('endobj');
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,82 +0,0 @@
|
||||
<?php
|
||||
error_reporting(E_ALL | E_WARNING);
|
||||
/**
|
||||
* Gets some core scripts
|
||||
*/
|
||||
require_once './libraries/common.inc.php';
|
||||
|
||||
/**
|
||||
* Settings for relation stuff
|
||||
*/
|
||||
require_once './libraries/relation.lib.php';
|
||||
require_once './libraries/transformations.lib.php';
|
||||
require_once './libraries/Index.class.php';
|
||||
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
/**
|
||||
* Now in ./libraries/relation.lib.php we check for all tables
|
||||
* that we need, but if we don't find them we are quiet about it
|
||||
* so people can work without.
|
||||
* This page is absolutely useless if you didn't set up your tables
|
||||
* correctly, so it is a good place to see which tables we can and
|
||||
* complain ;-)
|
||||
*/
|
||||
if (!$cfgRelation['pdfwork']) {
|
||||
echo '<font color="red">' . __('Error') . '</font><br />' . "\n";
|
||||
$url_to_goto = '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $url_query . '">';
|
||||
echo sprintf(__('The additional features for working with linked tables have been deactivated. To find out why click %shere%s.'), $url_to_goto, '</a>') . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Main logic
|
||||
*/
|
||||
try
|
||||
{
|
||||
$pdf_page_number = isset($pdf_page_number) ? $pdf_page_number : 1;
|
||||
$show_grid = (isset($show_grid) && $show_grid == 'on') ? 1 : 0;
|
||||
$show_color = (isset($show_color) && $show_color == 'on') ? 1 : 0;
|
||||
$show_table_dimension = (isset($show_table_dimension) && $show_table_dimension == 'on') ? 1 : 0;
|
||||
$all_table_same_wide = (isset($all_table_same_wide) && $all_table_same_wide == 'on') ? 1 : 0;
|
||||
$with_doc = (isset($with_doc) && $with_doc == 'on') ? 1 : 0;
|
||||
$orientation = (isset($orientation) && $orientation == 'P') ? 'P' : 'L';
|
||||
$paper = isset($paper) ? $paper : 'A4';
|
||||
$show_keys = (isset($show_keys) && $show_keys == 'on') ? 1 : 0;
|
||||
$export_type = isset($export_type) ? $export_type : 'pdf'; // default is PDF
|
||||
PMA_DBI_select_db($db);
|
||||
|
||||
switch($export_type)
|
||||
{
|
||||
case 'pdf';
|
||||
include_once("./libraries/schema/Pdf_Relation_Schema.class.php");
|
||||
$obj_schema=new PMA_Pdf_Relation_Schema($pdf_page_number, $show_table_dimension, $show_color,
|
||||
$show_grid, $all_table_same_wide, $orientation, $paper,
|
||||
$show_keys
|
||||
);
|
||||
break;
|
||||
case 'svg';
|
||||
include_once("./libraries/schema/Svg_Relation_Schema.class.php");
|
||||
$obj_schema=new PMA_Svg_Relation_Schema($pdf_page_number, $show_table_dimension, $show_color,
|
||||
$all_table_same_wide,$show_keys);
|
||||
break;
|
||||
case 'dia';
|
||||
include_once("./libraries/schema/Dia_Relation_Schema.class.php");
|
||||
$obj_schema=new diaSchema();
|
||||
break;
|
||||
case 'visio';
|
||||
include_once("./libraries/schema/Visio_Relation_Schema.class.php");
|
||||
$obj_schema=new visioSchema();
|
||||
break;
|
||||
case 'eps';
|
||||
include_once("./libraries/schema/Eps_Relation_Schema.class.php");
|
||||
$obj_schema=new epsSchema();
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
print('<pre>');
|
||||
print_r($e);
|
||||
print('</pre>');
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user