This commit is contained in:
Marc Delisle
2002-09-03 12:20:26 +00:00
parent 7bf1edfa09
commit 0cf9b5ba99
2 changed files with 47 additions and 43 deletions

View File

@@ -5,6 +5,12 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2002-09-03 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/display_tbl.lib.php3:
- fix a PHP3 problem (foreach function was called);
- XHTML fixes;
- coding standards.
2002-09-02 Marc Delisle <lem9@users.sourceforge.net> 2002-09-02 Marc Delisle <lem9@users.sourceforge.net>
* db_details_structure.php3, mult_submits.inc.php3: Patch 582904: * db_details_structure.php3, mult_submits.inc.php3: Patch 582904:
add REPAIR TABLE choice in drop-down of db view, thanks to add REPAIR TABLE choice in drop-down of db view, thanks to

View File

@@ -704,6 +704,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
return TRUE; return TRUE;
} // end of the 'PMA_displayTableHeaders()' function } // end of the 'PMA_displayTableHeaders()' function
/** /**
* Displays a link, or a button if the link's URL is too large, to * Displays a link, or a button if the link's URL is too large, to
* accomodate some browsers' limitations * accomodate some browsers' limitations
@@ -716,26 +717,33 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
*/ */
function PMA_linkOrButton($url, $message, $js_conf) function PMA_linkOrButton($url, $message, $js_conf)
{ {
if (strlen($url)<=1024) {?> if (strlen($url) <= 1024) {
<a href="<?php echo $url; ?>" $onclick_url = (empty($js_conf) ? '' : ' onclick="return confirmLink(this, \'' . $js_conf . '\')"');
<?php if (!empty($js_conf)) echo 'onclick="return confirmLink(this, \'' . $js_conf . '\')"'; ?> echo ' <a href="' . $url . '"' . $onclick_url . '>' . "\n"
><?php echo $message; ?></a><?php . ' ' . $message . '</a>' . "\n";
} else {
$edit_url_parts=parse_url($url);?>
<form action="<?php echo $edit_url_parts["path"] ?>" method="post">
<?php
$query_parts=explode("&",$edit_url_parts["query"]);
foreach($query_parts as $query_pair){
list($eachvar,$eachval)=explode("=",$query_pair)
?> <input type="hidden" name="<?php echo str_replace("amp;", "", $eachvar); ?>" value="<?php echo urldecode($eachval);
?>"><?php echo "\n";
} }
?> <input type="submit" value="<?php echo $message; ?>"> else {
$edit_url_parts = parse_url($url);
$query_parts = explode('&', $edit_url_parts['query']);
?>
<form action="<?php echo $edit_url_parts['path'] ?>" method="post">
<?php
echo "\n";
reset ($query_parts);
while (list(, $query_pair) = each ($query_parts)) {
list($eachvar, $eachval) = explode('=', $query_pair);
echo ' <input type="hidden" name="' . str_replace('amp;', '', $eachvar) . '" value="' . urldecode($eachval) . '" />' . "\n";
} // end while
?>
<input type="submit" value="<?php echo $message; ?>" />
</form> </form>
<?php <?php
} // end if echo "\n";
} // end if... else...
return TRUE;
} // end of the 'PMA_linkOrButton()' function
} // end of PMA_linkOrButton()
/** /**
* Displays the body of the results table * Displays the body of the results table
@@ -971,19 +979,14 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] if ($GLOBALS['cfg']['ModifyDeleteAtLeft']
&& ($disp_direction == 'horizontal')) { && ($disp_direction == 'horizontal')) {
if (!empty($edit_url)) { if (!empty($edit_url)) {
?> echo ' <td bgcolor="' . $bgcolor . '">' . "\n";
<td bgcolor="<?php echo $bgcolor; ?>"> PMA_linkOrButton($edit_url, $edit_str, '');
<?php PMA_linkOrButton($edit_url, $edit_str,''); ?> echo ' </td>' . "\n";
</td>
<?php
} }
if (!empty($del_url)) { if (!empty($del_url)) {
echo "\n"; echo ' <td bgcolor="' . $bgcolor . '">' . "\n";
?> PMA_linkOrButton($del_url, $del_str, (isset($js_conf) ? $js_conf : ''));
<td bgcolor="<?php echo $bgcolor; ?>"> echo ' </td>' . "\n";
<?php PMA_linkOrButton($del_url, $del_str, (isset($js_conf)? $js_conf: '')); ?>
</td>
<?php
} }
} // end if (1.3) } // end if (1.3)
echo (($disp_direction == 'horizontal') ? "\n" : ''); echo (($disp_direction == 'horizontal') ? "\n" : '');
@@ -1149,19 +1152,14 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
if ($GLOBALS['cfg']['ModifyDeleteAtRight'] if ($GLOBALS['cfg']['ModifyDeleteAtRight']
&& ($disp_direction == 'horizontal')) { && ($disp_direction == 'horizontal')) {
if (!empty($edit_url)) { if (!empty($edit_url)) {
?> echo ' <td bgcolor="' . $bgcolor . '">' . "\n";
<td bgcolor="<?php echo $bgcolor; ?>"> PMA_linkOrButton($edit_url, $edit_str, '');
<?php PMA_linkOrButton($edit_url, $edit_str, ''); ?> echo ' </td>' . "\n";
</td>
<?php
} }
if (!empty($del_url)) { if (!empty($del_url)) {
echo "\n"; echo ' <td bgcolor="' . $bgcolor . '">' . "\n";
?> PMA_linkOrButton($del_url, $del_str, (isset($js_conf) ? $js_conf : ''));
<td bgcolor="<?php echo $bgcolor; ?>"> echo ' </td>' . "\n";
<?php PMA_linkOrButton($del_url, $del_str, (isset($js_conf)? $js_conf: '')); ?>
</td>
<?php
} }
} // end if (3) } // end if (3)