require musn't be used inside conditional statements

This commit is contained in:
Loïc Chapeaux
2002-10-04 08:28:34 +00:00
parent 53df7ad4fa
commit 5dbcad6527
3 changed files with 26 additions and 29 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2002-10-03 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* tbl_select.php3, tbl_change.php3: require musn't be used inside
conditional statements.
2002-10-03 Marc Delisle <lem9@users.sourceforge.net> 2002-10-03 Marc Delisle <lem9@users.sourceforge.net>
* tbl_select.php3, tbl_change.php3, * tbl_select.php3, tbl_change.php3,
new libraries/get_foreign.lib.php3: drop-down of foreign keys new libraries/get_foreign.lib.php3: drop-down of foreign keys

View File

@@ -392,7 +392,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {
// The value column (depends on type) // The value column (depends on type)
// ---------------- // ----------------
require('./libraries/get_foreign.lib.php3'); include('./libraries/get_foreign.lib.php3');
if (isset($disp) && $disp) { if (isset($disp) && $disp) {
?> ?>

View File

@@ -138,36 +138,29 @@ if (!isset($param) || $param[0] == '') {
</select> </select>
</td> </td>
<td bgcolor="<?php echo $bgcolor; ?>"> <td bgcolor="<?php echo $bgcolor; ?>">
<?php <?php
// <markus@noga.de> // <markus@noga.de>
$field=$fields_list[$i]; $field = $fields_list[$i];
require('./libraries/get_foreign.lib.php3'); include('./libraries/get_foreign.lib.php3');
if($foreigners && isset($foreigners[$field]) && echo "\n";
isset($disp) && $disp) { if ($foreigners && isset($foreigners[$field]) && isset($disp) && $disp) {
?> echo ' <select name="fields[]">' . "\n";
<select name="fields[]"> echo ' <option value=""></option>' . "\n";
<option value=""></option> while ($relrow = @PMA_mysql_fetch_array($disp)) {
<?php $key = $relrow[$foreign_field];
$value = (($foreign_display != FALSE) ? '-' . htmlspecialchars($relrow[$foreign_display]) : '');
while ($relrow = @PMA_mysql_fetch_array($disp)) { echo ' <option value="' . urlencode($key) . '">'
$key = $relrow[$foreign_field]; . htmlspecialchars($key) . $value . '</option>' . "\n";
$value = (($foreign_display != FALSE) ? '-' . htmlspecialchars($relrow[$foreign_display]) : ''); } // end while
echo ' <option value="' . urlencode($key) . '">'. echo ' </select>' . "\n";
htmlspecialchars($key) . $value . '</option>' . "\n"; } else {
} // end while echo ' <input type="text" name="fields[]" size="40" class="textfield" />' . "\n";
?> }
</select> ?>
<?php <input type="hidden" name="names[]" value="<?php echo urlencode($fields_list[$i]); ?>" />
} else { <input type="hidden" name="types[]" value="<?php echo $fields_type[$i]; ?>" />
?>
<input type="text" name="fields[]" size="40" class="textfield" />
<?php
}
?>
<input type="hidden" name="names[]" value="<?php echo urlencode($fields_list[$i]); ?>" />
<input type="hidden" name="types[]" value="<?php echo $fields_type[$i]; ?>" />
</td> </td>
</tr> </tr>
<?php <?php