1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
|
<? include_once("init.php"); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="iso-8859-1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <link rel="icon" href="../../favicon.ico"> <? $query= mysql_query("SELECT * FROM artigo where idartigo = '$slug'"); $ltn = mysql_fetch_assoc($query); $data = $ltn['data_criacao']; $idcomentario = $ltn['idartigo'] ?> <title><?= $ltn['titulo']?> - Sivana</title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" /> <? if ($ltn['imagem']!=''){?> <meta property="og:image" content="http://www.sivana.com.br/userfiles/image/<?=$ltn['imagem'];?>/"> <? }else{?> <meta property="og:image" content="http://www.sivana.com.br/images/sivana.jpg"> <? } ?> <!-- Bootstrap core CSS --> <link href="dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template --> <link href="css/sivana.css" rel="stylesheet"> <!-- Owl Carousel Assets --> <link href="owl-carousel/owl.carousel.css" rel="stylesheet"> <link href="owl-carousel/owl.theme.css" rel="stylesheet"> <!-- Just for debugging purposes. Don't actually copy these 2 lines! --> <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]--> <script src="assets/js/ie-emulation-modes-warning.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <script src="assets/js/ie10-viewport-bug-workaround.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> <script src="owl-carousel/owl.carousel.js"></script> <style> #owl-demo .item{ margin: 3px; } #owl-demo .item img{ display: block; width: 100%; height: auto; } </style> <script> $(document).ready(function() { $("#owl-demo").owlCarousel({ autoPlay: 3000, items : 4, pagination : true, navigation : true, itemsDesktop : [1199,3], itemsDesktopSmall : [979,3] }); }); </script> <link rel="stylesheet" href="css_l/lightbox.css"> </head>
<body> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/pt_BR/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script>
<? include ("topo.php") ?> <!-- Static navbar --> <? include ("menu.php") ?> <div class="conteudo"> <div class="container"> <? include ("aviso.php") ?> <div class="row"> <div class="col-md-8"> <div class="principal"> <h1 class="nomgbottom"><?= $ltn['titulo']?></h1> <span style="font-size:14px;color:#989696;margin-top:10px;display:block;margin-bottom:8px"><?= $ltn['intro'] ?></span> <hr> <p style="font-size:12px"><?php echo date('d/m/Y H:m:s', strtotime($data)); ?></p> <div class="clearfix"></div> <div class="dsempre"> <ul class="nomg"> <li><div class="fb-like" data-href="<? $server = $_SERVER['SERVER_NAME']; $endereco = $_SERVER ['REQUEST_URI'];
echo "http://" . $server . $endereco; ?>/" data-width="450" data-layout="button_count" data-action="like" data-show-faces="true" data-send="true"></div></li> <li> <div class="g-plusone" data-size="medium" data-annotation="inline" data-width="200"></div> <script type="text/javascript"> window.___gcfg = {lang: 'pt-BR'}; (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/platform.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script> </li> <li> <a class="twitter-share-button" href="<? $server = $_SERVER['SERVER_NAME']; $endereco = $_SERVER ['REQUEST_URI'];
echo "http://" . $server . $endereco; ?>" data-via=""> Tweet </a> <script type="text/javascript"> window.twttr=(function(d,s,id){var t,js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return}js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);return window.twttr||(t={_e:[],ready:function(f){t._e.push(f)}})}(document,"script","twitter-wjs")); </script> </li> <div class="clearfix"></div> </ul> </div> <a class="example-image-link" href="userfiles/image/<?= $ltn['imagem']?>" data-lightbox="example-set" data-title="<?= $ltn['titulo'] ?>"><img src="userfiles/image/<?= $ltn['imagem']?>" class="cem" alt="<?= $ltn['titulo']?>" title="<?= $ltn['titulo']?>" /> </a> <p style="font-size:12px"><?= $ltn['legenda']?></p> <div class="vintespaco"></div> <p> <?= $ltn['conteudo'] ?> </p> <? $laq = mysql_query ("select * from foto_noticia where idartigo = '$idcomentario'"); $tot = mysql_num_rows($laq); if ($tot > 0 ) { ?> <div id="owl-demo" class="owl-carousel"> <? while ($foto = mysql_fetch_array($laq)) { ?> <div class="item"><a class="example-image-link" href="userfiles/image/<?= $foto['foto']?>" data-lightbox="example-set" data-title="<?= $ltn['titulo'] ?>"><img src="userfiles/image/<?= $foto['foto']?>" alt=""></a></div> <? } ?> </div> <? } ?> <div class="comentarios"> <? $sql = "SELECT * from comentario_artigo where artigo_idartigo = '$idcomentario' and ativo_coment = 's' ";//select para pegar todas as quantidades de vagas disponiveis $query = mysql_query($sql); $total = mysql_num_rows($query); ?> <h4><? if ( $total > 0 ) { echo $total;} ?> <span style="font-size:20px; font-weight:lighter">Comentários</span></h4> <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> <div class="panel panel-default"> <div class="panel-heading" role="tab" id="headingOne"> <h5 class="panel-title"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> Escreva seu comentário </a> </h5> </div> <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne"> <div class="panel-body"> <form id="formulario" name="formulario" action="javascript:func()" method="post"> <div class="row"> <div class="col-md-6"> <label>Nome:</label> <input type="text" class="form-control" id="nome" name="nome" required> <label>Email:</label> <input type="text" class="form-control" id="email" name="email" required> <input type="hidden" class="form-control" id="idartigo" name="idartigo" value="<?= $ltn['idartigo'] ?>" > </div> <div class="col-md-6"> <label>Comentário:</label> <textarea class="form-control" rows="5" id="comentario" name="comentario" required></textarea> </div> </div> <input type="submit" class="btn botao" value="Enviar Comentário"> <div id="status"></div> </form>
</div> </div> </div> </div> <? while ($exibir = mysql_fetch_array($query)){ ?> <div class="square2 esq"> <h5><strong><?= $exibir['nome_coment']?></strong> <span style="font-size:12px;"><?php echo date('d/m/Y', strtotime($exibir['data_comentario'])); ?></span></h5> <p><?= $exibir['conteudo_coment']?></p> </div> <? } ?> </div> <div class="clearfix"></div> </div>
</div> <!-- col 8 --> <div class="col-md-4"> <? include ("menu-rapido.php")?> </div>
</div> <div class="vintespaco"></div> <? include("parceiros.php") ?> </div> <!-- /container --> <? include ("rodape.php") ?> </div><!-- Conteudo do site-->
<!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="dist/js/bootstrap.min.js"></script> <script src="js_l/lightbox.js"></script> <script>
$(function($) { // Quando o formulário for enviado, essa funçao é chamada $("#formulario").submit(function() { // alert('numero 1'); var tipo = $("input[type=radio][name=tipo]:checked").val(); // Colocamos os valores de cada campo em uma variavel para facilitar a manipulacao if (formulario.nome.value == "" || formulario.nome.value == "Nome (requerido)" || formulario.nome.value == "Preencha este campo !" ) {
formulario.nome.value='Preencha este campo !' document.getElementById('nome').className = 'input_contato_fail form-control'; document.getElementById('nome').focus(); return false; }
var filtro_mail = /^.+@.+\..{2,3}$/ if (!filtro_mail.test(formulario.email.value) || formulario.email.value=="" || formulario.email.value=="Informe um email valido !" ) {
formulario.email.value='Informe um email valido !' document.getElementById('email').className = 'input_contato_fail form-control'; document.getElementById('email').focus(); return false; }
var tipo = $("input[type=radio][name=tipo]:checked").val(); // Colocamos os valores de cada campo em uma váriavel para facilitar a manipulaçao var nome = $("#nome").val(); var email = $("#email").val(); var idartigo = $("#idartigo").val(); //var setor = $("#setor").val(); var comentario = $("#comentario").val(); // Exibe mensagem de carregamento $("#status").html("Aguarde! Enviando comentário"); $("#status").slideDown(); $("#enviar").hide(); // Fazemos a requisao ajax com o arquivo enviar.php e enviamos os valores de cada campo através do método POST $.post('enviar-comentario.php', {nome: nome, idartigo: idartigo, email: email, comentario: comentario }, function(resposta) { // Quando terminada a requisiçao // Exibe a div status $("#status").slideDown(); // Se a resposta é um erro if (resposta != false) { // Exibe o erro na div $("#status").html(resposta); $("#enviar").show(); } // Se resposta for false, ou seja, nao ocorreu nenhum erro else { // Exibe mensagem de sucesso $("#status").html("Comentário enviado com sucesso!"); // Limpando todos os campos $("#nome").val(""); $("#fone").val(""); $("#email").val(""); $("#filial").val(""); $("#assunto").val(""); $("#comentario").val(""); $("#enviar").show(); } }); }); }); </script>
</body> </html>
|