%@ LANGUAGE=vbscript LCID=1033 %>
![]() |
||||||||
![]() |
||||||||
|
||||||||
|
||||||||
![]() |
||||||||
home | how it works | pricing | about us | site map | affiliates | login | sign up | contact us
book printing | book publishing | book publishing company | book publishing | self publishing | resources | page listing
<% ' if redirected here by an affiliate link, save the affiliate code as a session variable if request("Afcc") <> "" then ' change here because non-numeric affiliate codes were getting passed in if isnumeric(request("Afcc")) then session("Afcc") = request("Afcc") : session("InvalidAfcc") = "N" else session("Afcc") = "" : session("InvalidAfcc") = request("Afcc") : session("InvalidSource") = request.ServerVariables("SERVER_NAME") end if else session("Afcc") = "" : session("InvalidAfcc") = "N" end if ' if source code (srcc) is present, record it in the database if request("srcc") <> "" then on error resume next session("srcc") = request("srcc") SET rs = Server.CreateObject("ADODB.Recordset") rs.LockType = 2 rs.open "Select * from SourceCodeCounters where SourceCode = '" + Session("srcc") + "'", "DSN=IP_User" rs.movefirst if rs.eof then ' missing source code record - try adding one for this srcc rs.AddNew rs("SourceCode") = session("srcc") end if ' count this hit rs("SourceCodeHits") = rs("SourceCodeHits") + 1 rs.update rs.close else session("srcc") = "" end if %>