relation links in printview

This commit is contained in:
Marc Delisle
2002-04-23 17:30:20 +00:00
parent dd8420bbe1
commit 16ed8a6870
44 changed files with 90 additions and 3 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2002-04-23 Marc Delisle <lem9@users.sourceforge.net>
* tbl_printview.php3, lang/*.php3: Relation links in printview,
thanks to Mike Beck (mike.beck at ibmiller.de)
2002-04-23 Alexander M. Turek <rabus@users.sourceforge.net>
* libraries/common.lib.php3: fixed bug #547605 using Lo<4C>c's patch.

View File

@@ -354,4 +354,5 @@ $strZip = '"zipped" "
// To translate
$strCardinality = 'Cardinality';
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strZip = '"compactado com zip"';
$strBookmarkDeleted = 'The bookmark has been deleted.';
$strChangePassword = 'Change password'; //to translate
$strPmaUriError = 'The <tt>$cfgPmaAbsoluteUri</tt> directive MUST be set in your configuration file!';
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -353,4 +353,5 @@ $strYes = '
$strZip = '"zip-<2D><><EFBFBD><EFBFBD>"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -353,4 +353,5 @@ $strYes = '
$strZip = '"zip-<2D><><EFBFBD><EFBFBD>"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = 'Si';
$strZip = '"comprimit amb zip"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -350,4 +350,5 @@ $strYes = '
$strZip = '"zipped"';
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -346,4 +346,5 @@ $strWrongUser = '
$strYes = '<27><>';
$strZip = '"zipped"';
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strYes = 'Ano';
$strZip = '"zazipov<6F>no"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = 'Ano';
$strZip = '"zazipov<6F>no"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -347,4 +347,5 @@ $strYes = 'Ja';
$strZip = '"zipped"';
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -345,4 +345,5 @@ $strWrongUser = 'Verkeerde gebruikersnaam/wachtwoord. Toegang geweigerd.';
$strYes = 'Ja';
$strZip = '"Gezipt"';
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -172,6 +172,7 @@ $strLimitNumRows = 'Number of rows per page';
$strLineFeed = 'Linefeed: \\n';
$strLines = 'Lines';
$strLinesTerminatedBy = 'Lines terminated by';
$strLinksTo = 'Links to';
$strLocationTextfile = 'Location of the textfile';
$strLogin = 'Login';
$strLogout = 'Log out';

View File

@@ -348,4 +348,5 @@ $strYes = 'Jah';
$strZip = '"zipitud"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -352,4 +352,5 @@ $strYes = 'Kyll
$strZip = '"zip-pakattu"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -172,6 +172,7 @@ $strLimitNumRows = 'Nombre d\'enregistrements par page';
$strLineFeed = 'Saut de ligne : \\n';
$strLines = 'Lignes';
$strLinesTerminatedBy = 'Lignes termin<69>es par';
$strLinksTo = 'Reli<6C> <20>';
$strLocationTextfile = 'Emplacement du fichier texte';
$strLogin = 'Entrer';
$strLogout = 'Quitter';

View File

@@ -352,4 +352,5 @@ $strYes = 'Si';
$strZip = 'comprimido no formato "zipped"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -357,4 +357,5 @@ $strNoIndexPartsDefined = 'No index parts defined!';
$strPrimaryKeyHasBeenDropped = 'The primary key has been dropped';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = 'Ja';
$strZip = '"Zip komprimiert"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strYes = '
$strZip = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>zip<69>';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = '
$strZip = '"Zipped"';
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -349,5 +349,6 @@ $strYes = 'Igen';
$strZip = '"zippel t<>m<EFBFBD>r<EFBFBD>tve"';
// To translate
?>
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -347,4 +347,5 @@ $strYes = 'Ya';
$strZip = '"Dikompress dengan Zip"';
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -355,4 +355,5 @@ $strZip = '"compresso con zip"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -357,4 +357,5 @@ $strKanjiEncodConvert = '
$strXkana = '<27><><EFBFBD>ѥ<EFBFBD><D1A5>ʤ<EFBFBD><CAA4>Ѵ<EFBFBD><D1B4><EFBFBD><EFBFBD><EFBFBD>'; // convert to X208-kana
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -357,4 +357,5 @@ $strKanjiEncodConvert = '
$strXkana = '<27>S<EFBFBD>p<EFBFBD>J<EFBFBD>i<EFBFBD>֕ϊ<D695><CF8A><EFBFBD><EFBFBD><EFBFBD>'; // convert to X208-kana
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -349,4 +349,5 @@ $strYes = '
$strZip = 'zip <20><><EFBFBD><EFBFBD>';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -352,4 +352,5 @@ $strYes = 'J
$strZip = 'arhiv<69>ts ar zip';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strZip = '"zip"';
//to translate:
$strReferentialIntegrity = 'Check referential integrity:'; //to translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -347,4 +347,5 @@ $strYes = 'Ja';
$strZip = '"komprimert (zip)"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = 'Tak';
$strZip = '".zip"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -355,4 +355,5 @@ $strZip = '"Compress
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = 'Da';
$strZip = '"arhivat"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -353,4 +353,5 @@ $strYes = '
$strZip = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> "zip"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -353,4 +353,5 @@ $strYes = '
$strZip = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> "zip"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -354,4 +354,5 @@ $strYes = 'Da';
$strZip = '"zip-ovano"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -351,4 +351,5 @@ $strZip = '"zo zipovan
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -351,4 +351,5 @@ $strZip = '"zozipovan
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -346,4 +346,5 @@ $strYes = 'Si';
$strZip = '"comprimido con zip"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = 'Ja';
$strZip = '"zippad"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -354,4 +354,5 @@ $strNoIndex = 'No index defined!';
$strPrimaryKeyName = 'The name of the primary key must be... PRIMARY!';
$strPrimaryKeyWarning = '("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)';
$strReferentialIntegrity = 'Check referential integrity:'; //to translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = 'Evet';
$strZip = '"ziplenmi<6D>"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -348,4 +348,5 @@ $strYes = '
$strZip = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> "zip"';
// To translate
$strLinksTo = 'Links to'; //to translate
?>

View File

@@ -134,6 +134,35 @@ while (list($key, $table) = each($the_tables)) {
$result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url);
$fields_cnt = mysql_num_rows($result);
// check if we can use Relations (Mike Beck)
$rel_work=FALSE;
$rel_query = 'SHOW TABLES';
$tables = @mysql_query($rel_query) or PMA_mysqlDie('', $rel_query, '', $err_url);
while($ctable = @mysql_fetch_array($tables)){
if($ctable[0] == $cfgServer['relation']){
$rel_work=TRUE;
}
}
if($rel_work){
unset($res_rel);
// Find which tables are related with the current one and write it in an array
$rel_query = 'SELECT src_column,concat(dest_table,\'->\',dest_column) as rel ';
$rel_query .= 'FROM ' . PMA_backquote($cfgServer['relation']);
$rel_query .= ' WHERE src_table = \'' . urldecode($table) .'\'';
$relations = @mysql_query($rel_query) or PMA_mysqlDie('', $rel_query, '', $err_url);
while ($relrow = @mysql_fetch_array($relations)){
$col = $relrow['src_column'];
$res_rel[$col]=$relrow['rel'];
//debug echo "col: ".$col." - ". $relrow['rel']."<br>";
}
if(count($res_rel)>0){
$have_rel=TRUE;
}else{
$have_rel=FALSE;
}
}
//
/**
@@ -157,6 +186,11 @@ while (list($key, $table) = each($the_tables)) {
<th><?php echo ucfirst($strNull); ?></th>
<th><?php echo ucfirst($strDefault); ?></th>
<th><?php echo ucfirst($strExtra); ?></th>
<?php
if($rel_work && $have_rel==TRUE){
echo '<th>'. ucfirst($strLinksTo).'</th>';
}
?>
</tr>
<?php
@@ -215,6 +249,13 @@ while (list($key, $table) = each($the_tables)) {
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?>&nbsp;</td>
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php if (isset($row['Default'])) echo $row['Default']; ?>&nbsp;</td>
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $row['Extra']; ?>&nbsp;</td>
<?php
if($rel_work && $have_rel==TRUE){
?>
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $res_rel[$field_name]; ?>&nbsp;</td>
<?php
}
?>
</tr>
<?php
} // end while