"; $wrapper_breadcrumbs = array( "Support", "Software Updates", "Software Update Details" ); // Call wrapper include(dirname( __FILE__ ) . "/../../wrapper/cf_header.inc"); include(dirname( __FILE__ ) . "/../../wrapper/cf_precontent.inc"); parse_str($_SERVER["QUERY_STRING"]); $sql = "select *, to_char(date_updated, 'YYYY') as year,"; $sql .= " to_char(date_added, 'YYYY-MM-DD') as added,"; $sql .= " to_char(date_added, 'YYYY-MM-DD') as updated"; $sql .= sprintf(" from advisory where id = %d", $aid); $result = run_query($sql); if (!$result) { header("Location: index.php"); return; } $row = pg_fetch_array($result); if (!$row) { header("Location: index.php"); return; } $lt_advisory_types = table_to_array(LT_ADVISORY_TYPE); $lt_severity_levels = table_to_array(LT_SEVERITY_LEVEL); // FIXME: re-add severity $synopsis = $row['synopsis']; /* echo_header(sprintf("%s - %s", ucwords($lt_severity_levels[$row["severity_id"]]["name"]), $row["synopsis"]), $lt_advisory_types[$row["type_id"]]["icon"], ucwords($lt_advisory_types[$row["type_id"]]["name"])); */ if (!display_exceptions()) { display_advisories($row); } function display_advisories($advisory) { global $lt_advisory_types; global $lt_severity_levels; global $synopsis; $self = $_SERVER["PHP_SELF"] . "?aid=" . $advisory["id"]; $code = sprintf("CC%s-%d:%03d", $lt_advisory_types[$advisory["type_id"]]["code"], $advisory["year"], $advisory["id"]); $type = ucwords($lt_advisory_types[$advisory["type_id"]]["name"]) . " Advisory"; $issued = $advisory["added"]; $updated = $advisory["updated"]; $properties = load_properties(SOFTWARE_PROPERTIES); $affected_product = array(); $products = pg_explode($advisory["affected_product"]); foreach($products as $pid) { $sql = sprintf("select id, version from software where id = %d", $pid); $result = run_query($sql); if ($result && ($row = pg_fetch_array($result))) { $id = substr($pid, 0, strlen($pid) - 3) . "000"; $name = $properties["text"]["code"][$id] . " " . $row["version"]; $row["name"] = $name; $row["link"] = "" . $name . "
\n"; $row["anchor"] = "\n"; $affected_product[] = $row; } } $even = false; $package = array(); $packages = pg_explode($advisory["updated_package"]); foreach($packages as $pkg) { $sql = sprintf("select * from package where id = %d", $pkg); $result = run_query($sql); if ($result && ($row = pg_fetch_array($result))) { if ($even) { $class = "advisory_even"; $even = false; } else { $class = "advisory_odd"; $even = true; } $html = "" . $row["filename"] . ""; $html .= ""; $html .= $row["md5"] . "\n"; $row["html"] = $html; $package[] = $row; } } $reference = array(); $references = pg_explode($advisory["reference"]); foreach($references as $ref) { $sql = sprintf("select * from advisory_ref where id = %d", $ref); $result = run_query($sql); if ($result && ($row = pg_fetch_array($result))) { $row["link"] = "" . $row["name"] . "\n"; $row["anchor"] = "\n"; $reference[] = $row; } } echo "
"; echo ""; echo ""; echo ""; echo "\n"; echo ""; echo "\n"; echo ""; echo "\n"; echo ""; echo "\n"; echo ""; echo "\n"; echo ""; echo "\n"; if (count($reference)) { echo ""; echo "\n"; } echo "
AdvisoryDetails
Synopsis$synopsis
Number$code
Type$type
Issued on$issued
Last updated on$updated
Affected Products"; if (count($affected_product) == 0) { echo "No products! (impossible)\n"; } else { foreach ($affected_product as $product) echo $product["name"] . "
\n"; } echo "
References"; foreach($reference as $ref) { echo ""; echo $ref["name"] . "
\n"; } echo "
\n"; echo "
"; echo "
[ Edit ]
\n"; echo "

Details

\n"; echo "
\n"; echo str_replace("\n", "
\n", stripslashes($advisory["detail"])); echo "

\n"; if (strlen($advisory["solution"])) { echo "

Solution

\n"; echo "
\n"; echo str_replace("\n", "
\n", stripslashes($advisory["solution"])); echo "

\n"; } echo "

Updated Packages

\n"; echo "
\n"; foreach($affected_product as $product) { // echo $product["anchor"]; echo "

"; echo $product["name"]; echo "

\n"; echo "\n"; $found = false; foreach($package as $pkg) { $product_list = pg_explode($pkg["product_id"]); foreach($product_list as $pid) { if ($pid == $product["id"]) { echo $pkg["html"]; $found = true; } } } // FIXME: deal with deprecated packages in a better way if (!$found) echo "\n"; echo "
A newer version of this update has been released.
\n"; } echo "

\n"; } // Footer include(dirname( __FILE__ ) . "/../../wrapper/cf_postcontent.inc"); echo ""; ?>