ClearOS Enterprise Edition 5.2 - All Advisories
The following is a list of available updates for your system. You can install the updates via the ClearOS webconfig tool.
if (!display_exceptions()) { display_types($pid, $type, $sort); display_advisories($pid, $type, $sort); } function display_types($pid, $type, $sort) { global $lt_advisory_types; echo "Jump to: [ ";
if ($type == 0) echo "all";
else
{
$self = $_SERVER["PHP_SELF"] . "?pid=$pid&type=0&sort=$sort";
echo "all";
}
echo " | ";
$c = 0;
foreach($lt_advisory_types as $advisory_type)
{
if ($type == $advisory_type["id"]) {
echo "";
} else {
$self = $_SERVER["PHP_SELF"] . "?pid=$pid&type=" . $advisory_type["id"] . "&sort=$sort";
echo "
";
}
if (++$c == count($lt_advisory_types)) echo " ]";
else echo " | ";
}
echo "
\n"; } function display_advisories($pid, $type, $sort) { global $lt_advisory_types; global $lt_severity_levels; $sql = "select id, type_id, severity_id, synopsis, to_char(date_updated, 'YYYY') as year,"; $sql .= " to_char(date_updated, 'YYYY-MM-DD') as updated from advisory"; $sql .= sprintf(" where %d = any(affected_product)", $pid); if ($type != 0) $sql .= sprintf(" and type_id = %d", $type); switch($sort) { case "a": $sql .= " order by id"; break; case "s": $sql .= " order by synopsis"; break; case "d": default: $sql .= " order by date_updated desc"; break; } $result = run_query($sql); if (display_exceptions()) return; $even = false; $advisories = array(); while(($row = pg_fetch_array($result))) { if ($even) { $class = "advisory_even"; $even = false; } else { $class = "advisory_odd"; $even = true; } $icon = $lt_advisory_types[$row["type_id"]]["icon"]; $alt = ucwords($lt_advisory_types[$row["type_id"]]["name"]); $severity = ucwords($lt_severity_levels[$row["severity_id"]]["name"]); $code = sprintf("CF%s-%d:%03d", $lt_advisory_types[$row["type_id"]]["code"], $row["year"], $row["id"]); // FIXME: re-add $severity to synopsis column $advisories[] = "