[HOME]

Path : /home/hermanostamargo/ftp/landing/
Upload :
Current File : /home/hermanostamargo/ftp/landing/sql_popup.php

<?php
// textos
for($x = 0; $x < $arrlength; $x++) {
	if ( $languages[$x][2] == 1 ) {
		if ( $idioma == $languages[$x][0] ) {
			
			$sql_pop = "SELECT 
					serv.id AS serv_id,
					serv.fichero,
					serv.titulo_{$languages[$x][0]} AS titulo,
					serv.boton_{$languages[$x][0]} AS boton,
					serv.enlace_{$languages[$x][0]} AS enlace,
					serv.descripcion_{$languages[$x][0]} AS descripcion 
				FROM landing AS serv WHERE serv.visible=1
					";

    	}
	}
}

$res_pop = mysqli_query($conn,$sql_pop);
$row_pop = mysqli_fetch_array($res_pop);

echo mysqli_error($conn);


$idcargar = $row_pop['serv_id'];
if ( $idcargar != "" ) {
	for($x = 0; $x < $arrlength; $x++) {
		if ( $languages[$x][2] == 1 ) {
			if ( $idioma == $languages[$x][0] ) {
	    		//imagenes
				$sql_popimg = "SELECT 
								id, 
								imagen, 
								imagen_thumb, 
								imagen_med, 
								leyenda_{$languages[$x][0]} AS leyenda 
							FROM landingfotos WHERE idfamilia={$idcargar} ORDER by destacada DESC LIMIT 1";
	    	}
		}
	}
	//echo $sql_popimg;
	$res_popimg = mysqli_query($conn,$sql_popimg);
	$row_popimg = mysqli_fetch_array($res_popimg);
}

?>