<?
#################################################################
## PHP Pro Bid v6.07															##
##-------------------------------------------------------------##
## Copyright ©2007 PHP Pro Software LTD. All rights reserved.	##
##-------------------------------------------------------------##
#################################################################

if ( !defined('INCLUDED') ) { die("Access Denied"); }
?>



<script src="themes/<?=$setts['default_theme'];?>/carrusel/jquery.nivo.slider.js" type="text/javascript"></script>
 <link rel="stylesheet" href="themes/<?=$setts['default_theme'];?>/carrusel/nivo-slider.css" type="text/css" media="screen"/> 

<script type="text/javascript">
$(window).load(function() {
    $('#slider').nivoSlider();
});

</script>
<script type="text/javascript" src="themes/<?=$setts['default_theme'];?>/carrusel/jquery.carouFredSel-5.6.1.js"></script>
<script type="text/javascript" language="javascript">
			$(function() {

				

				//	Scrolled by user interaction
				$('#destacados').carouFredSel({
				  
					prev: '#prev2',
					next: '#next2',
					pagination: "#pager2",
					auto: {
						pauseOnHover: 'resume',
						onPauseStart: function( percentage, duration ) {
							$(this).trigger( 'configuration', ['width', function( value ) { 
								$('#timer1').stop().animate({
									width: value
								}, {
									duration: duration,
									easing: 'linear'
								});
							}]);
						},
						pauseDuration:2500,
						onPauseEnd: function( percentage, duration ) {
							$('#timer1').stop().width( 0 );
						},
						onPausePause: function( percentage, duration ) {
							$('#timer1').stop();
						}
					}
			
				});
				
				//	Scrolled by user interaction
				$('#res').carouFredSel({
				  	circular: false,
                    infinite: false,
					height: 'auto',
					prev: '#prev_res',
					next: '#next_res',
					pagination: "#pager_res",
					auto: false
						
					
			
				});
				
				//	Scrolled by user interaction
				$('#end').carouFredSel({
				  	circular: false,
                    infinite: false,
					height: 'auto',
					prev: '#prev_end',
					next: '#next_end',
					pagination: "#pager_end",
					auto: false
				});
			//	Scrolled by user interaction
				$('#wanted').carouFredSel({
				  	circular: false,
                    infinite: false,
					height: 'auto',
					prev: '#prev_wan',
					next: '#next_wan',
					pagination: "#pager_wan",
					auto: false
				});
				
				//	Scrolled by user interaction
				$('#popular').carouFredSel({
			      	circular: false,
                    infinite: false,
				    height: 'auto',
					prev: '#prev_pop',
					next: '#next_pop',
					pagination: "#pager_pop",
				    items:1,
					auto: false
			
				});
				
				//	Scrolled by user interaction
				$('#reverse').carouFredSel({
				  	
					circular: false,
                    infinite: false,height: 'auto',
					prev: '#prev_rev',
					next: '#next_rev',
					pagination: "#pager_rev",
					auto: false
				});
				
				//	Scrolled by user interaction
				$('#reverse_res').carouFredSel({
				  	circular: false,
                    infinite: false,
					height: 'auto',
					prev: '#prev_rev_res',
					next: '#next_rev_res',
					pagination: "#pager_rev_res",
					auto: false
				});

	
			});
		</script>
  <!--image header -->
   <td width="10"><img src="themes/<?=$setts['default_theme'];?>/img/pixel.gif" width="10" height="1"> 
  <table cellspacing="0" cellpadding="0">
  <tr>
  <td>
 <?=$banner_position[5];?>
  </td>
  </tr>
  </table>
  <? if (!empty($slider_images['image'])) {?>
<?=$divs_top;?>
  <?=$slider_images;?>
  <?=$divs_bajo;?>
  <? } else { ?>

   <div class="m_slider">
<div id="nivo_slider"><div  id="slider" class="nivoSlider"">
<a href="#"><img src="themes/<?=$setts['default_theme'];?>/carrusel/img/4.jpg" width="900px" ></a>
<a href="#"><img src="themes/<?=$setts['default_theme'];?>/carrusel/img/5.jpg" width="900px"></a>
<a href="#"><img src="themes/<?=$setts['default_theme'];?>/carrusel/img/3.jpg" width="900px"></a>
<a href="#"><img src="themes/<?=$setts['default_theme'];?>/carrusel/img/6.jpg" width="900px"></a>
</div>
</div>
</div>
<? }?>

    <? function recortar_texto($cadena, $limite, $corte=".", $pad="...") {   
    if(strlen($cadena) <= $limite)   
        return $cadena; 
    if(false !== ($breakpoint = strpos($cadena, $corte, $limite))) {   
        if($breakpoint < strlen($cadena) - 1) {   
            $cadena = substr($cadena, 0, $breakpoint) . $pad;   
        }   
    }   
    return $cadena;   
} ?> 

<table width="100%" border="0"  cellspacing="0" cellpadding="0">
 <tr>
    <td colspan="5">
    </td>
     </tr>
     
     <tr>
<td id="wel_wrap" valign="top" >
<div id="wel_header">
&nbsp;<?=MSG_WELCOME;?> <a style="padding-left:200px;"><?=MSG_BTN_LOGIN;?></a>
</div>
<div id="wel_left">

Whether you're new to  <font color="#3366CC"><b><?=$setts['sitename'];?></b></font> or a veteran user, we have just the right tools to get you on the right track.
<ul>
<li class=><img src="themes/<?=$setts['default_theme'];?>/img/wel1.gif"><a href="register.php">New to <?=$setts['sitename'];?></a></li>
<li class=><img src="themes/<?=$setts['default_theme'];?>/img/wel2.gif"><a href="content_pages.php?page=help">How to buy </a></li>
<li class=><img src="themes/<?=$setts['default_theme'];?>/img/wel2.gif"><a href="content_pages.php?page=help">How to Sell </a></li>

</ul>


</div>
<div id="wel_right">
 Back for more fun? Sign in now to buy, bid and sell, or to manage your account
   <br><br>
	<a href="login.php" class="hprl hprs"><span><?=MSG_BTN_LOGIN;?></span></a>
  <br><br>
   Not registered yet?
Join the millions of people who are already a part of the eBay family.
  <br><br>
	<a class="hprl hprr" href="register.php" class="hprl hprs"><span><?=MSG_BTN_REGISTER;?></span></a>
</div>
</td>
  <? if (!empty($banner_position[3]))
								 {
				$banner=$banner_position[3];
							   } else {
							$banner='<img src="themes/'.$setts['default_theme'].'/img/ban_empty.jpg" border="0">';
							   }?>
    <td width="180" valign="top" style="margin-left:8px;" rowspan="2"><?=$banner;?></td>
    
 
    <!-- columna derecha-->
 <td width="3" rowspan="11" ><img src="themes/<?=$setts['default_theme'];?>/img/pixel.gif" width="3" height="1"></td>

<td width="180" valign="top" rowspan="11"><? if ($is_news && $layout['d_news_box']) { ?>
   <?=$news_box_header;?>
   <?=$news_box_content;?>
   <div><img src='themes/<?=$setts['default_theme'];?>/img/pixel.gif' width='1' height='10'></div>
   <? } ?>
   <? if ($is_announcements && $member_active == 'Active') { ?>
   <?=$announcements_box_header;?>
   <div id="exp1102170555">
      <?=$announcements_box_content;?>
   </div>
   <div><img src="themes/<?=$setts['default_theme'];?>/img/pixel.gif" width="1" height="10"></div>
   <? } ?>
   
   <noscript>
   <?=MSG_JS_NOT_SUPPORTED;?>
   </noscript>
   <? if ($setts['enable_header_counter']) { ?>
   <?=$header_site_status;?>
   <table width='100%' border='0' cellpadding='2' cellspacing='0' class='border'>
      <tr class='c1'>
         <td width='20%' align='center'><b>
            <?=$nb_site_users;?>
            </b></td>
         <td width='80%'>&nbsp;
            <?=MSG_REGISTERED_USERS;?></td>
      </tr>
      <tr class='c2'>
         <td width='20%' align='center'><b>
            <?=$nb_live_auctions;?>
            </b></td>
         <td width='80%'>&nbsp;
            <?=MSG_LIVE_AUCTIONS;?></td>
      </tr>
      <? if ($setts['enable_wanted_ads']) { ?>
      <tr class='c1'>
         <td width='20%' align='center'><b>
            <?=$nb_live_wanted_ads;?>
            </b></td>
         <td width='80%'>&nbsp;
            <?=MSG_LIVE_WANT_ADS;?></td>
      </tr>
      <? } ?>
      <? if ($setts['enable_stores']) { ?>
      <tr class='c2'>
         <td width='20%' align='center'><b>
            <?=$nb_live_stores;?>
            </b></td>
         <td width='80%'>&nbsp;
            <?=MSG_ACTIVE_STORES;?></td>
      </tr>
      <? } ?>
      <tr class='c1'>
         <td width='20%' align='center'><b>
            <?=$nb_online_users;?>
            </b></td>
         <td width='80%'>&nbsp;
            <?=MSG_ONLINE_USERS;?></td>
       </tr>
	 
 </table>
 <br>
 

 <!--popular-->
	<? if ($layout['nb_popular_auct'] && $is_popular_items) { ?>
     
 <table width='100%' border='0' cellpadding='0' cellspacing='0' class='border'>
     
      <tr >
      <div class="head-text"><?=MSG_POPULAR_AUCTIONS;?></div>
         <td width='20%' align='center'>
        
		 <div class="list_carousel_pop" align="center">
				<ul id="popular">
      
		<? 
		   $columns = 3;
		   $nb_popular = $db->num_rows($sql_select_popular_items);
		   
			for($i = 0; $i < $nb_popular; $i++) 
			{
				$item_details_pop = mysql_fetch_array($sql_select_popular_items);
				$main_image = $db->get_sql_field("SELECT media_url FROM " . DB_PREFIX . "auction_media WHERE auction_id='" . $item_details_pop['auction_id'] . "' AND media_type=1 AND upload_in_progress=0 ORDER BY media_id ASC LIMIT 0,1", 'media_url');
				$background = ($item_details['bold']) ? ' bold_item' : '';
				$background .= ($item_details['hl']) ? ' hl_item1' : '';
				
				
				
				//popular
				
				$link_popular_auc=process_link('auction_details', array('name' => $item_details_pop['name'], 'auction_id' => $item_details_pop['auction_id']));
				
				 $nom_popular_auc= title_resize($item_details_pop['name']);
				 $title_popular=  substr($nom_popular_auc, 0, 50)."..."; 
			    
				$popular_auc='<li><a href="'.$link_popular_auc.'"><img src="'.((!empty($main_image)) ? 'thumbnail.php?pic=' . $main_image . '&w=80&sq=Y' : 'themes/' . $setts['default_theme'] . '/img/system/noimg.gif').'" border="0" width="80" alt="'.$nom_popular_auc.'"></a> <br>
				<div class="c1feat"><a href="'.$link_popular_auc.'">'.$title_popular.'</a></div>
                           <br>
                          <div class="precio"> '.MSG_MAX_BID.':'.$fees->display_amount($item_details_pop['max_bid'], $item_details_pop['currency']).'</div>
                           <br>
                           </li>';?>
	          	<?=$popular_auc;?>
          
            <? } ?>
    
	</ul>
				<div class="clearfix"></div>
				<a id="prev_pop" class="prev_180" href="#"></a>
				<a id="next_pop" class="next_180" href="#"></a>
				
        
     
	 </td>
     </tr>
      <tr class='c1'>
         <td width='20%' align='center'>
          <div align="right" style="padding: 5px;" class="contentfont"><a href="<?=process_link('auctions_show', array('option' => 'popular'));?>"><?=MSG_VIEW_ALL;?></a></div>   
         
         </td>
       </tr>
            
	  </table>
      <? } ?>
  
   <div><img src='themes/<?=$setts['default_theme'];?>/img/pixel.gif' width='1' height='10'></div>
   <? } ?>
  
   <?=$banner_position[4];?>
<div><img src="themes/<?=$setts['default_theme'];?>/img/pixel.gif" width="170" height="1"></div>
  <!--termina columna derecha-->
    </td>
     </tr>
 
 <tr>
<td id="wel_bajo">
</td>
<td></td>
<td></td>
</tr>

  <!--destacados-->
  <? if ($layout['hpfeat_nb']) { ?>
 <tr>
    <td colspan="2" class="head-text" height="20" ><?=MSG_FEATURED_AUCTIONS;?></td>
  </tr>
  <tr>
  <td colspan="2" height="220">
 </br>
   <?
 
	$counter = 0;
	for ($i=0; $i<$featured_columns; $i++) { ?>

      <?
      for ($j=0; $j<$layout['hpfeat_nb']; $j++) {
			$width = 100/$layout['hpfeat_nb'] . '%'; ?>
   <?
      	if (!empty($item_details[$counter]['name'])) {
      		$main_image = $db->get_sql_field("SELECT media_url FROM " . DB_PREFIX . "auction_media WHERE
      			auction_id='" . $item_details[$counter]['auction_id'] . "' AND media_type=1 AND upload_in_progress=0 ORDER BY media_id ASC LIMIT 0,1", 'media_url');

$auction_link = process_link('auction_details', array('name' => $item_details[$counter]['name'], 'auction_id' => $item_details[$counter]['auction_id']));
	
			if ($item_details[$counter]['start_price'] != $item_details[$counter]['buyout_price']) { 
                        $precio=$feat_fees->display_amount($item_details[$counter]['start_price'], $item_details[$counter]['currency']);          $label='<b>'.MSG_START_BID.':</b>'; 
						$label_cur='<b>'.MSG_CURRENT_BID.'</b>:';
                        $precio_cur=$feat_fees->display_amount($item_details[$counter]['max_bid'], $item_details[$counter]['currency']);
                            } else { 
							$precio_cur="";
							$label='<b>'.MSG_PRICE.'</b>:';
							$label_cur="";
                        	$precio='<b><font color="red">'.$feat_fees->display_amount($item_details[$counter]['buyout_price'], $item_details[$counter]['currency']).'</font></b>';         
						    } 
                           $tiempo_res= show_date($item_details[$counter]['end_time']);                             
			
			 $pres= $fees->display_amount($item_details[$counter]['start_price'], $item_details[$counter]['currency']);
			 
		 $nom_auction = $item_details[$counter]['name'];
         $titulo= recortar_texto( $nom_auction , 43, ' ');  
	
			$featured.= '<li>
			<div class="foto"><a href="'.$auction_link.'"><img src="'.((!empty($main_image)) ? 'thumbnail.php?pic=' . $main_image . '&w=' . $layout['hpfeat_width'] . '&sq=Y' : 'themes/' . $setts['default_theme'] . '/img/system/noimg.gif').'" border="0" alt="'.$item_details[$counter]['name'].'"></a></div>
			<div class="titulo" align="left">
			
			<a href="'.$auction_link.'">'.$titulo.'</a>
			</div>
			<div class="datos" align="left">
			<div align="left">'.$label.$precio.'</div> 
			<div align="left">'.$label_cur.$precio_cur.'</div></div></li>';
			
			?>
      
         <? $counter++;
      	} ?>
      <? } ?>
  
   <? } ?>


	<div class="clearfix"></div>
<div class="list_carousel" align="center">
				<ul id="destacados">
		    <?=$featured;?>
				</ul>
				<div class="clearfix"></div>
				<a id="prev2" class="prev" href="#"></a>
				<a id="next2" class="next" href="#"></a>
				<!--<div id="pager2" class="pager"></div>-->
			</div>  

<? } ?>
 <!--termina destacados-->
  
  </td>
  </tr>


  <!-- recientes -->
  
<? if ($layout['nb_recent_auct']) { ?>
<tr>
    <td colspan="2" class="head-text" height="20"><br><?=MSG_RECENTLY_LISTED_AUCTIONS;?></td>
  </tr>
  <tr>
  <td colspan="2" height="220" >
 </br>
 <?
            $nb_recent = $db->num_rows($sql_select_recent_items); ?>
			<div class="list_carousel_res" align="center">
         
     
				<ul id="res"> 
			<? for($i = 0; $i < $nb_recent; $i++)
			{
				$item_details = mysql_fetch_array($sql_select_recent_items);
				$main_image = $db->get_sql_field("SELECT media_url FROM " . DB_PREFIX . "auction_media WHERE auction_id='" . $item_details['auction_id'] . "' AND media_type=1 AND upload_in_progress=0 ORDER BY media_id ASC LIMIT 0,1", 'media_url');
				$background_bold = ($item_details['bold']) ? 'datos_bold' : 'datos';
				$background_h1 = ($item_details['hl']) ? 'foto_h1' : 'foto';
		        $link_recent_auc=process_link('auction_details', array('name' => $item_details['name'], 'auction_id' => $item_details['auction_id']));
				
				 $nom_auction_recent= title_resize($item_details['name']);
				$title_recent= recortar_texto(  $nom_auction_recent , 43, ' '); 
				 
				$today="";
				
				if (CURRENT_TIME - $item_details['start_time'] <= 86400) {
			 $today='<img src="themes/'.$setts['default_theme'].'/img/listedtoday.gif ">'; } 
		
	$recent_auc='<li >
				<div class="'.$background_h1.'"><a href="'.$link_recent_auc.'"><img src="'.((!empty($main_image)) ? 'thumbnail.php?pic=' . $main_image . '&w=' . $layout['hpfeat_width'] . '&sq=Y' : 'themes/' . $setts['default_theme'] . '/img/system/noimg.gif').'" border="0" width="80" alt="'.$nom_auction_recent.'"></a></div>
				<div class="lis_today">'.$today.'</div>
				<div class="titulo"><a href="'.$link_recent_auc.'">'.$title_recent.'</a></div>
				<div class="'.$background_bold.'">
				'.GMSG_START_TIME.':'.show_date($item_details['start_time']).'
                 
                 '. MSG_START_BID .':'. $fees->display_amount($item_details['start_price'], $item_details['currency']).'
				
                
                '. item_pics1($item_details).'</div></li>';?>
		 <?=$recent_auc;?>
	   <? } ?>
      
                </ul>
				<div class="clearfix"></div>
				<a id="prev_res" class="prev" href="#"></a>
				<a id="next_res" class="next" href="#"></a>
 
       <!--termina recientes-->
  
  </td>
 </tr>   
 <? } ?>
  

 
   
   <!-- proximas a terminar -->
   
 	<? if ($layout['nb_ending_auct']) { ?>
<tr>
<td colspan="2" class="head-text" height="20"><?=MSG_ENDING_SOON_AUCTIONS;?></td></tr>
 <tr>
   <td colspan="2" height="220">
          <? 
		   $columns = 3;
		   $nb_ending = $db->num_rows($sql_select_ending_items);?>
		   <div class="list_carousel_end" align="center">
      		<ul id="end"> 
			<? for($i = 0; $i < $nb_ending; $i++) 
			{
				$item_details = mysql_fetch_array($sql_select_ending_items);
				$main_image = $db->get_sql_field("SELECT media_url FROM " . DB_PREFIX . "auction_media WHERE auction_id='" . $item_details['auction_id'] . "' AND media_type=1 AND upload_in_progress=0 ORDER BY media_id ASC LIMIT 0,1", 'media_url');

				$item_details['max_bid'] = ($item_details['max_bid'] > 0) ? $item_details['max_bid'] : $item_details['start_price'];
		
				$background_bold = ($item_details['bold']) ? 'datos_bold' : 'datos';
				$background_h1 = ($item_details['hl']) ? 'foto_h1' : 'foto';
			// proximas a terminar
				
			     $link_ending_auc=process_link('auction_details', array('name' => $item_details['name'], 'auction_id' => $item_details['auction_id']));
				
				 $nom_auction_ending= title_resize($item_details['name']);
		         $title_ending= recortar_texto( $nom_auction_ending , 43, ' '); 
			     $end_time="";
				 
				if((($item_details['end_time'] - CURRENT_TIME) <= 86400) && $item_details['auction_type'] != 'first_bidder') /* 1day = 86400 sec */ { $end_time='<img src="themes/'.$setts['default_theme'].'/img/day.gif">'; }
			    if((($item_details['end_time'] - CURRENT_TIME) <= 3600) && $item_details['auction_type'] != 'first_bidder') /* 1hour = 3600 sec */ {$end_time='<img src="themes/'.$setts['default_theme'].'/img/hour.gif">'; }
				 
				 
				 $ending_auc='<li><div id="end_container">
				 <div class="'.$background_h1.'"><a href="'.$link_ending_auc.'"><img src="'.((!empty($main_image)) ? 'thumbnail.php?pic=' . $main_image . '&w=100 &sq=Y' : 'themes/' . $setts['default_theme'] . '/img/system/noimg.gif').'" border="0" width="80" alt="'.$nom_auction_ending.'"></a></div> <br> <div class="day_end" >'.$end_time.'</div>
				 <div class="titulo"><a href="'.$link_ending_auc.'">'.$title_ending.'</a></div> 
				 <div class="'.$background_bold.'">
                 '.MSG_TIME_LEFT.':'. time_left($item_details['end_time']).'
                           <br>
                 '. MSG_CURRENTLY .':'. $fees->display_amount($item_details['max_bid'], $item_details['currency']).'
                           <br>
                  '.item_pics1($item_details).'</div></div></li>'; ?>
	             <?=$ending_auc;?>
            <? } ?>
    
       </ul>
				<div class="clearfix"></div>
				<a id="prev_end" class="prev" href="#"></a>
				<a id="next_end" class="next" href="#"></a>
                
    </td>
  </tr>
    <!--termina proximas a terminar -->
 	<? } ?>
   


		<? if ($setts['enable_wanted_ads'] && $layout['nb_want_ads']) { ?>
       <tr>
<td colspan="2" class="head-text" height="20"><br><?=MSG_RECENTLY_LISTED_WANTED_ADS;?></td></tr>
        <tr>
    <td colspan="2" height="220">
    
    <!-- wanted -->
    <br>
    
			<? 
		   $columns = 3;
		   $nb_wanted = $db->num_rows($sql_select_recent_wa); ?>
		    <div class="list_carousel_wan" align="center">
				<ul id="wanted">
			<? for($i = 0; $i < $nb_wanted; $i++) 
			{
				$item_details = mysql_fetch_array($sql_select_recent_wa);
				$main_image = $db->get_sql_field("SELECT media_url FROM " . DB_PREFIX . "auction_media WHERE wanted_ad_id='" . $item_details['wanted_ad_id'] . "' AND media_type=1 AND upload_in_progress=0 ORDER BY media_id ASC LIMIT 0,1", 'media_url');
				// clasificados
				
			     $link_wanted=process_link('wanted_details', array('name' => $item_details['name'], 'wanted_ad_id' => $item_details['wanted_ad_id']));
				
				 $nom_wanted= title_resize($item_details['name']);
				$title_wanted= recortar_texto(  $nom_wanted , 43, ' '); 
			
				$wanted='<li><div class="foto_wanted"><a href="'.$link_wanted.'"><img src="'.((!empty($main_image)) ? 'thumbnail.php?pic=' . $main_image . '&w=70&sq=Y' : 'themes/' . $setts['default_theme'] . '/img/system/noimg.gif').'" border="0" width="70" alt="'.$title_wanted.'"></a></div> <br>
				<div class="c1feat"><a href="'.$link_wanted.'">'.$title_wanted.'</a></div>
				<br></li>';?>
			 <?=$wanted;?>
				
            <? } ?>
         
	   	     </ul>
				<div class="clearfix"></div>
				<a id="prev_wan" class="prev_wanted" href="#"></a>
				<a id="next_wan" class="next_wanted" href="#"></a>
 
      </div>
 </td>
  </tr>
   <!-- termina wanted -->
  <? } ?>
  <tr>
<td colspan="2"></td>
</tr>
</table>

<table width="100%" border="0" cellspacing="3">
<tr>


<!--inicia  subasta inversa destacada-->


<? if ($layout['r_hpfeat_nb'] && $setts['enable_reverse_auctions']) { ?>
<td >
 <div class="head-text" ><br><?=MSG_FEATURED_REVERSE_AUCTIONS;?></div>

  <div class="list_carousel_rev" align="center">
      		<ul id="reverse"> 
   <?
	$counter = 0;
	for ($i=0; $i<$featured_ra_columns; $i++) { ?>
 
      <?
      for ($j=0; $j<$layout['r_hpfeat_nb']; $j++) {
			$width = 100/$layout['r_hpfeat_nb'] . '%'; ?>
     <?
	 $main_image = $db->get_sql_field("SELECT media_url FROM " . DB_PREFIX . "auction_media WHERE reverse_id='" . $ra_details[$counter]['reverse_id'] . "' AND media_type=1 AND upload_in_progress=0 ORDER BY media_id ASC LIMIT 0,1", 'media_url');
	 
      	if (!empty($ra_details[$counter]['name'])) {
      		$auction_link = process_link('reverse_details', array('name' => $ra_details[$counter]['name'], 'reverse_id' => $ra_details[$counter]['reverse_id']));
            
             $nom_reverse= title_resize($ra_details[$counter]['name']);
				$title_reverse= recortar_texto( $nom_reverse , 43, ' '); 
				$feat_reverse = $feat_fees->budget_output($ra_details[$counter]['budget_id'], null, $ra_details[$counter]['currency']);
           
       $featured_reverse_auc='<li><div class="image_rev"><a href="'.$auction_link.'"><img src="'.((!empty($main_image)) ? 'thumbnail.php?pic=' . $main_image . '&w=80&sq=Y' : 'themes/' . $setts['default_theme'] . '/img/system/noimg.gif').'" border="0" width="100" alt="'. $nom_reverse.'"></a></div>
	  
	  <div class="titulo2"><a href="'.$auction_link.'">'.$title_reverse.'</a></div>
	  <div class="data_rev"> 
	  <b>'.MSG_BUDGET.': </b> '.$feat_reverse.'<br>
	   <b>'.MSG_NR_BIDS.':</b>'.$ra_details[$counter]['nb_bids'].' <br>
        <b>'.MSG_ENDS.':</b>'.show_date($ra_details[$counter]['end_time']).'</div></li>'; ?> 
   
     <?=$featured_reverse_auc;?>
         <? $counter++;
      	} ?>
      
           <? } ?>
    
  
  
   <? } ?>
  
   </ul>
				<div class="clearfix"></div>
				<a id="prev_rev" class="prev_440" href="#"></a>
				<a id="next_rev" class="next_440" href="#"></a>
</td>
<? } ?>



<!--inicia subasta inversa reciente -->

 <? if ($setts['enable_reverse_auctions'] && $layout['r_recent_nb']) { ?> 
 
 <td>
 <div class="head-text" ><br><?=MSG_MM_REVERSE_AUCTIONS;?></div>
  <div class="list_carousel_rev_res" align="center">
      		<ul id="reverse_res"> 
			<? 
		   $columns = 3;
		   $nb_reverse = $db->num_rows($sql_select_recent_reverse);
		   
			for($i = 0; $i < $nb_reverse; $i++) 
			{
				$item_details = mysql_fetch_array($sql_select_recent_reverse);
				
			 $main_image = $db->get_sql_field("SELECT media_url FROM " . DB_PREFIX . "auction_media WHERE reverse_id='" . $item_details['reverse_id'] . "' AND media_type=1 AND upload_in_progress=0 ORDER BY media_id ASC LIMIT 0,1", 'media_url');	
				  $nom_reverse_res= title_resize($item_details['name']);
				  
				$title_reverse_res= recortar_texto( $nom_reverse_res , 43, ' '); 
				$link_reverse_res=process_link('reverse_details', array('name' => $item_details['name'], 'reverse_id' => $item_details['reverse_id']));
				$feat_reverse_res=$feat_fees->budget_output($item_details['budget_id'], null, $item_details['currency']);
			
			$reverse_res='<li>
			<div class="image_rev"><a href="'.$link_reverse_res.'"><img src="'.((!empty($main_image)) ? 'thumbnail.php?pic=' . $main_image . '&w=80&sq=Y' : 'themes/' . $setts['default_theme'] . '/img/system/noimg.gif').'" border="0" width="100" alt="'. 		$nom_reverse_res.'"></a></div>
			
			<div class="titulo2"><a href="'.$link_reverse_res.'">'.$title_reverse_res.'</a></div>
			<div class="data_rev">
			<b>'.GMSG_START_TIME.': </b>'.show_date($item_details['start_time']).'<br>
			 <b>'.MSG_BUDGET.': </b>'.$feat_reverse_res.'<br>
			 <b>' .MSG_NR_BIDS.':</b>'.$item_details['nb_bids'].'</div></li>';?>	
				
                <?=$reverse_res;?>
                	
            <? } ?>
             
            
             </ul>
				<div class="clearfix"></div>
				<a id="prev_rev_res" class="prev_440" href="#"></a>
				<a id="next_rev_res" class="next_440" href="#"></a>
  
            </td>
            <? } ?>
</tr>
</table>
