Mini Shell
<div id="layerslider" class="ls-wp-container" style="width:100%;height:145px;margin:0 auto;border-bottom:1px solid #eee;">
<div class="ls-slide" data-ls="slidedelay:5000;transition2d:1;"><img src="#" data-src="faixa.jpg" class="ls-bg" alt="MAYER" /><div class="ls-l" style="top:240px;left:61px;white-space: nowrap;"><br></div></div>
</div>
<section class="container" style="margin-top: -50px;">
<div class="col-sm-12">
<hr class="vertical-space2">
<hr class="vertical-space2">
<h1 class="">Convênios</h1>
</h3>
<hr class="vertical-space1">
</div> <!-- end col-sm-12 -->
</section> <!-- end container -->
<section class="container" style="margin-top: -50px;padding-bottom: 50px">
<div class="col-sm-12">
<h1 style="text-align: center; font-size: 30px; color: #0071A7;" class="">CONHEÇA OS CONVÊNIOS</h1>
<form name="frm_convenio" action="#" data-toggle="validator" role="form" method="POST">
<div class="col-sm-12" style="margin-top: 20px;">
<div class="col-sm-5">
<label for="textNome" class="control-label" style="font-family:Roboto;font-size: 18px;">Especialista</label>
<select name="cod_entidade_grupo" class="form-control" style="width:350px;">
<option value=""> Selecione Especialidade </option>
<?
$cod_entidade_grupo = $_POST['cod_entidade_grupo'];
require_once('conexao.php');
$sql="select cod_entidade_grupo,grupo_entidade
from mayer_entidades_grupos
ORDER BY grupo_entidade ASC
;";
//echo "<pre>".$sql."</pre>";
$query=mysqli_query($con,$sql);
$totitens=@mysqli_num_rows($query);
if ($totitens!="")
{
while($row = mysqli_fetch_array($query))
{
$cod_entidade_grupo_1 = $row['cod_entidade_grupo'];
$grupo_entidade = $row['grupo_entidade'];
if ($cod_entidade_grupo_1==$cod_entidade_grupo)
{ $selected='selected';}
else
{ $selected='';}
?>
<option <?=$selected;?> value="<?=$cod_entidade_grupo_1;?>"> <?=$grupo_entidade;?> </option>
<?
} //while($row = mysqli_fetch_array($query))
} //if ($totitens!="")
?>
</select>
</div>
<div class="col-sm-5">
<label for="textNome" class="control-label" style="font-family:Roboto;font-size: 18px;">Cidade</label>
<select name="cod_cidade" class="form-control" style="width:350px;">
<option value=""> Selecione Cidade </option>
<?
$cod_cidade = $_POST['cod_cidade'];
require_once('conexao.php');
$sql="select
distinct(e.cod_cidade),
c.cidade,u.uf
from mayer_entidades e, mayer_cidades c, mayer_estados u
where
e.cod_cidade=c.cod_cidade
and
c.cod_estado=u.cod_estado
ORDER BY c.cidade,u.uf ASC
;";
//echo "<pre>".$sql."</pre>";
$query=mysqli_query($con,$sql);
$totitens=@mysqli_num_rows($query);
if ($totitens!="")
{
while($row = mysqli_fetch_array($query))
{
$cod_cidade_1 = $row['cod_cidade'];
$cidade = utf8_encode($row['cidade']);
$uf = $row['uf'];
if ($cod_cidade_1==$cod_cidade)
{ $selected='selected';}
else
{ $selected='';}
?>
<option <?=$selected;?> value="<?=$cod_cidade_1;?>"> <?=$cidade;?> / <?=$uf;?> </option>
<?
} //while($row = mysqli_fetch_array($query))
} //if ($totitens!="")
?>
</select>
</div>
<div class="col-sm-1" style=" margin-top: 15px;">
<div>
<button onclick="javascript:document.frm_convenio.form.submit()" style="width:45px;height:44px;background-image:url('busca.png');background-repeat: no-repeat;background-size:45px 44px;"> </button>
</div>
</div>
</div> <!-- end col-sm-12 formulario pesquisa-->
</form>
<?
//Resultado da pesquisa se selecionou grupo_entidade ou uma cidade -------------------
if ($cod_entidade_grupo!='' or $cod_cidade!='')
{
?>
<hr class="vertical-space1">
<h1 style="text-align: center; font-size: 30px; color: #0071A7; margin-top: 15px;" class="">Resultado da Pesquisa</h1>
<!-- Aqui são os Pagos em destaque -->
<div class="col-sm-12" style="">
<hr class="vertical-space2">
<?
if ($cod_cidade!='' and $cod_entidade_grupo)
{ $pesquisa_sql="(e.cod_cidade='$cod_cidade' and e.cod_entidade_grupo='$cod_entidade_grupo')"; }
else
{ $pesquisa_sql="(e.cod_cidade='$cod_cidade' or e.cod_entidade_grupo='$cod_entidade_grupo')"; }
require_once('conexao.php');
$sql="select
e.entidade,
e.telefone_1,
e.telefone_2,
e.telefone_3,
e.rua,
e.numero,
e.email,
(select cidade from mayer_cidades where cod_cidade=e.cod_cidade LIMIT 1)as cidade,
(select uf from mayer_estados where cod_estado=(select cod_estado from mayer_cidades where cod_cidade=e.cod_cidade LIMIT 1) LIMIT 1)as uf,
(select grupo_entidade from mayer_entidades_grupos where cod_entidade_grupo=e.cod_entidade_grupo)as grupo_entidade,
(select foto from mayer_entidades_fotos where cod_entidade=e.cod_entidade LIMIT 1)as foto
from mayer_entidades e
where
e.destaque='SIM'
and
$pesquisa_sql
ORDER BY e.entidade,e.cod_cidade ASC
;";
//echo "<pre>".$sql."</pre>";
$query=mysqli_query($con,$sql);
$totitens=@mysqli_num_rows($query);
if ($totitens!="")
{
while($row = mysqli_fetch_array($query))
{
$entidade = $row['entidade'];
$cidade = utf8_encode($row['cidade']);
$uf = $row['uf'];
$site = $row['site'];
$grupo_entidade = $row['grupo_entidade'];
$foto = $row['foto'];
$telefone_1 = $row['telefone_1'];
$telefone_2 = $row['telefone_2'];
$telefone_3 = $row['telefone_3'];
$rua = $row['rua'];
$numero = $row['numero'];
$email_entidade = $row['email'];
if ($telefone_1=='')
{ $telefone_1=' '; }
if ($telefone_2=='')
{ $telefone_2=' '; }
if ($telefone_3=='')
{ $telefone_3=' '; }
?>
<div class="col-md-4" style="">
<article class="our-team" style="background: #96989A">
<figure><a href="<?=$site;?>" target="_blank"><div style="width:224px;height:151px;line-height:151px;"><?if ($foto!=''){?><img width="151" height="151" src="<?=$base_url;?>/images/portfolio/entidades/<?=$foto;?>" alt="mn04"><?}?></div></a></figure>
<h4 style="color: #fff; margin-left: 15px; margin-top: 5px;height:57px"><?=$entidade;?></h4>
<h4 style=" font-size: 15px; color: #fff; margin-left: 15px; margin-top: -18px;"><?=$grupo_entidade;?></h4>
<div style="color: #fff;">
<p style="color: #96989A;;">Telefones:<br> <?=$telefone_1;?> <br> <?=$telefone_2;?> <br> <?=$telefone_3;?></p>
<p><?=$rua;?>, <?=$numero;?></p>
<p>Email: <?=$email_entidade;?></p>
<p><?=$cidade;?> - <?=$uf;?></p>
</div>
</article>
</div> <!-- end col-sm-3 -->
<?
} //while($row = mysqli_fetch_array($query))
} //if ($totitens!="")
else
{
?>
<div style="display:none">
Nenhum registro encontrado
</div>
<?
}
?>
</div> <!-- ACABA AQUI OS PAGOS -->
<hr>
<!-- Aqui sao os nao pagos sem destaque -->
<div class="col-sm-12" style="margin-top: -50px;">
<hr class="vertical-space3">
<hr class="vertical-space2">
<?
if ($cod_cidade!='' and $cod_entidade_grupo)
{ $pesquisa_sql="(e.cod_cidade='$cod_cidade' and e.cod_entidade_grupo='$cod_entidade_grupo')"; }
else
{ $pesquisa_sql="(e.cod_cidade='$cod_cidade' or e.cod_entidade_grupo='$cod_entidade_grupo')"; }
require_once('conexao.php');
$sql="select
e.entidade,
e.telefone_1,
e.telefone_2,
e.telefone_3,
e.rua,
e.numero,
e.email,
(select cidade from mayer_cidades where cod_cidade=e.cod_cidade LIMIT 1)as cidade,
(select uf from mayer_estados where cod_estado=(select cod_estado from mayer_cidades where cod_cidade=e.cod_cidade LIMIT 1) LIMIT 1)as uf,
(select grupo_entidade from mayer_entidades_grupos where cod_entidade_grupo=e.cod_entidade_grupo)as grupo_entidade
from mayer_entidades e
where
e.destaque='NAO'
and
$pesquisa_sql
ORDER BY e.entidade,e.cod_cidade ASC
;";
//echo "<pre>".$sql."</pre>";
$query=mysqli_query($con,$sql);
$totitens=@mysqli_num_rows($query);
if ($totitens!="")
{
while($row = mysqli_fetch_array($query))
{
$entidade = $row['entidade'];
$cidade = utf8_encode($row['cidade']);
$uf = $row['uf'];
$site = $row['site'];
$grupo_entidade = $row['grupo_entidade'];
$telefone_1 = $row['telefone_1'];
$telefone_2 = $row['telefone_2'];
$telefone_3 = $row['telefone_3'];
$rua = $row['rua'];
$numero = $row['numero'];
$email_entidade = $row['email'];
if ($telefone_1=='')
{ $telefone_1=' '; }
if ($telefone_2=='')
{ $telefone_2=' '; }
if ($telefone_3=='')
{ $telefone_3=' '; }
?>
<div class="col-md-4" style="">
<article class="our-team" style="background: #fff">
<h4 style="color: #96989A;; margin-left: 15px; margin-top: 5px;height:57px"><?echo $entidade;?></h4>
<h4 style=" font-size: 15px; color: #96989A; margin-left: 15px; margin-top: -18px;"><?=$grupo_entidade;?></h4>
<div style="color: #96989A;">
<p style="color: #96989A;;">Telefones:<br> <?=$telefone_1;?> <br> <?=$telefone_2;?> <br> <?=$telefone_3;?></p>
<p style="color: #96989A;"><?=$rua;?>, <?=$numero;?> </p>
<p style="color: #96989A;">Email: <?=$email_entidade;?></p>
<p style="color: #96989A;"><?=$cidade;?> - <?=$uf;?></p>
</div>
</article>
</div> <!-- end col-sm-3 -->
<?
} //while($row = mysqli_fetch_array($query))
} //if ($totitens!="")
else
{
?>
<div style="display:none">
Nenhum registro encontrado
</div>
<?
}
?>
</div> <!-- end col-sm-12 -->
<?
} //if ($cod_entidade_grupo!='' or cod_cidade!='')
//Resultado da pesquisa se selecionou grupo_entidade ou uma cidade -------------------
?>
</section> <!-- end container -->
<div class="ls-wp-container"><img width="100%" src="fundo-convenios.jpg" alt=""></div>
Zerion Mini Shell 1.0