+ // Only show link to password page if password is set
+ document.getElementById('upload_password_page').style.display = 'none';
+ if (document.getElementById('input_key').value.length > 0)
+ {
+ if (!!document.getElementById('upload_finished_download_page'))
+ document.getElementById('upload_finished_download_page').style.display = 'none';
+ document.getElementById('upload_password_page').style.display = '';
+ if (!!document.getElementById('upload_finished_preview'))
+ document.getElementById('upload_finished_preview').style.display = 'none';
+ document.getElementById('upload_direct_download').style.display = 'none';
+
+ document.getElementById('password_link').innerHTML = download_link;
+ document.getElementById('password_link').href = download_link_href;
+ }
+ // Direct download link
+ else
+ {
+ var direct_download_link = url + 'f.php?h=' + reference + '&d=1';
+ var direct_download_link_href = url + 'f.php?h=' + reference + '&d=1';
+ if (crypt_key.length > 0)
+ {
+ direct_download_link += '&k=' + crypt_key;
+ direct_download_link_href += '&k=' + crypt_key;
+ }
+ document.getElementById('direct_link').innerHTML = direct_download_link;
+ document.getElementById('direct_link').href = direct_download_link_href;
+ }
+
+ // Delete link
+ var delete_link = url + 'f.php?h=' + reference + '&d=' + delete_code;
+ var delete_link_href = url + 'f.php?h=' + reference + '&d=' + delete_code;