mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
When there is no custom graph redirects to the graph list
This commit is contained in:
parent
fc5635381a
commit
a81dcdcfc5
@ -65,6 +65,17 @@ $change_weight = (bool) get_parameter('change_weight', false);
|
|||||||
$change_label = (bool) get_parameter('change_label', false);
|
$change_label = (bool) get_parameter('change_label', false);
|
||||||
$id_graph = (int) get_parameter('id', 0);
|
$id_graph = (int) get_parameter('id', 0);
|
||||||
|
|
||||||
|
if($id_graph !== 0){
|
||||||
|
$sql = "SELECT * FROM tgraph
|
||||||
|
WHERE (private = 0 OR (private = 1 AND id_user = '".$config["id_user"]."'))
|
||||||
|
AND id_graph = ".$id_graph;
|
||||||
|
$control = db_process_sql($sql);
|
||||||
|
if(!$control){
|
||||||
|
header('Location: index.php?sec=reporting&sec2=godmode/reporting/graphs');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($add_graph) {
|
if ($add_graph) {
|
||||||
$name = get_parameter_post ("name");
|
$name = get_parameter_post ("name");
|
||||||
$description = get_parameter_post ("description");
|
$description = get_parameter_post ("description");
|
||||||
|
@ -25,6 +25,16 @@ $delete_graph = (bool) get_parameter ('delete_graph');
|
|||||||
$view_graph = (bool) get_parameter ('view_graph');
|
$view_graph = (bool) get_parameter ('view_graph');
|
||||||
$id_graph = (int) get_parameter ('id');
|
$id_graph = (int) get_parameter ('id');
|
||||||
|
|
||||||
|
if($id_graph !== 0){
|
||||||
|
$sql = "SELECT * FROM tgraph
|
||||||
|
WHERE (private = 0 OR (private = 1 AND id_user = '".$config["id_user"]."'))
|
||||||
|
AND id_graph = ".$id_graph;
|
||||||
|
$control = db_process_sql($sql);
|
||||||
|
if(!$control){
|
||||||
|
header('Location: index.php?sec=reporting&sec2=godmode/reporting/graphs');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Delete module SQL code
|
// Delete module SQL code
|
||||||
if ($delete_graph) {
|
if ($delete_graph) {
|
||||||
if (check_acl ($config['id_user'], 0, "AW")) {
|
if (check_acl ($config['id_user'], 0, "AW")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user