if (!isset($_GET['form_input']) && !isset($_GET['action']) && !isset($_GET['table_edit'])) { ModalBoxHelper::loadModalBox(true); $count_video = Database::get()->querySingle("SELECT COUNT(*) AS count FROM video $filterv AND course_id = ?d ORDER BY title", $course_id)->count; $count_video_links = Database::get()->querySingle("SELECT count(*) AS count FROM videolink $filterl AND course_id = ?d ORDER BY title", $course_id)->count; $num_of_categories = Database::get()->querySingle("SELECT COUNT(*) AS count FROM `video_category` WHERE course_id = ?d", $course_id)->count; $expand_all = isset($_GET['d']) && $_GET['d'] == '1'; if ($count_video[0] > 0 or $count_video_links[0] > 0) { $tool_content .= " <div class='row'> <div class='col-sm-12'> <div class='table-responsive'> <table class='table-default nocategory-links'> <tr class='list-header'> <th>" . headlink($langVideoDirectory, 'title') . "</th> <th class='text-center' style='width:134px'>" . headlink($langDate, 'date') . "</th>"; if (!$is_in_tinymce) { $tool_content .= "<th class='text-center'>" . icon('fa-gears') . '</th>'; } $tool_content .= "</tr>"; // display uncategorized links showlinksofcategory(); $tool_content .= "</table></div></div></div>" . "<div class='row'> <div class='col-sm-12'> <div class='table-responsive'> <table class='table-default category-links'>"; if ($num_of_categories > 0) { // categories found ?
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) . " {$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 // ------------------------------------- foreach (array(true, false) as $is_dir) { foreach ($fileinfo as $entry) { $link_title_extra = ''; if ($entry['is_dir'] != $is_dir or !$can_upload and !resource_access($entry['visible'], $entry['public'])) { continue; } $cmdDirName = $entry['path']; if (!$entry['visible']) {
$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>' . "<th class='text-left'>" . headlink($langName, 'name') . '</th>' . "<th class='text-left'>$langSize</th>" . "<th class='text-left'>" . headlink($langDate, 'date') . '</th>'; if (!$is_in_tinymce) { $tool_content .= "<th class='text-center'>".icon('fa-gears', $langCommands)."</th>"; } $tool_content .= "</tr>"; if (!count($fileinfo)) { $tool_content .= "<tr><td colspan=10><p class='not_visible text-center'> - " . q($langNoDocuments) . " - </td></tr>"; } else { // ------------------------------------- // Display directories first, then files // ------------------------------------- foreach (array(true, false) as $is_dir) { foreach ($fileinfo as $entry) { $link_title_extra = '';