Skip to content

/ godela Private

  • Unwatch

    Notifications

  • Fork

    Fork godela

    If this dialog fails to load, you can visit the fork page directly.

Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
281 lines (249 sloc) 13.6 KB
<?php require_once('../Connections/georgema_bd.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_rsgaleria = "-1";
if (isset($_GET['cod_galeria'])) {
$colname_rsgaleria = (get_magic_quotes_gpc()) ? $_GET['cod_galeria'] : addslashes($_GET['cod_galeria']);
}
mysql_select_db($database_georgema_bd, $georgema_bd);
$query_rsgaleria = sprintf("SELECT `v_galerias_fotos_ativas`.* , `tb_galeria`.`descricao` , `tb_local`.`local` , `tb_local`.`cod_cidade` , `tb_local`.`site` , `tb_local`.`fone` , `tb_local`.`propriedadeparticular` , `tb_local`.`Inativo` , `tb_local`.`latitude` , `tb_local`.`longetitude` , `tb_local`.`twitter` , `tb_cidade`.`cidade` , `tb_estado`.`sigla`
FROM v_galerias_fotos_ativas
INNER JOIN `godela_godela`.`tb_galeria` ON (`v_galerias_fotos_ativas`.`cod_galeria` = `tb_galeria`.`cod_galeria`)
INNER JOIN `godela_godela`.`tb_local` ON (`v_galerias_fotos_ativas`.`cod_local` = `tb_local`.`cod_local`)
INNER JOIN `godela_godela`.`tb_cidade` ON (`tb_local`.`cod_cidade` = `tb_cidade`.`cod_cidade`)
INNER JOIN `godela_godela`.`tb_estado` ON (`tb_cidade`.`cod_estado` = `tb_estado`.`cod_estado`)
WHERE (`v_galerias_fotos_ativas`.`cod_galeria` = %s)", GetSQLValueString($colname_rsgaleria, "int"));
$rsgaleria = mysql_query($query_rsgaleria, $georgema_bd) or die(mysql_error());
$row_rsgaleria = mysql_fetch_assoc($rsgaleria);
$totalRows_rsgaleria = mysql_num_rows($rsgaleria);
$colname_rsfotos = "-1";
if (isset($_GET['cod_galeria'])) {
$colname_rsfotos = (get_magic_quotes_gpc()) ? $_GET['cod_galeria'] : addslashes($_GET['cod_galeria']);
}
mysql_select_db($database_georgema_bd, $georgema_bd);
$query_rsfotos = sprintf("SELECT
`tb_fotos`.`cod_foto`
, `v_galerias_fotos_ativas`.`cod_galeria`
, `tb_fotos`.`arquivo`
, `v_galerias_fotos_ativas`.`diretorio`
, `tb_fotos`.`comentario`
FROM
`godela_godela`.`tb_fotos`
INNER JOIN `godela_godela`.`v_galerias_fotos_ativas`
ON (`tb_fotos`.`cod_galeria` = `v_galerias_fotos_ativas`.`cod_galeria`)
WHERE (`v_galerias_fotos_ativas`.`cod_galeria` =%s
AND `tb_fotos`.`status` =0) ORDER BY arquivo ASC", GetSQLValueString($colname_rsfotos, "int"));
$rsfotos = mysql_query($query_rsfotos, $georgema_bd) or die(mysql_error());
$row_rsfotos = mysql_fetch_assoc($rsfotos);
$totalRows_rsfotos = mysql_num_rows($rsfotos);
?>
<!DOCTYPE html>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>
<?php if ($totalRows_rsgaleria > 0) { // Galeria Existe ?><?php echo $row_rsgaleria['galeria']; ?><?php } // fim Galeria Existe ?>
<?php if ($totalRows_rsgaleria == 0) { // galeria nao encontrada ?>Nenhuma galeria encontrada!<?php } // fim galeria nao encontrada ?>
</title>
<?php require_once('../includes/conteduohead.php'); ?>
<!-- Facebook Tags -->
<meta property="fb:app_id" content="225926094228267" />
<meta property="og:type" content="event" />
<meta property="og:site_name" content="Godela"/>
<meta property="og:locale" content="pt_br"/>
<meta property="og:url" content="http://www.godela.com.br/galeria/<?php echo $row_rsgaleria['cod_galeria']; ?>/<?php echo removeAcentos($row_rsgaleria['galeria'],'-'); ?>/" />
<meta property="og:title" content="<?php echo $row_rsgaleria['galeria']; ?>" />
<meta property="og:image" content="http://www.godela.com.br/galerias/<?php echo $row_rsgaleria['diretorio']; ?>/foto1.jpg" />
<meta property="event:start_time" content="<?php echo $row_rsgaleria['dataformatada']; ?>" />
<meta property="event:location" content="<?php echo $row_rsgaleria['local']; ?> - <?php echo $row_rsgaleria['cidade']; ?>/<?php echo $row_rsgaleria['sigla']; ?>" />
<?php if ($row_rsgaleria['propriedadeparticular'] == "0" && $row_rsgaleria['latitude']<>0 && $row_rsgaleria['longetitude']<>0) { ?>
<meta property="event:location:latitude" content="<?php echo $row_rsgaleria['latitude']; ?>" />
<meta property="event:location:longitude" content="<?php echo $row_rsgaleria['longetitude']; ?>" />
<?php } ?>
<!-- Twitter Card -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@godeleiro">
<meta name="twitter:title" content="<?php echo $row_rsgaleria['galeria']; ?>">
<meta name="twitter:description" content="Local: <?php echo $row_rsgaleria['local']; ?> - <?php echo $row_rsgaleria['cidade']; ?>/<?php echo $row_rsgaleria['sigla']; ?>">
<meta name="twitter:creator" content="@godeleiro">
<meta name="twitter:image" content="http://www.godela.com.br/galerias/<?php echo $row_rsgaleria['diretorio']; ?>/foto1.jpg">
</head>
<body>
<!-- JavaScript plugins (requires jQuery) -->
<script src="http://code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/dist/js/bootstrap.min.js"></script>
<!-- MENU -->
<?php
$linkativo = 'galeria';
require_once('../includes/menu.php');
?>
<!-- Marketing messaging and featurettes
================================================== -->
<!-- Wrap the rest of the page in another container to center all the content. -->
<div class="conteudo">
<div class="container marketing">
<!-- CITAÇÃO -->
<?php require_once('../includes/frases.php'); ?>
<!-- BREADCRUMB -->
<ul class="breadcrumb">
<li><a href="/index.php">Início</a></li>
<li><a href="/galerias/">Galerias de Fotos</a></li>
<li class="active">
<?php if ($totalRows_rsgaleria > 0) { // Galeria Existe ?><?php echo $row_rsgaleria['galeria']; ?><?php } // fim Galeria Existe ?>
<?php if ($totalRows_rsgaleria == 0) { // galeria nao encontrada ?>Nenhuma galeria encontrada!<?php } // fim galeria nao encontrada ?>
</li>
</ul>
<!-- Ad -->
<?php require('../includes/bannergoogle.php'); ?>
<!-- Galeria -->
<?php if ($totalRows_rsgaleria > 0) { // Galeria Existe ?>
<h1><?php echo $row_rsgaleria['galeria']; ?></h1>
<div class="row">
<div class="col col-lg-7 col-md-7 col-sm-6 col-xs-12">
<!-- titulo galeria -->
<h4>
<a href="/local/<?php echo $row_rsgaleria['cod_local']; ?>/<?php echo removeAcentos($row_rsgaleria['local'],'-'); ?>/" title="<?php echo $row_rsgaleria['local']; ?>"><?php echo $row_rsgaleria['local']; ?></a> - <a href="/cidade/<?php echo $row_rsgaleria['cod_cidade']; ?>/<?php echo removeAcentos($row_rsgaleria['cidade'],'-'); ?>/" title="<?php echo $row_rsgaleria['cidade']; ?>"><?php echo $row_rsgaleria['cidade']; ?>/<?php echo $row_rsgaleria['sigla']; ?></a>
</h4>
<!-- verifica se e propriedade privada e se tem as coordenadas latitude e longitude -->
<?php if ($row_rsgaleria['propriedadeparticular'] == "0" && $row_rsgaleria['latitude']<>0 && $row_rsgaleria['longetitude']<>0) { ?>
<p><a href="https://maps.google.com?saddr=Current+Location&daddr=<?php echo $row_rsgaleria['latitude']; ?>,<?php echo $row_rsgaleria['longetitude']; ?>" class="btn btn-xs btn-primary active text-right" role="button" target="_new"><i class="fa fa-map-marker fa-lg"></i> Como Chegar</a>
</p>
<?php } ?>
<!-- detalhes local -->
<?php if (@$row_rsgaleria['site'] != "") { // verifica se existe site ?>
<i class="fa fa-link fa-lg"></i>
<a href="<?php echo $row_rsgaleria['site']; ?>" title="Website do <!?php echo $row_rsgaleria['local']; ?>" target="_blank"><strong><?php echo $row_rsgaleria['site']; ?></strong></a><br>
<?php } ?>
<?php if (@$row_rsgaleria['fone'] != "") { // verifica se existe telefone ?>
<i class="fa fa-phone fa-lg"></i>
<strong><?php echo $row_rsgaleria['fone']; ?></strong><br>
<?php } ?>
<?php if (@$row_rsgaleria['twitter'] != "") { // verifica se existe twitter ?>
<i class="fa fa-twitter fa-lg"></i>
<a href="http://www.twitter.com/<?php echo $row_rsgaleria['twitter']; ?>" target="_blank" title="Twitter do <?php echo $row_rsgaleria['local']; ?>">@<strong><?php echo $row_rsgaleria['twitter']; ?></strong></a><br>
<?php } ?>
<?php if (@$row_rsgaleria['descricao'] != "") { // verifica se existe descri��o ?>
<strong><?php echo $row_rsgaleria['descricao']; ?></strong><br>
<?php } ?>
<!-- FACEBOOK -->
<br>
<?php
$facebooklink = 'http://www.godela.com.br/galeria/'. $row_rsgaleria['cod_galeria'] .'/' . removeAcentos($row_rsgaleria['galeria'],'-') . '/';
require_once('../includes/facebook_inc.php');
?>
</div>
<div class="col col-lg-5 col-md-5 col-sm-6 col-xs-12">
<!-- Mapa -->
<?php
if ($row_rsgaleria['propriedadeparticular'] == "0" && $row_rsgaleria['latitude']<>0 && $row_rsgaleria['longetitude']<>0)
{
$mapatipo = 'local';
$nomelocal = $row_rsgaleria['local'];
$latitude = $row_rsgaleria['latitude'];
$longitude = $row_rsgaleria['longetitude'];
require_once('../includes/mapa_inc.php');
}
?>
</div>
</div>
<?php } // fim Galeria Existe ?>
<!-- Galeria nao tem fotos -->
<?php if ($totalRows_rsgaleria == 0) { // galeria nao encontrada ?>
<h1>Nenhuma galeria encontrada!</h1>
<?php } // fim galeria nao encontrada ?>
<!-- Fotos -->
<?php if ($totalRows_rsfotos > 0) { // Existe fotos ?>
<div class="row">
<?php do { ?>
<div class="col col-lg-2 col-md-3 col-sm-3 col-xs-4" style="margin-bottom: 20px;">
<?php /* Verifica se e foto ou video */ if ($row_rsfotos['arquivo']=="video"){ // se for video ?>
<a data-toggle="modal" href="#video<?php echo $row_rsfotos['cod_foto']; ?>">
<img class="img-thumbnail" src="/includes/image_resize.php?w=140&amp;h=140&amp;f=../img/filmadora.jpg"></a>
<!-- inicio modal video-->
<div class="modal" id="video<?php echo $row_rsfotos['cod_foto']; ?>">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">�</button>
<h4 class="modal-title"><?php echo $row_rsgaleria['galeria']; ?></h4>
</div>
<div class="modal-body">
<?php echo $row_rsfotos['comentario']; // video no comentario ?>
</div>
<div class="modal-footer">
<div class="pull-right"><a href="/foto/<?php echo $row_rsfotos['cod_foto']; ?>/" class="btn btn-default btn-xs"><i class="glyphicon glyphicon-envelope"></i> Enviar por email</a></div>
</div>
</div>
</div>
</div>
<!-- fim modal -->
<?php } else { // se for foto ?>
<!-- chama modal -->
<a data-toggle="modal" href="#foto<?php echo $row_rsfotos['cod_foto']; ?>">
<img class="img-thumbnail img-responsive" src="/includes/image_resize.php?w=500&amp;h=500&amp;f=../galerias/<?php echo $row_rsgaleria['diretorio']; ?>/<?php echo $row_rsfotos['arquivo']; ?>.jpg"></a>
<!-- inicio modal foto-->
<div class="modal" id="foto<?php echo $row_rsfotos['cod_foto']; ?>">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
<h4 class="modal-title"><?php echo $row_rsgaleria['galeria']; ?></h4>
</div>
<div class="modal-body">
<img src="/galerias/imagem.php?cod_foto=<?php echo $row_rsfotos['cod_foto']; ?>" class="img-responsive">
</div>
<div class="modal-footer">
<div class="pull-left"><?php echo $row_rsfotos['comentario']; // comentario da foto ?></div>
<div class="pull-right"><a href="/foto/<?php echo $row_rsfotos['cod_foto']; ?>/" class="btn btn-default btn-xs"><i class="glyphicon glyphicon-envelope"></i> Enviar por email</a></div>
</div>
</div>
</div>
</div>
<!-- fim modal -->
<?php } /* fim Verifica se e foto ou video*/ ?>
<BR>
</div>
<?php } while ($row_rsfotos = mysql_fetch_assoc($rsfotos)); ?>
</div>
<?php } // fim Existe fotos ?>
<!-- Fim Fotos -->
<h4><a href="javascript:history.go(-1);" class="btn btn-default"><i class="fa fa-reply"></i> Voltar</a></h4>
<!-- Ad -->
<?php require('../includes/bannergoogle.php'); ?>
<?php require_once('../includes/noticias.php'); // Noticias ?>
</div>
<!-- FOOTER -->
<?php require_once('../includes/rodape.php'); ?>
</div>
<!-- /.container -->
</body>
</html>
<?php
mysql_free_result($rsgaleria);
mysql_free_result($rsfotos);
?>
You can’t perform that action at this time.