So for the KBDuct website, I have to create three new buttons for their backdraft page. 1)Bulletin 2)Sizes and Specs 3)Manual. But for the other products I only want the "Sizes and Specs" button to show. I've tried using the "else if" method but it's not working. I'm sure that I'm doing this wrong. Any help?
WEBSITE:
http://www.kbduct.com/solution-products/products/index.php?id=4
CODING:
<?php include('../../inc/default.php');
include('../../inc/solution.php');
$solution_id = $_GET["id"];
$solution = $solutions[$solution_id];
$pageTitle = 'Solution Products- ' . $solution["name"] . ' - KB Duct';
$pageKeys = $solution["metakeys"];
$pageDisc = $solution["metadisc"];
?>
<!doctype html>
<html>
<?php include('../../inc/head.php'); ?>
<body>
<div id="sb-site">
<?php include('../../inc/maximage.php'); ?>
<?php include('../../inc/header.php'); ?>
<div class="mainarea">
<div class="wrapper">
<?php include('../../inc/industry.php'); ?>
<?php include('../../inc/catatypes.php'); ?>
<div id="products" style="padding-bottom:150px; margin-bottom:100px;">
<div class="main-product">
<h1>SOLUTION PRODUCTS > <?php echo $solution["name"] ?></h1>
<div class="easyzoom easyzoom--overlay">
<a href="<?php echo $baseUrl . $solution["lrgimg"] ?>">
<img style="width:100%; border:solid 5px #fff !important; margin-top:30px;" src="<?php echo $baseUrl; ?><?php echo $solution["img"]; ?>" alt="<?php echo $solution["name"]; ?>">
</a>
</div>
<h1><?php echo $solution["headline"]; ?></h1>
<p class="prodDesc"><?php echo $solution["disc"]; ?></p>
<?php
if ($solutions["id"] == 4) {
echo
<a class="grayBtn button" target="_blank" href="<?php echo $baseUrl; ?><?php echo $solution["bullet"]; ?>"><p class="specBtn">Bulletin</p></a>
<a class="grayBtn button" target="_blank" href="<?php echo $baseUrl; ?><?php echo $solution["spec"]; ?>"><p class="specBtn">Sizes and Specs</p></a>
<a class="grayBtn button" target="_blank" href="<?php echo $baseUrl; ?><?php echo $solution["manu"]; ?>"><p class="specBtn">Manual</p></a>
} else {
<a class="grayBtn button" target="_blank" href="<?php echo $baseUrl; ?><?php echo $solution["spec"]; ?>"><p class="specBtn">Sizes and Specs</p></a>
}
?>
</div>
<div class="similar"">
<h4 style="margin-bottom:30px;">SIMILAR PRODUCTS</h4>
<?php
$solution_id = $_GET["id"];
$solution = $solutions[$solution_id];
$solution_cnt = count($solutions);
$x = 0;
while($x < $solution_cnt) {
//Step through all products
foreach($solutions[$x]["keywords"] as $keyword) {
//step through current products' keywords
$pieces = explode(",",$solution["keywords"][0]);
$used = array();
foreach ($pieces as $needle) {
//if they match, show it!
if(stristr($keyword,$needle) != false && $x != $solution_id)
{
if(in_array($solutions[$x]["id"],$used)){
//IGNORE BECAUSE ITS IN THE ARRAY OF PRODUCTS TO SHOW ALREADY
}else{
echo '<a href="' . $baseUrl . '/solution-products/products/index.php?id='
. $solutions[$x]["id"] .'"><img style="margin:0px 5% 10px 0px !important; width:25%; float:left; border:solid 2px #fff !important;" src="' . $baseUrl . $solutions[$x]["img"] . '" alt="' . $solutions[$x]["name"] . '"><p>' . $solutions[$x]["name"] . '</p><div style="clear:both;"></div>';
$used[] = $solutions[$x]["id"];
}
}
}
}
$x++;
}
?>
</div>
<?php /*?><?php foreach($products as $product_id => $product) {
echo get_list_view_html($product_id, $product);
}
?><?php */?>
</div>
</div>
</div>
<?php include('../../inc/footer.php'); ?>
</div>
<?php include('../../inc/mob-menu.php'); ?>
<script src="<?php echo $baseUrl; ?>/js/easyzoom.js" type="text/javascript" charset="utf-8"></script>
<script>
// Instantiate EasyZoom plugin
var $easyzoom = $('.easyzoom').easyZoom();
// Get the instance API
var api = $easyzoom.data('easyZoom');
</script>
</body>
</html>