interkrome
12-21-2006, 06:01 AM
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/hrdept/dl_add_url.asp, line 41
Code:
<%
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
curpagetype = "downloads"
uploadPg = true
sString = ""
CurPageInfoChk = "1"
function CurPageInfo ()
PageName = "New Download"
PageAction = "Submitted"
CurPageInfo = PageAction & PageName
end function
%><!-- #INCLUDE file="config.asp" -->
<!-- #INCLUDE file="includes/inc_clsUpload.asp" -->
<!-- #INCLUDE file="inc_functions.asp" -->
<!-- INCLUDE file="modules/downloads/dl_functions.asp" -->
<!-- INCLUDE file="modules/downloads/dl_custom.asp" -->
<!-- #INCLUDE file="inc_top.asp" -->
<!-- INCLUDE file="includes/inc_ADOVBS.asp" -->
<%
if trim(objUpload.Fields("cat").Value) = "" then --> ERROR
Response.Redirect("dl.asp")
else
cat = cLng(objUpload.Fields("cat").Value)
name = ChkString(objUpload.Fields("name").Value,"sqlstring")
URL = ChkString(objUpload.Fields("URL").Value,"url")
key = ChkString(objUpload.Fields("key").Value,"sqlstring")
size = ChkString(objUpload.Fields("size").Value,"sqlstring")
description = ChkString(objUpload.Fields("des").Value,"sqlstring")
email = ChkString(objUpload.Fields("mail").Value,"url")
license = ChkString(objUpload.Fields("license").Value,"sqlstring")
language = ChkString(objUpload.Fields("language").Value,"sqlstring")
platform = ChkString(objUpload.Fields("platform").Value,"sqlstring")
publisher = ChkString(objUpload.Fields("publisher").Value,"sqlstring")
publisherURL = ChkString(objUpload.Fields("publisherURL").Value,"url")
uploader = ChkString(objUpload.Fields("uploader").Value,"title")
today = strCurDateString
uLoad = filename
Set objUpload = Nothing
strSQL = "SELECT CAT_ID FROM DL_SUBCATEGORIES WHERE SUBCAT_ID = " & cat
dim rsCategories
set rsCategories = server.CreateObject("adodb.recordset")
rsCategories.Open strSQL, my_Conn
parent = rsCategories("CAT_ID")
rsCategories.Close
set rsCategories = nothing
strSQL = "select UP_ACTIVE, UP_ALLOWEDUSERS, UP_ALLOWEDEXT from " & strTablePrefix & "UPLOAD_CONFIG where UP_LOCATION = 'download'"
dim rsUload
set rsUload = server.CreateObject("adodb.recordset")
rsUload.Open strSQL, my_Conn
uActive = rsUload("UP_ACTIVE")
uAllowed = rsUload("UP_ALLOWEDUSERS")
extAllowed = rsUload("UP_ALLOWEDEXT")
rsUload.Close
set rsUload = nothing
if trim(uLoad) <> "" and FSOenabled = true and strAllowUploads = 1 and uActive = 1 and mLev >= uAllowed then
banner = remotePath & parent & "/" & cat & "/" & uLoad
url = banner
end if
if trim(uLoad) = "" then
sString = ""
end if
if len(trim(name)) = 0 then
sString = sString & "<li>Please enter Program Title.</li>"
end if
isOK = false
if len(trim(url)) <= 8 and trim(uLoad) = "" then
sString = sString & "<li>Please enter a Download URL.</li>"
elseif len(trim(url)) > 8 and trim(uLoad) = "" then
tmpExt = split(extAllowed,",")
for ex = 0 to ubound(tmpExt)
if right(url,3) = tmpExt(ex) then
isOK = true
end if
next
if not isOK then
sString = sString & "<li>Please enter a valid Download URL.</li>"
end if
else
strSql="Select URL from DL where URL like '%" & URL & "%'"
set RS = my_Conn.execute(strSql)
if not rs.eof then
sString = sString & "<li>This Download already exists in our database.</li>"
end if
RS.close
end if
if cat = "--Please select one--" then
sString = sString & "<li>Please select category that match your program.</li>"
end if
if len(trim(Description)) = 0 then
sString = sString & "<li>Please enter program description.</li>"
end if
if len(trim(Description)) => 255 then
sString = sString & "<li>" &len(trim(Description))&" characters. Your description is too long. 255 characters max</li>"
end if
if len(trim(Email)) = 0 then
sString = sString & "<li>You must give an email address.</li>"
else
if EmailField(Email) = 0 then
sString = sString & "<li>You Must enter a valid email address.</li>"
end if
end if
end if
if sString = "" then
sSql = "SELECT APP_ID FROM "& strTablePrefix & "APPS WHERE APP_iNAME = 'downloads'"
set rsA = my_Conn.execute(sSql)
if not rsA.eof then
intAppID = rsA("APP_ID")
else
intAppID = 0
end if
session.Contents("uploadType") = ""
strSql = "INSERT INTO DL"
strSql = strSql & "(NAME"
strSql = strSql & ", URL"
strSql = strSql & ", KEYWORD"
strSql = strSql & ", CATEGORY"
strSql = strSql & ", DESCRIPTION"
strSql = strSql & ", EMAIL"
strSql = strSql & ", POST_DATE"
strSql = strSql & ", PARENT_ID"
strSql = strSql & ", SHOW"
strSql = strSql & ", BADLINK"
strSql = strSql & ", FILESIZE "
strSql = strSql & ", LICENSE "
strSql = strSql & ", LANG "
strSql = strSql & ", PLATFORM "
strSql = strSql & ", PUBLISHER "
strSql = strSql & ", PUBLISHER_URL "
strSql = strSql & ", UPLOADER "
strSql = strSql & ") "
strSql = strSql & " VALUES ("
strSql = strSql & "'" & name & "'"
strSql = strSql & ", " & "'" & url & "'"
strSql = strSql & ", " & "'" & key & "'"
strSql = strSql & ", " & "'" & cat & "'"
strSql = strSql & ", " & "'" & description & "'"
strSql = strSql & ", " & "'" & email & "'"
strSql = strSql & ", " & "'" & today & "'"
strSql = strSql & ", " & "'" & parent & "'"
if mlev=4 then
strSql = strSql & ", " & "1"
else
strSql = strSql & ", " & "0"
end if
strSql = strSql & ", " & "0"
strSql = strSql & ", " & "'" & size & "'"
strSql = strSql & ", " & "'" & license & "'"
strSql = strSql & ", " & "'" & language & "'"
strSql = strSql & ", " & "'" & platform & "'"
strSql = strSql & ", " & "'" & publisher & "'"
strSql = strSql & ", " & "'" & publisherurl & "'"
strSql = strSql & ", " & "'" & uploader & "'"
strSql = strSql & ")"
executeThis(strSQL)
if trim(uLoad) <> "" and FSOenabled = true and strAllowUploads = 1 and uActive = 1 and mLev >= uAllowed then
on error resume next
set fso = Server.CreateObject("Scripting.FileSystemObject")
dirPath = server.MapPath(remotePath) & "\"
if fso.FolderExists(dirPath & parent) = false then
fso.CreateFolder(dirPath & parent)
end if
if fso.FolderExists(dirPath & parent & "\" & cat) = false then
fso.CreateFolder(dirPath & parent & "\" & cat)
end if
if fso.FileExists(dirPath & uLoad) = true then
fso.MoveFile dirPath & uLoad, dirPath & parent & "\" & cat & "\" & uLoad
end if
set fso = nothing
on error goto 0
end if
if mLev = 4 and intSubscriptions = 1 and strEmail = 1 then
'send subscriptions emails
eSubject = strSiteTitle & " - New Download"
eMsg = "A new download has been submitted at " & strSiteTitle & vbCrLf
eMsg = eMsg & "that you have a subscription for." & vbCrLf & vbCrLf
eMsg = eMsg & "You can view the new downloads by visiting " & strHomeUrl & "dl.asp?cmd=3" & vbCrLf
sendSubscriptionEmails intAppID,parent,cat,"0",eSubject,eMsg
'response.Write("<br>Email sent<br>" )
end if
%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="leftPgCol">
</td>
<td class="mainPgCol">
<%
mwpThemeBlock_open()%>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="middle" width=100%>
<center>
<% if mlev=4 then%>Your file has been added to our database
<%else%>Your File has been accepted for review.<br>
Please wait 1-3 days for your File to be reviewed and added.
<%end if%>
<table border="0" cellpadding="4" cellspacing="0" width="60%" align="center">
<tr>
<td valign=top width=30%>
<b>Name:</b>
</td>
<td valign=top align=left width=70%>
<% Response.write name %>
</td>
</tr>
<tr>
<td valign=top>
<b>URL:</b>
</td>
<td valign=top align=left>
<% Response.write URL %>
</td>
</tr>
<tr>
<td valign=top>
<b>Keywords:</b>
</td>
<td valign=top align=left>
<% Response.write key %>
</td>
</tr>
<tr>
<td valign=top>
<b>Email:</b>
</td>
<td valign=top align=left>
<% Response.write Email %>
</td>
</tr>
<tr>
<td valign=top>
<b>File Size:</b>
</td>
<td valign=top align=left>
<% Response.write Size %>
</td>
</tr>
<tr>
<td valign=top>
<b>License:</b>
</td>
<td valign=top align=left>
<% Response.write License %>
</td>
</tr>
<tr>
<td valign=top>
<b>Language:</b>
</td>
<td valign=top align=left>
<% Response.write Language %>
</td>
</tr>
<tr>
<td valign=top>
<b>Platform:</b>
</td>
<td valign=top align=left>
<% Response.write Platform %>
</td>
</tr>
<tr>
<td valign=top>
<b>Publisher:</b>
</td>
<td valign=top align=left>
<% Response.write Publisher %>
</td>
</tr>
<tr>
<td valign=top>
<b>Publisher's Website:</b>
</td>
<td valign=top align=left>
<% Response.write Publisherurl %>
</td>
</tr>
<tr>
<td valign=top>
<b>Uploaded by:</b>
</td>
<td valign=top align=left>
<% Response.write Uploader %>
</td>
</tr>
<tr>
<td valign=top colspan=2>
<b>Description:</b>
</td>
</tr>
<tr>
<td valign=top colspan=2>
<% Response.write Description %>
</td>
</tr>
</table>
</td>
</tr></table>
<center><p><a href="dl.asp">Back to Download Categories </a></p>
</center>
<%
mwpThemeBlock_close()%>
</td>
</tr>
</table>
<meta http-equiv="Refresh" content="10; URL=dl.asp">
<%else
'They have made an error, delete their upload, if there is one
if FSOenabled = true and strAllowUploads = 1 then
on error resume next
set fso = Server.CreateObject("Scripting.FileSystemObject")
dirPath = server.MapPath(downloadDir) & "\" & uLoad
if fso.FileExists(dirPath) = true then
fso.DeleteFile dirPath
end if
set fso = nothing
end if %>
<br>
<table border="0" cellpadding="0" cellspacing="0" valign="top" width="100%">
<tr>
<td class="leftPgCol">
</td>
<td class="mainPgCol">
<%
mwpThemeBlock_open() %>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign=top align=center>
<p align="center"><span class="fSubTitle">There Was A Problem.</span></p>
<table align="center" border="0">
<tr>
<td>
<ul>
<% =sString %>
</ul>
</td>
</tr>
</table>
<p align="center"><a href="JavaScript:history.go(-1)">Go Back To Enter Data</a></p>
</td>
</tr>
</table>
<%mwpThemeBlock_close()%>
</td>
</tr>
</table>
<%end if%>
<!-- #INCLUDE file="inc_footer.asp" -->
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/hrdept/dl_add_url.asp, line 41
Code:
<%
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
curpagetype = "downloads"
uploadPg = true
sString = ""
CurPageInfoChk = "1"
function CurPageInfo ()
PageName = "New Download"
PageAction = "Submitted"
CurPageInfo = PageAction & PageName
end function
%><!-- #INCLUDE file="config.asp" -->
<!-- #INCLUDE file="includes/inc_clsUpload.asp" -->
<!-- #INCLUDE file="inc_functions.asp" -->
<!-- INCLUDE file="modules/downloads/dl_functions.asp" -->
<!-- INCLUDE file="modules/downloads/dl_custom.asp" -->
<!-- #INCLUDE file="inc_top.asp" -->
<!-- INCLUDE file="includes/inc_ADOVBS.asp" -->
<%
if trim(objUpload.Fields("cat").Value) = "" then --> ERROR
Response.Redirect("dl.asp")
else
cat = cLng(objUpload.Fields("cat").Value)
name = ChkString(objUpload.Fields("name").Value,"sqlstring")
URL = ChkString(objUpload.Fields("URL").Value,"url")
key = ChkString(objUpload.Fields("key").Value,"sqlstring")
size = ChkString(objUpload.Fields("size").Value,"sqlstring")
description = ChkString(objUpload.Fields("des").Value,"sqlstring")
email = ChkString(objUpload.Fields("mail").Value,"url")
license = ChkString(objUpload.Fields("license").Value,"sqlstring")
language = ChkString(objUpload.Fields("language").Value,"sqlstring")
platform = ChkString(objUpload.Fields("platform").Value,"sqlstring")
publisher = ChkString(objUpload.Fields("publisher").Value,"sqlstring")
publisherURL = ChkString(objUpload.Fields("publisherURL").Value,"url")
uploader = ChkString(objUpload.Fields("uploader").Value,"title")
today = strCurDateString
uLoad = filename
Set objUpload = Nothing
strSQL = "SELECT CAT_ID FROM DL_SUBCATEGORIES WHERE SUBCAT_ID = " & cat
dim rsCategories
set rsCategories = server.CreateObject("adodb.recordset")
rsCategories.Open strSQL, my_Conn
parent = rsCategories("CAT_ID")
rsCategories.Close
set rsCategories = nothing
strSQL = "select UP_ACTIVE, UP_ALLOWEDUSERS, UP_ALLOWEDEXT from " & strTablePrefix & "UPLOAD_CONFIG where UP_LOCATION = 'download'"
dim rsUload
set rsUload = server.CreateObject("adodb.recordset")
rsUload.Open strSQL, my_Conn
uActive = rsUload("UP_ACTIVE")
uAllowed = rsUload("UP_ALLOWEDUSERS")
extAllowed = rsUload("UP_ALLOWEDEXT")
rsUload.Close
set rsUload = nothing
if trim(uLoad) <> "" and FSOenabled = true and strAllowUploads = 1 and uActive = 1 and mLev >= uAllowed then
banner = remotePath & parent & "/" & cat & "/" & uLoad
url = banner
end if
if trim(uLoad) = "" then
sString = ""
end if
if len(trim(name)) = 0 then
sString = sString & "<li>Please enter Program Title.</li>"
end if
isOK = false
if len(trim(url)) <= 8 and trim(uLoad) = "" then
sString = sString & "<li>Please enter a Download URL.</li>"
elseif len(trim(url)) > 8 and trim(uLoad) = "" then
tmpExt = split(extAllowed,",")
for ex = 0 to ubound(tmpExt)
if right(url,3) = tmpExt(ex) then
isOK = true
end if
next
if not isOK then
sString = sString & "<li>Please enter a valid Download URL.</li>"
end if
else
strSql="Select URL from DL where URL like '%" & URL & "%'"
set RS = my_Conn.execute(strSql)
if not rs.eof then
sString = sString & "<li>This Download already exists in our database.</li>"
end if
RS.close
end if
if cat = "--Please select one--" then
sString = sString & "<li>Please select category that match your program.</li>"
end if
if len(trim(Description)) = 0 then
sString = sString & "<li>Please enter program description.</li>"
end if
if len(trim(Description)) => 255 then
sString = sString & "<li>" &len(trim(Description))&" characters. Your description is too long. 255 characters max</li>"
end if
if len(trim(Email)) = 0 then
sString = sString & "<li>You must give an email address.</li>"
else
if EmailField(Email) = 0 then
sString = sString & "<li>You Must enter a valid email address.</li>"
end if
end if
end if
if sString = "" then
sSql = "SELECT APP_ID FROM "& strTablePrefix & "APPS WHERE APP_iNAME = 'downloads'"
set rsA = my_Conn.execute(sSql)
if not rsA.eof then
intAppID = rsA("APP_ID")
else
intAppID = 0
end if
session.Contents("uploadType") = ""
strSql = "INSERT INTO DL"
strSql = strSql & "(NAME"
strSql = strSql & ", URL"
strSql = strSql & ", KEYWORD"
strSql = strSql & ", CATEGORY"
strSql = strSql & ", DESCRIPTION"
strSql = strSql & ", EMAIL"
strSql = strSql & ", POST_DATE"
strSql = strSql & ", PARENT_ID"
strSql = strSql & ", SHOW"
strSql = strSql & ", BADLINK"
strSql = strSql & ", FILESIZE "
strSql = strSql & ", LICENSE "
strSql = strSql & ", LANG "
strSql = strSql & ", PLATFORM "
strSql = strSql & ", PUBLISHER "
strSql = strSql & ", PUBLISHER_URL "
strSql = strSql & ", UPLOADER "
strSql = strSql & ") "
strSql = strSql & " VALUES ("
strSql = strSql & "'" & name & "'"
strSql = strSql & ", " & "'" & url & "'"
strSql = strSql & ", " & "'" & key & "'"
strSql = strSql & ", " & "'" & cat & "'"
strSql = strSql & ", " & "'" & description & "'"
strSql = strSql & ", " & "'" & email & "'"
strSql = strSql & ", " & "'" & today & "'"
strSql = strSql & ", " & "'" & parent & "'"
if mlev=4 then
strSql = strSql & ", " & "1"
else
strSql = strSql & ", " & "0"
end if
strSql = strSql & ", " & "0"
strSql = strSql & ", " & "'" & size & "'"
strSql = strSql & ", " & "'" & license & "'"
strSql = strSql & ", " & "'" & language & "'"
strSql = strSql & ", " & "'" & platform & "'"
strSql = strSql & ", " & "'" & publisher & "'"
strSql = strSql & ", " & "'" & publisherurl & "'"
strSql = strSql & ", " & "'" & uploader & "'"
strSql = strSql & ")"
executeThis(strSQL)
if trim(uLoad) <> "" and FSOenabled = true and strAllowUploads = 1 and uActive = 1 and mLev >= uAllowed then
on error resume next
set fso = Server.CreateObject("Scripting.FileSystemObject")
dirPath = server.MapPath(remotePath) & "\"
if fso.FolderExists(dirPath & parent) = false then
fso.CreateFolder(dirPath & parent)
end if
if fso.FolderExists(dirPath & parent & "\" & cat) = false then
fso.CreateFolder(dirPath & parent & "\" & cat)
end if
if fso.FileExists(dirPath & uLoad) = true then
fso.MoveFile dirPath & uLoad, dirPath & parent & "\" & cat & "\" & uLoad
end if
set fso = nothing
on error goto 0
end if
if mLev = 4 and intSubscriptions = 1 and strEmail = 1 then
'send subscriptions emails
eSubject = strSiteTitle & " - New Download"
eMsg = "A new download has been submitted at " & strSiteTitle & vbCrLf
eMsg = eMsg & "that you have a subscription for." & vbCrLf & vbCrLf
eMsg = eMsg & "You can view the new downloads by visiting " & strHomeUrl & "dl.asp?cmd=3" & vbCrLf
sendSubscriptionEmails intAppID,parent,cat,"0",eSubject,eMsg
'response.Write("<br>Email sent<br>" )
end if
%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="leftPgCol">
</td>
<td class="mainPgCol">
<%
mwpThemeBlock_open()%>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="middle" width=100%>
<center>
<% if mlev=4 then%>Your file has been added to our database
<%else%>Your File has been accepted for review.<br>
Please wait 1-3 days for your File to be reviewed and added.
<%end if%>
<table border="0" cellpadding="4" cellspacing="0" width="60%" align="center">
<tr>
<td valign=top width=30%>
<b>Name:</b>
</td>
<td valign=top align=left width=70%>
<% Response.write name %>
</td>
</tr>
<tr>
<td valign=top>
<b>URL:</b>
</td>
<td valign=top align=left>
<% Response.write URL %>
</td>
</tr>
<tr>
<td valign=top>
<b>Keywords:</b>
</td>
<td valign=top align=left>
<% Response.write key %>
</td>
</tr>
<tr>
<td valign=top>
<b>Email:</b>
</td>
<td valign=top align=left>
<% Response.write Email %>
</td>
</tr>
<tr>
<td valign=top>
<b>File Size:</b>
</td>
<td valign=top align=left>
<% Response.write Size %>
</td>
</tr>
<tr>
<td valign=top>
<b>License:</b>
</td>
<td valign=top align=left>
<% Response.write License %>
</td>
</tr>
<tr>
<td valign=top>
<b>Language:</b>
</td>
<td valign=top align=left>
<% Response.write Language %>
</td>
</tr>
<tr>
<td valign=top>
<b>Platform:</b>
</td>
<td valign=top align=left>
<% Response.write Platform %>
</td>
</tr>
<tr>
<td valign=top>
<b>Publisher:</b>
</td>
<td valign=top align=left>
<% Response.write Publisher %>
</td>
</tr>
<tr>
<td valign=top>
<b>Publisher's Website:</b>
</td>
<td valign=top align=left>
<% Response.write Publisherurl %>
</td>
</tr>
<tr>
<td valign=top>
<b>Uploaded by:</b>
</td>
<td valign=top align=left>
<% Response.write Uploader %>
</td>
</tr>
<tr>
<td valign=top colspan=2>
<b>Description:</b>
</td>
</tr>
<tr>
<td valign=top colspan=2>
<% Response.write Description %>
</td>
</tr>
</table>
</td>
</tr></table>
<center><p><a href="dl.asp">Back to Download Categories </a></p>
</center>
<%
mwpThemeBlock_close()%>
</td>
</tr>
</table>
<meta http-equiv="Refresh" content="10; URL=dl.asp">
<%else
'They have made an error, delete their upload, if there is one
if FSOenabled = true and strAllowUploads = 1 then
on error resume next
set fso = Server.CreateObject("Scripting.FileSystemObject")
dirPath = server.MapPath(downloadDir) & "\" & uLoad
if fso.FileExists(dirPath) = true then
fso.DeleteFile dirPath
end if
set fso = nothing
end if %>
<br>
<table border="0" cellpadding="0" cellspacing="0" valign="top" width="100%">
<tr>
<td class="leftPgCol">
</td>
<td class="mainPgCol">
<%
mwpThemeBlock_open() %>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign=top align=center>
<p align="center"><span class="fSubTitle">There Was A Problem.</span></p>
<table align="center" border="0">
<tr>
<td>
<ul>
<% =sString %>
</ul>
</td>
</tr>
</table>
<p align="center"><a href="JavaScript:history.go(-1)">Go Back To Enter Data</a></p>
</td>
</tr>
</table>
<%mwpThemeBlock_close()%>
</td>
</tr>
</table>
<%end if%>
<!-- #INCLUDE file="inc_footer.asp" -->