# HG changeset patch # User Matti Hamalainen # Date 1451523650 -7200 # Node ID 03963c456ed813f5c7b506fa0f2bcf410d8243b7 # Parent b65e0d6efe9d058df48151ab19f9c57302f601dc Sprinkle in some comments. diff -r b65e0d6efe9d -r 03963c456ed8 materials/info.php --- a/materials/info.php Thu Dec 31 02:59:54 2015 +0200 +++ b/materials/info.php Thu Dec 31 03:00:50 2015 +0200 @@ -11,12 +11,16 @@ $pageIndex = "info.php"; +// Static list of alloy data contributors $contributors = [ "Hair", "Malacoda", "Kiomet", "Aegenor", "Gileon", "Corto", ]; +// Material type table for the type selector. +// Because some types are combinations, we need to have +// mappings for those (the last two columns) $matTypeTable = [ 0 => ["Organic + cloth (sewing)" , 0, 1], @@ -37,6 +41,10 @@ ]; +// Define ranges for alloy tests' "reliability" based +// on how many tests have been performed. Define the +// lower and upper bound (inclusive), informative text +// and CSS style for those items. $matReliability = [ [ 1, 2, "1-2 tests", "background: #a00; color: white;" ], @@ -78,6 +86,8 @@ $setSwapRows = (isset($_GET["swap"]) && is_array($_GET["swap"])) ? $_GET["swap"] : array(); + +// Generate CSS and information snippets into temporary arrays $extraCSS = []; $extraInfo = []; foreach ($matReliability as $chk) @@ -90,6 +100,10 @@ $extraInfo[] = "".$chk[2].""; } + +// +// Let's start pooping out the page +// cmPrintPageHeader($pageTitle, "