Changed GET to POST in web2image
This commit is contained in:
parent
4214577eea
commit
b625f2e5c8
|
@ -13,9 +13,9 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
// Global & session manageme
|
||||
session_id($_GET["session_id"]);
|
||||
session_id($_REQUEST["session_id"]);
|
||||
if (file_exists(session_save_path() . "/pansess_" . session_id())) {
|
||||
$user = file_get_contents(session_save_path() . "/pansess_" . session_id());
|
||||
$user = file_request_contents(session_save_path() . "/pansess_" . session_id());
|
||||
}
|
||||
session_start();
|
||||
if (isset($user)) {
|
||||
|
@ -39,12 +39,12 @@ check_login();
|
|||
|
||||
global $config;
|
||||
|
||||
$params = json_decode($_GET['data'], true);
|
||||
$params = json_decode($_REQUEST['data'], true);
|
||||
// Metaconsole connection to the node
|
||||
$server_id = $params['server_id'];
|
||||
|
||||
if ($config["metaconsole"] && !empty($server_id)) {
|
||||
$server = metaconsole_get_connection_by_id($server_id);
|
||||
$server = metaconsole_request_connection_by_id($server_id);
|
||||
// Error connecting
|
||||
if (metaconsole_connect($server) !== NOERR) {
|
||||
echo "<html>";
|
||||
|
@ -68,7 +68,7 @@ if (file_exists ('languages/'.$user_language.'.mo')) {
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Pandora FMS Graph (<?php echo agents_get_alias($agent_id) . ' - ' . $interface_name; ?>)</title>
|
||||
<title>Pandora FMS Graph (<?php echo agents_request_alias($agent_id) . ' - ' . $interface_name; ?>)</title>
|
||||
<link rel="stylesheet" href="styles/pandora.css" type="text/css" />
|
||||
<link rel="stylesheet" href="styles/pandora_minimal.css" type="text/css" />
|
||||
<link rel="stylesheet" href="styles/jquery-ui-1.10.0.custom.css" type="text/css" />
|
||||
|
@ -99,9 +99,9 @@ if (file_exists ('languages/'.$user_language.'.mo')) {
|
|||
$params['width'] = '1048';
|
||||
$params['menu'] = false;
|
||||
|
||||
$params_combined = json_decode($_GET['data_combined'], true);
|
||||
$module_list = json_decode($_GET['data_module_list'], true);
|
||||
$type_graph_pdf = $_GET['type_graph_pdf'];
|
||||
$params_combined = json_decode($_REQUEST['data_combined'], true);
|
||||
$module_list = json_decode($_REQUEST['data_module_list'], true);
|
||||
$type_graph_pdf = $_REQUEST['type_graph_pdf'];
|
||||
|
||||
if($type_graph_pdf == 'combined'){
|
||||
echo '<div>';
|
||||
|
|
|
@ -12,29 +12,29 @@ var url_params = system.args[3];
|
|||
var url_params_comb = system.args[4];
|
||||
var url_module_list = system.args[5];
|
||||
var output_filename = system.args[6];
|
||||
var _width = system.args[7];
|
||||
var _height = system.args[8];
|
||||
var viewport_width = system.args[7];
|
||||
var viewport_height = system.args[8];
|
||||
var session_id = system.args[9];
|
||||
var base_64 = system.args[10];
|
||||
|
||||
|
||||
if (!_width) {
|
||||
_width = 750;
|
||||
if (!viewport_width) {
|
||||
viewport_width = 750;
|
||||
}
|
||||
|
||||
if (!_height) {
|
||||
_height = 350;
|
||||
if (!viewport_height) {
|
||||
viewport_height = 350;
|
||||
}
|
||||
|
||||
if(type_graph_pdf == 'combined'){
|
||||
finish_url = url + "?" + "data=" + url_params +
|
||||
post_data = "data=" + url_params +
|
||||
"&data_combined=" + url_params_comb +
|
||||
"&data_module_list=" + url_module_list +
|
||||
"&type_graph_pdf=" + type_graph_pdf +
|
||||
"&session_id=" + session_id;
|
||||
}
|
||||
else{
|
||||
finish_url = url + "?" + "data=" + url_params +
|
||||
post_data = "data=" + url_params +
|
||||
"&type_graph_pdf=" + type_graph_pdf +
|
||||
"&session_id=" + session_id;
|
||||
}
|
||||
|
@ -42,9 +42,7 @@ else{
|
|||
page.viewportSize = { width: _width, height: _height };
|
||||
//page.zoomFactor = 1.75;
|
||||
|
||||
page.open(finish_url, function start(status) {
|
||||
|
||||
});
|
||||
page.open(post_data, 'POST', post_data, function start(status) {});
|
||||
|
||||
page.onLoadFinished = function (status) {
|
||||
if(!base_64){
|
||||
|
|
Loading…
Reference in New Issue