{include file="$template/clientareadetailslinks.tpl"}

		<div class="bigheader">
			<h2>{$LANG.clientareanavchangecc}</h2>
		</div><!-- .bigheader -->

{if $remoteupdatecode}


			<div class="notice notice-success">
				<div class="inside">
					<p>{$remoteupdatecode}</p>
				</div>
			</div>

{else}

{if $successful}

			<div class="notice notice-success">
				<div class="inside">
					<p>{$LANG.changessavedsuccessfully}</p>
				</div>
			</div>

{/if}


{if $errormessage}

			<div class="notice notice-error">
				<div class="inside">
					<p>{$errormessage|replace:'<li>':' &nbsp;#&nbsp; '} &nbsp;#&nbsp;</p>
				</div>
			</div>
{/if}

<form method="post" action="{$smarty.server.PHP_SELF}?action=creditcard">
<input type="hidden" name="submit" value="true" />


  		<div class="feildset">
		
			<div class="col1">
			

				<div>
					<label>
						<span>{$LANG.creditcardcardtype}:</span>
						{$cardtype}
					</label>
				</div>
				
				<div>
					<label>
						<span>{$LANG.creditcardcardnumber}: ({$LANG.required})</span>
						{$cardnum}{if $allowcustomerdelete && $cardtype} &nbsp;&nbsp;&nbsp; <input type="button" value="{$LANG.creditcarddelete}" class="button1 orange2" onclick="window.location='clientarea.php?action=creditcard&delete=true'" />{/if}
					</label>
				</div>
				
				<div>
					<label>
						<span>{$LANG.creditcardcardexpires}:</span>
						{$cardexp}
					</label>
				</div>	
				
				{if $cardissuenum}
				<div>
					<label>
						<span>{$LANG.creditcardcardissuenum}:</span>
						{$cardissuenum}
					</label>
				</div>
				{/if}
				
				{if $cardstart}
				<div>
					<label>
						<span>{$LANG.creditcardcardstart}:</span>
						{$cardstart}
					</label>
				</div>
				{/if}									
				
			
			</div>
			
		</div>

		<div class="bigheader">
			<h2>{$LANG.creditcardenternewcard}</h2>
		</div><!-- .bigheader -->

  		<div class="feildset">
		
			<div class="col1">
			
			
				<div>
					<label>
						<span>{$LANG.creditcardcardtype}:</span>
						<select name="cctype">
						{foreach key=num item=cardtype from=$acceptedcctypes}
						<option{if $cardtype eq $cctype} selected{/if}>{$cardtype}</option>
						{/foreach}
						</select>
					</label>
				</div>
				
				<div>
					<label>
						<span>{$LANG.creditcardcardnumber}:</span>
						<input type="text" name="ccnumber" autocomplete="off" value="{$ccnumber}" />
					</label>
				</div>
				
				<div>
					<label>
						<span>{$LANG.creditcardcardexpires}:</span>
						<select name="ccexpirymonth" id="ccexpirymonth">{foreach from=$months item=month}
<option{if $ccexpirymonth eq $month} selected{/if}>{$month}</option>
{/foreach}</select> / <select name="ccexpiryyear">
{foreach from=$expiryyears item=year}
<option{if $ccexpiryyear eq $year} selected{/if}>{$year}</option>
{/foreach}</select>
					</label>
				</div>	
				
				
				
				 {if $showccissuestart}
				
				<div>
					<label>
						<span>{$LANG.creditcardcardstart}</span>
						<select name="ccstartmonth" id="ccstartmonth">{foreach from=$months item=month}
<option{if $ccstartmonth eq $month} selected{/if}>{$month}</option>
{/foreach}</select> / <select name="ccstartyear">
{foreach from=$startyears item=year}
<option{if $ccstartyear eq $year} selected{/if}>{$year}</option>
{/foreach}</select>
					</label>
				</div>
				
				<div>
					<label>
						<span>{$LANG.creditcardcardissuenum}</span>
						<input type="text" name="ccissuenum" value="{$ccissuenum}" maxlength="3" />
					</label>
				</div>					
			
				
				{/if}
				
				
				<div>
					<label>
						<span>{$LANG.creditcardcvvnumber}</span>
						<input type="text" name="cardcvv" value="{$cardcvv}" maxlength="3" />
					</label>
				</div>				
				
											
			
			
			</div>
			
			<p class="center"><input type="submit" value="{$LANG.clientareasavechanges}" class="button1 color2" /> <input type="reset" value="{$LANG.clientareacancel}" class="button1 color1" /></p>
			
		</div>

</form>

{/if}