require_once 'modules/admin/extconfig/opendelosapp.php'; require_once 'delos_functions.php'; require_once 'custom_sort.php'; $toolName = $langVideo; if (isset($_SESSION['givenname'])) { $nick = q($_SESSION['givenname'] . ' ' . $_SESSION['surname']); } $is_in_tinymce = isset($_REQUEST['embedtype']) && $_REQUEST['embedtype'] == 'tinymce'; $display_tools = $is_editor && !$is_in_tinymce; $menuTypeID = ($is_in_tinymce) ? 5 : 2; list($filterv, $filterl, $compatiblePlugin) = isset($_REQUEST['docsfilter'])? select_proper_filters($_REQUEST['docsfilter']): array('WHERE true', 'WHERE true', true); // custom sort $order = 'ORDER BY title'; $sort = 'title'; $reverse = false; if (isset($_GET['sort']) && $_GET['sort'] === 'date') { $order = 'ORDER BY date'; $sort = 'date'; } if (isset($_GET['rev'])) { $order .= ' DESC'; $reverse = true; }
$sort = 'name'; $reverse = false; if (isset($_GET['sort'])) { if ($_GET['sort'] == 'type') { $order = 'ORDER BY format'; $sort = 'type'; } elseif ($_GET['sort'] == 'date') { $order = 'ORDER BY date_modified'; $sort = 'date'; } } if (isset($_GET['rev'])) { $order .= ' DESC'; $reverse = true; } list($filter, $compatiblePlugin) = isset($_REQUEST['docsfilter']) ? select_proper_filters($_REQUEST['docsfilter']) : array('', true); /* * * Retrieve file info for current directory from database and disk ** */ $result = Database::get()->queryArray("SELECT * FROM document\n WHERE {$group_sql} AND\n path LIKE '{$curDirPath}/%' AND\n path NOT LIKE '{$curDirPath}/%/%' {$filter} {$order}"); $fileinfo = array(); foreach ($result as $row) { if ($real_path = common_doc_path($row->extra_path, true)) { // common docs if (!$common_doc_visible and !$is_admin) { // hide links to invisible common docs to non-admins continue; } $path = $real_path; } else { $path = $basedir . $row->path; } if (!$real_path and $row->extra_path) {
$action = new action(); $action->record('MODULE_ID_VIDEO'); /**************************************/ require_once 'include/lib/forcedownload.php'; require_once 'include/lib/modalboxhelper.class.php'; require_once 'include/lib/multimediahelper.class.php'; require_once 'include/lib/mediaresource.factory.php'; require_once 'include/log.php'; require_once 'modules/search/indexer.class.php'; $toolName = $langVideo; if (isset($_SESSION['givenname'])) { $nick = q($_SESSION['givenname'] . ' ' . $_SESSION['surname']); } $is_in_tinymce = isset($_REQUEST['embedtype']) && $_REQUEST['embedtype'] == 'tinymce' ? true : false; $menuTypeID = $is_in_tinymce ? 5 : 2; list($filterv, $filterl, $compatiblePlugin) = isset($_REQUEST['docsfilter']) ? select_proper_filters($_REQUEST['docsfilter']) : array('WHERE true', 'WHERE true', true); if ($is_in_tinymce) { $_SESSION['embedonce'] = true; // necessary for baseTheme load_js('jquery-' . JQUERY_VERSION . '.min'); load_js('tinymce.popup.urlgrabber.min.js'); } if ($is_editor) { load_js('tools.js'); ModalBoxHelper::loadModalBox(true); $head_content .= <<<hContent <script type="text/javascript"> function checkrequired(which, entry) { \tvar pass=true; \tif (document.images) { \t\tfor (i=0;i<which.length;i++) {