isPublic == 0) && ($fileFolder->userId != $Auth->id)) { coreFunctions::redirect(WEB_ROOT . '/index.' . SITE_CONFIG_PAGE_EXTENSION); } } else { coreFunctions::redirect(WEB_ROOT . '/index.' . SITE_CONFIG_PAGE_EXTENSION); } // check for password if we need it $showFolder = true; if (strlen($fileFolder->accessPassword) > 0) { /* check folder password */ if ((int) $_REQUEST['passwordSubmit']) { // check password $folderPassword = trim($_REQUEST['folderPassword']); if (!strlen($folderPassword)) { notification::setError(t("please_enter_the_folder_password", "Please enter the folder password")); } else { if (md5($folderPassword) == $fileFolder->accessPassword) { // successful $_SESSION['folderPassword'] = md5($folderPassword); } else { // login failed notification::setError(t("password_is_invalid", "The folder password is invalid")); } } } // figure out whether to show the folder $showFolder = false; if (isset($_SESSION['folderPassword'])) { // check password if ($_SESSION['folderPassword'] == $fileFolder->accessPassword) { $showFolder = true; } } } // if the owner is logged in, ignore the password prompt if ($fileFolder->userId == $Auth->id) { $showFolder = true; } /* setup page */ define("PAGE_NAME", t("account_home_page_name", "View Folder")); define("PAGE_DESCRIPTION", t("account_home_meta_description", "Your Account Home")); define("PAGE_KEYWORDS", t("account_home_meta_keywords", "account, home, file, your, interface, upload, download, site")); define("TITLE_DESCRIPTION_LEFT", t("view_folder_title_page_description_left", "")); define("TITLE_DESCRIPTION_RIGHT", t("view_folder_title_page_description_right", "")); // include header require_once(SITE_TEMPLATES_PATH . '/partial/_header.inc.php'); // show login box if password required if ($showFolder == false) { ?>

" type="password"/>

'folderName); ?>'

userId == $Auth->id): ?>

isPublic == 0) { echo t('folder_share_this_folder_can_not_be_shared_as_it_is_not_publicly_accessible', 'This folder can not be shared as it is not set to a publicly accessible folder. Only users with access to your account can see this listing.'); } else { echo t('folder_share_you_can_share_this_page_with_other_external_users', 'You can share this page with other users who do not have access to your account. Just copy the website url in the url bar and provide this via email or other sharing method.'); if (strlen($fileFolder->accessPassword)) { echo '

'; echo t('folder_share_as_youve_set_a_password_on_this_folder', 'Note: As you\'ve set a password on this folder, users will need to correctly enter this before they gain access to this page.'); } } ?>

'; echo ''; echo ''; echo '' . t('download_url_filename', 'Download Url/Filename:') . ''; echo '' . t('options', 'Options:') . ''; echo ''; echo ''; foreach ($childFolders AS $childFolder) { // get total files $totalFiles = 0; $allFiles = file::loadAllActiveByFolderId($childFolder['id']); if ($allFiles) { $totalFiles = COUNT($allFiles); } echo ''; echo ''; echo ' '; echo ''; echo ''; echo '' . validation::safeOutputToScreen($childFolder['folderName']) . ''; echo '
' . $totalFiles . ' file' . ($totalFiles != 1 ? 's' : '') . ''; echo ''; $links = array(); $links[] = ''; echo '' . implode(" ", $links) . ''; echo ''; } foreach ($files AS $file) { echo ''; echo ''; $fileTypePath = DOC_ROOT . '/themes/' . SITE_CONFIG_SITE_THEME . '/images/file_icons/32px/' . $file['extension'] . '.png'; if (file_exists($fileTypePath)) { echo ' '; } else { echo ' '; } echo ''; echo ''; echo '' . str_replace(array('http://', 'https://'), '', file::getFileUrl($file['id'])) . ''; echo '
' . $file['originalFilename']; echo ' (' . coreFunctions::formatSize($file['fileSize']) . ')'; echo ''; $links = array(); $links[] = ''; echo '' . implode(" ", $links) . ''; echo ''; } echo ''; echo ''; } else { echo '- ' . t('there_are_no_files_within_this_folder', 'There are no files within this folder.') . ''; } ?>