".$lang_label["delete_agent_no"]."";
else
echo "
".$lang_label["delete_agent_ok"]."
";
// Delete agent access table
$sql_delete = "DELETE FROM tagent_access WHERE id_agent = ".$id_agente;
// Delete tagente_datos data
$result=mysql_query($sql_delete);
$sql_delete4="DELETE FROM tagente_datos WHERE id_agente=".$id_agente;
$result=mysql_query($sql_delete4);
// Delete tagente_datos_string data
$result=mysql_query($sql_delete);
$sql_delete4="DELETE FROM tagente_datos_string WHERE id_agente=".$id_agente;
$result=mysql_query($sql_delete4);
// Delete from tagente_datos
$sql1='SELECT * FROM tagente_modulo WHERE id_agente = '.$id_agente;
$result1=mysql_query($sql1);
while ($row=mysql_fetch_array($result1)){
$sql_delete4="DELETE FROM tagente_datos_inc WHERE id_agente_modulo=".$row["id_agente_modulo"];
$result=mysql_query($sql_delete4);
}
$sql_delete2 ="DELETE FROM tagente_modulo WHERE id_agente = ".$id_agente; // delete from tagente_modulo
$sql_delete3 ="DELETE FROM tagente_estado WHERE id_agente = ".$id_agente; // delete from tagente_estado
$result=mysql_query($sql_delete2);
$result=mysql_query($sql_delete3);
} else {
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to delete an Agent");
require ("general/noaccess.php");
}
}
echo "".$lang_label["agent_conf"]."
";
echo "";
// Load icon index from tgrupos
$iconindex_g[]="";
$sql_g='SELECT * FROM tgrupo';
$result_g=mysql_query($sql_g);
while ($row_g=mysql_fetch_array($result_g)){
$iconindex_g[$row_g["id_grupo"]] = $row_g["icon"];
}
$sql1='SELECT * FROM tagente ORDER BY nombre';
$result=mysql_query($sql1);
if (mysql_num_rows($result)){
echo "";
echo "".$lang_label["agent_name"];
echo " | ".$lang_label["group"];
echo " | ".$lang_label["description"];
echo " | ".$lang_label["delete"];
$color=1;
while ($row=mysql_fetch_array($result)){
$id_grupo = $row["id_grupo"];
if ($color == 1){
$tdcolor = "datos";
$color = 0;
}
else {
$tdcolor = "datos2";
$color = 1;
}
if (give_acl($id_user, $id_grupo, "AW")==1){
echo " | ".$row["nombre"]."";
echo " | ( ".dame_grupo($id_grupo)." ) | ";
echo "".$row["comentarios"]." | ";
echo " | ";
}
}
echo "
|
";
echo "";
echo " |
";
echo "
";
} else {
echo "".$lang_label["no_agent_def"]."
";
echo "";
}
} // Fin pagina
else {
audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Agent Management");
require ("general/noaccess.php");
}
?>