-
Notifications
You must be signed in to change notification settings - Fork 0
/
emprendimientos.inc.php
101 lines (72 loc) · 2.62 KB
/
emprendimientos.inc.php
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
<?php
/************ Emprendimiento *******************/
/* select all */
function traerEmprendimiento(){
require("galeria_emprendimiento.inc.php");
$db = Conectar();
$sql = "SELECT * FROM emprendimientos ORDER BY id_em DESC";
$resultado = $db->query($sql);
while ($data = $resultado->fetch_object()){
echo "
<section class='site-emprendimiento clearfix SombraEmprendiminetos2' id='".$data->id_em."'>
<div class='hideme'>
<div class='row Contenedor-Emprender'>
<h2>".$data->titulo."</h2>
<img src='upload/".$data->banner."' width='1079' height='216'/>
</div>
</div>
</section>
<section class='VisitarTienda clearfix'>
<div class='row Contenedor-Emprender'> ";
if(empty($data->video)){
echo "<article class='Text-TiendaFundacion' style='width:100%;'>
<p>".$data->detalle."</p>
</article>
</div>
</section>
<br><br>
";
}else{
echo "<article class='Text-TiendaFundacion'>
<p>".$data->detalle."</p>";
echo "
</article>
<div class='VideoEmprendimiento'>
<iframe width='600' height='407' src='https://www.youtube.com/embed/".$data->video."?rel=0&showinfo=0' frameborder='0' allowfullscreen></iframe>
</div>
</section>
<br><br>
";
}
traerGaleriaEmprendimiento($data->id_em); }
}
function getEmprendimiento(){
$db = Conectar();
$id = $db->real_escape_string($_GET['id']);
$sql = "SELECT * FROM emprendimientos WHERE id_em = '$id'";
$resultado = $db->query($sql);
$data = $resultado->fetch_object();
echo "
<section class='site-emprendimiento clearfix SombraEmprendiminetos2' id='".$data->id_em."'>
<div id='here'></div>
<div class='row Contenedor-Emprender'>
<h2>".$data->titulo."</h2>
<img src='upload/".$data->banner."' width='1000'/>
</div>
</section>
<section class='VisitarTienda clearfix'>
<div class='row Contenedor-Emprender'>
<article class='Text-TiendaFundacion'>
<p>".$data->detalle."</p>";
$link = str_replace("watch?v=", "/embed/", $data->video);
echo "
</article>
<div class='VideoEmprendimiento'>
<iframe width='540' height='350' src=".$link." frameborder='0'allowfullscreen></iframe>
</div>
</div>
</section>
</div>
";
}
?>