mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Deferred operations by AJAX instead of JS (doesn't require sending token)
This commit is contained in:
@@ -482,6 +482,25 @@ function odd($return = ' class="odd"') {
|
||||
return ($i++ % 2 ? $return : '');
|
||||
}
|
||||
|
||||
/** Print one row in JSON object
|
||||
* @param string or "" to close the object
|
||||
* @param string
|
||||
* @return null
|
||||
*/
|
||||
function json_row($key, $val = null) {
|
||||
static $first = true;
|
||||
if ($first) {
|
||||
echo "{";
|
||||
}
|
||||
if ($key != "") {
|
||||
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, '\\"') . '": ' . (isset($val) ? '"' . addcslashes($val, '\\"') . '"' : 'undefined');
|
||||
$first = false;
|
||||
} else {
|
||||
echo "\n}\n";
|
||||
$first = true;
|
||||
}
|
||||
}
|
||||
|
||||
/** Check whether the string is in UTF-8
|
||||
* @param string
|
||||
* @return bool
|
||||
|
Reference in New Issue
Block a user