" /> <table align="left" width="20%"> <tr> <td width="5%"> </td> <td colspan="2"> <?php echo "<strong>" . get_string('categories', 'block_file_manager') . "</strong><br />"; ?> </td> </tr> <tr> <td width="5%"> </td> <td> <?php echo fm_print_actions_menu($id, 'category', $rootdir, $groupid); ?> </td> <td> <?php helpbutton('mycataction', get_string('menuhelp', 'block_file_manager'), 'block_file_manager'); ?> </td> </tr> </table> <br /><br /> <?php /* $tablehead = get_string('categories', 'block_file_manager'); $table->head = array($tablehead);
} else { // If $original not set, shows all files shared to current user if (!isset($original)) { // Link shows coursewide/sitewide shared if (!isset($sitewide)) { echo "<center><a href=\"view_shared.php?id={$id}&sitewide=1\">" . get_string("showallshared", 'block_file_manager') . "</a>"; } else { echo "<center><a href=\"view_shared.php?id={$id}\">" . get_string("showcourseonly", 'block_file_manager') . "</a>"; } helpbutton('showfiles', get_string('showfileshelp', 'block_file_manager'), 'block_file_manager'); echo "</center><br/>"; fm_print_users_shared($id, $sitewide, OWNERISUSER, OWNERISGROUP); } else { echo "<form name=\"sharedform\" method=\"post\" action=\"conf_delete.php?id={$id}&from='shared'\">"; echo "<script language=\"javascript\">\r\n\t\t\t\t\t<!--\r\n\t\t\t\t\t\t// selects all the checkboxes for the form\r\n\t\t\t\t\t\tfunction selectboxes(allbox) {\r\n\t\t\t\t\t\t\tfor (var i = 0; i < document.sharedform[\"cb[]\"].length; i++) {\r\n\t\t\t\t\t\t\t\tdocument.sharedform[\"cb[]\"][i].checked = allbox.checked;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t-->\r\n\t\t\t\t\t</script>"; echo fm_print_actions_menu($id, 'shared', $rootdir); helpbutton('sharedfilesaction', get_string('menuhelp', 'block_file_manager'), 'block_file_manager'); echo fm_print_js_amenushared(); // Prints the selected users shared files to current user if ($ownertype == OWNERISUSER) { if (!($orig = get_record('user', 'id', $original))) { error(get_string('errcantfinduser', 'block_file_manager')); } echo "<b><center>" . get_string('sharedfiles', 'block_file_manager') . " " . get_string('by', 'block_file_manager') . " {$orig->lastname} {$orig->firstname}</center></b>"; } else { if (!($orig = get_record('groups', 'id', $original))) { error(get_string('errcantfinduser', 'block_file_manager')); } echo "<b><center>" . get_string('sharedfiles', 'block_file_manager') . " " . get_string('by', 'block_file_manager') . " {$orig->name}</center></b>"; } print_table(fm_print_user_shared($orig, $id, $ownertype, OWNERISUSER, OWNERISGROUP));