OverLord Shell

Path : G:/PleskVhosts/jaincensus.com/macciaweb.ultraliant.com/businessforum/
File Upload :
Current File : G:/PleskVhosts/jaincensus.com/macciaweb.ultraliant.com/businessforum/allcat.php

<?php 
session_start();
require_once("db/conn.php");
//$catid=base64_decode($_GET['id']);
include_once("header.inc.php");
 

$sqlcat=$connection->query("SELECT * FROM busdir_mst_category WHERE active='y' order by categoryname ");
?>
<style>
#myBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 99;
  border: none;
  outline: none;
  background-color: #147fcc;
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 36px;
}

#myBtn:hover {
  background-color: #555;
}
</style>

<section id="content" class="greybg">
	<div class="container">
    <button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
    	<div class="row">
        	<div class="col-md-12">
         
            	<h2 class="page-header"><strong>Categories</strong></h2>
            </div>
        </div>
        
    	<div class="row">
        
			<?php
           
            while($catdata=$sqlcat->fetch_assoc()){
            ?>     
             <div class="col-md-4 " style="height: 160px;  padding-bottom: 20%; ">
            
            
                <div class="well" style="padding:0%">
                   
                    <div class="media" style="    background-color: white;
}">
                                  
                        <div class="col-sm-6" >
                            <a href="category.php?id=<?php echo base64_encode($catdata['catid'])?>"><img class="media-object" data-src="realimage2.gif" src="uploads/category/<?php echo $catdata['category_image']?>" style="height: 165px;
    width: 154px; opacity:0.9;    margin-left: -9%;"></a>
                        </div>
                         <div class="col-sm-6" >
                         <div style="padding-bottom:5%;padding-top:5%">
                          <h4 style="margin-left: -0.857143em;"><b><a href="category.php?id=<?php echo base64_encode($catdata['catid'])?>" class="black"><?php echo $catdata['categoryname']?></a></b></h4>
                          </div>
                            <ul class="fa-ul" style=" font-size: 12px;margin-left: -0.857143em;">
                                <?php
                                $sqlsubcat=$connection->query("SELECT * FROM busdir_mst_subcategory WHERE active='y' AND catid = ".$catdata['catid']." ORDER BY subcategoryname LIMIT 2");
                                $x=1;
                                while($subcatdata=$sqlsubcat->fetch_assoc()){
                                ?>
                                <li><i class="fa-li fa fa-angle-right"></i><a href="subcategory.php?id=<?php echo base64_encode($subcatdata['subcatid'])?>" title="<?php echo $subcatdata['subcategoryname']?>"><?php echo substr($subcatdata['subcategoryname'],0,32);if(strlen($subcatdata['subcategoryname'])>20)echo "...";?></a></li>
                                <?php
                                    $x++;
                                }
								//if category has less than 4 subcategories, adding empty 'li' tags to match height
                                if($x<5){
                                    while($x<5){
                                    ?>
                                <li>&nbsp;</li>
                                    <?php
                                        $x++;
                                    }
                                }
                                ?>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <?php
            }
            ?>
        </div>
    </div>
</section>

<script>
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};

function scrollFunction() {
    if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
        document.getElementById("myBtn").style.display = "block";
    } else {
        document.getElementById("myBtn").style.display = "none";
    }
}

// When the user clicks on the button, scroll to the top of the document
function topFunction() {
    document.body.scrollTop = 0;
    document.documentElement.scrollTop = 0;
}
</script>


<?php include_once("footer.inc.php");//connClose();?>

xRyukZ - Copyright 2k19