<?php
	$api = new Apiwhmcs();
	$api->api_db_conect(APIHOST, APIUSER, APIPASS, APIDATABASE);
?>


 <?php
 
 
switch ($_SESSION['currency']) {
    case '':
		$currency = 2;
        break;
    case 'usd':
		$currency = 1;
        break;
    case 'gbp':
		$currency = 7;
        break;
    case 'mxn':
		$currency = 2;
        break;
    case 'eur':
		$currency = 3;
        break;
    case 'cop':
		$currency = 9;
        break;
    case 'ars':
		$currency = 10;
        break;
    case 'pen':
		$currency = 11;
        break;
    case 'uyu':
		$currency = 12;
        break;
    case 'clp':
		$currency = 13;
        break;
    case 'vef':
		$currency = 14;
        break;
} 



?>







<style>


#servidores {
	width:100%;
	height:auto;
	overflow:hidden;
	}
	
.servidores_servidores {
	width:100%;
	height:auto;
	overflow:hidden;
	}
		
#servstreaming_cont{
	width:100%;
	height:auto;
	overflow:hidden;
}
	
</style>
<div id="servidores">                                                  

 <?php
 

			$query = "SELECT 
					  tblproducts.`type`,
					  tblproducts.gid,
					  tblproducts.name,
					  tblproducts.description,
					  tblproducts.hidden,
					  tblpricing.annually,
					  tblpricing.relid,
					  tblproducts.id,
					  tblpricing.semiannually,
					  tblpricing.quarterly,
					  tblpricing.monthly,
					  tblpricing.`type`,
					  tblpricing.currency,
					  tblcurrencies.prefix,
					  tblcurrencies.suffix
					FROM
					 tblpricing
					 RIGHT OUTER JOIN tblproducts ON (tblpricing.relid=tblproducts.id)
					 INNER JOIN tblcurrencies ON (tblcurrencies.id=tblpricing.currency)
					WHERE
					  (tblproducts.`type` = 'other') AND 
					  (tblpricing.`type` = 'product') AND 
					  (tblproducts.gid = '11') AND 
					  (tblproducts.hidden = '') AND 
					(tblpricing.currency = '".$currency."') 
					ORDER BY
					  tblpricing.monthly ASC";
		

			$planesstreaming = $api->ApiDB->QueryToArray($query);

			

?>

                                               

<style>
.sharedhosting_cont{
	width:100%;
	margin:auto;
	height:auto;
	overflow:hidden;
	}
	
.sharedhosting_cont table{	border-collapse:collapse;
	}

td.caracteristica{
	margin:0 !important;
	padding:1px !important;
	text-align:right;
	width:150px;
	background:#929fb3;
	color:#FFF !important;
	font-size:12px !important;
	vertical-align:middle;
	}
	
td.plan{
	border-right:1px solid #e6ecf5;
	padding:2px !important;
	text-align:center;
	width:auto;
	font-size:12px !important;
	border-bottom:1px solid #c3d2e0;
	vertical-align:middle;
	}
	
.rowh{
		background:url('{$TEMPLATE_URL}/img/layer_5_bg.png') !important;}

.tdh{
	background:url('{$TEMPLATE_URL}/img/layer_6_bg.png') !important;}

td.data{
	}

.price{
	margin:0px;}

strong.monthly{
	color:#F00 !important;
	font-size:14px !important;
	font-weight:normal;

}
strong.annually{
	color:#F00 !important;
	font-size:24pt !important;
	font-weight:normal;
}

.trendy{
	background:url('{$TEMPLATE_URL}/img/layer_5_bg.png');
}

.starter{
	background:url('{$TEMPLATE_URL}/img/layer_5_bg.png');
}

.basico{
	background:url('{$TEMPLATE_URL}/img/layer_5_bg.png');
}

	.linkitem{
		overflow:hidden;
		width:auto;
		margin:auto;
		text-align:right;
		border:0px solid #0FF;
		text-decoration:none;
		}
	.linkitem h3{
		background:#009cef;
		width:100%;
		overflow:hidden;
		padding:10px 0;
		font-size:20px !important;
		color:#FFF !important;
		text-align:center;
		text-decoration:none !important;}

	.linkitem h3 img{
		position:relative;
		float:right;
		right:30px;
		top:7px;
		}
</style>
<style>
.servstreaming_cont{
	width:100%;
	margin:auto;
	height:auto;
	overflow:hidden;
	background:#e6ecf5;}
	
.servstreaming_cont table{
	border-collapse:collapse;
	width:100%;
	padding:0;
	margin:0;
	height:auto;
	overflow:hidden;}
	

.servstreaming_cont table td{
	margin:0;
	padding:0;
	border:1px solid #f0f4fa;
	border-bottom:1px solid #d8dfeb;
	text-align:center;
	}

.streamspecs{
		font-family:Tahoma, Geneva, sans-serif;
		font-size:8pt;
		color:#333;
		padding:0 0px;	
	}
	
.streamspecsH{
		font-family:Tahoma, Geneva, sans-serif;
		font-size:8pt;
		color:#333;
		padding:0 0px;		
		background-color:#e1ffc8;
	}
	
	.streamdesc{
		background-color:#e8e8e8;
				}
	
	.streamdesct{
		width:auto;
		padding:5px 0;
		font-family: 'Roboto Condensed', sans-serif !important;
		font-weight:normal !important;
		font-size:10pt !important;
		background-color:#556379;
		text-shadow:none !important;
		color:#fff !important;
		border-radius:0px;
		}
	
		
	.streamspecs td{
		font-family:Tahoma, Geneva, sans-serif;
		font-size:8pt;
		padding:0px 0px;		
		}	
		
	.streamspecsH td{
		font-family:Tahoma, Geneva, sans-serif;
		font-size:8pt;
		padding:0px 0px;		
		}	
		
	.planstreamdesc{
		font-family: 'Ubuntu', sans-serif !important;
		font-size:12px !important;
		font-weight:normal;
		color:;
		padding:0px 0;
		border-radius:0px;
		border-bottom:1px solid #cad2d9;
		}
	
	.serverprecio strong{
		width:90px;
		font-weight:strong;
		color:#F00 !important;
		font-size:15px !important;
		font-family: 'Play', sans-serif !important;
		}
		
	.serverbrand{
		font-family: 'Ubuntu', sans-serif !important;
		font-weight:normal !important;
		font-size:10pt !important;
		background-color:#929fb3;
		text-shadow:none !important;
		color:#fff !important;
		border-radius:0px;
		}
		
	.servername{
		font-weight:bold !important;
		font-size:12pt !important;
		background-color:#929fb3;
		text-shadow:none !important;
		color:#fff !important;
		border-radius:0px;
		}
	
	.link_configserv{
		overflow:hidden;
		width:auto;
		margin:auto;
		text-align:right;
		border:0px solid #0FF;
		text-decoration:none;
		}
	.link_configserv h3{
		background:#009cef;
		width:100%;
		overflow:hidden;
		padding:12px 10px;
		font-size:16px !important;
		color:#FFF !important;
		text-align:center;
		text-decoration:none !important;}

	.link_configserv h3 img{
		position:relative;
		float:right;
		right:10px;
		top:3px;
		}
		
		.link_configserv:hover{
			color:#FFF !important;}
</style>
                                                    
             <div class="servstreaming_cont">
                <table>
                    <tbody>
                    <tr class="streamdesc">
                        <td class="streamdesct">Plan</td>
                        <td class="streamdesct">Calidad de Transmisión</td>
                        <td class="streamdesct">Escuchas Simultaneos</td>
                        <td class="streamdesct">Alojamiento FTP</td>
                        <td class="streamdesct">AutoDJ</td>
                        <td class="streamdesct">Costo / Mes</td>
                        <td class="streamdesct">Configura tu Plan</td>
                    </tr>
                    
                    
                    <?php foreach($planesstreaming as $streaming):?>
                        <tr class="streamspecs" onmouseover="this.className='streamspecsH';" onmouseout="this.className='streamspecs';">
                        <td class="servercaract"><p class="serverbrand"><?=extraer($streaming['name'], 0, "*")?></p><p class="servername"><?=extraer($streaming['name'], 1, "*")?></p></td>
                        <td class="planstreamdesc">	<?=extraer($streaming['description'], 2, " ")?> Kbps</td>
                        <td class="planstreamdesc">Desde:	<?=extraer($streaming['description'], 6, " ")?></td>
                        <td class="planstreamdesc">	<?=extraer($streaming['description'], 8, " ")?></td>
                        <td class="planstreamdesc">	<img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
                        <td class="planstreamdesc serverprecio">desde <?=$streaming['prefix']?><strong> <?=$streaming['monthly']?></strong> <?=$streaming['suffix']?> / Mes. </td>
                        <td class="planstreamdesc"><a class="link_configserv"  href="https://www.afterfuture.net/clientes/cart.php?a=add&pid=<?=$streaming['id']?>&currency=<?=$currency?>&systpl=afnet" target="_self" title="Configurar Servidor"><h3 class="configurar">Configurar <img style="position:relative; margin-top:-5px;"src="{$TEMPLATE_URL}/img/icon_configure.png" /></h3></a></td>
                    </tr>
                    <?php endforeach; ?>
                    
                    
                    </tbody>
                </table>
             </div>
        
        
</div>                            
   
    
{literal}
<script>
	$(document).ready(function() {
		
		  $('.contenido_ajax').show();
		  $('#loading').hide();

		$("#nav ul").tabs("#panes > div", {effect: 'fade', fadeOutSpeed: 200, initialIndex: 0});
	});
</script>
{/literal}