first_php_project/eventos_detalhe.php

158 lines
6.0 KiB
PHP
Raw Normal View History

2021-11-19 22:12:23 -03:00
<?php require_once('Connections/conn_sustentabilidade.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$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_lista_evento_detalhe = "-1";
if (isset($_GET['id_evento'])) {
$colname_lista_evento_detalhe = $_GET['id_evento'];
}
mysql_select_db($database_conn_sustentabilidade, $conn_sustentabilidade);
$query_lista_evento_detalhe = sprintf("SELECT * FROM vw_tbeventos WHERE id_evento = %s ORDER BY nome_evento ASC", GetSQLValueString($colname_lista_evento_detalhe, "int"));
$lista_evento_detalhe = mysql_query($query_lista_evento_detalhe, $conn_sustentabilidade) or die(mysql_error());
$row_lista_evento_detalhe = mysql_fetch_assoc($lista_evento_detalhe);
$totalRows_lista_evento_detalhe = mysql_num_rows($lista_evento_detalhe);
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Sustentaitapê</title>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="css/estilo.css" rel="stylesheet">
<link rel="icon" type="image/x-icon" href="css/favicon.ico" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="css/font-face/stylesheet.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:300,400,700">
</head>
<body>
<div class="modal-open">
<?php include ('contato.php');?>
<?php include ('sobre.php');?>
<!-- Inicio Modal Quero Participar -->
<div class="modal fade" id="queroparticipar" tabindex="-1" role="dialog" aria-labelledby="meumodal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="meumodal"><b>Quero Participar!</b></h4>
</div>
<div class="modal-body">
<img src="imagens/sustentaitape2.png" alt="..." width="220px" height="70px">
</div>
<div class="modal-body">
<form action="queroparticipar.php" name="form_queroparticipar" id="form_queroparticipar" method="post">
<div class="form-group">
<label for="name" class="col-form-label">Nome:</label>
<input type="text" class="form-control" name="nome_contato" id="nome_contato" placeholder="Digite seu nome" required>
</div>
<div class="form-group">
<label for="email" class="col-form-label">E-mail:</label>
<input type="email" class="form-control" name="email_contato" id="email_contato" placeholder="Digite seu e-mail" required>
<input type="hidden" name="evento" id="evento" value="<?php echo $row_lista_evento_detalhe['nome_evento']?>"
</div>
<div class="modal-footer">
<center><button type="submit" class="btn btn-primary" aria-label="Enviar" aria-hidden="true">Quero Participar!</button></center>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Fim Modal Quero Participar -->
</div>
<nav class="navbar navbar-fixed-top navbar-inverse navbar-transparente">
<?php include ('menu.php');?>
</nav>
<header class="container main" style="margin-top: 80px;">
<h4 class="breadcrumb"><a href="index.php">Home</a> / <a href="eventos_por_tipo.php?id_tipo=<?php echo $row_lista_evento_detalhe['tipo_evento']; ?>"><?php echo $row_lista_evento_detalhe['rotulo_tipo']?></a> / <a href="#"><?php echo $row_lista_evento_detalhe['nome_evento']?></a></h4>
<h1><?php echo $row_lista_evento_detalhe['nome_evento']?></h1>
</header>
<section class="container main" style="padding-bottom:30px">
<h4>Detalhes do Evento</h4>
<section class="container-fluid">
<section class="row">
<section class="container-fluid thumbnail">
<section class="col-md-4 col-sm-12 col-xs-12">
<img src="imagens/<?php echo $row_lista_evento_detalhe['imagem_evento']?>" class="img-responsive img-thumbnail" alt="Imagem do Evento">
</section>
<section class="col-md-8 col-sm-12 col-xs-12">
<h4><?php echo $row_lista_evento_detalhe['rotulo_tipo']?></h4>
<p><?php echo $row_lista_evento_detalhe['publico_evento']?></p>
<p><?php echo $row_lista_evento_detalhe['descr_evento'];?></p>
<div class="collapse" id="collapseExample">
<div class="card card-body">
<?php echo substr($row_lista_evento_detalhe['descr_evento'], 30)?>
</div>
</div>
<p class="text-right"><button data-toggle="modal" data-target="#queroparticipar" class="btn btn-default">Quero participar!</button></p>
</section>
</section>
</section>
</section>
</section>
<footer><?php include 'rodape.php';?></footer>
<!-- Jquery (obrigatório para plugin JS do Bootstrap) -->
<script src="bootstrap/jquery.min.js"></script>
<!-- Plugin JS-->
<script src="bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
<?php
mysql_free_result($lista_evento_detalhe);
?>