Exemplo n.º 1
0
                                 // Set Human readable Facility!
                                 $content['fields'][$mycolkey]['fieldvalue'] = GetMessageTypeDisplayName($logArray[$mycolkey]);
                             } else {
                                 // Use default colour!
                                 $content['fields'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $msgtype_colors[IUT_Unknown] . '" ';
                             }
                         }
                     }
                 }
             } else {
                 if ($content['fields'][$mycolkey]['FieldType'] == FILTER_TYPE_STRING) {
                     if ($mycolkey == SYSLOG_MESSAGE) {
                         $content['fields'][$mycolkey]['fieldvalue'] = ReplaceLineBreaksInString(GetStringWithHTMLCodes($logArray[$mycolkey]));
                     } else {
                         // kindly copy!
                         $content['fields'][$mycolkey]['fieldvalue'] = ReplaceLineBreaksInString(GetStringWithHTMLCodes($logArray[$mycolkey]));
                     }
                     // --- HOOK here to add context links!
                     AddContextLinks($content['fields'][$mycolkey]['fieldvalue']);
                     // ---
                 }
             }
         }
         // Increment helpcounter
         $counter++;
     } else {
         $content['fields'][$mycolkey]['fieldenabled'] = false;
     }
 }
 // --- Now Check for dynamic fields!
 $counter = 0;
Exemplo n.º 2
0
     foreach ($content['syslogmessages'][$counter]['values'] as $mykey => $myfield) {
         // Set Caption!
         $content['syslogmessages'][$counter]['values'][$mycolkey]['messagesdetails'][]['detailfieldtitle'] = $content['fields'][$mykey]['FieldCaption'];
         // Get ArrayIndex
         $myIndex = count($content['syslogmessages'][$counter]['values'][$mycolkey]['messagesdetails']) - 1;
         // --- Set CSS Class
         if ($myIndex % 2 == 0) {
             $content['syslogmessages'][$counter]['values'][$mycolkey]['messagesdetails'][$myIndex]['detailscssclass'] = "line1";
         } else {
             $content['syslogmessages'][$counter]['values'][$mycolkey]['messagesdetails'][$myIndex]['detailscssclass'] = "line2";
         }
         // ---
         // If message field, we need to handle differently!
         if ($mykey == SYSLOG_MESSAGE) {
             // Get DetailMsg with linebreaks
             $szDetailMsg = ReplaceLineBreaksInString(GetStringWithHTMLCodes($logArray[SYSLOG_MESSAGE]));
             if (isset($content['highlightwords'])) {
                 $content['syslogmessages'][$counter]['values'][$mycolkey]['messagesdetails'][$myIndex]['detailfieldvalue'] = HighLightString($content['highlightwords'], $szDetailMsg);
             } else {
                 $content['syslogmessages'][$counter]['values'][$mycolkey]['messagesdetails'][$myIndex]['detailfieldvalue'] = $szDetailMsg;
             }
             // --- HOOK here to add context links!
             AddContextLinks($content['syslogmessages'][$counter]['values'][$mycolkey]['messagesdetails'][$myIndex]['detailfieldvalue']);
             // ---
         } else {
             // Just set field value
             $content['syslogmessages'][$counter]['values'][$mycolkey]['messagesdetails'][$myIndex]['detailfieldvalue'] = isset($myfield['rawfieldvalue']) ? GetStringWithHTMLCodes($myfield['rawfieldvalue']) : GetStringWithHTMLCodes($myfield['fieldvalue']);
         }
     }
 }
 if (strlen($content['searchstr']) > 0) {