another simple example of making somethings better would be ..
Put Most of it in Subs and Functions ..
seperate all HTML from ASP .. ASP first then write out the HTML using Varibles ..
or at least make the variables first instead of putting database values right into the HTML ..
Get rid of all the Open and Closes .. eg .. dont need ..
%>
<%
Slows the script down ..
I dont see any kind of error checking in there also .. Seperate different types of procedures into their own include files .. eg. The Upload code could go in something like modUpload.asp ... a class would be nice but even if the basics are covered it would be alot easier to maintain and work with .. even so .. i see alot of errors .. which may not bring up errors but will definately slow the script down very very much ..
Basically the whole thing needs a revamp .. ;-)
Also instead of all those Dim Statements ..
VB Code:
'*** Pure ASP File Upload 2.1.7
Dim GP_uploadAction,UploadQueryString
PureUploadSetup
If (CStr(Request.QueryString("GP_upload")) <> "") Then
Dim RequestBin, UploadRequest
Const pau_thePath = """/images/doctors"""
Const pau_Extensions = "GIF,JPG,JPEG"
Const pau_Form = "providersAdd"
Const pau_Redirect = ""
Const pau_storeType = "file"
Const pau_sizeLimit = ""
Const pau_nameConflict = "over"
Const pau_requireUpload = "false"
Const pau_minWidth = ""
Const pau_minHeight = ""
Const pau_maxWidth = ""
Const pau_maxHeight = ""
Const pau_saveWidth = ""
Const pau_saveHeight = ""
Const pau_timeout = "600"
Const pau_progressBar = ""
Const pau_progressWidth = "300"
Const pau_progressHeight = "100"
CheckPureUploadVersion 2.17
Call ProcessUpload(pau_thePath, pau_Extensions, pau_Redirect, pau_storeType, pau_sizeLimit, _
pau_nameConflict, pau_requireUpload, pau_minWidth, pau_minHeight, pau_maxWidth, _
pau_maxHeight, pau_saveWidth,pau_saveHeight,pau_timeout)
end if