query($sql)) { $obj = $result->fetch_object(); $metaTitle = $obj->MetaTagTitle; $metaDescription = $obj->MetaTagDescription; echo ("" . $metaTitle . ""); echo (""); $result->close(); } ?>
query($sql)) { $nbrRows = $result->num_rows; if ($nbrRows > 0) { $sql2 = "SELECT CategoryName, CategoryDescription "; $sql2 .= "FROM categories "; $sql2 .= "WHERE CategoryID = " . $categoryID; if ($result2 = $mysqli->query($sql2)) { $obj2 = $result2->fetch_object(); echo ("

" . $obj2->CategoryName . "


"); echo ("
"); echo ("

" . $obj2->CategoryDescription . "


"); $result2->close(); } echo (""); $i = 0; while($obj = $result->fetch_object()) { $i++; if ($i % 3 == 1) { echo (""); } echo (""); if ($i % 3 == 0) { $i = 0; echo (""); } } $spacercells = 3 - ($i % 3); if ($spacercells < 3) { for ($j=1; $j<=$spacercells; $j++) { echo (""); } echo (""); } echo ("
"); if ($obj->ImageName != "") { echo ("
"); } echo("$obj->CategoryName
"); echo ("
"); if ($categoryID == 18) { echo("

"); echo("For more information see our STEEL IN ARCHITECTURE BROCHURE"); } } else { $categoryName = ""; $categoryDescription = ""; $sql = "SELECT CT.CategoryID, C.CategoryName, C.CategoryDescription "; $sql .= "FROM categorytree CT "; $sql .= "JOIN categories C ON CT.CategoryID = C.CategoryID "; $sql .= "WHERE CT.ParentCategoryID = " . $categoryID; if ($result2 = $mysqli->query($sql)) { $obj = $result2->fetch_object(); $categoryID = $obj->CategoryID; $categoryName = $obj->CategoryName; $categoryDescription = $obj->CategoryDescription; $result2->close(); } else { $categoryID = 0; } echo ("

" . $categoryName . "

Check up to five results to perform an action.
"); echo ("
"); echo ("

" . $categoryDescription . "


"); $sql = "SELECT * FROM categoryimages "; $sql .= "WHERE CategoryID = " . $categoryID . " "; $sql .= "AND ImageTypeID = 1"; if ($result2 = $mysqli->query($sql)) { if ($result2->num_rows > 0) { echo (""); echo (""); while($obj = $result2->fetch_object()) { echo (""); } echo (""); echo ("
"); if ($obj->LargerImageName != "") { echo ("
larger image"); } else { echo (""); } echo ("
"); } $result2->close(); } echo (""); echo (""); echo (""); echo (""); echo (""); echo ("
"); echo (""); echo (""); echo (""); echo ("
"); $sql2 = "SELECT A.AttributeID, A.AttributeDescription "; $sql2 .= "FROM categoryattributes CA "; $sql2 .= "JOIN attributes A ON CA.AttributeID = A.AttributeID "; $sql2 .= "WHERE CategoryID = " . $categoryID . " "; $sql2 .= "AND A.Status = 1 "; $sql2 .= "AND LSequence > 0 "; $sql2 .= "ORDER BY LSequence"; $sql3 = "SELECT ItemID, ItemNumber, ItemName "; $sql3 .= "FROM items "; $sql3 .= "WHERE CategoryID = " . $categoryID . " "; $sql3 .= "AND Status = 1 "; $sql3 .= "ORDER BY ItemNumber"; $itemID = ""; echo (""); if ($result2 = $mysqli->query($sql2)) { $nbrHdrColumns = $result2->num_rows; echo (""); echo (""); echo (""); echo (""); while($obj2 = $result2->fetch_object()) { $hValue = str_replace("±", "±", $obj2->AttributeDescription); echo (""); } echo (""); if ($result3 = $mysqli->query($sql3)) { while($obj3 = $result3->fetch_object()) { $itemID = $obj3->ItemID; echo (""); echo (""); echo (""); echo (""); $sql4 = "SELECT AttributeValue FROM itemattributes IA "; $sql4 .= "JOIN attributes A ON IA.AttributeID = A.AttributeID "; $sql4 .= "JOIN categoryattributes CA ON IA.AttributeID = CA.AttributeID "; $sql4 .= "WHERE IA.ItemID = " . $itemID . " "; $sql4 .= "AND A.Status = 1 "; $sql4 .= "AND CA.CategoryID = " . $categoryID . " "; $sql4 .= "AND CA.LSequence > 0 "; $sql4 .= "ORDER BY CA.LSequence"; if ($result4 = $mysqli->query($sql4)) { while($obj4 = $result4->fetch_object()) { echo (""); } $result4->close(); } echo (""); } $result3->close(); } $result2->close(); } echo ("
Item #Item Name"); echo ($hValue); echo ("
"); echo (""); echo (""); echo ("" . $obj3->ItemNumber . ""); echo (""); echo ($obj3->ItemName); echo (""); if ($obj4->AttributeValue != "") { $aValue = str_replace("^", "°", htmlentities($obj4->AttributeValue)); echo ($aValue); } else { echo ("n/a"); } echo ("
"); } $result->close(); } $mysqli->close(); ?>