<?php require_once('../Connections/BE2.php'); ?>
<? 
$menu=isset($_GET['menu'])?$_GET['menu']:'SKYBNI';

  
mysql_select_db($database_BE2, $BE2);
$query_Rt2 = sprintf("SELECT a.mid,b.* FROM company as a, product_data as b WHERE b.company_num=a.mid AND a.company_title='%s'",$menu);	
 
$Rt2 = mysql_query($query_Rt2, $BE2) or die(mysql_error());
$row_Rt2 = mysql_fetch_assoc($Rt2);
$totalRows_Rt2 = mysql_num_rows($Rt2);
 $c=0;
 
	if($totalRows_Rt2>0){
				do {  
			 $imagepath = "/admin/upload_image/".$row_Rt2['meta_img'];
		      if($row_Rt2['p_new']==1){
			  $imagepath = "/admin/upload2_image/".sprintf("%07d",$row_Rt2['company_num']).'/'.$row_Rt2['meta_img'].'.'.$row_Rt2['p_tag'];  
				
		     	}
				 if( file_exists('/www2/skybni'.$imagepath)){
				  $c++;
				 ?>				
					
	 <div class="col-md-4 col-xs-4 col-sm-4">
       <div class="thumbnail">
          <a href="/categoryDetail-<?= $row_Rt2['mem_auto'];?>.html" target="_self"><img src="<?= $imagepath ?>" alt="<?= $arr1[$i][2];?>" title="<?= $row_Rt2['p_title'];?>" /></a>
           
       </div>
            <div style="text-align:center;font-size:12px;"><?= mb_substr($row_Rt2['p_title'],0,16);?>..
                   <br> $NT <?= number_format($row_Rt2['p_money'],0, '.', ',');?>元</div> 
       </div>	
       <?  }  // file_exists    			
	      if($c==3){?> <div class="clearfix"> </div> <?  $c=0; } 
                   } while ($row_Rt2 = mysql_fetch_assoc($Rt2));
			 } 
 				
 					
mysql_free_result($Rt2);
?>                          