예제 #1
0
<div id = "controls">
</div>

<div class="actions"></div>

<?php 
include 'reader/lib/dir.php';
include 'reader/lib/thumbnail.php';
include 'reader/lib/library_display.php';
include 'reader/lib/tag_utils.php';
$tag = "%" . $_['tag'] . "%";
$res = find_results_with_tag_like($tag);
?>
<table id = "readerContent">
	<tbody id = "fileList">
		<?php 
while ($r = $res->fetchRow()) {
    $dirname = dirname($r['filepath']);
    if ($dirname != '/') {
        $dirname = $dirname . '/';
    }
    display_ebooks(basename($r['filepath']), $dirname);
}
?>
</tbody>
</table>
예제 #2
0
        ?>
</a>
			</div>
	<?php 
    }
}
?>
	<div id="file_action_panel"></div>
	<input type="hidden" name="dir" value="<?php 
p(empty($_['path']) ? '' : rtrim($_['path'], '/'));
?>
" id="dir">
</div>

<div class="actions"></div>

<table id = "readerContent">
	<tbody id = "fileList">
		<?php 
include 'reader/lib/thumbnail.php';
include 'reader/lib/library_display.php';
include 'reader/lib/tag_utils.php';
$file = $_['file'];
$path = $_['path'];
$filename = $_['filename'];
display_ebooks($filename, $path . '/');
?>
	</tbody>
</table>

예제 #3
0
<table id = "readerContent">
	<tbody id = "fileList">
<?php 
// Array to store directory entries, which contain pdfs.
$sub_dirs = array();
$ebooks = array();
foreach ($files as $file) {
    if ($file['dirname'] == '.') {
        $ebooks[] = $file['filename'];
    } else {
        // Trim the extra slash that we don't need.
        $dir_name = ltrim($current_dir, '/');
        // Explode the variable to check if the pdf file is contained in a directory.
        $dir_array = explode('/', $file['dirname']);
        // Get the directory name in which the pdf resides.
        $sub_dir = $dir_array[0];
        if (!in_array($sub_dir, $sub_dirs)) {
            $sub_dirs[] = $sub_dir;
        }
    }
}
display_sub_dirs($current_dir, $sub_dirs);
foreach ($ebooks as $ebook) {
    display_ebooks($ebook, $current_dir);
}
?>
	</tbody>
</table>