Mini Shell
<!DOCTYPE html>
<head>
</head>
<body>
<div id="myCarousell" data-interval="2000" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<!-- Wrapper for slides -->
<div class="carousel-inner">
<?
$sql = "SELECT * FROM fotosturismo order by rand () limit 1";
$res = mysqli_query($con, $sql);
$total = mysqli_num_rows($res);
while ($f = mysqli_fetch_array($res))
{
$idfototur = $f["id"];
$fototur = $f["arquivo"];
$linkkk = $f["link"];
}
if(empty($linkkk))
{
echo"
<div class=\"item active\">
<img src=\"adm/fotos/banner/$fototur\" alt=\"Sicomercio\" style=\"width:100%;\">
<div class=\"carousel-caption\">
</div>
</div>
";
}
else
{
echo"
<div class=\"item active\">
<a href = '$linkkk' target = '_blank'> <img src=\"adm/fotos/banner/$fototur\" alt=\"Sicomercio\" style=\"width:100%;\"> </a>
<div class=\"carousel-caption\">
</div>
</div>
";
}
$sql = "SELECT * FROM fotosturismo where id <> '$idfototur' order by rand () ";
$res = mysqli_query($con, $sql);
$total = mysqli_num_rows($res);
while ($f = mysqli_fetch_array($res))
{
$fototurr = $f["arquivo"];
$linkk = $f["link"];
if(empty($linkk))
{
echo"
<div class=\"item\">
<img src=\"adm/fotos/banner/$fototurr\" alt=\"Sicomercio\" style=\"width:100%;\">
<div class=\"carousel-caption\">
</div>
</div>
";
}
else
{
echo"
<div class=\"item\">
<a href = '$linkk' target = '_blank'> <img src=\"adm/fotos/banner/$fototurr\" alt=\"Sicomercio\" style=\"width:100%;\"> </a>
<div class=\"carousel-caption\">
</div>
</div>
";
}
}
?>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousell" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousell" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</body>
</html>
Zerion Mini Shell 1.0