<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<?php
include('config/koneksi2.php');

$id =$_POST['image'];
$query2=mysql_query("SELECT * FROM bs_stok where id='$id'");
$row2=mysql_fetch_array($query2);
$ket=$row2['deskripsi'];
$nama=$row2['nama']; 
 ?>
 
 <ol class="carousel-indicators">
					<?php
					
					$count = mysql_query("SELECT COUNT(*) from photo where id_stok='$id'");
					$count = mysql_result($count,0);
					for($i=0; $i<$count;$i++){
						echo '<li data-target="#carousel-example-generic" data-slide-to="'.$i.'"'; if($i==0){ echo 'class="active"'; } echo '></li>';
					}
					?>
				</ol>
				 <div class="carousel-inner" role="listbox">
    <?php
					$query = mysql_query("select id,photo,id_stok from photo where id_stok='$id' ");   
 while($row=mysql_fetch_array($query))
		{
							$query1 = mysql_query("select MIN(id) as a from photo where id_stok='$id' ");
							$row1=mysql_fetch_array($query1);   
	echo '
						<div class="item '; if($row1['a'] == $row['id']){ echo 'active'; } echo'">
						<a herf="http://bsis.bikershop.biz/inside/data/photo/'.$row['photo'].'">
							<img src="http://bsis.bikershop.biz/inside/data/photo/'.$row['photo'].'" />
							<div class="carousel-caption">

  </div>
  </a>
						</div>
						';
				
					}
					?>
  </div>

				<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
					<span class="glyphicon glyphicon-chevron-left"></span>
				</a>
				<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
					<span class="glyphicon glyphicon-chevron-right"></span>
				</a>
 
 <?php
 /*$query = mysql_query("select * from image_map where id_map='$id'");   
 while($row1=mysql_fetch_array($query))
		{
	?>
    <div class="item active">
      <img class="img-responsive" src="uploads/<?php echo $row1[image] ;?>" alt="">
      <div class="carousel-caption">
      </div>
    </div>
 <?php
				}*/
		
   

?>
</div>

	
<p>
<?php echo "$ket"; ?>
</p>
