Exemple #1
0
 * @copyright (c) 2012 Shimansky.biz
 * @author Serguei Shimansky <*****@*****.**>
 * @license http://opensource.org/licenses/bsd-license.php
 * @package shimansky.biz
 * @link https://bitbucket.org/englishextra/shimansky.biz
 * @link https://github.com/englishextra/shimansky.biz.git
 */
$relpa = ($relpa0 = preg_replace("/[\\/]+/", "/", $_SERVER['DOCUMENT_ROOT'] . '/')) ? $relpa0 : '';
$a_inc = array('inc/regional.inc', 'inc/adminauth.inc');
foreach ($a_inc as $v) {
    require_once $relpa . $v;
}
// Include the DirectoryLister class
require_once $relpa . 'tools/DirectoryLister/resources/DirectoryLister.php';
// Initialize the DirectoryLister object
$lister = new DirectoryLister();
// Return file hash
if (isset($_GET['hash'])) {
    // Get file hash array and JSON encode it
    $hashes = $lister->getFileHash($_GET['hash']);
    $data = json_encode($hashes);
    // Return the data
    die($data);
}
// Initialize the directory array
if (isset($_GET['dir'])) {
    $dirArray = $lister->listDirectory($_GET['dir']);
} else {
    $dirArray = $lister->listDirectory($relpa . 'libs/');
}
/* echo $relpa . 'lib/'; exit; */
<?php

// Include the DirectoryLister class
require_once 'resources/DirectoryLister.php';
// Initialize the DirectoryLister object
$lister = new DirectoryLister();
// Restrict access to current directory
ini_set('open_basedir', getcwd());
// Return file hash
if (isset($_GET['hash'])) {
    // Get file hash array and JSON encode it
    $hashes = $lister->getFileHash($_GET['hash']);
    $data = json_encode($hashes);
    // Return the data
    die($data);
}
// Initialize the directory array
if (isset($_GET['dir'])) {
    $dirArray = $lister->listDirectory($_GET['dir']);
} else {
    $dirArray = $lister->listDirectory('.');
}
// Define theme path
if (!defined('THEMEPATH')) {
    define('THEMEPATH', $lister->getThemePath());
}
// Set path to theme index
$themeIndex = $lister->getThemePath(true) . '/index.php';
// Initialize the theme
if (file_exists($themeIndex)) {
    include $themeIndex;
Exemple #3
0
<?php

// Include the DirectoryLister class
require_once 'resources/DirectoryLister.php';
// Initialize the DirectoryLister object
$lister = new DirectoryLister();
//Initialize the directory array
if (isset($_GET['dir'])) {
    $dirArray = $lister->listDirectory($_GET['dir']);
} else {
    $dirArray = $lister->listDirectory('cards/');
}
?>
                    <?php 
if ($lister->getSystemMessages()) {
    ?>
                <?php 
    foreach ($lister->getSystemMessages() as $message) {
        ?>
                    <div class="alert alert-<?php 
        echo $message['type'];
        ?>
">
                        <?php 
        echo $message['text'];
        ?>
                    </div>
                <?php 
    }
    ?>
            <?php