%
' ADO constants include file for VBScript
'---- CursorTypeEnum Values ----
Const adOpenForwardOnly = 0
'---- LockTypeEnum Values ----
Const adLockOptimistic = 3
'---- CursorLocationEnum Values ----
Const adUseServer = 2
Const adUseClient = 3
'---- CommandTypeEnum Values ----
Const adCmdText = &H0001
'---- ConnectModeEnum Values ----
Const adModeRead = 1
Const adModeWrite = 2
Const adModeReadWrite = 3
siteName= "Ecstasy"
strDocRefer = Request.Cookies("revsharer")
strSavedRefer = CStr(Request("ID"))
If strSavedRefer <> "" then
Response.Cookies("revsharer") = strSavedRefer
Response.Cookies("revsharer").Expires = now + 30
strClientIP = CStr(Request.ServerVariables("REMOTE_ADDR"))
If strClientIP = "" then strClientIP = "Unknown"
Response.Cookies("address") = strClientIP
Response.Cookies("address").Expires = now + 30
strClientReferer = CStr(Request.ServerVariables("HTTP_REFERER"))
If strClientReferer = "" then strClientReferer = "Unknown"
Response.Cookies("referer") = strClientReferer
Response.Cookies("referer").Expires = now + 30
uniquehit = false
Set connectPartner = Server.CreateObject("ADODB.Connection")
connectPartner.ConnectionString = "Driver={MySQL};DATABASE=test;"_
& "SERVER=216.226.151.237;UID=ampartner;PWD=kat9661;"
connectPartner.CursorLocation = adUseServer
connectPartner.Mode = adModeReadWrite
connectPartner.Open
strSQL = "SELECT * FROM tblCustomers WHERE IPAddress LIKE '" & strClientIP & "'"
strSQL2 = "SELECT * FROM tblPartners WHERE PartnerID LIKE '" & strSavedRefer & "'"
Set rsPartner = Server.CreateObject("ADODB.Recordset")
Set rsRevshare = Server.CreateObject("ADODB.Recordset")
rsPartner.Open strSQL, connectPartner, adOpenForwardOnly, adLockOptimistic, adCmdText
If rsPartner.EOF then
uniquehit = True
Set adoCommand = Server.CreateObject("ADODB.Command")
adoCommand.ActiveConnection = connectPartner
adoCommand.CommandType = adCmdText
sqlCommand = "INSERT INTO tblCustomers (IPAddress, PartnerID, ReferingURL, DateFirstVisit, SiteJoined) "
sqlCommand = sqlCommand & "VALUES ('" & strClientIP & "', '" & strSavedRefer & "', '"
sqlCommand = sqlCommand & strClientReferer & "', Null, Null)"
adoCommand.CommandText = sqlCommand
adoCommand.Execute
Set adoCommand = Nothing
Else
Set adoCommand = Server.CreateObject("ADODB.Command")
adoCommand.ActiveConnection = connectPartner
adoCommand.CommandType = adCmdText
sqlCommand = "UPDATE tblCustomers SET PartnerID = '" & strSavedRefer & "', referingURL"
sqlCommand = sqlCommand & " = '" & strClientReferer & "', DateFirstVisit = "
sqlCommand = sqlCommand & "Null, SiteJoined = Null"
sqlCommand = sqlCommand & " WHERE IPAddress = " & "'" & strClientIP & "'"
adoCommand.CommandText = sqlCommand
adoCommand.Execute
Set adoCommand = Nothing
End If
rsPartner.Close
rsRevshare.Open strSQL2, connectPartner, adOpenForwardOnly, adLockOptimistic, adCmdText
If rsRevshare.EOF = false then
Set adoCommand = Server.CreateObject("ADODB.Command")
adoCommand.ActiveConnection = connectPartner
adoCommand.CommandType = adCmdText
sqlCommand = "UPDATE tblPartners SET TotalRawClicks ="
sqlCommand = sqlCommand & (rsRevshare("TotalRawClicks") + 1)
sqlCommand = sqlCommand & ", " & siteName & "Uniques="
sqlCommand = sqlCommand & (rsRevshare(siteName & "Uniques") + 1)
sqlCommand = sqlCommand & ", TotalUniques=" & (rsRevshare("TotalUniques") + 1)
If rsRevshare(siteName & "Joins") > 0 then
sqlCommand = sqlCommand & ", " & siteName & "Ratio="
sqlCommand = sqlCommand & (rsRevshare(siteName & "Uniques") + 1) / _
rsRevshare(siteName & "Joins")
End If
If rsRevshare("TotalJoins") > 0 then
sqlCommand = sqlCommand & ", UniquesPerJoin=" & (rsRevshare("TotalUniques") + 1) / _
rsRevshare("TotalJoins")
End If
sqlCommand = sqlCommand & " WHERE PartnerID = '" & strSavedRefer & "'"
adoCommand.CommandText = sqlCommand
adoCommand.Execute
Set adoCommand = Nothing
End If
rsRevshare.Close
connectPartner.Close
Set rsRevshare = Nothing
Set rsPartner = Nothing
Set connectPartner = Nothing
End If
If Request("goto") <> "" then
Response.Redirect Request("goto")
End If
%>
Sweet Ecstasy!!!
|
|
WARNING...
This web site contains adult material that some may find offensive. If you are offended by such material, or if you are under 18 years old, you should not view the site. By continuing to view the following pages you are making the following legal statements: I am over the age of 18; I want to view adult material; it is legal for me to view such material in my community, state, nation or province; and if I proceed to follow a link on this site, I assume full responsibility for my actions. To leave the site simply CLICK HERE
|
|
| Privacy Policy
Click Here for copyright and Section 18 USC 2257 information.
|
| ©SweetEcstasy.com; all rights reserved. |
|