Ejemplo n.º 1
0
                if ($space_released >= $diskQuotaDropbox/10) {
                    break;
                }
            }
            $tool_content .= "<div class='alert alert-success'>".sprintf($langDropboxFreeSpaceSuccess, $space_released/1024/1024)."</div>";
        } else { //provide option to free some space
            $tool_content .= "<div id='operations_container'>
                                <ul id='opslist'>
                                  <li><a onclick=\"return confirm('".sprintf($langDropboxFreeSpaceConfirm, $space_to_free)."');\" href='$_SERVER[SCRIPT_NAME]?course=$course_code&amp;showQuota=TRUE&amp;free=TRUE'>".sprintf($langDropboxFreeSpace, $space_to_free)."</a></li>
                                </ul>
                              </div>";
        }
    }
    
    $backPath = "$_SERVER[SCRIPT_NAME]" . (($course_id != 0)? "?course=$course_code" : "");
    $tool_content .= showquota($diskQuotaDropbox, $diskUsed-$space_released, $backPath);
    
    draw($tool_content, 2);
    exit;
}

if (isset($_REQUEST['upload']) && $_REQUEST['upload'] == 1) {//new message form
    if ($course_id == 0) {
        if (isset($_GET['type']) && $_GET['type'] == 'cm') {
            $type = 'cm';
        } else {
            $type = 'pm';
        }
    }
    
    if ($course_id == 0 && $type == 'pm') {
Ejemplo n.º 2
0
} else {
    $type = $subsystem == GROUP ? 'group_quota' : 'doc_quota';
    $d = Database::get()->querySingle("SELECT {$type} as quotatype FROM course WHERE id = ?d", $course_id);
    $diskQuotaDocument = $d->quotatype;
}
if (isset($_GET['showQuota'])) {
    if ($subsystem == GROUP) {
        $navigation[] = array('url' => 'index.php?course=' . $course_code . '&amp;group_id=' . $group_id, 'name' => $langDoc);
    } elseif ($subsystem == EBOOK) {
        $navigation[] = array('url' => 'index.php?course=' . $course_code . '&amp;ebook_id=' . $ebook_id, 'name' => $langDoc);
    } elseif ($subsystem == COMMON) {
        $navigation[] = array('url' => 'commondocs.php', 'name' => $langCommonDocs);
    } else {
        $navigation[] = array('url' => 'index.php?course=' . $course_code, 'name' => $langDoc);
    }
    $tool_content .= showquota($diskQuotaDocument, $diskUsed);
    draw($tool_content, $menuTypeID);
    exit;
}
// ---------------------------
// download directory or file
// ---------------------------
if (isset($_GET['download'])) {
    $downloadDir = $_GET['download'];
    if ($downloadDir == '/') {
        $format = '.dir';
        $real_filename = remove_filename_unsafe_chars($langDoc . ' ' . $public_code);
    } else {
        $q = Database::get()->querySingle("SELECT filename, format, visible, extra_path, public FROM document\n                        WHERE {$group_sql} AND\n                        path = ?s", $downloadDir);
        if (!$q) {
            not_found($downloadDir);
Ejemplo n.º 3
0
            $tool_content .= action_bar(array(
                array('title' => $langBack,
                      'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code",
                      'icon' => 'fa-reply',
                      'level' => 'primary-label')));
        }
    }

    $diskQuotaVideo = Database::get()->querySingle("SELECT video_quota FROM course WHERE code=?s", $course_code)->video_quota;
    $updir = "$webDir/video/$course_code"; //path to upload directory
    $diskUsed = dir_total_space($updir);

    if (isset($_GET['showQuota']) and $_GET['showQuota'] == TRUE) {
        $pageName = $langQuotaBar;
        $navigation[] = array('url' => "$_SERVER[SCRIPT_NAME]?course=$course_code", 'name' => $langVideo);
        $tool_content .= showquota($diskQuotaVideo, $diskUsed);
        draw($tool_content, $menuTypeID);
        exit;
    }

    // visibility commands
    if (isset($_GET['vis'])) {
        $table = select_table($_GET['table']);
        Database::get()->query("UPDATE $table SET visible = ?d WHERE id = ?d", $_GET['vis'], $_GET['vid']);
        $action_message = "<div class='alert alert-success'>$langViMod</div>";
    }

    // Public accessibility commands
    if (isset($_GET['public']) or isset($_GET['limited'])) {
        $new_public_status = isset($_GET['public']) ? 1 : 0;
        $table = select_table($_GET['table']);