Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 A Rather Limited Upload Mod
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

dayve
Forum Moderator

USA
5820 Posts

Posted - 15 June 2002 :  12:41:24  Show Profile  Visit dayve's Homepage
quote:

hey how do u know if u have got the ASPUpload dll file on ur server??

© 1999-2002 MaD2ko0l
-=[ Life Is So Easy When You Are Evil ]=-



ask them.


http://www.nineinchnailz.com
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 17 June 2002 :  11:40:18  Show Profile  Visit MaD2ko0l's Homepage
ok i found out how to check if u have the ASPUpload dll installed on the server...

make a new .asp file and add this to that file.


<%
Set upload = server.CreateObject("Persits.Upload")
%>


if u get a error then u havent got it installed.


just thourght i would be a bit helpful to u all.


MaD2ko0l

© 1999-2002 MaD2ko0l
-=[ Life Is So Easy When You Are Evil ]=-
Go to Top of Page

John Bour
Starting Member

30 Posts

Posted - 20 August 2002 :  05:13:45  Show Profile
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 ####


Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07