<?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;} 
 
			$query = "SELECT 
					  tblpricing.currency,
					  tblpricing.relid,
					  tblpricing.semiannually,
					  tblpricing.annually,
					  tblpricing.monthly,
					  tblproducts.order, 
					  tblpricing.`type`,
					  tblproducts.id,
					  tblproducts.`type`,
					  tblproducts.gid,
					  tblproducts.name,
					  tblproducts.hidden,
					  tblproducts.configoption1,
					  tblproducts.configoption2,
					  tblproducts.configoption3,
					  tblproducts.configoption4,
					  tblproducts.configoption5,
					  tblproducts.configoption6,
					  tblproducts.configoption7,
					  tblproducts.configoption8,
					  tblproducts.configoption9,
					  tblproducts.configoption10,
					  tblproducts.configoption11,
					  tblproducts.configoption12,
					  tblproducts.configoption13,
					  tblproducts.configoption14,
					  tblproducts.configoption15,
					  tblproducts.configoption16,
					  tblproducts.configoption17,
					  tblproducts.configoption18,
					  tblproducts.configoption19,
					  tblproducts.configoption20,
					  tblproducts.configoption21,
					  tblproducts.configoption22,
					  tblproducts.configoption23,
					  tblproducts.configoption24,
					  tblcurrencies.prefix,
					  tblcurrencies.suffix
					FROM
					 tblpricing
					 RIGHT OUTER JOIN tblproducts ON (tblpricing.relid=tblproducts.id)
					 INNER JOIN tblcurrencies ON (tblcurrencies.id=tblpricing.currency)
					WHERE
					  (tblpricing.currency = '".$currency."') AND 
					  (tblpricing.`type` = 'product') AND 
					  (tblproducts.`gid` = '1') AND
					  (tblproducts.hidden = '') AND 
					  (tblproducts.`type` = 'hostingaccount')
					ORDER BY
						  tblproducts.order ASC";
		
			$planes_hosting = $api->ApiDB->QueryToArray($query);
	
?>


<div class="sharedhosting_cont">
    <table style="width:100%;">
    <thead>
    </thead>    
      
        <tr class="rowplan">
          <td class="data caracteristica">Plan:</td>
          <td class="data plan"><p class="titplan">Dominio</p></td>
          <td class="data plan"><p class="titplan">Trendy</p></td>
          <td class="data plan"><p class="titplan">Starter</p></td>
          <td class="data plan"><p class="titplan">Basico</p></td>
          <td class="data plan"><p class="titplan">Empresarial</p></td>
          <td class="data plan"><p class="titplan">Corporativo</p></td>
          <td class="data plan"><p class="titplan">Platinum</p></td>
        </tr>
        <tr class="rowplan">
          <td class="data caracteristica">Soporte Técnico:</td>
          <td class="data plan">Lite</td>
          <td class="data plan">Lite</td>
          <td class="data plan">Lite</td>
          <td class="data plan">Pro</td>
          <td class="data plan">Pro</td>
          <td class="data plan">SysAdmin</td>
          <td class="data plan">SysAdmin</td>
        </tr>
        <tr class="rowplan">
          <td class="data caracteristica">Cuentas de Correo:</td>
          <td class="data plan">10</td>
          <td class="data plan">Ilimitadas</td>
          <td class="data plan">Ilimitadas</td>
          <td class="data plan">Ilimitadas</td>
          <td class="data plan">Ilimitadas</td>
          <td class="data plan">Ilimitadas</td>
          <td class="data plan">Ilimitadas</td>
        </tr>
        <tr class="rowplan">
            <td class="data caracteristica">Cuentas FTP</td>
            <td class="data plan">1</td>
          <td class="data plan">Ilimitadas</td>    
            <td class="data plan">Ilimitadas</td>    
            <td class="data plan">Ilimitadas</td>
            <td class="data plan">Ilimitadas</td>
            <td class="data plan">Ilimitadas</td>
            <td class="data plan">Ilimitadas</td>
        </tr>
        <tr class="rowplan">
          <td class="data caracteristica">Listas de Correo</td>
          <td class="data plan">1</td>
          <td class="data plan">Ilimitadas</td>
          <td class="data plan">Ilimitadas</td>
          <td class="data plan">Ilimitadas</td>
          <td class="data plan">Ilimitadas</td>
          <td class="data plan">Ilimitadas</td>
          <td class="data plan">Ilimitadas</td>
        </tr>
        <tr class="rowplan">
            <td class="data caracteristica">Páginas de error personalizadas:</td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
          <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>    
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>    
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" alt="" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" alt="" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" alt="" /></td>
        </tr>
        <tr class="rowplan">
            <td class="data caracteristica">Estadísticas de Tráfico:</td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
          <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>    
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>    
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
        </tr>
        <tr class="rowplan">
            <td class="data caracteristica">Antivirus:</td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
          <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>    
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>    
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
        </tr>
        <tr class="rowplan">
            <td class="data caracteristica">Firewall:</td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
          <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>    
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>    
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
        </tr>
        <tr class="rowplan">
            <td class="data caracteristica">Monitoreo del Servicio:</td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
          <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>    
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>    
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
            <td class="data plan"><img src="{$TEMPLATE_URL}/img/checkmark.gif" /></td>
        </tr>
        <tr class="rowplan">
          <td class="data plan">&nbsp;</td>
          <td class="data plan"><a class="linkitem2"  href="{$SITE_URL}/hosting/compartido/plan-hosting-x-dominio" target="_self" title="Contratar Plan Hosting">
            <h6 class="configurar">+ Info </h6>
          </a></td>
          <td class="data plan"><a class="linkitem2"  href="{$SITE_URL}/hosting/compartido/plan-hosting-trendy" target="_self" title="Contratar Plan Hosting">
            <h6 class="configurar">+ Info </h6>
          </a></td>
          <td class="data plan"><a class="linkitem2"  href="{$SITE_URL}/hosting/compartido/plan-hosting-starter" target="_self" title="Contratar Plan Hosting">
            <h6 class="configurar">+ Info </h6>
          </a></td>
          <td class="data plan"><a class="linkitem2"  href="{$SITE_URL}/hosting/compartido/plan-hosting-basico" target="_self" title="Contratar Plan Hosting">
            <h6 class="configurar">+ Info </h6>
          </a></td>
          <td class="data plan"><a class="linkitem2"  href="{$SITE_URL}/hosting/empresarial/plan-hosting-empresarial" target="_self" title="Contratar Plan Hosting">
            <h6 class="configurar">+ Info </h6>
          </a></td>
          <td class="data plan"><a class="linkitem2"  href="{$SITE_URL}/hosting/empresarial/plan-hosting-corporativo" target="_self" title="Contratar Plan Hosting">
            <h6 class="configurar">+ Info </h6>
          </a></td>
          <td class="data plan"><a class="linkitem2"  href="{$SITE_URL}/hosting/empresarial/plan-hosting-premium" target="_self" title="Contratar Plan Hosting">
            <h6 class="configurar">+ Info </h6>
          </a></td>
        </tr>
        <tr class="rowplan">
            <td class="data caracteristica">Costo por Mes:</td>
            <td class="data plan"><h5 class="price">
              <strong class="monthly">
                Sin Costo!
              </strong>
            </h5></td>
          <td class="data plan"><h5 class="price"><?=$planes_hosting[1]['prefix']?> <strong class="monthly"><?=$planes_hosting[1]['monthly']?></strong> <?=$planes_hosting[1]['suffix']?></h5></td>    
          <td class="data plan"><h5 class="price"><?=$planes_hosting[2]['prefix']?> <strong class="monthly"><?=$planes_hosting[2]['monthly']?></strong> <?=$planes_hosting[2]['suffix']?></h5></td>    
          <td class="data plan"><h5 class="price"><?=$planes_hosting[3]['prefix']?> <strong class="monthly"><?=$planes_hosting[3]['monthly']?></strong> <?=$planes_hosting[3]['suffix']?></h5></td>
          <td class="data plan"><h5 class="price">
            <?=$planes_hosting[4]['prefix']?>
            <strong class="monthly">
              <?=$planes_hosting[4]['monthly']?>
            </strong>
            <?=$planes_hosting[4]['suffix']?>
          </h5></td>
          <td class="data plan"><h5 class="price">
            <?=$planes_hosting[5]['prefix']?>
            <strong class="monthly">
              <?=$planes_hosting[5]['monthly']?>
            </strong>
            <?=$planes_hosting[5]['suffix']?>
          </h5></td>
          <td class="data plan"><h5 class="price">
            <?=$planes_hosting[6]['prefix']?>
            <strong class="monthly">
              <?=$planes_hosting[6]['monthly']?>
            </strong>
            <?=$planes_hosting[6]['suffix']?>
          </h5></td>
       </tr>
        <tr class="rowplan">
          <td class="data caracteristica">Costo por 6 Mes:</td>
          <td class="data plan"><h5 class="price"> <strong class="monthly"> Sin Costo! </strong> </h5></td>
          <td class="data plan"><h5 class="price">
            <strong class="monthly">
              No Aplica
            </strong>
          </h5></td>
          <td class="data plan"><h5 class="price">
            <strong class="monthly">
              No Aplica
            </strong>
          </h5></td>
          <td class="data plan"><h5 class="price">
            <strong class="monthly">
              No Aplica
            </strong>
          </h5></td>
          <td class="data plan"><h5 class="price">
            <?=$planes_hosting[4]['prefix']?>
            <strong class="monthly">
              <?=$planes_hosting[4]['semiannually']?>
            </strong>
            <?=$planes_hosting[4]['suffix']?>
          </h5></td>
          <td class="data plan"><h5 class="price">
            <?=$planes_hosting[5]['prefix']?>
            <strong class="monthly">
              <?=$planes_hosting[5]['semiannually']?>
            </strong>
            <?=$planes_hosting[5]['suffix']?>
          </h5></td>
          <td class="data plan"><h5 class="price">
            <?=$planes_hosting[6]['prefix']?>
            <strong class="monthly">
              <?=$planes_hosting[6]['semiannually']?>
            </strong>
            <?=$planes_hosting[6]['suffix']?>
          </h5></td>
        </tr>
        <tr class="rowplan">
            <td class="data caracteristica">Costo por Año:</td>
            <td class="data plan"><h5 class="price">
              
              <strong class="annually">
                Sin Costo!
              </strong>
            </h5></td>
          <td class="data plan"><h5 class="price"><?=$planes_hosting[1]['prefix']?> <strong class="annually"><?=$planes_hosting[1]['annually']?></strong> <?=$planes_hosting[1]['suffix']?></h5></td>    
          <td class="data plan"><h5 class="price"><?=$planes_hosting[2]['prefix']?> <strong class="annually"><?=$planes_hosting[2]['annually']?></strong> <?=$planes_hosting[2]['suffix']?></h5></td>    
          <td class="data plan"><h5 class="price"><?=$planes_hosting[3]['prefix']?> <strong class="annually"><?=$planes_hosting[3]['annually']?></strong> <?=$planes_hosting[3]['suffix']?></h5></td>
          <td class="data plan"><h5 class="price">
            <?=$planes_hosting[4]['prefix']?>
            <strong class="annually">
              <?=$planes_hosting[4]['annually']?>
            </strong>
            <?=$planes_hosting[4]['suffix']?>
          </h5></td>
          <td class="data plan"><h5 class="price">
            <?=$planes_hosting[5]['prefix']?>
            <strong class="annually">
              <?=$planes_hosting[5]['annually']?>
            </strong>
            <?=$planes_hosting[5]['suffix']?>
          </h5></td>
          <td class="data plan"><h5 class="price">
            <?=$planes_hosting[6]['prefix']?>
            <strong class="annually">
              <?=$planes_hosting[6]['annually']?>
            </strong>
            <?=$planes_hosting[6]['suffix']?>
          </h5></td>
       </tr>
       
        <tr class="rowplan">
            <td class="data plan">&nbsp;</td>
            <td class="data plan"><a class="linkitem"  href="https://www.afterfuture.net/clientes/cart.php?a=add&amp;pid=<?=$planes_hosting[0]['id']?>&amp;currency=<?=$currency?>&amp;systpl=afnet" target="_self" title="Contratar Plan Hosting">
              <h3 class="configurar">Contratar! <img style="position:relative; margin-top:-5px;"src="{$TEMPLATE_URL}/img/icon_buy.png" /></h3>
            </a></td>
          <td class="data plan"><a class="linkitem"  href="https://www.afterfuture.net/clientes/cart.php?a=add&pid=<?=$planes_hosting[1]['id']?>&currency=<?=$currency?>&systpl=afnet" target="_self" title="Contratar Plan Hosting"><h3 class="configurar">Contratar! <img style="position:relative; margin-top:-5px;"src="{$TEMPLATE_URL}/img/icon_buy.png" /></h3></a>             </td>    
          <td class="data plan"><a class="linkitem"  href="https://www.afterfuture.net/clientes/cart.php?a=add&pid=<?=$planes_hosting[2]['id']?>&currency=<?=$currency?>&systpl=afnet" target="_self" title="Contratar Plan Hosting"><h3 class="configurar">Contratar!  <img style="position:relative; margin-top:-5px;"src="{$TEMPLATE_URL}/img/icon_buy.png" /></h3></a>             </td>    
          <td class="data plan"><a class="linkitem"  href="https://www.afterfuture.net/clientes/cart.php?a=add&pid=<?=$planes_hosting[3]['id']?>&currency=<?=$currency?>&systpl=afnet" target="_self" title="Contratar Plan Hosting"><h3 class="configurar">Contratar! <img style="position:relative; margin-top:-5px;"src="{$TEMPLATE_URL}/img/icon_buy.png" /></h3></a>             </td>
          <td class="data plan"><a class="linkitem"  href="https://www.afterfuture.net/clientes/cart.php?a=add&amp;pid=<?=$planes_hosting[4]['id']?>&amp;currency=<?=$currency?>&amp;systpl=afnet" target="_self" title="Contratar Plan Hosting">
            <h3 class="configurar">Contratar! <img style="position:relative; margin-top:-5px;"src="{$TEMPLATE_URL}/img/icon_buy.png" /></h3>
          </a></td>
          <td class="data plan"><a class="linkitem"  href="https://www.afterfuture.net/clientes/cart.php?a=add&amp;pid=<?=$planes_hosting[5]['id']?>&amp;currency=<?=$currency?>&amp;systpl=afnet" target="_self" title="Contratar Plan Hosting">
            <h3 class="configurar">Contratar! <img style="position:relative; margin-top:-5px;"src="{$TEMPLATE_URL}/img/icon_buy.png" /></h3>
          </a></td>
          <td class="data plan"><a class="linkitem"  href="https://www.afterfuture.net/clientes/cart.php?a=add&amp;pid=<?=$planes_hosting[6]['id']?>&amp;currency=<?=$currency?>&amp;systpl=afnet" target="_self" title="Contratar Plan Hosting">
            <h3 class="configurar">Contratar! <img style="position:relative; margin-top:-5px;"src="{$TEMPLATE_URL}/img/icon_buy.png" /></h3>
          </a></td>
       </tr>
    </table>

</div>
{literal}
<script>
	$(document).ready(function(){
		$('tr.rowplan').mouseover(function(){
				$(this).addClass('rowh');
				$(this).children('.caracteristica').addClass('tdh');

			});
		$('tr.rowplan').mouseout(function(){
				$(this).removeClass('rowh');
				$(this).children('.caracteristica').removeClass('tdh');
			});
		});
</script>
{/literal}
