<?php 

include_once("include/main.inc.php"); 

@extract($_REQUEST);

if (preg_match('drhsports\.net$/', $_SERVER['HTTP_HOST'], $match)) {
	$match1=$match[1];

	$vanity_url='http://'.$_SERVER['HTTP_HOST'];
}

$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";

$ee=explode('/',$actual_link);

$mm=$ee[3];

$ss=explode('.',$mm);

$cc=$ss[0];

$cat=str_replace("-", " ", $cc);

$cats=ucfirst($cat);

//echo $cats;

$cat_s="select * from category_tbl where catName='$cats'";
$cat_q=mysql_query($cat_s);
$num=mysql_num_rows($cat_q);
$cat_r=mysql_fetch_array($cat_q);

$category_id=$cat_r['catID'];

$cat_sql="select * from category_tbl where parentID='$category_id'";
$cat_qry=mysql_query($cat_sql);

$cat_sql1="select * from category_tbl where catID='$category_id'";
$cat_qry1=mysql_query($cat_sql1);
$cat_res=mysql_fetch_array($cat_qry1);
$title=$cat_res['pageTitle'];
$keyword=$cat_res['pageKeywords'];
$desc=$cat_res['pageDescription'];
$pageTitle=$cat_res['catName'];
$pdes=$cat_res['catDesc'];
$pdes1=$cat_res['catDesc1'];
$parent=$cat_res['parentID'];
$cat_sql2="select * from category_tbl where catID='$parent'";
$cat_qry2=mysql_query($cat_sql2);
$num2=mysql_num_rows($cat_qry2);
$cat_res2=mysql_fetch_array($cat_qry2);
$mparent=$cat_res2['parentID'];
$cat_sql3="select * from category_tbl where catID='$mparent'";
$cat_qry3=mysql_query($cat_sql3);
$num3=mysql_num_rows($cat_qry3);
$cat_res3=mysql_fetch_array($cat_qry3);
$mmparent=$cat_res3['parentID'];
$cat_sql4="select * from category_tbl where catID='$mmparent'";
$cat_qry4=mysql_query($cat_sql4);
$num4=mysql_num_rows($cat_qry4);
$cat_res4=mysql_fetch_array($cat_qry4);

?>
<?php
if($num > 0)
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php
if($title !='')
{
?>
<title><?php echo $title; ?></title>
<meta name="keywords" content="<?php echo $keyword; ?>" />
<meta name="description" content="<?php echo $desc; ?>" />
<?php
}
else
{
?>
<title><?php echo $pageTitle; ?> Manufacturers,<?php echo $pageTitle; ?> Suppliers,<?php echo $pageTitle; ?> Pakistan</title>
<meta name="keywords" content="<?php echo $pageTitle; ?>, <?php echo $pageTitle; ?> Manufacturers USA, <?php echo $pageTitle; ?> Manufacturer  Pakistan, Wholesale <?php echo $pageTitle; ?> Suppliers  Pakistan, <?php echo $pageTitle; ?> Exporters  Pakistan, <?php echo $pageTitle; ?> Suppliers Pakistan, Manufacturers of <?php echo $pageTitle; ?> USA, Wholesale Suppliers of <?php echo $pageTitle; ?> Australia, Exporters of <?php echo $pageTitle; ?> Australia, Italy" />
<meta name="description" content="<?php echo $pageTitle; ?> Manufacturers Pakistan - Formative Sports Wholesale <?php echo $pageTitle; ?> Suppliers Spain,Aussie Shorts Australia, <?php echo $pageTitle; ?> Exporters Italy" />
<?php
}
?>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<link href="<?=SITE_URL_PATH;?>/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="<?=SITE_URL_PATH;?>/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">

<link rel="shortcut icon" type="" href="" />
<link href="<?=SITE_URL_PATH;?>/css/style.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">

</head>

<body>
<header>
<?php include "header.php"; ?>

</header>

<div class="clearfix"></div>

<?php


if(mysql_num_rows($cat_qry) > 0)
{
?>

<section class="middle-section-inner cross-bg">
<div class="container">
<div class="inner">
<div class="row-fluid ">

<div class="span3">
<div class="gw-sidebar">
	  <div id="gw-sidebar" class="gw-sidebar">
	    <div class="nano-content">
	      <ul class="gw-nav gw-nav-list">
	        <li class="init-arrow-down"> <a href="javascript:void(0)" onclick="javascript:goToURL(https://www.google.co.in)"> <span class="gw-menu-text">Category 1</span> <b class="gw-arrow"></b> </a>
	          <ul class="gw-submenu">
	            <li> <a href="javascript:void(0)">Menu 1</a> </li>
	            </ul>
	          </li>
	        <li class="init-arrow-down"> <a href="javascript:void(0)"> <span class="gw-menu-text">Category 2</span> <b class="gw-arrow icon-arrow-up8"></b> </a>
	          <ul class="gw-submenu">
	            <li> <a href="javascript:void(0)">Menu 1</a> </li>
	            <li> <a href="javascript:void(0)">Menu 2</a> </li>
	            <li> <a href="javascript:void(0)">Menu 3</a> </li>
	          </ul>
	        </li>
	        <li class="init-arrow-down"> <a href="javascript:void(0)"> <span class="gw-menu-text">Category 3</span> <b></b> </a>
	          <ul class="gw-submenu">
	            <li> <a href="javascript:void(0)">Menu 1</a> </li>
	            <li> <a href="javascript:void(0)">Menu 2</a> </li>
	            <li> <a href="javascript:void(0)">Menu 3</a> </li>
	          </ul>
	        </li>
	      </ul>
	    </div>
	  </div>
	</div>
</div>

<div class="span9 pull-right">

<div class="breadcrum">
<a href="<?=SITE_URL_PATH;?>/index.html">Home</a> 
<?php if($num3 > 0) {?>> <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($cat_res3['catName']);?>.htm"><?php echo $cat_res3['catName']; ?></a> <?php } ?>

<?php if($num2 > 0) {?>> <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($cat_res2['catName']);?>.htm"><?php echo $cat_res2['catName']; ?></a> <?php } ?> 
><?php echo $pageTitle; ?>
</div>
<div class="product-box">
<h1><?php echo $pageTitle; ?></h1>
<p><?php echo html_entity_decode($pdes1); ?></p>
<p class="detail">For more details please click on the links given below</p>

<?php
while($sub_res=mysql_fetch_array($cat_qry))
{
?>

<div class="sub-category-box"><h2><a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($sub_res['catName']);?>.htm"><?php echo $sub_res['catName'];?></a></h2>
<div class="line"></div>
<div class="content-area">
<div class="row-fluid">
<div class="span2"> <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($sub_res['catName']);?>.htm"><img src="<?=SITE_URL_PATH;?>/uploaded_files/category_images/<?php echo $sub_res['catImage']; ?>"></a></div>
<div class="span10 des"><?php echo $sub_res['catDesc'];?> <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($sub_res['catName']);?>.htm">more...</a> </div></div>

<ul class="sub-links">
<?php
$catids=$sub_res['catID'];
$cat_sql2="select * from category_tbl where parentID='$catids'";
$cat_qry2=mysql_query($cat_sql2);
while($sub_res2=mysql_fetch_array($cat_qry2))
{
?>
<li>» <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($sub_res2['catName']);?>.htm"><?php echo $sub_res2['catName'];?></a></li>
<?php
}
?>
</ul>
</div>
</div>
<?php
}
?>

</div>
</div>
</div>
</div>
</div>
</section>

<?php
}
else
{
?>

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>

<section class="middle-section-inner cross-bg">
<div class="container">
<div class="inner">
<div class="row-fluid ">

<div class="span3">
<div class="gw-sidebar">
	  <div id="gw-sidebar" class="gw-sidebar">
	    <div class="nano-content">
	      <ul class="gw-nav gw-nav-list">
	        <li class="init-arrow-down"> <a href="javascript:void(0)" onclick="javascript:goToURL(https://www.google.co.in)"> <span class="gw-menu-text">Category 1</span> <b class="gw-arrow"></b> </a>
	          <ul class="gw-submenu">
	            <li> <a href="javascript:void(0)">Menu 1</a> </li>
	            </ul>
	          </li>
	        <li class="init-arrow-down"> <a href="javascript:void(0)"> <span class="gw-menu-text">Category 2</span> <b class="gw-arrow icon-arrow-up8"></b> </a>
	          <ul class="gw-submenu">
	            <li> <a href="javascript:void(0)">Menu 1</a> </li>
	            <li> <a href="javascript:void(0)">Menu 2</a> </li>
	            <li> <a href="javascript:void(0)">Menu 3</a> </li>
	          </ul>
	        </li>
	        <li class="init-arrow-down"> <a href="javascript:void(0)"> <span class="gw-menu-text">Category 3</span> <b></b> </a>
	          <ul class="gw-submenu">
	            <li> <a href="javascript:void(0)">Menu 1</a> </li>
	            <li> <a href="javascript:void(0)">Menu 2</a> </li>
	            <li> <a href="javascript:void(0)">Menu 3</a> </li>
	          </ul>
	        </li>
	      </ul>
	    </div>
	  </div>
	</div>
</div>
<div class="span9 pull-right">
<div class="breadcrum">

<a href="<?=SITE_URL_PATH;?>/index.html">Home</a> 
<?php if($num4 > 0) {?>> <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($cat_res4['catName']);?>.htm"><?php echo $cat_res4['catName']; ?></a> <?php } ?>
<?php if($num3 > 0) {?>> <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($cat_res3['catName']);?>.htm"><?php echo $cat_res3['catName']; ?></a> <?php } ?>
<?php if($num2 > 0) {?>> <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($cat_res2['catName']);?>.htm"><?php echo $cat_res2['catName']; ?></a> <?php } ?>
><?php echo $pageTitle; ?>
</div>
<div class="product-listing">
<h1 class="catergory-title">
<?php
echo $pageTitle;
?>
</h1>
<p><?php echo html_entity_decode($pdes1); ?></p>

<?php
$sql_pro=mysql_query("select * from product_tbl where product_finalcat='$category_id' or product_subsubcat='$category_id' or prodcut_subcat='$category_id'");
	
if(mysql_num_rows($sql_pro) > 0)
{	
?>
<div class="btn-group">
<a href="#" id="list" class="btn-grid"><i class="fa fa-th-large"></i></a> <a href="#" id="grid" class="btn-grid"><i class="fa fa-list"></i></a>
</div>
<div id="products" class=" list-group">
<div class="row-fluid">
<ul class="pro-list">
<?php
while($res_pro=mysql_fetch_array($sql_pro))
{
?>
        <li class="item  span4 ajax-block-product">
        <div class="thumbnail">
		<div class="eshop-image-block">
		<div class="image">
		<a href="#" class="product-image"><img src="<?=SITE_URL_PATH;?>/uploaded_files/product_images/thumbs/<?php echo $res_pro['product_image'];?>" title="Cotton Shirt" alt="Cotton Shirt"></a>
		<span class="overlay-background-color">&nbsp;</span>
		</div>
		<div class="eshop-buttons">                            
		<div class="eshop-cart-area">
<a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($res_pro['product_title']);?>.htm"><button id="add-to-cart-15" class="btn-orange" ><i class="fa fa-arrow-right">&nbsp;</i>&nbsp;View Detail</button></a>
		</div>
		</div>
		</div>
		<div class="eshop-info span12">
		<div class="eshop-info-block">
		<h4 class="eshop-product-title"><a href="#"><?php echo $res_pro['product_title'];?></a></h4>
		<div class="eshop-product-desc"><?php echo html_entity_decode($res_pro['product_desc']);?></div>
        <div class="row-fluid eshop-table">
        <div class="eshop-product-review span6"><?php echo $res_pro['product_code'];?></div>
        <div class="eshop-product-price span6"><span class="price">$<?php echo $res_pro['product_price'];?></span>
        </div>
        </div>
        <div class="eshop-buttons">    
        <button id="add-to-cart-15" class="btn-orange" ><i class="fa fa-arrow-right">&nbsp;</i>&nbsp;View Detail</button>
		</div>
		</div>
		</div>
        </div>
        </li>
       <?php
	   }
	   }
	   ?> 
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-hover-dropdown.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#list').click(function(event){event.preventDefault();$('#products .item').addClass('list-group-item');});
$('#grid').click(function(event){event.preventDefault();$('#products .item').removeClass('list-group-item');$('#products .item').addClass('grid-group-item');});
});
</script>
</body>
</html>
<?php
}
?>
<div class="clearfix mb40"></div>
<?php include "footer.php";

}
else
{

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<link href="<?=SITE_URL_PATH;?>/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="<?=SITE_URL_PATH;?>/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">

<link rel="shortcut icon" type="" href="" />
<link href="<?=SITE_URL_PATH;?>/css/style.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">

</head>

<body>
<header>

<?php include "header.php"; ?>

</header>
<div class="clearfix"></div>


	
<section class="middle-section-inner cross-bg">
<div class="container">
<div class="inner">
<div class="row-fluid ">

<div class="span3">
<div class="gw-sidebar">
	  <div id="gw-sidebar" class="gw-sidebar">
	    <div class="nano-content">
	      <ul class="gw-nav gw-nav-list">
	        <li class="init-arrow-down"> <a href="javascript:void(0)" onclick="javascript:goToURL(https://www.google.co.in)"> <span class="gw-menu-text">Category 1</span> <b class="gw-arrow"></b> </a>
	          <ul class="gw-submenu">
	            <li> <a href="javascript:void(0)">Menu 1</a> </li>
	            </ul>
	          </li>
	        <li class="init-arrow-down"> <a href="javascript:void(0)"> <span class="gw-menu-text">Category 2</span> <b class="gw-arrow icon-arrow-up8"></b> </a>
	          <ul class="gw-submenu">
	            <li> <a href="javascript:void(0)">Menu 1</a> </li>
	            <li> <a href="javascript:void(0)">Menu 2</a> </li>
	            <li> <a href="javascript:void(0)">Menu 3</a> </li>
	          </ul>
	        </li>
	        <li class="init-arrow-down"> <a href="javascript:void(0)"> <span class="gw-menu-text">Category 3</span> <b></b> </a>
	          <ul class="gw-submenu">
	            <li> <a href="javascript:void(0)">Menu 1</a> </li>
	            <li> <a href="javascript:void(0)">Menu 2</a> </li>
	            <li> <a href="javascript:void(0)">Menu 3</a> </li>
	          </ul>
	        </li>
	      </ul>
	    </div>
	  </div>
	</div>
</div>
<div class="span9 pull-right">
<div class="breadcrum"><a href="#">Home</a> > <a href="#">Products</a> > Sports Equipment</div>
<div class="top-banner-area"><img src="images/top-banner-1.jpg" width="870" height="198" /></div>
<div class="product-final">
<div class="row-fluid">
<div class="span5"><p><a class="group1" href="images/big.jpg" title="Me and my grandfather on the Ohoopee."><img src="images/small.jpg"  class="brd"></a></p></div>
<div class="span7 detail-section"><h1>Product Name Comes Here</h1>


<div>

    <div class="product-desc">
        <address>
<strong>Minimum Order Quantity:</strong><span></span> Piece/Pieces
<br>
<strong>Supply Availability:</strong><span>1000 Piece/Pieces per month</span>
<br>
<strong>Place of origin:</strong><span>Place name comes here</span>
        </address>
        </div>
        <div class="product-price-range">
        <h3>Price range comes here</h3>
        
    </div>
<h4>Send Quick Enquiry</h4>
<form class="enq-form">
<div class="form-group">

    <label class="sr-only" for="exampleInputEmail2">

        Your Name

    </label>
    <input id="exampleInputEmail2" class="form-control" type="name" placeholder="Enter your name "></input>

</div>
<div class="form-group">

    <label class="sr-only" for="exampleInputEmail2">

       Mobile no.

    </label>
    <input id="exampleInputEmail2" class="form-control" type="phone" placeholder="Enter Mobile no."></input>

</div>
<div class="form-group">

    <label class="sr-only" for="exampleInputEmail2">

       Email ID.

    </label>
    <input id="exampleInputEmail2" class="form-control" type="phone" placeholder="Enter Email Id.."></input>

</div>
<div class="form-group">

    <label class="sr-only" for="exampleInputEmail2">

       Quantity.

    </label>
    <input id="exampleInputEmail2" class="form-control" type="phone" placeholder="Enter Quantity no."></input>

</div>
<div class="form-group">

    <label class="sr-only" for="exampleInputEmail2">

       Mobile no.

    </label>
    <select name="Select Nack option">
      <option value="1">Select Neck Options</option>
      <option value="2">Option2</option>
    </select>

</div>
<div class="form-group"><input name="Send" type="submit" class="submit" /></div>
</form>
</div>
</div>
</div>
</div>
<div class="desc-wrap">
 <h1 class="catergory-title">Description</h1>
 
 <div class="white-area"></div></div>
</div>


</div>
</div>
</div>
</section>
<div class="clearfix mb40"></div>
<?php
include "footer.php";
}
?>
 