function printfilelist($filelist) { global $CFG, $basedir; $strfolder = get_string("folder"); $strfile = get_string("file"); foreach ($filelist as $file) { if (is_dir($basedir . '/' . $file)) { echo '<img src="' . $OUTPUT->pix_url('f/folder') . '" class="icon" alt="' . $strfolder . '" /> ' . htmlspecialchars($file) . '<br />'; $subfilelist = array(); $currdir = opendir($basedir . '/' . $file); while (false !== ($subfile = readdir($currdir))) { if ($subfile != ".." && $subfile != ".") { $subfilelist[] = $file . "/" . $subfile; } } printfilelist($subfilelist); } else { $icon = mimeinfo("icon", $file); echo '<img src="' . $OUTPUT->pix_url("f/{$icon}") . '" class="icon" alt="' . $strfile . '" /> ' . htmlspecialchars($file) . '<br />'; } } }
function printfilelist($filelist) { global $basedir, $CFG; foreach ($filelist as $file) { if (is_dir($basedir . $file)) { echo "<img src=\"{$CFG->pixpath}/f/folder.gif\" class=\"icon\" alt=\"" . get_string('folder') . "\" /> {$file}<br />"; $subfilelist = array(); $currdir = opendir($basedir . $file); while (false !== ($subfile = readdir($currdir))) { if ($subfile != ".." && $subfile != ".") { $subfilelist[] = $file . "/" . $subfile; } } printfilelist($subfilelist); } else { $icon = mimeinfo("icon", $file); echo "<img src=\"{$CFG->pixpath}/f/{$icon}\" class=\"icon\" alt=\"" . get_string('file') . "\" /> {$file}<br />"; } } }
function printfilelist($filelist) { global $basedir, $CFG; foreach ($filelist as $file) { if (is_dir($basedir . $file)) { echo "<img src=\"{$CFG->pixpath}/f/folder.gif\" height=\"16\" width=\"16\" alt=\"\" /> {$file}<br />"; $subfilelist = array(); $currdir = opendir($basedir . $file); while ($subfile = readdir($currdir)) { if ($subfile != ".." && $subfile != ".") { $subfilelist[] = $file . "/" . $subfile; } } printfilelist($subfilelist); } else { $id = intval($file); $thisfile = get_record("netpublish_images", "id", $id); $icon = mimeinfo("icon", $thisfile->name); echo "<img src=\"{$CFG->pixpath}/f/{$icon}\" height=\"16\" width=\"16\" alt=\"\" /> {$thisfile->name}<br />"; } } }
function printfilelist($filelist) { global $CFG, $basedir; foreach ($filelist as $file) { if (is_dir($basedir . $file)) { $prop = null; $prop->src = "{$CFG->pixpath}/f/folder.gif"; $prop->height = "16"; $prop->width = "16"; $prop->alt = ""; wiki_img($prop); echo $file; wiki_br(); $subfilelist = array(); $currdir = opendir($basedir . $file); while (false !== ($subfile = readdir($currdir))) { if ($subfile != ".." && $subfile != ".") { $subfilelist[] = $file . "/" . $subfile; } } printfilelist($subfilelist); } else { $icon = mimeinfo("icon", $file); $prop = null; $prop->src = "{$CFG->pixpath}/f/{$icon}"; $prop->height = "16"; $prop->width = "16"; $prop->alt = ""; wiki_img($prop); echo $file; wiki_br(); } } }
function printfilelist($filelist) { global $CFG, $basedir, $repo; foreach ($filelist as $uuid) { $file = $repo->get_info($uuid); if ($repo->is_dir($uuid)) { echo "<img src=\"{$file->icon}\" height=\"16\" width=\"16\" alt=\"\" /> " . $file->title . "<br />"; $subfilelist = array(); if ($currdir = $repo->read_dir($uuid)) { if (!empty($currdir->folders)) { foreach ($currdir->folders as $folder) { $subfilelist[] = $folder->uuid; } } if (!empty($currdir->files)) { foreach ($currdir->files as $file) { $subfilelist[] = $file->uuid; } } } printfilelist($subfilelist); } else { $filename = $file->filename; $fileurl = $CFG->wwwroot . '/file/repository/alfresco/openfile.php?uuid=' . $uuid; echo "<img src=\"{$file->icon}\" height=\"16\" width=\"16\" alt=\"\" /> " . $file->filename . "<br />"; } } }
function printfilelist($filelist) { global $CFG, $basedir; $strfolder = get_string("folder"); $strfile = get_string("file"); foreach ($filelist as $file) { # HU, CS Repository Plugin support if (repository_is_dir($basedir . '/' . $file)) { echo "<img src=\"{$CFG->pixpath}/f/folder.gif\" class=\"icon\" alt=\"{$strfolder}\" /> {$file}<br />"; $subfilelist = array(); $currdir = opendir($basedir . '/' . $file); while (false !== ($subfile = readdir($currdir))) { if ($subfile != ".." && $subfile != ".") { $subfilelist[] = $file . "/" . $subfile; } } printfilelist($subfilelist); } else { $icon = mimeinfo("icon", $file); echo "<img src=\"{$CFG->pixpath}/f/{$icon}\" class=\"icon\" alt=\"{$strfile}\" /> {$file}<br />"; } } }
$count++; $val = rawurldecode($val); $USER->filelist[] = clean_param($val, PARAM_PATH); } } return $count; } function clearfilelist() { global $USER; $USER->filelist = array(); $USER->fileop = ""; } function printfilelist($filelist) { global $CFG, $basedir; foreach ($filelist as $file) { if (is_dir($basedir . '/' . $file)) { echo "<img src=\"{$CFG->pixpath}/f/folder.gif\" height=\"16\" width=\"16\" alt=\"\" /> {$file}<br />"; $subfilelist = array();