HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/web/coventrydemolition/2020-10-05/common prev/inc-template-account.asp
<%
' === COMMON TEMPLATE (SAME FOR ALL SHOPPING SITES) ===

' (SS,13/02/08) removed bold from Postcode, no longer a required field
' (SS,12/11/08) added bold for Postcode back in
' (SS,03/03/09)? Jeets adds lots of bgcolor="#FFFFFF" for white background on petfood site
' (SS,17/04/09) added Mobile if enabled
' (SS,28/05/09) removed Retype Email
' (SS,11/06/09) reduced occurrences of bgcolor="#FFFFFF" by only placing them where required i.e. <table>'s rather than <td>'s where possible, reduced from 20 to 13 occurrences
' (SS,15/06/09) replaced bgcolor="#FFFFFF" with class="account_bkd"
' (SS,23/06/09) added GetVATNumberHelpMessage to VATNumber
' (SS,18/03/10) added language translation using calls to tr function
' (SS,07/05/10) replaced buttons with calls to GetButton..
' (SS,25/02/11) minor correction to add space after thank you and before company name
' (SS,20/06/11) removed all class="form" from form controls
' (SS,16/02/12) replaced 4 references to products.asp?page=account with GetPageLink("account") for development purposes and because it's better anyway
' (SS,18/06/12) text change to Sub ShowForgotPasswordThankYou, added reset password routines including Sub ShowResetPasswordForm, 
' (SS,13/07/12) change to ShowAccountLogoutSuccess, My Account button becomes Your Account
' (SS,13/09/12) changed GetButtonMyAccount to GetButtonYourAccount
' (SS,08/03/13) added APackedBy, ADateDespatched, ACourier,  ATrackingNo, ATrackingURL to ShowAccountPreviousOrdersDetail
' (SS,13/11/13) change to ShowAccountPreviousOrdersHeader and ShowAccountPreviousOrdersDetail to only show despatch details if new parameter AShowDespatchDetails is True
' (SS,20/12/13) added class="form-hint" to VAT help hint and changed size of field from 30 to 20
' (SS,09/09/14) changes to work with Bootstrap 3 framework
' (SS,01/03/14) replaced all & in URLs with &amp; to pass W3C validation
' (SS,04/04/17) added jquery code to hide/show VAT Number field depending on whether country is UK or not
' (SS,24/08/17) change to ShowResetPasswordForm added Server.HTMLEncode to both Request.QueryString variables to prevent xss
' (SS,23/05/18) added Sub ShowSubscribeHeader and Sub ShowSubscribeFooter

' --- START OF ACCOUNT LOGIN TEMPLATES --- '
' (SS,13/6/11) added following to show header and the container div, page title passed here from other header routines
Sub ShowAccountHeader(APageTitle)
  ShowPageTitle tr(APageTitle)
%>  
<div id="account">
<%
End Sub

' (SS,13/6/11)
Sub ShowAccountFooter
%>
</div> <!-- end #account -->
<%
End Sub

' (SS,13/6/11) replaced "ShowPageTitle(tr(" with ShowAccountHeader
Sub ShowAccountLoginHeader(AAlreadyLoggedIn)
  If AAlreadyLoggedIn Then
    ShowAccountHeader("Your Account")  ' (SS,30/5/07) changed from "Account Details"
  Else
    ShowAccountHeader("Log in")         ' (SS,30/5/07) changed from "Account Holder Login", also changed "Login" to "Log in"
  End If
End Sub

' (SS,15/6/11)
Sub ShowAccountLogoutHeader
  ShowAccountHeader("Log out") 
End Sub

' (SS,16/2/12) replaced 2 references to products.asp?page=account with GetPageLink("account") for development purposes and because it's better anyway
Sub ShowAccountLoginMain(AErrorMessage)
%>
<div class="row">

<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">  
  <form name="frmAccountLoginMain" role="form" method="post" action="<%=GetPageLink("account")%>">

  <div class="panel panel-default">  
    <div class="panel-heading"><%=tr("Existing Customers")%></div>
    <div class="panel-body">

<%  
  SetFormControlsLabelWidth 0 ' default to 0 for following controls, i.e. not horizontal
  ShowFormControl "email", "Email", "Email address", Request.Form("Email"), "Enter email address", "100", True, "", ""
  ShowFormControl "password", "Password", "Password", "", "Enter password", "20", True, "", "onKeyPress=""itp_submit_login(event)"""
  If AErrorMessage <> "" Then
    ShowAlertMesssage "danger", AErrorMessage
  End If  
%>
      <div class="form-group">
         <%=GetButtonLogin%>
         &nbsp;&nbsp;<a href="<%=GetPageLink("account")%>&amp;cmd=forgotpassword"><%=tr("Forgot Password")%>?</a>
      </div>
    </div>
  </div>
      
  </form>
</div><!--col-->

<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
  <div class="panel panel-default">  
    <div class="panel-heading"><%=tr("New Customers")%></div>
    <div class="panel-body"><p><%=tr("Welcome to")%>&nbsp;<%=GetStoreName%></p>
      <p><%=tr("Creating an account is simple and only takes a few minutes. You will be able to store you delivery details for quick orders in the future.")%><p>
      <%=GetButtonCreateAccount%>
    </div>
  </div>
  
</div><!--col-->

</div><!--row-->  
<%
End Sub

' (SS,12/3/13) updated the text
Sub ShowAccountDetails(AAlreadyLoggedIn)  ' (SS,14/8/05) was called ShowAccountLoginSuccess
  If Not AAlreadyLoggedIn Then
%>
  <p><%=tr("Welcome")%>&nbsp;<strong><%=Session("AccountName")%></strong>.&nbsp;<%=tr("You have successfully logged in")%>.</p>          

  <p><%=tr("For order info - see the order history table and the <b>Order Status</b> and despatch fields")%>.<br />
  <%=tr("For order details - click on the <b>Order Ref</b> link to view and print the order")%>.<br />
  <%=tr("For reordering - click on the Order Ref link to view the order and click the <b>Buy</b> button against the products to be reordered")%>.<br />
  <%=tr("To update account info - click on the <b>Edit account</b> details button")%>.</p>
  
<%
  End If
End Sub

' (SS,15/6/11) tidied including removing two tables and class="account_bkd", and <br>'s
' (SS,13/9/12) changed GetButtonMyAccount to GetButtonYourAccount
Sub ShowAccountLogoutSuccess
%>
<p><%=tr("Goodbye")%> <b><%=Session("AccountName")%></b>.</p>
<p><%=tr("You have successfully logged out")%>.</p>
<p><%=tr("Thank you for your visit")%>.</p>
<%=GetButtonYourAccount%></a>
<%
End Sub

' (SS,13/6/11) now calls ShowAccountFooter
Sub ShowAccountLoginFooter
  ShowAccountFooter
End Sub

' (SS,15/6/11)
Sub ShowAccountLogoutFooter
  ShowAccountFooter
End Sub

' --- START OF FORGOT PASSWORD TEMPLATES --- '
Sub ShowForgotPasswordHeader
  ShowAccountHeader(tr("Forgot Password"))
End Sub

' (SS,15/6/11) tidied, removed tables, class="account_bkd", etc.
' (SS,16/2/12) replaced reference to products.asp?page=account with GetPageLink("account") for development purposes and because it's better anyway
' (SS,19/6/12) added text "in the box below" after "Please enter your email address"
' Added new text "We will send you an email containing a link you can follow to reset your password" 
Sub ShowForgotPasswordForm(AErrorMessage)
If AErrorMessage <> "" Then
%>
<p class="errormessage"><%=AErrorMessage%></p>
<%
End If
%>
<p><%=tr("Please enter your email address in the box below")%>.</p>
<p><%=tr("This should be the email address you used to create your account")%>.</p>
<p><%=tr("We will send you an email containing a link you can follow to reset your password")%>.</p>

<form name="frmForgotPassword" method="post" action="<%=GetPageLink("account")%>&amp;cmd=forgotpassword" class="nospace">
<%=tr("Email Address")%>:
<input type="text" name="Email" value="<%=HTMLEncode(Request.Form("Email"))%>" size="30" maxlength="100">
<%=GetButtonSubmitForgotPassword%>
<input type="hidden" name="postform" value="yes">
</form>
<%
End Sub

' (SS,15/6/11) tidied, removed table, etc.
' (SS,18/6/12) replaced tr("Your password has been emailed to you") with ("Password reset details have been emailed to you")
Sub ShowForgotPasswordThankYou
%>
<p><%=tr("Thank you for your request")%>.</p>
<p><%=tr("Password reset details have been emailed to you")%>.</p>
<%
End Sub

Sub ShowForgotPasswordFooter
  ShowAccountFooter
End Sub

' --- END OF FORGOT PASSWORDS TEMPLATES --- '


' --- START OF RESET PASSWORD TEMPLATES --- '
' (SS,18/6/12)
Sub ShowResetPasswordHeader
  ShowAccountHeader(tr("Reset Password"))
End Sub

' (SS,18/6/12)
' (SS,24/8/17) added Server.HTMLEncode to both Request.QueryString variables to prevent xss
Sub ShowResetPasswordForm(AErrorMessage, AMessage, AShowForm)

If AErrorMessage <> "" Then
%>
<p class="errormessage"><%=AErrorMessage%></p>
<%
End If

If AMessage <> "" Then
%>
<p><%=AMessage%></p>
<%
End If

If AShowForm Then
%>
<p><%=tr("Please enter your new password")%>.</p>

<form name="frmResetPassword" method="post" action="<%=GetPageLink("account")%>&amp;cmd=rp&amp;id=<%=Server.HTMLEncode(Request.QueryString("id"))%>&key=<%=Server.HTMLEncode(Request.QueryString("key"))%>" class="nospace">

<table class="create-account">
  <tr>
    <td><b><%=tr("Password")%>:</b></td>
    <td><input name="Password" type="password" size="30">
      <span class="form-hint"><%=tr("5 characters or more")%></span></td>
  </tr>
  <tr>
    <td><b><%=tr("Retype Password")%>:</b></td>
    <td><input name="Password2" type="password" size="30"></td>
  </tr>
</table>
<p></p>
<%=GetButtonSubmitResetPassword%>
<input type="hidden" name="postform" value="yes">

</form>
<%
End If

End Sub

Sub ShowResetPasswordFooter
  ShowAccountFooter
End Sub

' --- END OF RESET PASSWORD TEMPLATES --- '


' --- START OF CREATE ACCOUNT TEMPLATES --- '
' (SS,14/6/11) added ANew parameter
Sub ShowCreateAccountHeader(ANew)
  ' ShowPageTitle(tr("Create an account"))
  ' (SS,14/6/11) replaced above with following
  If ANew Then
    ShowAccountHeader("Create an account")
  Else
    ShowAccountHeader("Edit account details")
  End If
End Sub

' (SS,5/6/07) added ANew parameter
' (SS,5/5/10) modified to use text instead of Gifs
' (SS,15/6/11) tidied, including removing table used by header
' removed bgcolor="#F0F0F0" from main table
' (SS,16/2/12) replaced reference to products.asp?page=account with GetPageLink("account") for development purposes and because it's better anyway
' (SS,19/6/12) password fields now only shown if creating a new account, not when editing existing account
' (SS,9/9/14) modified for RWD/Bootstrap, removed heading shown here, not necessary Response.Write tr("Create an account") & "&nbsp; / &nbsp;" & tr("New customers") / Response.Write tr("Edit account details")
Sub ShowCreateAccountForm(ANew, AErrorMessage)
%>

<div class="row">

<div class="col-lg-8 col-md-8 col-sm-10 col-xs-12">  

  <form name="frmCreateAccount" class="form-horizontal" role="form" method="post" action="<%=GetPageLink("account")%>&amp;cmd=<%=IIf(ANew,"create", "update")%>">

<%
  If AErrorMessage <> "" Then
    ShowAlertMesssage "danger", AErrorMessage
  End If
%>
  <div class="panel panel-default">  
    <div class="panel-heading"><%=tr("Personal Information")%></div>
    <div class="panel-body">
 <%
  SetFormControlsLabelWidth 4 ' default to 3 for following controls

  ShowFormControl "select", "Title", "", "", "", "", True, "", ""
  ShowFormControl "text", "FirstName", "First Name", Session("FirstName"), "Enter first name", "50", True, "", ""
  ShowFormControl "text", "Surname", "Surname", Session("Surname"), "Enter surname name", "50", True, "", ""
  ShowFormControl "text", "CompanyName", "Company Name", Session("CompanyName"), "Enter company name (optional)", "50", True, "", ""
  ShowFormControl "text", "Address1", "Address Line 1", Session("Address1"), "Enter first line of address", "50", True, "", ""
  ShowFormControl "text", "Address2", "Address Line 2", Session("Address2"), "Enter second line of address", "50", True, "", ""
  ShowFormControl "text", "Town", "Town / City", Session("Town"), "Enter town or city", "50", True, "", ""
  ShowFormControl "text", "County", "County / State", Session("County"), "Enter county, state or region", "50", True, "", ""
  ShowFormControl "text", "Postcode", "Postcode / ZIP", Session("Postcode"), "Enter postcode or ZIP", "20", True, "", ""
  ShowFormControl "select", "Country", "", "", "", "", True, GetImportantCountryMessage, "" 

  If IsVATZeroForIntraCommunity Then
    ShowFormControl "text", "VATNumber", "VAT Number", Session("VATNumber"), "Enter VAT Number (optional)", "50", True, GetVATNumberHelpMessage, ""
    AddVATNumberValidationHTML
  End If  
  
  ' (SS,3/4/17) change label to "Mobile"
  ShowFormControl "text", "Telephone", "Mobile", Session("Telephone"), "Enter mobile number", "50", True, "", ""
  
  If MobileEnabled Then
    ShowFormControl "text", "Mobile", "Mobile", Session("Mobile"), "Enter mobile number", "50", True, "to receive delivery details via SMS", ""
  End If
  
  ShowFormControl "select", "HearAboutUs", "Hear about us", "", "", "", True, "", ""
  ShowFormControl "checkbox", "Subscribe", "Please subscribe me to your newsletter and offers", Session("Subscribe"), "", "", True, "", ""
  %>
    </div><!--panel-body-->
  </div><!--panel-->
  <%
  If AllowDifferentDeliveryAddress Then
    %>
  <div class="panel panel-default">  
    <div class="panel-heading"><%=tr("Delivery Information")%></div>
    <div class="panel-body">    
    <%
    ShowFormControl "checkbox", "DeliveryAddressSameAsInvoice", "Delivery address is the same as the billing address", Session("DeliveryAddressSameAsInvoice"), "", "", True, "", ""
    
    ShowFormControl "text", "DeliveryName", "Delivery Name", Session("DeliveryName"), "Enter full name (title, first name, surname)", "50", True, "", ""
    ShowFormControl "text", "DeliveryCompanyName", "Delivery Company", Session("DeliveryCompanyName"), "Enter company name (optional)", "50", True, "", "" 
    ShowFormControl "text", "DeliveryAddress1", "Delivery Address Line 1", Session("DeliveryAddress1"), "Enter first line of address", "50", True, "", ""
    ShowFormControl "text", "DeliveryAddress2", "Delivery Address Line 2", Session("DeliveryAddress2"), "Enter second line of address", "50", True, "", ""
    ShowFormControl "text", "DeliveryTown", "Delivery Town / City", Session("DeliveryTown"), "Enter town or city", "50", True, "", ""
    ShowFormControl "text", "DeliveryCounty", "Delivery County / State", Session("DeliveryCounty"), "Enter county, state or region", "50", True, "", ""
    ShowFormControl "text", "DeliveryPostcode", "Delivery Postcode / ZIP", Session("DeliveryPostcode"), "Enter postcode or ZIP", "20", True, "", ""
    ShowFormControl "select", "DeliveryCountry", "Delivery Country", "", "", "", True, GetImportantCountryMessage, ""
    %>
    </div><!--panel-body-->
  </div><!--panel-->
  <%
  End If
  %>

  <div class="panel panel-default">    
    <div class="panel-heading"><%=tr("Login Information")%></div>
    <div class="panel-body">
  <%
  ShowFormControl "email", "Email", "Email", Session("Email"), "Enter email address", "100", True, "", ""

  If ANew Then
    ShowFormControl "password", "Password", "Password", Session("Password"), "Enter password (5 characters or more)", "20", True, "", ""
    ShowFormControl "password", "Password2", "Retype Password", Session("Password2"), "Retype password", "20", True, "", ""
  End If
 
%>  
    </div><!--panel body-->
  </div><!--panel-->
  <div class="pull-right">
  <%=GetButtonSubmitCreateAccount%>
  </div>
  <input type="hidden" name="postform" value="yes">
  </form>
</div><!--column-->
</div><!--row-->

<script>
// (SS,4/4/17) added following to show VAT Number field if not UK, not shown for UK
// same code also exists in inc-template-checkout.asp
$(document).ready(function() {
  itp_show_hide_VAT_field();
});

$('select[id="Country"]').on('change',function() {
  itp_show_hide_VAT_field();
});

function itp_show_hide_VAT_field()
{
  if ($('select[id="Country"]').val()=="United Kingdom")
    $('#VATNumber').parents('.form-group').hide()
  else
    $('#VATNumber').parents('.form-group').show();
}
</script>
<%
End Sub

' (SS,20/6/11) removed table
Sub ShowCreateAccountThankYou
%>
<p><strong><%=tr("Thank you for creating an account with us")%>.</strong></p>
<%
End Sub

' (SS,20/6/11) removed table
Sub ShowUpdateAccountThankYou
%>
<p><strong><%=tr("Your account has been updated")%>.</strong></p>
<%
End Sub

Sub ShowCreateAccountFooter
  ShowAccountFooter
End Sub

' --- END OF CREATE ACCOUNT TEMPLATES --- '

' (SS,5/6/07) added AOrdersExist parameter
' (SS,15/6/11) added class="ac-details" and <col class="ac-details-col1"></col>
' font-weight cannot be used in a <col>
' (SS,8/3/13) added Packed By, Date Despatched, Courier,  Tracking No to ordre history table header
' (SS,13/11/13) added parameter AShowDespatchDetails and added "if" to ensure Packed By, Date Despatched, Courier and Tracking No are only shown when AShowDespatchDetails is True 
' (SS,9/9/14) improved for RWD/Bootstrap
Sub ShowAccountPreviousOrdersHeader(AOrdersExist, AAccountID, AAccountName, AEmailAddress, AShowDespatchDetails)
%>
<table class="table table-responsive">
  <tr>
    <th nowrap width="0%"><%=tr("Account ID")%>&nbsp;</th>
    <td width="100%"><%=AAccountID%></td>
  </tr>
  <tr>
    <th><%=tr("Name")%>&nbsp;</th>
    <td><%=AAccountName%></td>
  </tr>
  <tr>
    <th nowrap><%=tr("Email Address")%>&nbsp;</th>
    <td><%=AEmailAddress%></td>
  </tr>
</table>

<form class="form-inline">
  <div class="form-group">
    <%=GetButtonLogOut%>&nbsp;
  </div>
  <div class="form-group">
    <%=GetButtonEditAccount%>&nbsp;
  </div>
  <div class="form-group">
    <%=GetButtonContinueShopping%>
  </div>
<%If Not IsBasketEmpty Then%>
  <div class="form-group">
&nbsp;<%=GetButtonProceedToCheckout%>
  </div>
<%End If%>
</form>

<%If AOrdersExist Then%>
<div class="panel panel-default" style="margin-top: 10px">
  <div class="panel-heading"><%=tr("Order History")%></div>
</div>
<table class="table table-responsive">
<tr>
<th><%=tr("Order Ref")%></th>
<th><%=tr("Date of Order")%></th>
<th style="text-align:right"><%=tr("Total")%>&nbsp;</th>
<th><%=tr("Order Status")%></th>
<%If AShowDespatchDetails Then%>
<th><%=tr("Packed By")%></th>
<th><%=tr("Date Despatched")%></th>
<th><%=tr("Courier")%></th>
<th><%=tr("Tracking No")%></th>
<%End If%>
</tr>
<%End If%>
<%
End Sub

' (SS,8/3/13) added APackedBy, ADateDespatched, ACourier,  ATrackingNo, ATrackingURL
' (SS,13/11/13) added parameter AShowDespatchDetails and added "if" to ensure Packed By, Date Despatched, Courier and Tracking No are only shown when AShowDespatchDetails is True
Sub ShowAccountPreviousOrdersDetail(AOrderNo, ADateOfOrder, ATotal, AStatus, AHRef, AShowDespatchDetails, APackedBy, ADateDespatched, ACourier, ATrackingNo, ATrackingURL)
  Dim LTrackingHTML
  If ATrackingURL = "" Then
    LTrackingHTML = ATrackingNo
  Else
    LTrackingHTML = "<a href=""" & ATrackingURL & """>" & ATrackingNo & "</a>"
  End If
%>
<tr>
<td><a href="<%=AHRef%>"><%=AOrderNo%></a></td>
<td><%=ADateOfOrder%></td>
<td style="text-align:right"><%=ATotal%>&nbsp;</td>
<td><%=tr(AStatus)%></td>
<%If AShowDespatchDetails Then%>
<td><%=APackedBy%></td>
<td><%=ADateDespatched%></td>
<td><%=ACourier%></td>
<td><%=LTrackingHTML%></td>
<%End If%>
</tr>
<%
End Sub

' (SS,5/6/07) added AOrdersExist parameter
Sub ShowAccountPreviousOrdersFooter(AOrdersExist)
%>
<%If AOrdersExist Then%>
</table>
<%End If%>
<%
End Sub

' --- END OF ACCOUNT LOGIN TEMPLATES --- '

' (SS,23/5/18) added following here because accounts page is used for this 
Sub ShowSubscribeHeader
  ShowAccountHeader(tr("Subscription"))
End Sub

' (SS,23/5/18) added following here because accounts page is used for this 
Sub ShowSubscribeFooter
  ShowAccountFooter
End Sub
%>