reusable links
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2002-04-27 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* tbl_properties.php3, new tbl_properties_links.php3:
|
||||
remove duplicate links code
|
||||
|
||||
2002-04-27 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||
* Recompressed old ChangeLog without saving its path in the archive.
|
||||
* header.inc.php3:
|
||||
|
@@ -144,64 +144,12 @@ if (PMA_MYSQL_INT_VERSION >= 32303) {
|
||||
$show_comment = '';
|
||||
}
|
||||
mysql_free_result($result);
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($num_rows > 0) {
|
||||
echo "\n";
|
||||
?>
|
||||
<!-- first browse links -->
|
||||
<p>
|
||||
[ <a href="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&pos=0">
|
||||
<b><?php echo $strBrowse; ?></b></a> ]
|
||||
[ <a href="tbl_select.php3?<?php echo $url_query; ?>">
|
||||
<b><?php echo $strSelect; ?></b></a> ]
|
||||
[ <a href="tbl_change.php3?<?php echo $url_query; ?>">
|
||||
<b><?php echo $strInsert; ?></b></a> ]
|
||||
[ <?php
|
||||
echo '<a href="sql.php3?' . $url_query . '&sql_query=';
|
||||
if (PMA_MYSQL_INT_VERSION >= 40000) {
|
||||
echo urlencode('TRUNCATE ' . PMA_backquote($table))
|
||||
. '&zero_rows='
|
||||
. urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table)))
|
||||
. '"' . "\n"
|
||||
. ' onclick="return confirmLink(this, \'TRUNCATE ';
|
||||
} // end if
|
||||
else {
|
||||
echo urlencode('DELETE FROM ' . PMA_backquote($table))
|
||||
. '&zero_rows='
|
||||
. urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table)))
|
||||
. '"'
|
||||
. "\n"
|
||||
. ' onclick="return confirmLink(this, \'DELETE FROM ';
|
||||
} // end else
|
||||
echo PMA_jsFormat($table)
|
||||
. '\')">'
|
||||
. "\n";
|
||||
?>
|
||||
<b><?php echo $strEmpty; ?></b></a> ]
|
||||
[ <a href="sql.php3?<?php echo ereg_replace('tbl_properties.php3$', 'db_details.php3', $url_query); ?>&back=tbl_properties.php3&reload=1&sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
|
||||
onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')">
|
||||
<b><?php echo $strDrop; ?></b></a> ]
|
||||
</p>
|
||||
<?php
|
||||
} else {
|
||||
echo "\n";
|
||||
?>
|
||||
<!-- first browse links -->
|
||||
<p>
|
||||
[ <b><?php echo $strBrowse; ?></b> ]
|
||||
[ <b><?php echo $strSelect; ?></b> ]
|
||||
[ <a href="tbl_change.php3?<?php echo $url_query; ?>">
|
||||
<b><?php echo $strInsert; ?></b></a> ]
|
||||
[ <b><?php echo $strEmpty; ?></b> ]
|
||||
[ <a href="sql.php3?<?php echo ereg_replace('tbl_properties.php3$', 'db_details.php3', $url_query); ?>&back=tbl_properties.php3&reload=1&sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
|
||||
onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')">
|
||||
<b><?php echo $strDrop; ?></b></a> ]
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<!-- first browse links -->
|
||||
<?php
|
||||
require('./tbl_properties_links.php3');
|
||||
|
||||
if (!empty($show_comment)) {
|
||||
?>
|
||||
@@ -443,40 +391,10 @@ echo "\n";
|
||||
* links again
|
||||
*/
|
||||
if ($fields_cnt > 20) {
|
||||
if ($num_rows > 0) {
|
||||
?>
|
||||
<!-- Browse links -->
|
||||
<p>
|
||||
[ <a href="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&pos=0">
|
||||
<b><?php echo $strBrowse; ?></b></a> ]
|
||||
[ <a href="tbl_select.php3?<?php echo $url_query; ?>">
|
||||
<b><?php echo $strSelect; ?></b></a> ]
|
||||
[ <a href="tbl_change.php3?<?php echo $url_query; ?>">
|
||||
<b><?php echo $strInsert; ?></b></a> ]
|
||||
[ <a href="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('DELETE FROM ' . PMA_backquote($table)); ?>&zero_rows=<?php echo urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table))); ?>"
|
||||
onclick="return confirmLink(this, 'DELETE FROM <?php echo PMA_jsFormat($table); ?>')">
|
||||
<b><?php echo $strEmpty; ?></b></a> ]
|
||||
[ <a href="sql.php3?<?php echo ereg_replace('tbl_properties.php3$', 'db_details.php3', $url_query); ?>&back=tbl_properties.php3&reload=1&sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
|
||||
onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')">
|
||||
<b><?php echo $strDrop; ?></b></a> ]
|
||||
</p>
|
||||
<?php
|
||||
} else {
|
||||
echo "\n";
|
||||
?>
|
||||
<!-- first browse links -->
|
||||
<p>
|
||||
[ <b><?php echo $strBrowse; ?></b> ]
|
||||
[ <b><?php echo $strSelect; ?></b> ]
|
||||
[ <a href="tbl_change.php3?<?php echo $url_query; ?>">
|
||||
<b><?php echo $strInsert; ?></b></a> ]
|
||||
[ <b><?php echo $strEmpty; ?></b> ]
|
||||
[ <a href="sql.php3?<?php echo ereg_replace('tbl_properties.php3$', 'db_details.php3', $url_query); ?>&back=tbl_properties.php3&reload=1&sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
|
||||
onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')">
|
||||
<b><?php echo $strDrop; ?></b></a> ]
|
||||
</p>
|
||||
<?php
|
||||
} // end if...else
|
||||
<?php
|
||||
require('./tbl_properties_links.php3');
|
||||
} // end if ($fields_cnt > 20)
|
||||
echo "\n\n";
|
||||
|
||||
|
48
tbl_properties_links.php3
Executable file
48
tbl_properties_links.php3
Executable file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/* $Id$ */
|
||||
?>
|
||||
<p>
|
||||
[ <?php if ($num_rows > 0) {
|
||||
?>
|
||||
<a href="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&pos=0">
|
||||
<?php
|
||||
} // end if
|
||||
?>
|
||||
<b><?php echo $strBrowse; ?></b></a> ]
|
||||
[ <?php if ($num_rows > 0) {
|
||||
?>
|
||||
<a href="tbl_select.php3?<?php echo $url_query; ?>">
|
||||
<?php
|
||||
} // end if
|
||||
?>
|
||||
<b><?php echo $strSelect; ?></b></a> ]
|
||||
[ <a href="tbl_change.php3?<?php echo $url_query; ?>">
|
||||
<b><?php echo $strInsert; ?></b></a> ]
|
||||
[ <?php
|
||||
if ($num_rows > 0) {
|
||||
echo '<a href="sql.php3?' . $url_query . '&sql_query=';
|
||||
if (PMA_MYSQL_INT_VERSION >= 40000) {
|
||||
echo urlencode('TRUNCATE ' . PMA_backquote($table))
|
||||
. '&zero_rows='
|
||||
. urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table)))
|
||||
. '"' . "\n"
|
||||
. ' onclick="return confirmLink(this, \'TRUNCATE ';
|
||||
} // end if
|
||||
else {
|
||||
echo urlencode('DELETE FROM ' . PMA_backquote($table))
|
||||
. '&zero_rows='
|
||||
. urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table)))
|
||||
. '"'
|
||||
. "\n"
|
||||
. ' onclick="return confirmLink(this, \'DELETE FROM ';
|
||||
} // end else
|
||||
echo PMA_jsFormat($table)
|
||||
. '\')">'
|
||||
. "\n";
|
||||
} // end if
|
||||
?>
|
||||
<b><?php echo $strEmpty; ?></b></a> ]
|
||||
[ <a href="sql.php3?<?php echo ereg_replace('tbl_properties.php3$', 'db_details.php3', $url_query); ?>&back=tbl_properties.php3&reload=1&sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
|
||||
onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')">
|
||||
<b><?php echo $strDrop; ?></b></a> ]
|
||||
</p>
|
Reference in New Issue
Block a user