📄 file_upload.asp
字号:
%>
}else{
document.getElementById("imageProperties").style.display="none";
document.getElementById("fileProperties").style.display="block";<%
'If this is Gekco based browser or Opera the element needs to be set to visable
'If RTEenabled = "Gecko" OR RTEenabled = "opera" Then Response.Write(vbCrLf & " document.getElementById(""fileProperties"").style.visibility=""visable"";")
%>
}
}
//Function to check upload file is selected
function checkFile(){
if ((document.getElementById('file1').value=='')&&(document.getElementById('file2').value=='')) {
alert('<% = strTxtErrorUploadingFile %>\n<% = strTxtNoFileToUpload %>')
return false;
}else{
alert('<% = strTxtPleaseWaitWhileFileIsUploaded %>');
return true;
}
}
</script>
<link href="<% = strCSSfile %>default_style.css" rel="stylesheet" type="text/css" />
<!-- #include file="includes/header.asp" -->
<!-- #include file="includes/status_bar_header_inc.asp" -->
<table class="basicTable" cellspacing="0" cellpadding="3" align="center">
<tr>
<td align="left"><h1><% = strTxtFileManager & ": " & strTxtFileUpload %></h1></td>
</tr>
</table>
<br />
<table class="basicTable" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="tabTable">
<a href="member_control_panel.asp<% If strMode = "A" Then Response.Write("?PF=" & lngUserProfileID & "&M=A" & strQsSID2) Else Response.Write(strQsSID1) %>" title="<% = strTxtControlPanel %>" class="tabButton"> <img src="<% = strImagePath %>member_control_panel.<% = strForumImageType %>" border="0" alt="<% = strTxtControlPanel %>" /> <% = strTxtControlPanel %></a>
<a href="register.asp<% If strMode = "A" Then Response.Write("?PF=" & lngUserProfileID & "&M=A" & strQsSID2) Else Response.Write(strQsSID1) %>" title="<% = strTxtProfile2 %>" class="tabButton"> <img src="<% = strImagePath %>profile.<% = strForumImageType %>" border="0" alt="<% = strTxtProfile2 %>" /> <% = strTxtProfile2 %></a><%
If blnEmail Then
%>
<a href="email_notify_subscriptions.asp<% If strMode = "A" Then Response.Write("?PF=" & lngUserProfileID & "&M=A" & strQsSID2) Else Response.Write(strQsSID1) %>" title="<% = strTxtSubscriptions %>" class="tabButton"> <img src="<% = strImagePath %>subscriptions.<% = strForumImageType %>" border="0" alt="<% = strTxtSubscriptions %>" /> <% = strTxtSubscriptions %></a><%
End If
'Only disply other links if not in admin mode
If strMode <> "A" AND blnActiveMember AND blnPrivateMessages Then
%>
<a href="pm_buddy_list.asp<% = strQsSID1 %>" title="<% = strTxtBuddyList %>" class="tabButton"> <img src="<% = strImagePath %>buddy_list.<% = strForumImageType %>" border="0" alt="<% = strTxtBuddyList %>" /> <% = strTxtBuddyList %></a><%
End If
'If the user is user is using a banned IP redirect to an error page
If blnAttachments OR blnImageUpload Then
%>
<a href="file_manager.asp<% If strMode = "A" Then Response.Write("?PF=" & lngUserProfileID & "&M=A" & strQsSID2) Else Response.Write(strQsSID1) %>" title="<% = strTxtFileManager %>" class="tabButtonActive"> <img src="<% = strImagePath %>file_manager.<% = strForumImageType %>" border="0" alt="<% = strTxtFileManager %>" /> <% = strTxtFileManager %></a><%
End If
%>
</td>
</tr>
</table>
<br />
<table cellspacing="1" cellpadding="3" class="tableBorder" align="center">
<tr class="tableLedger">
<td colspan="2" align="left"><% = strTxtFileManager %></td>
</tr>
<tr class="tableRow">
<td valign="top"><%
'If both image and file uploads are permitted for this member give then the option
If blnAttachments AND blnImageUpload Then
%>
<% = strTxtSelectUploadType %>
<select name="selType" id="selType" onchange="swapLinkType(this)">
<option value="fileUp"><% = strTxtFileUpload %></option>
<option value="imageUp"<% If Request.QueryString("T") = "image" Then Response.Write(" selected") %>><% = strTxtImageUpload %></option>
</select> <%
End If
'If attachments allowed
If blnAttachments Then
%>
<div id="fileProperties"<% If Request.QueryString("T") = "image" Then Response.Write(" style=""display:none""") %>>
<br />
<strong><% = strTxtFileUpload %></strong>
<br />
<form method="post" action="file_upload.asp?PB=Y&T=file<% If strMode = "A" Then Response.Write("&PF=" & lngUserProfileID & "&M=A") %><% = strQsSID2 %>" name="frmUpload" enctype="multipart/form-data" onsubmit="return checkFile();" >
<input id="file1" name="file" type="file" size="50" />
<br />
<br />
<% Response.Write(strTxtFilesMustBeOfTheType & ", " & Replace(strUploadFileTypes, ";", ", ", 1, -1, 1) & ", " & strTxtAndHaveMaximumFileSizeOf & " " & intUploadMaxFileSize & "KB") %>
<br />
<br />
<input name="upload" type="submit" id="upload1" value="<% = strTxtUpload & " " & strTxtFile %>">
<br />
<br />
</form>
</div><%
End If
'If image upload allowed
If blnImageUpload Then
%>
<div id="imageProperties"<% If Request.QueryString("T") <> "image" AND blnAttachments Then Response.Write(" style=""display:none""") %>>
<br />
<strong><% = strTxtImageUpload %></strong>
<br />
<form method="post" action="file_upload.asp?PB=Y&T=image<% If strMode = "A" Then Response.Write("&PF=" & lngUserProfileID & "&M=A") %><% = strQsSID2 %>" name="frmUpload" enctype="multipart/form-data" onsubmit="return checkFile();" >
<input id="file2" name="file" type="file" size="50" />
<br />
<br />
<% Response.Write(strTxtImagesMustBeOfTheType & ", " & Replace(strImageTypes, ";", ", ", 1, -1, 1) & ", " & strTxtAndHaveMaximumFileSizeOf & " " & intUploadMaxImageSize & "KB") %>
<br />
<br />
<input name="upload" type="submit" id="upload2" value="<% = strTxtUpload & " " & strTxtImage %>">
<br />
<br />
</form>
</div>
<%
End If
%>
</td>
</tr>
</table>
<br />
<div align="center"><%
'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
If blnLCode = True Then
If blnTextLinks = True Then
Response.Write("<span class=""text"" style=""font-size:10px"">Bulletin Board Software by <a href=""http://www.webwizforums.com"" target=""_blank"" style=""font-size:10px"">Web Wiz Forums®</a> version " & strVersion & "</span>")
Else
Response.Write("<a href=""http://www.webwizforums.com"" target=""_blank""><img src=""webwizforums_image.asp"" border=""0"" title=""Bulletin Board Software by Web Wiz Forums® version " & strVersion& """ alt=""Bulletin Board Software by Web Wiz Forums® version " & strVersion& """ /></a>")
End If
Response.Write("<br /><span class=""text"" style=""font-size:10px"">Copyright ©2001-2008 <a href=""http://www.webwizguide.com"" target=""_blank"" style=""font-size:10px"">Web Wiz</a></span>")
End If
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
'Display the process time
If blnShowProcessTime Then Response.Write "<span class=""smText""><br /><br />" & strTxtThisPageWasGeneratedIn & " " & FormatNumber(Timer() - dblStartTime, 3) & " " & strTxtSeconds & "</span>"
%>
</div>
<%
'If the file space is exceeded then tell the user
If blnFileSpaceExceeded Then
Response.Write("<script language=""JavaScript"">")
Response.Write("alert('" & strTxtErrorUploadingFile & ".\n" & strTxtAllotedFileSpaceExceeded & " " & intUploadAllocatedSpace & "MB.\n" & strTxtDeleteFileOrImagesUingCP & "');")
Response.Write("</script>")
'If the file already exists tell the user
ElseIf blnFileExists Then
Response.Write("<script language=""JavaScript"">")
Response.Write("alert('" & strTxtErrorUploadingFile & ".\n" & strTxtFileAlreadyUploaded & ".\n" & strTxtSelectOrRenameFile & "');")
Response.Write("</script>")
'If the file upload has failed becuase of the wrong extension display an error message
ElseIf blnExtensionOK = False Then
Response.Write("<script language=""JavaScript"">")
Response.Write("alert('" & strTxtErrorUploadingFile & ".\n" &strTxtFileOfTheWrongFileType & ".\n" & strTxtFilesMustBeOfTheType & ", " & Replace(strUploadFileTypes, ";", ", ", 1, -1, 1) & "');")
Response.Write("</script>")
'Else if the file upload has failed becuase the size is to large display an error message
ElseIf lngErrorFileSize <> 0 AND Request.QueryString("T") = "image" Then
Response.Write("<script language=""JavaScript"">")
Response.Write("alert('" & strTxtErrorUploadingImage & ".\n" & strTxtImageFileSizeToLarge & " " & lngErrorFileSize & "KB.\n" & strTxtMaximumFileSizeMustBe & " " & intUploadMaxImageSize & "KB');")
Response.Write("</script>")
'Else if the file upload has failed becuase the size is to large display an error message
ElseIf lngErrorFileSize <> 0 Then
Response.Write("<script language=""JavaScript"">")
Response.Write("alert('" & strTxtErrorUploadingFile & ".\n" & strTxtFileSizeToLarge & " " & lngErrorFileSize & "KB.\n" & strTxtMaximumFileSizeMustBe & " " & intUploadMaxFileSize & "KB');")
Response.Write("</script>")
End If
%>
<!-- #include file="includes/footer.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -