Fixed a bug and some errors
This commit is contained in:
@@ -11,6 +11,8 @@ $Source$
|
|||||||
|
|
||||||
2002-04-23 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-04-23 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* libraries/common.lib.php3: fixed bug #547605 using Lo<4C>c's patch.
|
* libraries/common.lib.php3: fixed bug #547605 using Lo<4C>c's patch.
|
||||||
|
* tbl_printview.php3: Fixed a small bug, some php and XHTML 1.0 errors and
|
||||||
|
beautified the generated code.
|
||||||
|
|
||||||
2002-04-22 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2002-04-22 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* lang/slovak-win1250.inc.php3: completed, thanks to Peter Svec.
|
* lang/slovak-win1250.inc.php3: completed, thanks to Peter Svec.
|
||||||
|
@@ -149,8 +149,9 @@ while (list($key, $table) = each($the_tables)) {
|
|||||||
$rel_query = 'SELECT src_column,concat(dest_table,\'->\',dest_column) as rel ';
|
$rel_query = 'SELECT src_column,concat(dest_table,\'->\',dest_column) as rel ';
|
||||||
$rel_query .= 'FROM ' . PMA_backquote($cfgServer['relation']);
|
$rel_query .= 'FROM ' . PMA_backquote($cfgServer['relation']);
|
||||||
$rel_query .= ' WHERE src_table = \'' . urldecode($table) .'\'';
|
$rel_query .= ' WHERE src_table = \'' . urldecode($table) .'\'';
|
||||||
|
|
||||||
$relations = @mysql_query($rel_query) or PMA_mysqlDie('', $rel_query, '', $err_url);
|
$relations = @mysql_query($rel_query) or PMA_mysqlDie('', $rel_query, '', $err_url);
|
||||||
|
$res_rel = array();
|
||||||
while ($relrow = @mysql_fetch_array($relations)){
|
while ($relrow = @mysql_fetch_array($relations)){
|
||||||
$col = $relrow['src_column'];
|
$col = $relrow['src_column'];
|
||||||
$res_rel[$col]=$relrow['rel'];
|
$res_rel[$col]=$relrow['rel'];
|
||||||
@@ -160,7 +161,7 @@ while (list($key, $table) = each($the_tables)) {
|
|||||||
$have_rel=TRUE;
|
$have_rel=TRUE;
|
||||||
}else{
|
}else{
|
||||||
$have_rel=FALSE;
|
$have_rel=FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
||||||
@@ -190,7 +191,7 @@ while (list($key, $table) = each($the_tables)) {
|
|||||||
if($rel_work && $have_rel==TRUE){
|
if($rel_work && $have_rel==TRUE){
|
||||||
echo '<th>'. ucfirst($strLinksTo).'</th>';
|
echo '<th>'. ucfirst($strLinksTo).'</th>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@@ -237,13 +238,16 @@ while (list($key, $table) = each($the_tables)) {
|
|||||||
$row['Default'] = htmlspecialchars($row['Default']);
|
$row['Default'] = htmlspecialchars($row['Default']);
|
||||||
}
|
}
|
||||||
$field_name = htmlspecialchars($row['Field']);
|
$field_name = htmlspecialchars($row['Field']);
|
||||||
if (isset($pk_array[$row['Field']])) {
|
|
||||||
$field_name = '<u>' . $field_name . '</u>';
|
|
||||||
}
|
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $field_name; ?> </td>
|
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php
|
||||||
|
if (isset($pk_array[$row['Field']])) {
|
||||||
|
echo '<u>' . $field_name . '</u>';
|
||||||
|
} else {
|
||||||
|
echo $field_name;
|
||||||
|
}
|
||||||
|
?> </td>
|
||||||
<td bgcolor="<?php echo $bgcolor; ?>"<?php echo $type_nowrap; ?>><?php echo $type; ?><bdo dir="ltr"></bdo></td>
|
<td bgcolor="<?php echo $bgcolor; ?>"<?php echo $type_nowrap; ?>><?php echo $type; ?><bdo dir="ltr"></bdo></td>
|
||||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $strAttribute; ?></td>
|
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $strAttribute; ?></td>
|
||||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?> </td>
|
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?> </td>
|
||||||
@@ -251,11 +255,13 @@ while (list($key, $table) = each($the_tables)) {
|
|||||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $row['Extra']; ?> </td>
|
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $row['Extra']; ?> </td>
|
||||||
<?php
|
<?php
|
||||||
if($rel_work && $have_rel==TRUE){
|
if($rel_work && $have_rel==TRUE){
|
||||||
?>
|
echo '<td bgcolor="' . $bgcolor . '" nowrap="nowrap">';
|
||||||
<td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"><?php echo $res_rel[$field_name]; ?> </td>
|
if (isset($res_rel[$field_name])) {
|
||||||
<?php
|
echo htmlspecialchars($res_rel[$field_name]);
|
||||||
|
}
|
||||||
|
echo ' </td>' . "\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
} // end while
|
} // end while
|
||||||
|
Reference in New Issue
Block a user