Beispiel #1
0
}
// check if there are documents
$doc_count = Database::get()->querySingle("SELECT COUNT(*) as count FROM document WHERE {$group_sql} {$filter}" . ($can_upload ? '' : " AND visible=1"))->count;
if ($doc_count == 0) {
    $tool_content .= "<div class='alert alert-warning'>{$langNoDocuments}</div>";
} else {
    // Current Directory Line
    $tool_content .= "\n    <div class='row'>\n        <div class='col-md-12'>\n            <div class='panel'>\n                <div class='panel-body'>";
    if ($can_upload) {
        $cols = 4;
    } else {
        $cols = 3;
    }
    $download_path = empty($curDirPath) ? '/' : $curDirPath;
    $download_dir = $is_in_tinymce ? '' : "<a href='{$base_url}download={$download_path}'><img src='{$themeimg}/save_s.png' width='16' height='16' align='middle' alt='{$langDownloadDir}' title='{$langDownloadDir}'></a>";
    $tool_content .= "\n        <div class='pull-left'><b>{$langDirectory}:</b> " . make_clickable_path($curDirPath) . "&nbsp;{$download_dir}</div>\n        ";
    /*     * * go to parent directory ** */
    if ($curDirName) {
        // if the $curDirName is empty, we're in the root point and we can't go to a parent dir
        $parentlink = $base_url . 'openDir=' . $cmdParentDir;
        $tool_content .= " <div class='pull-right'>\n                            <a href='{$parentlink}' type='button' class='btn btn-success'><i class='fa fa-level-up'></i> {$langUp}</a>\n                        </div>";
    }
    $tool_content .= "</div>\n            </div>\n        </div>\n    </div>\n    <div class='row'>\n        <div class='col-md-12'>\n                <div class='table-responsive'>\n                <table class='table-default'>\n                    <tr>";
    $tool_content .= "<th class='center'><b>" . headlink($langType, 'type') . '</b></th>' . "<th><div class='text-left'>" . headlink($langName, 'name') . '</div></th>' . "<th class='center'><b>{$langSize}</b></th>" . "<th class='text-center'><b>" . headlink($langDate, 'date') . '</b></th>';
    if (!$is_in_tinymce) {
        $tool_content .= "<th class='text-center'>" . icon('fa-gears', $langCommands) . "</th>";
    }
    $tool_content .= "</tr>";
    // -------------------------------------
    // Display directories first, then files
    // -------------------------------------
Beispiel #2
0
    // If inside a subdirectory ($curDirName is not empty)
    if ($curDirName) {
        // Display parent directory link
        $parentlink = $base_url . 'openDir=' . $cmdParentDir;
        $tool_content.=" <div class='pull-right'>
                            <a href='$parentlink' type='button' class='btn btn-success'><i class='fa fa-level-up'></i> $langUp</a>
                        </div>";
        // Get current directory comment
        $dirComment = Database::get()->querySingle("SELECT comment FROM document WHERE $group_sql AND path = ?s", $curDirPath)->comment;
    } else {
        // In root directory - don't display parent directory link or comments
        $dirComment = '';
    }
    $download_path = empty($curDirPath) ? '/' : $curDirPath;
    $download_dir = (!$is_in_tinymce and $uid) ? icon('fa-download', $langDownloadDir, "{$base_url}download=$download_path") : '';
    $tool_content .= "<div>".make_clickable_path($curDirPath) .
            "&nbsp;&nbsp;$download_dir</div>";
    if ($dirComment) {
        $tool_content .= '<div>' . q($dirComment) . '</div>';
    }

    $tool_content .= "</div>
            </div>
        </div>
    </div>
    <div class='row'>
        <div class='col-md-12'>
                <div class='table-responsive'>
                <table class='table-default'>
                    <tr class='list-header'>";
    $tool_content .= "<th class='text-left' width='60'>" . headlink($langType, 'type') . '</th>' .