%@LANGUAGE="VBSCRIPT"%>
<% on error resume next %>
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
If (CStr(Request("MM_insert")) = "form1") Then
If Request("SVALIDO") <> Request("SVALID") Then
Response.Redirect("failed.asp")
End If
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_connGODRUGFREE_STRING
MM_editCmd.CommandText = "INSERT INTO godrugfree.tbllisting (sNAME, sDESC, sURL, sCATID, sKEYWORD, locCITY, locSTATE, locCOUNTRY, sEMAIL, sRECURL, sDATE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 201, 1, 255, Request.Form("sNAME")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 201, 1, -1, Request.Form("sDESC")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 201, 1, -1, Request.Form("sURL")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 5, 1, -1, MM_IIF(Request.Form("sCAT"), Request.Form("sCAT"), null)) ' adDouble
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 201, 1, -1, Request.Form("sKEYWORD")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 201, 1, 255, Request.Form("locCITY")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 201, 1, 255, Request.Form("locSTATE")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 201, 1, 255, Request.Form("locCOUNTRY")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 201, 1, 100, Request.Form("sEMAIL")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param10", 201, 1, -1, Request.Form("sRECURL")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 135, 1, -1, MM_IIF(Request.Form("sDATE"), Request.Form("sDATE"), null)) ' adDBTimeStamp
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
End If
End If
%>
<%
Dim rsCAT
Dim rsCAT_numRows
Set rsCAT = Server.CreateObject("ADODB.Recordset")
rsCAT.ActiveConnection = MM_connGODRUGFREE_STRING
rsCAT.Source = "SELECT sID, sNAME FROM tblcat ORDER BY sNAME ASC"
rsCAT.CursorType = 0
rsCAT.CursorLocation = 2
rsCAT.LockType = 1
rsCAT.Open()
rsCAT_numRows = 0
%>
<%
sDATE1 = date()
sDATESPLIT = split(sDATE1,"/")
sDATESPLITM = sDATESPLIT(0)
sDATESPLITD = sDATESPLIT(1)
sDATESPLITY = sDATESPLIT(2)
sDATE = sDATESPLITY & "-" & sDATESPLITM & "-" & sDATESPLITD
%>
<%
Dim intLowerBound
Dim intUpperBound
Dim intRangeSize
Dim sngRandomValue
Dim intRandomInteger
intLowerBound = 1000000
intUpperBound = 10000000
If intLowerBound > intUpperBound Then
Dim iTemp
iTemp = intLowerBound
intLowerBound = intUpperBound
intUpperBound = iTemp
End If
Randomize()
intRangeSize = intUpperBound - intLowerBound + 1
sngRandomValue = intRangeSize * Rnd()
sngRandomValue = sngRandomValue + intLowerBound
intRandomInteger = Int(sngRandomValue)
strT1 =replace((intRandomInteger),"1","1.jpg")
strT2 =replace(strT1,"2","2.jpg")
strT3 =replace(strT2,"3","3.jpg")
strT4 =replace(strT3,"4","4.jpg")
strT5 =replace(strT4,"5","5.jpg")
strT6 =replace(strT5,"6","6.jpg")
strT7 =replace(strT6,"7","7.jpg")
strT8 =replace(strT7,"8","8.jpg")
strT9 =replace(strT8,"9","9.jpg")
strT0 =replace(strT9,"0","0.jpg")
strTOTAL = strT0
strS1 = Split(strTOTAL,".jpg")
strS2 = strS1(0)
strS3 = strS1(1)
strS4 = strS1(2)
strS5 = strS1(3)
strS6 = strS1(4)
strS7 = strS1(5)
strS8 = strS1(6)
if strS3 = "" then
strS3 = "null"
else
strS3 = strS3
end if
strIMG = "
"&"
"&"
"&"
"&"
"&"
"&"
"
%>
![]() |
||||||
![]() |
||||||
![]() |
||||||
|
||||||
. All Rights Reserved. 2006-2008. GoDrugFree.org. |