Hello,
I would like to suggest adding ability to limit daily bandwidth for each user level.
I've already asked for it on a pre-sale ticket and told that i need to ask for it in this forum.
But now i see this piece of code on the script download file:
	
	
	
		
This tell that the functionality is already exist, but from where can i control it?
								I would like to suggest adding ability to limit daily bandwidth for each user level.
I've already asked for it on a pre-sale ticket and told that i need to ask for it in this forum.
But now i see this piece of code on the script download file:
		Code:
	
	    // make sure the user is permitted to download files of this size
    if ((int) getMaxDailyDownloads() > 0)
    {
        // get total user downloads today
        $sQL            = "SELECT COUNT(id) AS total ";
        $sQL .= "FROM download_tracker ";
        $sQL .= "WHERE download_tracker.status='finished' AND download_tracker.ip_address = " . $db->quote(getUsersIPAddress()) . " ";
        $sQL .= "AND UNIX_TIMESTAMP(date_updated) >= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 day))";
        $totalDownloads24Hour = (int) $db->getValue($sQL);
        if ((int) getMaxDailyDownloads() < $totalDownloads24Hour)
        {
            $errorMsg = t("error_you_have_reached_the_maximum_permitted_downloads_in_the_last_24_hours", "You have reached the maximum permitted downloads in the last 24 hours.");
            redirect(getCoreSitePath() . "/error." . SITE_CONFIG_PAGE_EXTENSION . "?e=" . urlencode($errorMsg));
        }
    } 
				
		