We just modified the version from Peopls.
So, the page called upload1.asp is modified like this:
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_code.asp" -->
<HTML>
<HEAD>
<TITLE><%=strForumTitle%></TITLE>
<style type="text/css">
<!--
.formbox { background: transparent; background-color: #FFFFFF; border: 1px solid #6B82A5; color: #040826; font-size: x-small; text-align: left}
a:link {color:<% =strLinkColor %>;text-decoration:<% =strLinkTextDecoration %>}
a:visited {color:<% =strVisitedLinkColor %>;text-decoration:<% =strVisitedTextDecoration %>}
a:hover {color:<% =strHoverFontColor %>;text-decoration:<% =strHoverTextDecoration %>}
BODY {scrollbar-face-color: <% =strScrollbarFaceColor %>; scrollbar-highlight-color: <% =strScrollbarHighlightColor %>; scrollbar-shadow-color: <% =strScrollbarShadowColor %>; scrollbar-3dlight-color: <% =strScrollbar3DLightColor %>; scrollbar-track-color: <% =strScrollbarTrackColor %>; scrollbar-darkshadow-color: <% =strScrollbarDarkShadowColor %>; scrollbar-arrow-color: <% =strScrollbarArrowsColor %>; font-family: Arial}
#chat {color:<% =strLinkColor %>;text-decoration:<% =strHoverTextDecoration %>}
input.radio {background: <% = strPopUpTableColor %>; color:#040826}
-->
</style>
<script language="Javascript">
<!-- hide
function inserttxtupload(txt){
window.opener.document.PostTopic.Message.value+=txt;
}
// -->
</script>
</HEAD>
<%
if Request.ServerVariables("REQUEST_METHOD")="POST" then
Set Upload = server.CreateObject("Persits.Upload.1")
Upload.SaveToMemory
' Setting up the size if necessary
' Upload.SetMaxSize 300000, True
if not Upload.Files("FILE1") Is Nothing then
Fic = Upload.Files("FILE1").ExtractFileName
chemin_serveur = server.MapPath("\")
Dim TPath(4)
Tpath(1) = "\Uploads\pic\"
Tpath(2) = "\Uploads\sound\"
Tpath(3) = "\Uploads\Others\"
Tpath(4) = "\Uploads\Movie\"
Select case lcase(right(Fic,4))
case "jpeg"
Save_path = chemin_serveur & Tpath(1) & fic
txtupload = ""
case "html"
Save_path = chemin_serveur & Tpath(3) & fic
txtupload = "" & fic & ""
end select
Select case lcase(right(Fic,3))
case "wav"
Save_Path = chemin_serveur & Tpath(2) & fic
txtupload = "" & fic & ""
case "mid"
Save_Path = chemin_serveur & Tpath(2) & fic
txtupload = "" & fic & ""
case "mp3"
Save_path = chemin_serveur & Tpath(2) & fic
txtupload = "" & fic & ""
case "gif"
Save_path = chemin_serveur & Tpath(1) & fic
txtupload = ""
case "jpg"
Save_path = chemin_serveur & Tpath(1) & fic
txtupload = ""
case "bmp"
Save_path = chemin_serveur & Tpath(1) & fic
txtupload = "" & fic & ""
case "avi" Save_path = chemin_serveur & Tpath(4) & fic
txtupload = "" & fic & ""
case "mpe"
Save_path = chemin_serveur & Tpath(4) & fic
txtupload = "" & fic & ""
case "mpg"
Save_path = chemin_serveur & Tpath(4) & fic
txtupload = "" & fic & ""
case "asf"
Save_path = chemin_serveur & Tpath(4) & fic
txtupload = "" & fic & ""
case "ram"
Save_path = chemin_serveur & Tpath(4) & fic
txtupload = "" & fic & ""
case "doc"
Save_path = chemin_serveur & Tpath(3) & fic
txtupload = "" & fic & ""
case "txt"
Save_path = chemin_serveur & Tpath(3) & fic
txtupload = "" & fic & ""
case "xls"
Save_path = chemin_serveur & Tpath(3) & fic
txtupload = "" & fic & ""
case "pps"
Save_path = chemin_serveur & Tpath(3) & fic
txtupload = "" & fic & ""
case "htm"
Save_path = chemin_serveur & Tpath(3) & fic
txtupload = "" & fic & ""
case "zip"
Save_path = chemin_serveur & Tpath(3) & fic
txtupload = "" & fic & ""
end select
if Save_Path<>"" then
Upload.Files("FILE1").SaveAs save_path
txtupload = txtupload & "
"
%>
<script language="javascript">inserttxtupload('<%=txtupload%>');</script>
<%
end if
end if
Set Upload = Nothing
end if
%>
<BODY BGCOLOR="WHITESMOKE">
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="upload1.asp">
<INPUT TYPE="FILE" SIZE="30" NAME="FILE1"><BR><br>
<INPUT TYPE="SUBMIT" VALUE="Upload!">
</form>
<%if save_path<>"" then%>
<b><font color="#MIDNIGHTBLUE">
"<% = fic %>" uploaded successfully! </b></font>
<%end if%>
<br>
<br>
<div align=center><a href="javascript:window.close();"><b>FERMER</b></a></div>
</HTML>
And in the post.asp like in the original script:
Between the Head Tags
<script language="JavaScript">
<!--
//##### Upload Mod #####
function OpenUpload()
{
var curCookie = "strMessagePreview=" + escape(document.PostTopic.Message.value);
document.cookie = curCookie;
popupWin = window.open('upload1.asp', 'preview_page', 'scrollbars=no,width=440,height=180')
}
//##### END UPLOAD MOD####
//-->
</script>
And where you want the button :
'##### UPLOAD MOD #####
Response.Write " <input name=""Upload"" type=""button"" value="" Upload "" onclick=""OpenUpload()"">" & vbNewline
'##### END UPLOAD MOD ####