2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * "Echo" service to allow force downloading server status monitor settings
9 define('PMA_MINIMUM_COMMON', true);
10 require_once 'libraries/common.inc.php';
12 if (isset($_REQUEST['monitorconfig'])) {
13 /* For monitor chart config export */
14 PMA_downloadHeader('monitor.cfg', 'application/json; charset=UTF-8');
15 header('X-Content-Type-Options: nosniff');
17 echo urldecode($_REQUEST['monitorconfig']);
19 } else if (isset($_REQUEST['import'])) {
20 /* For monitor chart config import */
21 header('Content-Type: application/json; charset=UTF-8');
22 header('X-Content-Type-Options: nosniff');
24 if (!file_exists($_FILES['file']['tmp_name'])) {
27 echo file_get_contents($_FILES['file']['tmp_name']);