%@LANGUAGE="VBSCRIPT"%>
<%
'---------- Computer Postcards --------------------------------
'Copyright (c) 2002-2003 Jackie Johnston, ComputerPostcards.com
'All Rights Reserved.
'Version: 2.0.4
'--------------------------------------------------------------
%>
<%
' *** Logout the current user.
MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
If (CStr(Request("MM_Logoutnow")) = "1") Then
Session.Abandon
MM_logoutRedirectPage = "subscriberlogin.asp"
' redirect with URL parameters (remove the "MM_Logoutnow" query param).
if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))
If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_newQS = "?"
For Each Item In Request.QueryString
If (Item <> "MM_Logoutnow") Then
If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
End If
Next
if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS
End If
Response.Redirect(MM_logoutRedirectPage)
End If
%>
<%
If (Request.Cookies("cardsenderemail") = "") Then
Response.Cookies("cardsenderemail") = Request.Form("cardsenderemail")
Response.Cookies("cardsenderemail").Expires = Date + 365
End If
%>
<%
If (Request.Cookies("cardsendername") = "") Then
Response.Cookies("cardsendername") = Request.Form("cardsendername")
Response.Cookies("cardsendername").Expires = Date + 365
End If
%>
<%
Dim rsPhoto__MMColParam
rsPhoto__MMColParam = "1"
if (Request.QueryString("id") <> "") then rsPhoto__MMColParam = Request.QueryString("id")
%>
<%
set rsPhoto = Server.CreateObject("ADODB.Recordset")
rsPhoto.ActiveConnection = MM_connCards_STRING
rsPhoto.Source = "SELECT * FROM photos WHERE photoid = " + Replace(rsPhoto__MMColParam, "'", "''") + ""
rsPhoto.CursorType = 0
rsPhoto.CursorLocation = 2
rsPhoto.LockType = 3
rsPhoto.Open()
rsPhoto_numRows = 0
%>
<%
set rsPreferences = Server.CreateObject("ADODB.Recordset")
rsPreferences.ActiveConnection = MM_connCards_STRING
rsPreferences.Source = "SELECT * FROM preferences"
rsPreferences.CursorType = 0
rsPreferences.CursorLocation = 2
rsPreferences.LockType = 3
rsPreferences.Open()
rsPreferences_numRows = 0
%>
<%
set rsPostcardsText = Server.CreateObject("ADODB.Recordset")
rsPostcardsText.ActiveConnection = MM_connCards_STRING
rsPostcardsText.Source = "SELECT * FROM postcardstext"
rsPostcardsText.CursorType = 0
rsPostcardsText.CursorLocation = 2
rsPostcardsText.LockType = 3
rsPostcardsText.Open()
rsPostcardsText_numRows = 0
%>
<%
Dim rsSubscriber__MMColParam
rsSubscriber__MMColParam = "1"
if (Session("MM_Username") <> "") then rsSubscriber__MMColParam = Session("MM_Username")
%>
<%
set rsSubscriber = Server.CreateObject("ADODB.Recordset")
rsSubscriber.ActiveConnection = MM_connCards_STRING
rsSubscriber.Source = "SELECT * FROM subscribers WHERE subscribe_username = '" + Replace(rsSubscriber__MMColParam, "'", "''") + "'"
rsSubscriber.CursorType = 0
rsSubscriber.CursorLocation = 2
rsSubscriber.LockType = 3
rsSubscriber.Open()
rsSubscriber_numRows = 0
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request("MM_EmptyValue") <> "") Then
Recordset1__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_connCards_STRING
Recordset1.Source = "SELECT * FROM optin WHERE optin_active = " + Replace(Recordset1__MMColParam, "'", "''") + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%=(rsPreferences.Fields.Item("headhtml").Value)%>
<%=(rsPreferences.Fields.Item("headhtml").Value)%>
<%=(rsPostcardsText.Fields.Item("BASO_greetingtitle").Value)%>
<% Session("Photo_ID") = (rsPhoto.Fields.Item("photoid").Value) %>
" bgcolor="<%=(rsPreferences.Fields.Item("bkgcolor").Value)%>" text="<%=(rsPreferences.Fields.Item("textcolor").Value)%>" link="<%=(rsPreferences.Fields.Item("linkcolor").Value)%>" vlink="<%=(rsPreferences.Fields.Item("vlinkcolor").Value)%>" alink="<%=(rsPreferences.Fields.Item("alinkcolor").Value)%>" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" <%=(rsPreferences.Fields.Item("bodyhtml").Value)%>>
<%=(rsPreferences.Fields.Item("tophtml").Value)%>
<% If (rsPreferences.Fields.Item("subscriptions").Value) = (1) Then 'script %>
<% End If ' end If (rsPreferences.Fields.Item("subscriptions").Value) = (1) script %>
| |
|
|
| |
<% If (((rsPreferences.Fields.Item("subscriptions").Value) = (1)) AND (Not rsSubscriber.EOF Or Not rsSubscriber.BOF)) OR (rsPreferences.Fields.Item("subscriptions").Value) = (0)Then %>
" color="<%=(rsPreferences.Fields.Item("cardtextcolor").Value)%>" size="-1"> " size="-1"><%=(rsPostcardsText.Fields.Item("BASO_personalize").Value)%>
" color="<%=(rsPreferences.Fields.Item("cardtextcolor").Value)%>" size="-1">
|
<% End If %>
|
|
<%=(rsPreferences.Fields.Item("bottomhtml").Value)%>
<%
rsPhoto.Close()
%>
<%
rsPreferences.Close()
%>
<%
rsPostcardsText.Close()
%>
<%
rsSubscriber.Close()
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>