Mini Shell

Direktori : /home/playbengal/www/
Upload File :
Current File : /home/playbengal/www/nossos-bengals.php

<div class="nossosBengals">
	<h1><span style="color:#201e1e">NOSSOS</span> <span style="color:#ffca01">BENGALS</span></h1>
	<?
	$HTML = '';
	$n = 0;
	$SQL = mysql_query("SELECT nome, sexo, foto, perm FROM mp WHERE ativ = 'S' ORDER BY posi DESC",$db) or die(mysql_error());
	while($row = mysql_fetch_array($SQL)){
		$n++;
		$NOME = $row["nome"];
		$SEXO = str_replace(array('M','F'),array('PADREADOR','MATRIZ'),$row["sexo"]);
		$FOTO = $row["foto"];
		$PERM = $row["perm"];
		$HTML .= '<div class="c'.$n.' coluna">
						<a href="'.URL().'/matrizes-padreadores/'.$PERM.'">
							<img src="'.URL().'/imagens/matrizes-padreadores/'.$FOTO.'" alt="'.$NOME.'" />
							<div class="legenda">
								<p class="nome">'.$NOME.' <span style="color:#ffca01">'.$SEXO.'</span></p>
								<p class="link">CLIQUE PARA CONHECER</p>
							</div>
						</a>
					</div>';
		if($n == 3) $n = 0;
	}
	echo $HTML;
	?>
</div>
<script type="text/javascript">
$(window).on('load resize', function(){
	M = $('.nossosBengals').outerWidth() * 2 / 100;
	$('.nossosBengals .coluna').css('marginBottom',M);
	$('.nossosBengals').css('marginBottom',M*-1);
	/**/
	$('.nossosBengals .coluna').each(function(){
		H = $(this).outerHeight();
		$(this).find('.legenda').css('height',H);
	});
	$('.nossosBengals .coluna').hover(function(){
		$(this).find('.legenda').fadeIn(150);
	}, function(){
		if($('.nossosBengals .legenda:hover').length == 0) $(this).find('.legenda').fadeOut(50);
	});
});
</script>

Zerion Mini Shell 1.0