} array_push($new_row, new CCol(get_severity_description($row["severity"]), get_severity_style($row["severity"]))); $row["value"] = trim($row["value"], "\r\n"); // array_push($new_row,htmlspecialchars($row["value"])); array_push($new_row, encode_log($row["value"])); if (!isset($_REQUEST["plaintext"])) { $crow = new CRow($new_row); if (is_null($color_style) && is_array($_REQUEST["itemid"])) { $min_color = 0x98; $max_color = 0xf8; $int_color = ($max_color - $min_color) / count($_REQUEST["itemid"]); $int_color *= array_search($row["itemid"], $_REQUEST["itemid"]); $int_color += $min_color; $crow->AddOption("style", "background-color: " . sprintf("#%X%X%X", $int_color, $int_color, $int_color)); } else { $crow->SetClass($color_style); } $crow->Show(); // to solve memory leak we call 'Show' method for each element } else { echo date("Y-m-d H:i:s", $row["clock"]); echo "\t" . $row["clock"] . "\t" . htmlspecialchars($row["value"]) . "\n"; } } if (!isset($_REQUEST["plaintext"])) { $table->ShowEnd(); } else { echo "</pre>"; } } else { switch ($item_type) {