Пример #1
0
     $host_list = implode(',', $host_list);
 }
 if ($row['templateid'] == 0) {
     $name = new CLink($row['name'], 'graphs.php?graphid=' . $row['graphid'] . '&form=update', 'action');
 } else {
     $real_hosts = get_realhosts_by_graphid($row['templateid']);
     $real_host = DBfetch($real_hosts);
     if ($real_host) {
         $name = array(new CLink($real_host['host'], 'graphs.php?' . 'hostid=' . $real_host['hostid'], 'action'), ':', $row['name']);
     } else {
         array_push($description, new CSpan('error', 'on'), ':', expand_trigger_description($row['triggerid']));
     }
 }
 $chkBox = new CCheckBox('group_graphid[' . $row['graphid'] . ']', NULL, NULL, $row['graphid']);
 if ($row['templateid'] > 0) {
     $chkBox->SetEnabled(false);
 }
 switch ($row['graphtype']) {
     case GRAPH_TYPE_STACKED:
         $graphtype = S_STACKED;
         break;
     case GRAPH_TYPE_PIE:
         $graphtype = S_PIE;
         break;
     case GRAPH_TYPE_EXPLODED:
         $graphtype = S_EXPLODED;
         break;
     default:
         $graphtype = S_NORMAL;
         break;
 }