예제 #1
0
<?php

$dir = filter_input(INPUT_GET, "ftp", FILTER_DEFAULT);
$file = filter_input(INPUT_GET, "file", FILTER_DEFAULT);
$style = filter_input(INPUT_GET, 'style', FILTER_DEFAULT);
$Ftp = new Ftp(HOME . "/pages/qualidade/", $style);
echo $Ftp->getBread($dir);
$Ftp->setConn(FTP_HOST);
$Ftp->setLogin(FTP_USER, FTP_PASS);
echo "<div class='row'>";
if (!empty($style) && $style == 'lista') {
    ?>
    <a href="<?php 
    echo $Ftp->getPage() . "&ftp=" . $Ftp->getUrl();
    ?>
&style=bloco" class="btn btn-success" style="float: right; width: 100px;">Bloco</a>
<?php 
} else {
    ?>
    <a href="<?php 
    echo $Ftp->getPage() . "&ftp=" . $Ftp->getUrl();
    ?>
&style=lista" class="btn btn-primary" style="float: right; width: 100px;">Lista</a>
<?php 
}
echo "</div>";
?>

<div class="well">
    <?php 
$lista = !empty($dir) ? $Ftp->nlist($dir) : $Ftp->nlist('.');