<?php require_once('Config/bootstrap.php');
//$pagetitle='Demo';
$db=db_connect();
$id=base64_decode($_REQUEST['id']);
$arr=db_read(db_execute("select categoryname from category where id='".$id."'",$db,false));
$pagetitle=$arr['categoryname'];
require_once('header.php');
$db=db_connect();?>
<style>.fancybox_new {
-moz-box-shadow: 1px 1px 6px #7a7a7a;
-webkit-box-shadow: 1px 1px 6px #7a7a7a;
box-shadow: 1px 1px 6px #7a7a7a;
border: solid 10px #FFFFFF;
margin: 10px;</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="22%" height="50" align="left" background="images/tit_bg.jpg"><p class="powered"><strong><?php echo $pagetitle; ?></strong></p></td>
            <td width="78%" background="images/ti_bg.jpg">&nbsp;</td>
          </tr>
</table>
 <tr>
     <td>
         <div id="ca-container" class="ca-container">
				<div class="ca-wrapper">
                                    <?php 
                   $rs=db_execute("select * FROM product where category=$id order by id Desc",$db,false);
                   $row_count=db_RowCount($rs);
                   while($row=db_read($rs)){
                   $images=db_read(db_execute("select imgurl from productimage where albumid='".$row['id']."' limit 1",$db,false));
                   
                   ?>
					<div class="ca-item ca-item-1">
						<a href="product_detail.php?id=<?php echo base64_encode($row['id']);?>" class="ca-more_pr">
						<div class="ca-item-main">
                             <div>
<!--                            <img src="<?php echo "admin/Ajax/".$images['imgthumburl'];  ?>"  width="189"  />-->
                                <img src="<?php echo $images['imgurl'];?>" width="189px" height="189px"/>
                             </div>
                           <h3 style=" text-decoration:none;"><?php echo $row['title'];?></h3>
							<a href="product_detail.php?id=<?php echo base64_encode($row['id']);?>" class="ca-more1">more...</a>
						</div>
						</a>
					</div>
                   <?php }?>                
					
<!--					<div class="ca-item ca-item-1">
						<div class="ca-item-main">
							<div class=""><img src="images/animal1.png" /></div>
							<h3>Projectors</h3>
								<a href="product_detail.htm" class="ca-more1">more...</a>
						</div>
					</div>-->
					
<!--					<div class="ca-item ca-item-1">
						<div class="ca-item-main">
							<div class=""><img src="images/animal1.png" /></div>
							<h3>Projectors</h3>
								<a href="product_detail.htm" class="ca-more1">more...</a>
						</div>
					</div>-->
				</div>
			</div>
     </td>
</tr>
<?php  db_close($db);require_once('footer.php');?>