Selection
By default, only unmounted components are displayed, except SMs which are all displayed.
Choose components to display, the sorting criterion and their placement:
Inventory
\n";
$res = pg_query ("SELECT ".
' type,'.
' name,'.
' subtype,'.
' id,'.
' status,'.
' person,'.
' loc,'.
' remarks,'.
' CASE WHEN ncmts=0 THEN \'\' '.
' WHEN ncmts=1 THEN \'1 comment\' '.
' ELSE ncmts || \' comments\' '.
' END AS cmts '.
"FROM inventory ".
"WHERE (type IN ('".implode("','", $showtypes)."') ".
"$placing) OR type='sm' ".
"ORDER BY $sortrow;");
// "ORDER BY CASE WHEN type='sm' THEN id ELSE $sortrow END;");
echo "\n";
$oe=0;
while ($row = pg_fetch_assoc($res)) {
echo '';
echo ''.strtoupper($row['type']).' | ';
echo ''.hrefname($row['name']).' | ';
echo ''.$row['subtype'].' | ';
echo ''.$row['id'].' | ';
echo ''.$row['status'].' | ';
echo ''.$row['person'].' | ';
echo ''.$row['loc'].' | ';
echo ''.$row['remarks'].' | ';
echo ''.$row['cmts'].' | ';
echo "
\n";
}
echo "\n";
?>