$linkshared += $tmpcount;
         $tmprec = get_record('fmanager_link', 'id', $c);
         $tmplist .= $tmprec->name;
         $list->thelist[] = $tmplist;
     }
     // delete confirmed
     if (isset($_POST['yesdel'])) {
         $linkshared = count_records('fmanager_shared', 'sharedlink', $c);
         if ($linkshared > 0) {
             fm_update_shared_links($c);
         }
         $linkshared = 0;
         if ($groupid == 0) {
             $file = fm_get_user_link($c);
         } else {
             $file = fm_get_group_link($c, $groupid);
         }
         if ($file->type == TYPE_FILE || $file->type == TYPE_ZIP) {
             $warnmsg .= fm_remove_file($file, $groupid);
         }
     }
     // Means that multiple types were selected (folders/links) and these are folders
 } else {
     if (substr($c, 0, 2) == 'f-') {
         $foldid = substr($c, 2);
         $tmplist = "";
         if ($groupid == 0) {
             fm_user_owns_folder($foldid);
         } else {
             fm_group_owns_folder($foldid, $groupid);
         }
Пример #2
0
     echo "<input type=\"submit\" name=\"standardzip\" value=\"" . get_string('btnstandardzip', 'block_file_manager') . "\">";
     // modifie par Dominic Villiard 5 septembre 2008
     //echo "&nbsp;&nbsp;<input type=\"submit\" name=\"moodlezip\" value=\"".get_string('btnmoodlezip','block_file_manager')."\">";
     echo "</center>";
     print_simple_box_end();
     echo "</form>";
     break;
 case 'unzip':
     /*if (isset($_POST['cancel'])) {
     			print_simple_box(get_string('msgcancelok', 'block_file_manager'), 'center');
     			redirect("link_manage.php?id=$id&linkid=$zipid&rootdir=$rootdir");
     		} else if (isset($_POST['unzip'])) {*/
     if ($groupid == 0) {
         $zipfile = fm_get_user_link($zipid);
     } else {
         $zipfile = fm_get_group_link($zipid, $groupid);
     }
     if ($groupid == 0) {
         $zipfileloc = $CFG->dataroot . "/" . fm_get_user_dir_space() . fm_get_folder_path($zipfile->folder, false, $groupid) . "/" . $zipfile->link;
     } else {
         $zipfileloc = $CFG->dataroot . "/" . fm_get_group_dir_space($groupid) . fm_get_folder_path($zipfile->folder, false, $groupid) . "/" . $zipfile->link;
     }
     fm_unzip_file($zipfileloc, '', false, $zipfile->folder, $groupid);
     print_simple_box(get_string('msgmodificationok', 'block_file_manager'), "center", "", "#FFFFFF");
     redirect("view.php?id={$id}&rootdir={$rootdir}&groupid={$groupid}");
     //}
     /*$list = fm_view_zipped(fm_get_user_link($zipid), $groupid);
     		$fmdir = fm_get_root_dir();
     		echo "<form name=\"unzipform\" method=\"post\" action=\"$CFG->wwwroot/$fmdir/zip.php?id={$id}&rootdir={$rootdir}&zipid=$zipid&what='$action'\">";
     		print_simple_box_start('center','500','#C0C0C0');
     		echo "<table name=\"viewziptable\" cellspacing=\"5\" align=\"center\" width=\"375\">";
Пример #3
0
    // Modding existing link
    if ($groupid == 0) {
        fm_user_owns_link($linkid);
    } else {
        fm_group_owns_link($linkid, $groupid);
    }
    echo '<br/>' . print_simple_box(text_to_html(get_string('msgmodlink', 'block_file_manager')), 'center', '') . '<br/>';
} else {
    echo '<br/>' . print_simple_box(text_to_html(get_string('msgaddlink', 'block_file_manager')), 'center', '') . '<br/>';
}
print_simple_box_start('center', '', '#C0C0C0');
$linkrec = NULL;
if ($linkid != NULL) {
    if ($groupid == 0) {
        $linkrec = fm_get_user_link($linkid);
    } else {
        $linkrec = fm_get_group_link($linkid, $groupid);
    }
    $store->name = $linkrec->name;
    $store->category = $linkrec->category;
    if ($linkrec->type == TYPE_URL) {
        // a url link
        $store->url = $linkrec->link;
        $store->radioval = "url";
    }
    $store->description = $linkrec->description;
}
$foldid = '';
include 'link_manage.html';
print_simple_box_end();
print_footer();