-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvideos.php
46 lines (44 loc) · 1.23 KB
/
videos.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
<?php include "topo.php";
include "conn.php"; ?>
<div class="videos">
<h1>Luz, Câmera, Ação!</h1>
<h2>...Ataque de fofura, ativar ♥</h2>
<?php
/*$dir = "/home/cabox/workspace/amy/fotos/";
foreach (glob ($dir."*", GLOB_ONLYDIR) as $pastas) {
if (is_dir ($pastas)) {
//echo "Galeria De ";
$caminho = str_replace ( $dir,"",$pastas);
echo " <a href=\"$caminho\"/index.php>".str_replace ( $dir,"",$pastas)."</a><br />";
echo "";
}
}*/
$sqlRead = 'SELECT * FROM videos order by id DESC';
try{
$read = $db->prepare($sqlRead);
$read->execute();
} catch(PDOException $e){
echo $e->getMessage();
}
echo "<p> </p>";
while($rs = $read->fetch(PDO::FETCH_OBJ)){
/*print_r($rs);*/
if($_SESSION["acesso"]=="1"){
echo "<a href='up/delV.php?idv=" . $rs->id . "'>Deletar Video</a><br />";
}
?>
<iframe src="<?php
if ($link=str_replace("https://www.youtube.com/watch?v=","https://www.youtube.com/embed/",$rs->link)){
echo $link;
} else {
echo $rs->link;
}?>"
frameborder="0" allow="autoplay; encrypted-media" allowfullscreen>
</iframe><br />
<?=$rs->descricao?>
<p> </p>
<center><hr></center>
<p> </p>
<?php } ?>
</div>
<?php include "rodape.php";