".S_NO_PERMISSIONS."");
show_page_footer();
exit;
}
?>
";
$h2=$h2.form_select("groupid",0,S_ALL_SMALL);
$result=DBselect("select groupid,name from groups order by name");
while($row=DBfetch($result))
{
// Check if at least one host with read permission exists for this group
$result2=DBselect("select h.hostid,h.host from hosts h,hosts_groups hg where hg.groupid=".$row["groupid"]." and hg.hostid=h.hostid and h.status<>".HOST_STATUS_DELETED." group by h.hostid,h.host order by h.host");
$cnt=0;
while($row2=DBfetch($result2))
{
if(!check_right("Host","U",$row2["hostid"]))
{
continue;
}
$cnt=1; break;
}
if($cnt!=0)
{
$h2=$h2.form_select("groupid",$row["groupid"],$row["name"]);
}
}
$h2=$h2."";
$h2=$h2." ".S_HOST." ";
$h2=$h2."";
$h2=$h2." | ";
$h2=$h2."";
show_header2($h1, $h2, "
");
?>
SetHeader(array(S_ID,S_NAME,S_EXPRESSION, S_SEVERITY, S_STATUS, S_ERROR));
$result=DBselect("select distinct h.hostid,h.host,t.triggerid,t.expression,t.description,t.status,t.value,t.priority,t.error from triggers t,hosts h,items i,functions f where f.itemid=i.itemid and h.hostid=i.hostid and t.triggerid=f.triggerid and h.hostid=".$_REQUEST["hostid"]." order by h.host,t.description");
while($row=DBfetch($result))
{
if(check_right_on_trigger("R",$row["triggerid"]) == 0)
{
continue;
}
$description=expand_trigger_description($row["triggerid"]);
if(isset($_REQUEST["hostid"]))
{
$description="$description";
}
else
{
$description="$description";
}
$id=" ".$row["triggerid"];
$sql="select t.triggerid,t.description from triggers t,trigger_depends d where t.triggerid=d.triggerid_up and d.triggerid_down=".$row["triggerid"];
$result1=DBselect($sql);
if(DBnum_rows($result1)>0)
{
$description=$description."