Coding standards

This commit is contained in:
Loïc Chapeaux
2002-05-16 21:58:47 +00:00
parent 4b05caa50a
commit bbf33f8cd9
3 changed files with 39 additions and 36 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2002-05-15 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* db_details_structure.php3; Documentation.html: coding standards.
2002-05-14 Marc Delisle <lem9@users.sourceforge.net> 2002-05-14 Marc Delisle <lem9@users.sourceforge.net>
* pdf_schema.php3, db_details_structure.php3, lang/*, fpdf/*, * pdf_schema.php3, db_details_structure.php3, lang/*, fpdf/*,
Documentation.html: new feature: pdf schema output, Documentation.html: new feature: pdf schema output,

View File

@@ -592,16 +592,16 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
</li> </li>
<li> <li>
display in an optional tooltip the &quot;display field&quot; display in an optional tooltip the &quot;display field&quot;
when browsing the master table, if when browsing the master table, if you move the mouse to a column
you move the mouse to a column containing a foreign key; containing a foreign key;
</li> </li>
<li> <li>
display links on the table properties page, to check referential display links on the table properties page, to check referential
integrity (display missing foreign keys) for each described key; integrity (display missing foreign keys) for each described key;
</li> </li>
<li> <li>
in query-by-example, create automatic joints (see an example in query-by-example, create automatic joints (see an example in
in the FAQ, section &quot;Using phpMyAdmin&quot;); the FAQ, section &quot;Using phpMyAdmin&quot;);
</li> </li>
<li> <li>
enable you to get a PDF schema of your database. enable you to get a PDF schema of your database.
@@ -661,8 +661,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
output. This configuration variable will hold the name of this special output. This configuration variable will hold the name of this special
table. table.
<br /><br /> <br /><br />
This feature is supported under PHP4, and you must be using also This feature is supported under PHP4, and you must be using also the
the 'relation' feature. 'relation' feature.
<br /><br /> <br /><br />
To use this functionality you have to: To use this functionality you have to:
<ul> <ul>
@@ -673,8 +673,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CREATE TABLE `pdf_table_position` (<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CREATE TABLE `pdf_table_position` (<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`table_name` varchar(50) NOT NULL default '',<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`table_name` varchar(50) NOT NULL default '',<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`x` float unsigned NOT NULL default '0',<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`x` float unsigned NOT NULL default '0',<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`y` float unsigned NOT NULL default '0'<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`y` float unsigned NOT NULL default '0',<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PRIMARY KEY (`table_name`)<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PRIMARY KEY (`table_name`)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;) TYPE=MyISAM COMMENT='Table positions for PDF schema';<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;) TYPE=MyISAM COMMENT='Table positions for PDF schema';<br />
</tt> </tt>
</li> </li>
@@ -683,11 +683,12 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
<tt>$cfg['Servers'][$i]['pdf_table_position']</tt> <tt>$cfg['Servers'][$i]['pdf_table_position']</tt>
</li> </li>
<li> <li>
then manually fill this table with information about then manually fill this table with information about the table
the table positions on the PDF schema. positions on the PDF schema.
</li> </li>
</ul><br /> </ul><br />
See also this <a class="navigation" href="#faqpdf">usage tip.</a><br /><br /> See also this <a class="navigation" href="#faqpdf">usage tip.</a>
<br /><br />
</dd> </dd>
<dt><b>$cfg['ServerDefault']</b> integer</dt> <dt><b>$cfg['ServerDefault']</b> integer</dt>
@@ -1672,6 +1673,7 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
<li>Click &quot;Submit query&quot;</li> <li>Click &quot;Submit query&quot;</li>
</ul> </ul>
<br /> <br />
<a name="faqpdf"></a> <a name="faqpdf"></a>
<p> <p>
<b>How can I produce a PDF schema of my database?</b> <b>How can I produce a PDF schema of my database?</b>
@@ -1679,20 +1681,19 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
First you have to fill the 'relation' and 'pdf_table_position' First you have to fill the 'relation' and 'pdf_table_position'
configuration variables. configuration variables.
<br /><br /> <br /><br />
Then, think about your schema layout: which tables will go on which Then, think about your schema layout: which tables will go on which pages.
pages. You have to fill in the 'relation' table the page number for You have to fill in the 'relation' table the page number for each
each master-foreign link. master-foreign link.
<br /><br /> <br /><br />
Then manually fill the pdf_table_position table with the coordinates, Then manually fill the pdf_table_position table with the coordinates,
x being the width and y the height, and (0,0) at the upper left corner. x being the width and y the height, and (0,0) at the upper left corner.
For example, x=100 and y=200 means that the table will be at 200 mm For example, x=100 and y=200 means that the table will be at 200 mm down
down and 100 mm right from the upper left corner. and 100 mm right from the upper left corner.
<br /><br /> <br /><br />
To produce the output, click on your database name, then choose 'Structure' To produce the output, click on your database name, then choose 'Structure'
and 'Display PDF schema', and enter the page number. and 'Display PDF schema', and enter the page number.
</p> </p>
<a name="faqproject"></a> <a name="faqproject"></a>
<h3>[phpMyAdmin project]</h3> <h3>[phpMyAdmin project]</h3>
<p> <p>

View File

@@ -436,36 +436,35 @@ echo ' ' . '&nbsp;<input type="submit" value="' . $strGo . '" />' . "\n";
</li> </li>
<?php <?php
// is this OK to check for 'class' support? // is this OK to check for 'class' support?
if ( PMA_PHP_INT_VERSION >= 40000 if (PMA_PHP_INT_VERSION >= 40000
&& (!empty($cfg['Server']['pdf_table_position']))) { && (!empty($cfg['Server']['pdf_table_position']))) {
?> ?>
<!-- PDF schema --> <!-- PDF schema -->
<li> <li>
<form method="post" action="pdf_schema.php3"> <form method="post" action="pdf_schema.php3">
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" /> <input type="hidden" name="db" value="<?php echo $db; ?>" />
<?php <?php
echo ' ' . $strDisplayPDF . '&nbsp;:<br />' . "\n"; echo ' ' . $strDisplayPDF . '&nbsp;:<br />' . "\n";
echo ' ' . $strPageNumber . '&nbsp;' . "\n"; echo ' ' . $strPageNumber . '&nbsp;' . "\n";
echo ' ' . '<input type="text" name="pdf_page_number" size="3" class="textfield" value="1" /> <br />' . "\n"; echo ' ' . '<input type="text" name="pdf_page_number" size="3" class="textfield" value="1" /><br />' . "\n";
echo ' ' . '<input type="checkbox" name="show_grid" />' . "\n"; echo ' ' . '<input type="checkbox" name="show_grid" />' . "\n";
echo ' ' . $strShowGrid . '&nbsp;<br />' . "\n"; echo ' ' . $strShowGrid . '&nbsp;<br />' . "\n";
echo ' ' . '<input type="checkbox" name="show_color" checked="checked" />' . "\n"; echo ' ' . '<input type="checkbox" name="show_color" checked="checked" />' . "\n";
echo ' ' . $strShowColor . '&nbsp;<br />' . "\n"; echo ' ' . $strShowColor . '&nbsp;<br />' . "\n";
echo ' ' . '<input type="checkbox" name="show_table_dimension" />' . "\n"; echo ' ' . '<input type="checkbox" name="show_table_dimension" />' . "\n";
echo ' ' . $strShowTableDimension . '&nbsp;' . "\n"; echo ' ' . $strShowTableDimension . '&nbsp;' . "\n";
echo ' ' . '&nbsp;<input type="submit" value="' . $strGo . '" />' . "\n"; echo ' ' . '&nbsp;<input type="submit" value="' . $strGo . '" />' . "\n";
?> ?>
</form> </form>
</li> </li>
<?php <?php
} } // end if
echo "\n" . '</ul>';
echo '</ul>';
/** /**
* Displays the footer * Displays the footer