<?php
/*
  ===============================================================

  inGenio X
  http://ingenio.area421.com

  Created by 
  Julian Moreno Hidalgo (Software developer)
  Jesus Moreno Hidalgo (Communication's tree)

  inGenio X is a free software licensed under CC-GNU GPL

  ===============================================================
*/
	if (!defined("IGNX")) { die("Attempt..."); }
	
if (isset($_GET["des"]))
{

	$salida_destacados = array();
	$qt = myquery("SELECT * FROM ".DESTACADOS." ORDER BY orden ASC limit ".$sig.", ".CONFIG_35."","[var_des=1]");
	$i=0;
	while ($rowt = myfetch($qt))
	{
		$q = myquery("SELECT * FROM ".ITEMS." WHERE enabled=1 AND item_tipo=1 AND catID>0 AND itemID='".$rowt["itemID"]."'","[var_des=2]");
		if ($row = myfetch($q))
		{

			include ("./ints/inc/inc_item_list.php");
			
			$indice_ini = $i/CONFIG_58;
			$indice_fin = ($i+1)/CONFIG_58;
				
			if (is_int($indice_ini))
			{
				
				$row["salida_gral_tr_ini"] = 1;
			}

			if (is_int($indice_fin))
			{
				
				$row["salida_gral_tr_fin"] = 1;
			}
			
			// ancho de celda
			$row["salida_gral_celda"] = 100/CONFIG_58;						

				$salida_destacados[] = $row;
								
		} // del if ($row = myfetch($q)
	
	$i++;
	} // del while

	// Smarty
	$smarty->assign("salida_destacados",$salida_destacados);
	
	
	// paginas
	$q_todos = myquery("SELECT * FROM ".DESTACADOS." ORDER BY orden DESC","[var_des=3]");
	$cnt_items = mynumrows($q_todos);	
	$paginas = paginas_gral($cnt_items, $sig, $pag, CONFIG_35, RUTA_INICIO."len".IGUAL.$idioma_actual.AMPER."des".IGUAL."1".AMPER."sig".IGUAL);

	// Smarty
	$smarty->assign("total", $cnt_items);

	// Smarty
	$smarty->assign("paginas", $paginas);


}


?>