<?
	ob_start();
	session_start();
 	include("include/db.inc.php");
 	include("include/bit_functions.inc.php");
	include("include/functions.php");
	if($_SESSION['lang']=='')
	{
		$_SESSION['lang'] = "en";
	}	

	include 'languages/lang_common_'.$_SESSION['lang'].'.php';
    $db1=new db;
    $db1->open();mysql_query("SET NAMES 'utf8'");
    $uid=$_SESSION['uid'];
	$catid=$_GET['catid'];
	include("include/meta_functions.php");	
?>
<!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>
<base href="<?=_BASEURL_?>/" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=_TITLE_?>High Discount on all New Products</title>
<meta name="description" content="High Discount on <?
				    $sqlcat="select * from add_category where top='$catid' order by name";
   					$rscat=mysql_query($sqlcat);
					$x=0;
					while($cate=mysql_fetch_array($rscat))
					{
					
					  $res=mysql_query("select id from add_category where top='".$cate[id]."'");
					  if(mysql_num_rows($res)>0)
					   {
					   ?><?=$cate['name'] ?>,
					   <? }
					   }?>. Discount can go upto 70%. Bid now and win it" />
<meta name="keywords" content="<?
				    $sqlcat="select * from add_category where top='$catid' order by name";
   					$rscat=mysql_query($sqlcat);
					$x=0;
					while($cate=mysql_fetch_array($rscat))
					{
					  $res=mysql_query("select id from add_category where top='".$cate[id]."'");
					  if(mysql_num_rows($res)>0)
					   {
					   ?><?=$cate['name'] ?>,
					   <? }
					   }?>" />
<META Http-Equiv="Cache-Control" Content="no-cache">
<META Http-Equiv="Pragma" Content="no-cache">
<META Http-Equiv="Expires" Content="0">
<meta name="author" content="Info-Tech Ltd.">
<meta name="publisher" content="Info-Tech Ltd.">
<meta name="copyright" content="123Gewon">
<meta name="page-topic" content="Service">
<meta name="audience" content="all">
<meta http-equiv="content-language" content="us">
<meta name="Language" content="english">
<meta name="robots" content="index,follow">
<meta name="revisit-after" content="3">
<link href="css/english/index.css" rel="stylesheet" type="text/css" />
<link href="css/english/categories.css" rel="stylesheet" type="text/css" />
<link href="<?=_BASEURLCSSNEW_?>/index.css" rel="stylesheet" type="text/css" />
<link href="<?=_BASEURLCSSNEW_?>/index_sec.css" rel="stylesheet" type="text/css" />
<!--[if lte IE 6]><style type="text/css" media="screen">/* <![CDATA[ */ @import url(<?=_BASEURLCSSNEW_?>/ie6.css?0:102290); /* ]]> */</style><![endif]-->
<!--[if gte IE 7]><style type="text/css" media="screen">/* <![CDATA[ */ @import url(<?=_BASEURLCSSNEW_?>/ie7.css?0:99961); /* ]]> */</style><![endif]-->
</head>
<body>
<div id="container">
<? include("header.php");?>



            <div class='tal allp5px lineimgcat' colspan="4">
            
            <a href='allcategories/index.html'  class='boldorangelinks'>Categories </a> 
			<?
            $tree=get_cat_tree($catid); 
			$trarr=explode(",",$tree);
			$newtree=array_reverse($trarr);
			
			for($a=0; $a<count($newtree); $a++)
			{			
			?>
            &nbsp;&nbsp; <a href="subcat/<?=get_cat_name($newtree[$a]); ?>/<?=$newtree[$a];?>/" class='boldorangelinks'><?=get_category($newtree[$a])?></a> 
           <? } ?>
            
            </div>

    <div id="boringcate">        
          
<?
				    $sqlcat="select * from add_category where top='$catid' order by name";
   					$rscat=mysql_query($sqlcat);					
					while($cate=mysql_fetch_array($rscat))
					{
						
					  $tree=get_child_tree($cate[id]);
					  $child=substr($tree,1);
					
					  $numpro=mysql_num_rows(mysql_query("select pid from t123go_product where cid in ($child) and start_time <= DATE_ADD(now(), INTERVAL 72 HOUR) and end_time > DATE_SUB(now(), INTERVAL 2 MINUTE) and status='1'"));
												 
					  $res=mysql_query("select id from add_category where top='".$cate[id]."'");
					  if(mysql_num_rows($res)>0)
					   {
					   ?>
                       <div id="categ"><div ><a href="subcat/<?=get_cat_name($cate['id']); ?>/<?=$cate[id];?>/" class="lm40px">
					   <?=get_cat_image($cate['image'],40,30)?></a>
					   <span class="amazing_showcate"><a href="subcat/<?=get_cat_name($cate['id']); ?>/<?=$cate[id];?>/" class='anywhere lm30px'><?=$cate['name'] ?></a> <span class="normaltextgreybold13 ">( <?=$numpro?> )</span></span></div></div>
                       
                	   <? 
					   }
					  else
					   { ?>
                       <div id="allcateg"><div ><a href="subcat/<?=get_cat_name($cate['id']); ?>/allauction/<?=$cate[id];?>/" class='anywhere lm40px '>
					   <?=get_cat_image($cate['image'],40,30)?></a>
					   <span class="amazing_showcate"><a href="subcat/<?=get_cat_name($cate['id']); ?>/allauction/<?=$cate[id];?>/" class='anywhere lm30px'><?=$cate['name'] ?></a> <span class="normaltextgreybold13 ">( <?=$numpro?> )</span></span></div></div>
			    
	 				 <? }
 					
					
				 	  }

				 	?>              
   
       
</div>
<? include("footer.php");?>
</div>
</body>
</html>
