MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 3.142.40.195
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/ppcad7no/irshadwoodenscrap.com/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/irshadwoodenscrap.com/category.php
<?php include("site-header.php");?>
  <div>
    <?php include("site-left-menu.php");?>
    <!--strat here lightbox script-->
    <link rel="stylesheet" href="<?=$site_url?>/css/lightbox.css">
    <!--strat here lightbox script-->
    <?php
	    $prd_name=$_REQUEST['cat_name'];
	    $catID=db_scalar("select category_id from tbl_category where 1 and category_url='$prd_name'");
	    $countSubCat=db_scalar("select count(*) from tbl_category where category_parent_id='$catID' and category_status='Active'"); // Count for sub category
	  ?>
    <?php if($countSubCat > 0){ ?>
    <?php 
     $sql_cat=db_query("select * from tbl_category where 1 and category_id='$catID'");
      if(mysqli_num_rows($sql_cat) > 0){
	   $CAT_DATA=mysqli_fetch_array($sql_cat);
	   @extract($CAT_DATA);
	  }	  
	?>
    <div class="w680px fl mt10px ml20px">
      <div >
        <h1 class="gray">
            <?=ucwords(strtolower($CAT_DATA['category_name']));?>
        </h1>
        <p class="bdrB1 mt3px"></p>
        <p class="fr black2"><span class="mr5px"><a href="<?=$site_url?>/index.html">Home</a></span>&raquo; &nbsp;<span class="mr5px"><a href="<?=$site_url?>/products.html">
          <?php if($compDATA['admin_product_option']=='Yes'){ ?>
          Products
          <? }else{ ?>
          Services
          <? } ?>
          </a></span>&raquo; <span class="ml5px">
          <?=ucwords(strtolower($CAT_DATA['category_name']));?>
          </span></p>
      </div>
      <div class="mt30px">
        <div class="mt10px lh15em gray aj large"> <a href="<?=$site_url?>/uploaded_files/<?=$CAT_DATA['category_image_name']?>" data-lightbox="example-1"><img src="<?=$site_url?>/uploaded_files/<?=$CAT_DATA['category_image_name']?>" alt="<?php if($CAT_DATA['category_is_product']=='Yes'){ ?> Manufacturers Exporters and Wholesale Suppliers of <?=$CAT_DATA['category_name']?> <?php echo $compDATA['admin_city']; ?> <?php echo $compDATA['admin_state']; ?> <? }else{ ?> Service Provider of <?=$CAT_DATA['category_name']?> <?php echo $compDATA['admin_city']; ?> <?php echo $compDATA['admin_state']; ?> <? } ?>" title="<?php if($CAT_DATA['category_is_product']=='Yes'){ ?> Manufacturers Exporters and Wholesale Suppliers of <?=$CAT_DATA['category_name']?> <?php echo $compDATA['admin_city']; ?> <?php echo $compDATA['admin_state']; ?> <? }else{ ?> Service Provider of <?=$CAT_DATA['category_name']?> <?php echo $compDATA['admin_city']; ?> <?php echo $compDATA['admin_state']; ?> <? } ?>" width="230" height="210" hspace="10" class="fr bd" /></a>
          <?=$CAT_DATA['category_description']?>
        </div>
        <p class="cb"></p>
        <?php
   $sql_catimage=db_query("select * from tbl_category_image where 1 and category_image_cat_id='$catID' order by category_image_id desc");
	 if(mysqli_num_rows($sql_catimage)>0){
	 ?>
        <div class="mt20px">
          <?php
	 while($CAT_IMAGE=mysqli_fetch_array($sql_catimage)){
	  @extract($CAT_IMAGE);
	?>
          <div class="fl bd4 p10px ml6px w150px"> <a href="<?=$site_url?>/category_more_images/<?=$CAT_IMAGE['category_image_name']?>" data-lightbox="example-1"> <img  src="<?=$site_url?>/category_more_images/<?=$CAT_IMAGE['category_image_name']?>" width="145" height="120" alt="<?=$category_image_title?>" title="<?=$category_image_title?>" /> </a> </div>
          <? } ?>
          <p class="cb"></p>
        </div>
        <? } ?>
        <?php
     $sql_subcat=db_query("select * from tbl_category where 1 and category_parent_id='$catID' and category_status='Active' order by category_id asc");
      while($SUBCAT_DATA=mysqli_fetch_array($sql_subcat)){
	  @extract($SUBCAT_DATA);
	 ?>
        <div class="mt20px bg7 bd">
          <h4>
            <p class="p5px gray"><a href="<?=$site_url?>/<?=$SUBCAT_DATA['category_url']?>.html">
              <?=ucwords(strtolower($SUBCAT_DATA['category_name']));?>
              </a></p>
          </h4>
          <p class="bd1 mt5px"></p>
          <div>
            <div class="fl w200px">
              <p class="p5px"><img src="<?=$site_url?>/uploaded_files/<?=$SUBCAT_DATA['category_image_name']?>" alt="<?php if($SUBCAT_DATA['category_is_product']=='Yes'){ ?> Manufacturers Exporters and Wholesale Suppliers of <?=$SUBCAT_DATA['category_name']?> <?php echo $compDATA['admin_city']; ?> <?php echo $compDATA['admin_state']; ?> <? }else{ ?> Service Provider of <?=$SUBCAT_DATA['category_name']?> <?php echo $compDATA['admin_city']; ?> <?php echo $compDATA['admin_state']; ?> <? } ?>" title="<?php if($SUBCAT_DATA['category_is_product']=='Yes'){ ?> Manufacturers Exporters and Wholesale Suppliers of <?=$SUBCAT_DATA['category_name']?> <?php echo $compDATA['admin_city']; ?> <?php echo $compDATA['admin_state']; ?> <? }else{ ?> Service Provider of <?=$SUBCAT_DATA['category_name']?> <?php echo $compDATA['admin_city']; ?> <?php echo $compDATA['admin_state']; ?> <? } ?>" width="190" height="180" /></p>
            </div>
            <?php $description=strip_tags($SUBCAT_DATA['category_description']);?>
            <div class="fl w500px ml10px mt5px aj lh15em gray">
              <?=substr($description,0,550);?>
              <em class="orange ml10px"><a href="<?=$site_url?>/<?=$SUBCAT_DATA['category_url']?>.html">Read more..</a></em></div>
            <p class="cb"></p>
          </div>
          <p class="cb"></p>
        </div>
        <? } ?>
        <p class="cb"></p>
      </div>
      <p class="cb"></p>
    </div>
    <? }else{ ?>
    <?php
	   if(!empty($catID)){
	     $sql_final=db_query("select * from tbl_category where 1 and category_id='$catID'");
		  $FINAL_DATA=mysqli_fetch_array($sql_final);
	      @extract($FINAL_DATA);
		  $productName=$FINAL_DATA['category_name'];
		  $productImageName=$FINAL_DATA['category_image_name'];
		  $productDescription=$FINAL_DATA['category_description'];
	   }
	   
	  ?>
    <div class="w680px fl mt10px ml20px">
      <div >
        <h1 class="gray">
            <?=ucwords(strtolower($productName));?>
        </h1>
        <p class="bdrB1 mt5px"></p>
        <p class="fr black2"><span class="mr5px"><a href="<?=$site_url?>/index.html">Home</a></span>&raquo; &nbsp;<span class="mr5px"><a href="<?=$site_url?>/products.html">
          <?php if($compDATA['admin_product_option']=='Yes'){ ?>
          Products
          <? }else{ ?>
          Services
          <? } ?>
          </a></span>&raquo; <span class="ml5px">
          <?=ucwords(strtolower($productName));?>
          </span></p>
      </div>
      <div class="mt30px">
        <p class="mt10px" align="center"><img src="<?=$site_url?>/uploaded_files/<?=$productImageName?>" class="bd4 p5px radius" width="400" height="300" alt="<?php if($FINAL_DATA['category_is_product']=='Yes'){ ?> Manufacturers Exporters and Wholesale Suppliers of <?=$FINAL_DATA['category_name']?> <?php echo $compDATA['admin_city']; ?> <?php echo $compDATA['admin_state']; ?> <? }else{ ?> Service Provider of <?=$FINAL_DATA['category_name']?> <?php echo $compDATA['admin_city']; ?> <?php echo $compDATA['admin_state']; ?> <? } ?>" title="<?php if($FINAL_DATA['category_is_product']=='Yes'){ ?> Manufacturers Exporters and Wholesale Suppliers of <?=$FINAL_DATA['category_name']?> <?php echo $compDATA['admin_city']; ?> <?php echo $compDATA['admin_state']; ?> <? }else{ ?> Service Provider of <?=$FINAL_DATA['category_name']?> <?php echo $compDATA['admin_city']; ?> <?php echo $compDATA['admin_state']; ?> <? } ?>" /></p>
        <div class="mt10px lh15em gray aj large">
          <?=$productDescription?>
        </div>
        <p align="center" class="mt20px"><a href="" class="topopup">
          <input type="submit" name="submit" value="Send Enquiry" class="bbnt2" style="height:40px; width:120px;" />
          </a></p>
        <?php
   $sql_catimage=db_query("select * from tbl_category_image where 1 and category_image_cat_id='$catID' order by category_image_id desc");
	 if(mysqli_num_rows($sql_catimage)>0){
	 ?>
        <div class="mt10px">
          <?php
	 while($CAT_IMAGE=mysqli_fetch_array($sql_catimage)){
	  @extract($CAT_IMAGE);
	?>
          <div class="bd w220px mt10px ml10px fl ">
            <h4>
              <p class="gray p5px">
                <?=$CAT_IMAGE['category_image_title']?>
              </p>
            </h4>
            <p class="bd"></p>
            <p class="p5px"> <a href="<?=$site_url?>/category_more_images/<?=$CAT_IMAGE['category_image_name']?>" data-lightbox="example-1"> <img src="<?=$site_url?>/category_more_images/<?=$CAT_IMAGE['category_image_name']?>" width="215" height="200" alt="<?=$productName?>" title="<?=$productName?>" /> </a> </p>
          </div>
          <? } ?>
          <p class="cb"></p>
        </div>
        <? } ?>
        <p class="cb"></p>
      </div>
      <p class="cb"></p>
    </div>
    <? } ?>
    <p class="cb"></p>
  </div>
</div>
<script src="<?=$site_url?>/js/lightbox.js"></script>
<?php include("site-footer.php");?>

MMCT - 2023