git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@507 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0a2e469767
commit
69c1f9370c
|
@ -29,18 +29,24 @@ if (comprueba_login() != 0) {
|
||||||
|
|
||||||
// Delete module SQL code
|
// Delete module SQL code
|
||||||
if (isset($_GET["delete"])){
|
if (isset($_GET["delete"])){
|
||||||
$id = $_GET["delete"];
|
if ((give_acl($id_usuario,0,"AW") == 1 ) OR (dame_admin($id_user)==1)) {
|
||||||
$sql = "DELETE FROM tgraph_source WHERE id_graph = $id";
|
$id = $_GET["delete"];
|
||||||
if ($res=mysql_query($sql))
|
$sql = "DELETE FROM tgraph_source WHERE id_graph = $id";
|
||||||
$result = "<h3 class=suc>".$lang_label["delete_ok"]."</h3>";
|
if ($res=mysql_query($sql))
|
||||||
else
|
$result = "<h3 class=suc>".$lang_label["delete_ok"]."</h3>";
|
||||||
$result = "<h3 class=error>".$lang_label["delete_no"]."</h3>";
|
else
|
||||||
$sql = "DELETE FROM tgraph WHERE id_graph = $id";
|
$result = "<h3 class=error>".$lang_label["delete_no"]."</h3>";
|
||||||
if ($res=mysql_query($sql))
|
$sql = "DELETE FROM tgraph WHERE id_graph = $id";
|
||||||
$result = "<h3 class=suc>".$lang_label["delete_ok"]."</h3>";
|
if ($res=mysql_query($sql))
|
||||||
else
|
$result = "<h3 class=suc>".$lang_label["delete_ok"]."</h3>";
|
||||||
$result = "<h3 class=error>".$lang_label["delete_no"]."</h3>";
|
else
|
||||||
echo $result;
|
$result = "<h3 class=error>".$lang_label["delete_no"]."</h3>";
|
||||||
|
echo $result;
|
||||||
|
} else {
|
||||||
|
audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to delete a graph from access graph builder");
|
||||||
|
include ("general/noaccess.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -143,7 +149,7 @@ echo "<h2>".$lang_label["reporting"]." > ";
|
||||||
echo $lang_label["custom_graph_viewer"]."</h2>";
|
echo $lang_label["custom_graph_viewer"]."</h2>";
|
||||||
echo "<table width='500' cellpadding=4 cellpadding=4 class='databox_frame'>";
|
echo "<table width='500' cellpadding=4 cellpadding=4 class='databox_frame'>";
|
||||||
echo "<tr><th>".$lang_label["graph_name"]."<th>".$lang_label["description"]."<th>".$lang_label["view"];
|
echo "<tr><th>".$lang_label["graph_name"]."<th>".$lang_label["description"]."<th>".$lang_label["view"];
|
||||||
if ((give_acl($id_usuario,0,"AW") == 1 ) OR (dame_admin($id_user)==1))
|
if ((give_acl($id_usuario,0,"AW") == 1 ) OR (dame_admin($id_usuario)==1))
|
||||||
echo "<th>";
|
echo "<th>";
|
||||||
|
|
||||||
$color=1;
|
$color=1;
|
||||||
|
@ -166,7 +172,7 @@ while ($row = mysql_fetch_array($res)){
|
||||||
$id_graph = $row["id_graph"];
|
$id_graph = $row["id_graph"];
|
||||||
echo "<td valign='middle' class='$tdcolor' align='center'><a href='index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=$id_graph'><img src='images/images.png'></A>";
|
echo "<td valign='middle' class='$tdcolor' align='center'><a href='index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=$id_graph'><img src='images/images.png'></A>";
|
||||||
|
|
||||||
if ((give_acl($id_usuario,0,"AW") == 1 ) OR (dame_admin($id_user)==1)) {
|
if ((give_acl($id_usuario,0,"AW") == 1 ) OR (dame_admin($id_usuario)==1)) {
|
||||||
echo "<td class='$tdcolor'><a href='index.php?sec=reporting&sec2=operation/reporting/graph_viewer&delete=$id_graph' ".'onClick="if (!confirm(\' '.$lang_label["are_you_sure"].'\')) return false;">';
|
echo "<td class='$tdcolor'><a href='index.php?sec=reporting&sec2=operation/reporting/graph_viewer&delete=$id_graph' ".'onClick="if (!confirm(\' '.$lang_label["are_you_sure"].'\')) return false;">';
|
||||||
echo "<img src='images/cross.png'></a></td>";
|
echo "<img src='images/cross.png'></a></td>";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue