git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@507 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f

This commit is contained in:
slerena 2007-06-12 18:24:59 +00:00
parent 0a2e469767
commit 69c1f9370c
1 changed files with 20 additions and 14 deletions

View File

@ -29,6 +29,7 @@ if (comprueba_login() != 0) {
// Delete module SQL code
if (isset($_GET["delete"])){
if ((give_acl($id_usuario,0,"AW") == 1 ) OR (dame_admin($id_user)==1)) {
$id = $_GET["delete"];
$sql = "DELETE FROM tgraph_source WHERE id_graph = $id";
if ($res=mysql_query($sql))
@ -41,6 +42,11 @@ if (isset($_GET["delete"])){
else
$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"]." &gt; ";
echo $lang_label["custom_graph_viewer"]."</h2>";
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"];
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>";
$color=1;
@ -166,7 +172,7 @@ while ($row = mysql_fetch_array($res)){
$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>";
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 "<img src='images/cross.png'></a></td>";
}