mirror of
https://github.com/vrana/adminer.git
synced 2025-11-18 02:50:39 +01:00
Print SQL query by message
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@477 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -195,6 +195,14 @@ function redirect($location, $message = null) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function query_redirect($query, $location, $message) {
|
||||
global $mysql, $error, $SELF;
|
||||
if ($mysql->query($query)) {
|
||||
redirect($location, $message . "<br /><code class='jush-sql'>" . htmlspecialchars($query) . '</code> - <a href="' . htmlspecialchars($SELF) . 'sql=' . urlencode($query) . '">' . lang('edit') . '</a>');
|
||||
}
|
||||
$error = $mysql->error;
|
||||
}
|
||||
|
||||
function remove_from_uri($param = "") {
|
||||
$param = "($param|" . session_name() . ")";
|
||||
return preg_replace("~\\?$param=[^&]*&~", '?', preg_replace("~\\?$param=[^&]*\$|&$param=[^&]*~", '', $_SERVER["REQUEST_URI"]));
|
||||
|
||||
Reference in New Issue
Block a user