<!--#include virtual="/includes/resifunctions.asp" -->
<!--#include virtual="/includes/datefunctions.asp" -->
<!--#include virtual="/includes/sessionvariables.asp" -->

<%
 Dim SQLItin, Itinerary_ID
  
 Set RSItin = Server.CreateObject("ADODB.Recordset")
 SQLItin = "Select * From Transactions Where Transaction_ID = '" & Request("Transaction_ID") & "'"
 RSItin.Open SQLItin, Conn
 
 Itinerary_ID = RSItin("Itinerary_ID")
 
 Dim SQLTrans, HTML, Plain
 
 Set RSTrans = Server.CreateObject("ADODB.Recordset")
 SQLTrans = "Select T.Transaction_ID, T.Itinerary_ID, T.CreateDate, CD.Name_First, CD.Name_Last, CD.Address_1, CD.City, CD.State, CD.Country, CD.Zip, U.User_Name "
 SQLTrans = SQLTrans & "from Transactions T Inner Join (Users U Inner Join Contact_Detail CD On U.Contact_ID = CD.Contact_ID) on T.Contact_ID = U.User_ID "
 SQLTrans = SQLTrans & "Where T.Transaction_ID = '" & Request("Transaction_ID") & "' And T.Contact_ID = '" & RSItin("Contact_ID") & "'"
 RSTrans.Open SQLTrans, Conn
 
 If Session("Transacted") = "verifytx.asp" Then
 	Session("Transacted") = "transact-complete.asp"
 
 HTML = HTML & "<html>"
 HTML = HTML & "<head>"
 HTML = HTML & "<title>Untitled Document</title>"
 HTML = HTML & "<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">"
 HTML = HTML & "<link rel=""stylesheet"" href=""http:/www.vacationinflorida.com/Style-sheets/attraction-set.css"" type=""text/css"">"
 HTML = HTML & "<link rel=""stylesheet"" href=""http:/www.vacationinflorida.com/Style-sheets/atrraction-set.css"" type=""text/css"">"
 HTML = HTML & "<link rel=""stylesheet"" href=""http:/www.vacationinflorida.com/Style-sheets/headline.css"" type=""text/css"">"
 HTML = HTML & "</head>"
 HTML = HTML & "<body bgcolor=""#FFFFFF"" text=""#000000"">"
 HTML = HTML & "<table width=""500"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td colspan=""3"" class=""headline-prnt"" align=""center"">Purchase Receipt</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td colspan=""3"" class=""headline-prnt"" align=""left"">Tropical Palms RV FunResort</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td class=""headline-prnt"" bgcolor=""#FFFFFF"" colspan=""2"">2650 Holiday Trail"
 HTML = HTML & "Kissimmee, Florida 34746<br>"
 HTML = HTML & "1-800-647-2567<br>"
 HTML = HTML & "</td>"
 HTML = HTML & "<td class=""statement-subhds-prnt"" bgcolor=""#FFFFFF"" width=""20%"">&nbsp;</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td class=""statement-subhds-prnt"" bgcolor=""#FFFFFF"" width=""37%"">&nbsp;</td>"
 HTML = HTML & "<td class=""statement-subhds-prnt"" bgcolor=""#FFFFFF"" width=""43%"">&nbsp;</td>"
 HTML = HTML & "<td class=""statement-subhds-prnt"" bgcolor=""#FFFFFF"" width=""20%"">&nbsp;</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td colspan=""3"" bgcolor=""#FFFFFF""> "
 HTML = HTML & "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td width=""26%"" class=""statement-subhds-prnt"">Transaction #:</td>"
 HTML = HTML & "<td width=""74%"" class=""statement-detail-prnt"">" & RSTrans("Transaction_ID") & "</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td width=""26%"" class=""statement-subhds-prnt"">Itinerary #:</td>"
 HTML = HTML & "<td width=""74%"" class=""statement-detail-prnt"">" & RSTrans("Itinerary_ID") & "</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td width=""26%"" class=""statement-subhds-prnt"">Purchase Date:</td>"
 HTML = HTML & "<td width=""74%"" class=""statement-detail-prnt"">" & RSTrans("CreateDate") & "</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td width=""26%"" class=""statement-subhds-prnt"">&nbsp;</td>"
 HTML = HTML & "<td width=""74%"" class=""statement-subhds-prnt"">&nbsp;</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td width=""26%"" class=""statement-subhds-prnt"">Customer:</td>"
 HTML = HTML & "<td width=""74%"" class=""statement-detail-prnt"">" & RSTrans("Name_First") & " " & RSTrans("Name_Last") & "</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td width=""26%"" class=""statement-subhds-prnt"">&nbsp;</td>"
 HTML = HTML & "<td width=""74%"" class=""statement-detail-prnt"">" & RSTrans("Address_1") & "</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td width=""26%"" class=""statement-subhds-prnt"">&nbsp;</td>"
 HTML = HTML & "<td width=""74%"" class=""statement-detail-prnt"">" & RSTrans("City") & ", " & RSTrans("State") & ", "
 HTML = HTML & RSTrans("Country") & " " & RSTrans("Zip") & "</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td width=""26%"" class=""statement-subhds-prnt"">Username:</td>"
 HTML = HTML & "<td width=""74%"" class=""statement-detail-prnt"">" & RSTrans("User_Name") & "</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "</table>"
 HTML = HTML & "</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr> "
 HTML = HTML & "<td colspan=""3"" class=""headline-prnt"" bgcolor=""#FFFFFF"">Hotel:</td>"
 HTML = HTML & "</tr>"                                                                  

	Dim SQLEntity, Entity_Name, sqlDetails

	Set RSEntity = Server.CreateObject("ADODB.Recordset")
	SQLEntity = "Select E.Name, ED.Address_1, ED.City, ED.State, ED.Zip From Entity E Inner Join Entity_Detail ED on E.Entity_ID = ED.Entity_ID "
	SQLEntity = SQLEntity & "Where E.Entity_ID = '7476'"
	RSEntity.Open SQLEntity, Conn	
	Entity_Name = RSEntity("Name") & "<br>" & RSEntity("Address_1") & "<br>" & RSEntity("City") & " " & RSEntity("State") & " " & RSEntity("Zip")
	RSEntity.Close()
	Set RSEntity = Nothing
	Set rsDetails = server.CreateObject("ADODB.Recordset")
	sqlDetails = "Select * From Itinerary_Detail_Vars Where Itinerary_ID = '" & rsTrans("Itinerary_ID") & "'"
	rsDetails.Open sqlDetails, Conn				
	Dim FirstDate, LastDate
	FirstDate = CDate(rsDetails("Arrival_Date"))
	LastDate = CDate(DateAdd("d", rsDetails("Stay"), rsDetails("Arrival_Date")))

 HTML = HTML & "<tr><td class=""statement-detail-prnt"" colspan=""2"">" & Entity_Name & "</td></tr>"
 HTML = HTML & "<tr><td colspan=""2"" class=""headline-prnt"">Lodging "
 HTML = HTML & "Reservation:</td></tr>"                                
 HTML = HTML & "<tr bgcolor=""#FFFFFF"">"
 HTML = HTML & "<td colspan=""2"" class=""statement-detail-prnt"">" & WeekDayName(WeekDay(FirstDate), True, 1) & " " & FormatDateTime(FirstDate, 2)& " - "
 HTML = HTML & WeekDayName(WeekDay(LastDate), True, 1) & " " & FormatDateTime(LastDate, 2) & "</td></tr>"

 For q = 0 to (GetTransCount(Itinerary_ID))
 HTML = HTML & "<tr bgcolor=""#FFFFFF"">"
 HTML = HTML & "<td colspan=""2"" class=""statement-detail"">" & RoomType(Itinerary_ID, q, 7476) & "</td>"
 HTML = HTML & "<td width=""20%"" class=""statement-detail-prnt"">" & FormatCurrency(GetCostByTrans(Itinerary_ID, q)) & "</td>"
 HTML = HTML & "</tr>"
 Next
 HTML = HTML & "<tr bgcolor=""#FFFFFF"">" 
 HTML = HTML & "<td colspan=""2"" class=""statement-detail-prnt"" height=""9"">Sales" 
 HTML = HTML & "&amp; Room Tax</td>"
 HTML = HTML & "<td width=""20%"" class=""statement-detail-prnt"" height=""9"">" & FormatCurrency(CCur(LodgingTax(Itinerary_ID))) & "</td>"
 HTML = HTML & "</tr>"
 HTML = HTML & "<tr bgcolor=""#FFFFFF"">" 
 HTML = HTML & "<td class=""statement-subhds"" bgcolor=""#FFFFFF"" height=""17"" width=""37%"">&nbsp;</td>"
 HTML = HTML & "<td class=""statement-subhds-prnt"" bgcolor=""#FFFFFF"" height=""17"" width=""43%"">Total" 
 HTML = HTML & "Charged to your Account:</td>"
 HTML = HTML & "<td width=""20%"" class=""statement-subhds-prntTTL"" bgcolor=""#FFFFFF"" height=""17"">" & FormatCurrency(CCur(CartTotalwTax(Itinerary_ID))) & "</td>"
 HTML = HTML & "</tr>"                                 
 HTML = HTML & "</table>"
 HTML = HTML & "</body>"
 HTML = HTML & "</html>"
 
 set RSUser = Server.CreateObject("ADODB.Recordset")
 sqlUser = "Select * From Contact_Detail CD Inner Join Users U on CD.Contact_ID = U.Contact_ID Where U.User_ID = '" & RSItin("Contact_ID") & "'"
 RSUser.Open sqlUser, Conn
 
     Dim myMail
     Set myMail = Server.CreateObject("CDONTS.NewMail")
 
     myMail.Subject="Tropical Palms RV FunResort Reservation Receipt"
 
       myMail.From="reservations@arrivares.com"
       myMail.Body=HTML
       myMail.BodyFormat=0
       myMail.MailFormat=0
       myMail.To = RSUser("Email_Home")
       'myMail.To = "shadow@empnet.com"
 	  myMail.Bcc = "roger@encorefl.com"
     myMail.Send
     set mymail=nothing
 End If
 'ResetSession()
 
 %>
<html>
	
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript" src="/js/menu-script.js">
<!--




<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
//-->
		</script>
<link rel="stylesheet" href="/Style-sheets/tropical-1.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/tropical-1.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/headline.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/atrraction-set.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/arrivares.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/arrivares.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/atrraction-set.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/headline-large.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/atrraction-set.css" type="text/css">
<link rel="stylesheet" href="/Style-sheets/headline.css" type="text/css">
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body bgcolor="#000000" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/menu/resort-amentites-dim.gif','images/menu/cottages-dim.gif','images/menu/attractions-dim.gif','images/menu/events-dim.gif','images/menu/contact-us-dim.gif','images/menu/reservations-dim.gif','images/menu/home-dim.gif','/images/menu/resort-amentites-dim.gif','/images/menu/cottages-dim.gif','/images/menu/attractions-dim.gif','/images/menu/events-dim.gif','/images/menu/contact-us-dim.gif','/images/menu/reservations-dim.gif','/images/menu/home-dim.gif')">
<table width="650" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#7BB8B9" class="main-table-space">
  <tr> 
    <td colspan="2"><img src="/images/header-composite.jpg" width="650" height="76"></td>
  </tr>
  <tr> 
    <td width="120" valign="top"> 
      <table width="120" border="0" cellspacing="0" cellpadding="0" height="100%">
        <tr> 
          <td background="/images/menu-121.gif" height="266" valign="top"> 
            <!--#include virtual="/includes/menu.asp" -->
          </td>
        </tr>
        <tr> 
          <td background="/images/menu/menu-121-palm.gif" height="122">&nbsp; </td>
        </tr>
      </table>
    </td>
    <td width="531" align="center" valign="top"> 
      <table width="520" border="0" cellspacing="0" cellpadding="0" bgcolor="#DCECED">
        <tr> 
          <td width="15" align="left" valign="top" class="tableSpace"><img src="/images/conerUL.gif" width="14" height="15"></td>
          <td width="494" class="tableSpace">&nbsp;</td>
          <td width="16" valign="top" align="right" class="tableSpace"><img src="/images/conerUR.gif" width="15" height="14"></td>
        </tr>
        <tr align="center" valign="top"> 
          <td colspan="3">
            <table width="495" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td width="509">&nbsp;</td>
              </tr>
              <%If RSItin("Response_Code") = "1" Then%>
              <tr> 
                <td class="headline" width="509" align="center">Success!</td>
              </tr>
              <tr> 
                <td width="509">&nbsp;</td>
              </tr>
              <tr> 
                <td width="509" height="178"><span class="body-copy-blue">Payment 
                  has been received and your reservation is now confirmed. A detailed 
                  lodging itinerary and receipt has been sent to the E-mail address 
                  provided in your reservation. <br>
                  <br>
                  Should you have any question about your reservations, please 
                  call our Customer Service Representatives at 800-647-2567 (Monday 
                  - Friday 8 am to 7 pm EST, Saturday &amp; Sunday 9 am to 5 pm 
                  EST). To enable us to help you faster, please have the Reservation 
                  # shown on your Itinerary available.</span><br>
                  <br>
                  <a href="#" onClick="MM_openBrWindow('documents/cc-receipt-print.asp?Transaction_ID=<%=Request("Transaction_ID")%>&Itinerary_ID=<%=Request("Itinerary_ID")%>&UserID=<%=RSItin("Contact_ID")%>','ccprint','scrollbars=yes,width=515')" class="body-copy-blue">If 
                  you'd like to print a receipt now, please Click Here.</a></td>
              </tr>
              <tr> 
                <!--<td width="17%" height="25"><a href="main-itinerary-edit.asp">Click 
                  Here to return to your Travel Planner.</a></td>-->
              </tr>
              <%Else%>
              <tr> 
                <td width="509" height="69" class="body-copy-blue">While processing 
                  your request, we encountered the following problem:<br>
                  <br>
                  <span class="headline-bold"><%=RSItin("Response_Reason_Text")%><br>
                  <br>
                  </span><span class="body-copy-blue">Should you have any question 
                  or need further information, please call our Customer Service 
                  Representatives at 800-647-2567 (Monday - Friday 8 am to 7 pm 
                  EST, Saturday &amp; Sunday 9 am to 5 pm EST).</span><span class="headline-bold"> 
                  </span></td>
              </tr>
              <tr> 
                <td width="509" height="25"> 
                  <div onClick="history.go(-2)" style="{cursor: hand}" class="body-copy-blue">Please 
                    click Here to return to your transaction and try again.</div>
              </tr>
              <%End If%>
            </table>
          </td>
        </tr>
        <tr> 
          <td width="15" align="left" valign="bottom" class="tableSpace"><img src="/images/conerLL.gif" width="15" height="14"></td>
          <td width="494" class="tableSpace">&nbsp;</td>
          <td width="16" align="right" valign="bottom" class="tableSpace"><img src="/images/conerLR.gif" width="15" height="15"></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td colspan="2"> <img src="/images/footer-650.jpg" width="650" height="33"> 
    </td>
  </tr>
</table>
</body>
</html>
