<div
    class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-3 col-lg-pull-9 col-md-pull-9 order-xxl-first order-xl-first order-lg-first order-md-first order-sm-first order-last">
    <div class="left_sidebar">
        <div class="left_title">Our Products</div>
        <ul>
            <?php
$sql=mysqli_query($dbcon,"select * from category_tbl where parentID='1'");
while($res=mysqli_fetch_array($sql))
{
?>
            <li><a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($res['catName']);?>.htm"
                    title="<?php echo $res['displayName']; ?> Manufacturers in Haryana"><?php echo $res['displayName']; ?></a>

                <?php 
if($res['catName']==$cat_res4[catName] || $res['catName']==$cat_res3[catName] || $res['catName']==$cat_res2[catName] || $res['catName']==$catn)
{
$catID=$res['catID'];
$sql_sub=mysqli_query($dbcon,"select * from category_tbl where parentID='$catID'");
if(mysqli_num_rows($sql_sub) > 0)
{
?>

                <ul>
                    <?php
 while($subres=mysqli_fetch_array($sql_sub))
 {
 $catIDs=$subres['catID'];
 $sql_subsub=mysqli_query($dbcon,"select * from category_tbl where parentID='$catIDs'");
 if(mysqli_num_rows($sql_subsub) > 0)
 {
 ?>
                    <li><a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($subres['catName']);?>.htm"
                            title="<?php echo $subres['displayName']; ?> Manufacturers in Haryana"><?php echo $subres['displayName']; ?></a>
                        <ul>
                            <?php
 while($subsubres=mysqli_fetch_array($sql_subsub))
 {
 $catIDss=$subsubres['catID'];
 $sql_final=mysqli_query($dbcon,"select * from category_tbl where parentID='$catIDss'");
 if(mysqli_num_rows($sql_final) > 0)
 {
 ?>
                            <li>
                                <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($subsubres['catName']);?>.htm"
                                    title="<?php echo $subsubres['displayName']; ?> Manufacturers in Haryana"><?php echo $subsubres['displayName']; ?></a>
                                <ul>
                                    <?php
while($finalres=mysqli_fetch_array($sql_final))
{
?>
                                    <li>
                                        <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($finalres['catName']);?>.htm"
                                            title="<?php echo $finalres['displayName']; ?> Manufacturers in Haryana"><?php echo $finalres['displayName']; ?></a>
                                    </li>
                                    <?php 
 }
 ?>
                                </ul>
                            </li>
                            <?php 
 }
else
{
?>
                            <li>
                                <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($subsubres['catName']);?>.htm"
                                    title="<?php echo $subsubres['displayName']; ?> Manufacturers in Haryana"><?php echo $subsubres['displayName']; ?></a>
                            </li>
                            <?php
}
}
?>
                        </ul>
                    </li>
                    <?php
}
else
{
?>
                    <li>
                        <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($subres['catName']);?>.htm"
                            title="<?php echo $subres['displayName']; ?> Manufacturers in Haryana"><?php echo $subres['displayName']; ?></a>
                    </li>
                    <?php
}
}
?>
                </ul>

                <?php
}
}
?>
            </li>
            <?php 
}
?>
        </ul>
    </div>
    
</div>