
<script type="text/javascript">
 $(document).ready(function() {


     $("#cc_processor").click(function () {

                $("#cc_processor_data").show(100);
             });

	// validate the comment form when it is submitted

	// validate signup form on keyup and submit
	$("#frmUsers").validate({
		rules: {
			fname: {
                          	required: true
			},
                        lname: {
                          	required: true
			},
                        email: {
                          	required: true
			},
                        add1: {
                          	required: true
			},
                        city: {
                          	required: true
			},
                        state: {
                          	required: true
			},
                        zip: {
                          	required: true
			},
                        ccno: {
                        required: true
                        },
			cvv: {
				required: true

			}
		},
		messages: {
                        fname: {
				required: "Required"

			},
                        lname: {
				required: "Required"

			},
                         email: {
				required: "Required"

			},
                         add1: {
				required: "Required"

			},
                         city: {
				required: "Required"

			},
                         state: {
				required: "Required"

			},
                         zip: {
				required: "Required"

			},
			ccno: {
				required: "Required"

			},
			cvv: {
				required: "Required"

			}

		}
	});



$("#frmUsers").submit(function (){



var yr1;
var mon1;
var dt1;
dt1=1;

yr1 = $("#expY").val();

mon1 = $("#expM").val();



   var date1 = new Date(yr1, mon1, dt1);
   var date2 = new Date();

   var error ='';
   var email= $("#email").val();
  if(date1<date2)
  {
      error = 'Invalid Expiry Date \n';
     
  }

   var re = /^[a-zA-Z0-9\.]+@[A-Za-z0-9]+\.[a-zA-Z]{1,3}$/;
    if(re.test(email)==false)
    {
       error += 'Invalid Email Address \n';
    }


  if(error!='')
      {
          alert(error);
      }

});



 });





 

</script>


<div class="inner_rightpanel" >
    

<div class="bread_crumb" >

 
<div class="clear"></div>
</div>

<div class="content_area_div" >

<div class="content_area"  >
 <h2>Payment Options</h2>
 	
	<div class="col-xs-12 col-sm-1 col-md-2"></div>
	<div class="col-xs-12 col-sm-10 col-md-8">
		<div class="form_main_outer">
			<div class="full_width">
				<?php
				if($this->paypalEnabled) {
				?>
				<div class="col-xs-12 col-sm-6">
					<a title="Paypal" href="<?php echo ConfigUrl::base('default');?>paypal/process/R/<?php echo $this->listId;?>"><img border="0" src="<?php echo ConfigUrl::images();?>paypal.jpg"></a>
				</div>
				<?php
				}
				
				if($this->authorizeEnabled) {
				?>
				<div class="col-xs-12 col-sm-6">
					<a id="cc_processor" title="Credit Card" href="#"><img border="0" src="<?php echo ConfigUrl::images();?>creditcard.jpeg"></a>
				</div>
				<?php
				} 
				echo  $this->message;    ?>
				
			<div class="clearfix"></div>
			</div>
		
		<div class="clearfix"></div>
			asdasd
		<div class="clearfix"></div>
		</div>
	</div>
	<div class="col-xs-12 col-sm-1 col-md-2"></div>
     <div style="display:none;" id="cc_processor_data">
      <div id="cc_processor_data_block">
		<form id="frmUsers" name="frmUsers" action="<?php echo ConfigUrl::base();?>index/creditcard/<?php echo $this->listId;?>/renew" method="POST">
		<h1>Please enter your Credit card info</h1>
		<div class="form_main_inner">
			<div class="row">
				<div class="col-xs-12 col-sm-12">
					<label>First Name On The Card <span class="red">*</span></label>
					<input type="text" class="txt_area" id="fname" name="fname" value="<?php echo $this->fname;?>" maxlength="255">
				</div>
			</div>
		</div>
		<div class="form_main_inner">
			<div class="row">
				<div class="col-xs-12 col-sm-12">
					<label>Last Name On The Card <span class="red">*</span></label>
					<input type="text" class="txt_area" id="lname" name="lname" value="<?php echo $this->lname;?>" maxlength="255">
				</div>
			</div>
		</div>
		<div class="form_main_inner">
			<div class="row">
				<div class="col-xs-12 col-sm-12">
					<label>Email <span class="red">*</span></label>
					<input type="text" class="txt_area" id="email" name="email" value="<?php echo $this->email;?>" maxlength="255">
				</div>
			</div>
		</div>
		<div class="form_main_inner">
			<div class="row">
				<div class="col-xs-12 col-sm-12">
					<label>Address1 <span class="red">*</span></label>
					<input type="text" class="txt_area" id="add1" name="add1" value="<?php echo $this->address;?>" maxlength="255">
				</div>
			</div>
		</div>
		<div class="form_main_inner">
			<div class="row">
				<div class="col-xs-12 col-sm-12">
					<label>Country</label>
					<select name="country" class="txt_area" id="country" >
						<option value="">Select Country</option>
						<?php
						 $selectedCountry    = stripslashes($this->country);
						 if($selectedCountry=="") $countryKey   ="US";
						 else
						 $countryKey = $selectedCountry;
						 global $countries;
						foreach( $countries as $key => $value)
						{
		
						?>
						<option value="<?php echo $key?>" <?php if($key==$countryKey) echo "selected";?>><?php echo $value;?></option>
						<?php
						}
						 ?>
						<option value="undefined">undefined</option>
					</select>
				</div>
			</div>
		</div>
		<div class="form_main_inner">
			<div class="row">
				<div class="col-xs-12 col-sm-12">
					<label>State <span class="red">*</span></label>
					<input type="text" class="txt_area" id="state" name="state" value="<?php echo $this->state;?>" maxlength="255">
				</div>
			</div>
		</div>
		<div class="form_main_inner">
			<div class="row">
				<div class="col-xs-12 col-sm-12">
					<label>City <span class="red">*</span></label>
					<input type="text"  class="txt_area" id="city" name="city" value="<?php echo $this->city;?>" maxlength="255">
				</div>
			</div>
		</div>
		<div class="form_main_inner">
			<div class="row">
				<div class="col-xs-12 col-sm-12">
					<label>ZIP <span class="red">*</span></label>
					<input type="text" id="zip" class="txt_area" name="zip" value="<?php echo $this->zip;?>" maxlength="20">
				</div>
			</div>
		</div>
		<div class="form_main_inner">
			<div class="row">
				<div class="col-xs-12 col-sm-12">
					<label>Card Number <span class="red">*</span></label>
					<input type="text" id="ccno" class="txt_area" name="ccno" maxlength="16">
				</div>
			</div>
		</div>
		<div class="form_main_inner">
			<div class="row">
				<div class="col-xs-12 col-sm-12">
					<label>CVV <span class="red">*</span></label>
					<input type="text" id="cvv" class="txt_area" name="cvv" maxlength="4">
				</div>
			</div>
		</div>
		<div class="form_main_inner">
			<div class="row">
				<div class="col-xs-12 col-sm-12">
					<label>Expiration Date (MM/YYYY)</label>
					<div class="row">
						<div class="col-xs-12 col-sm-6 form_main_inner_L">
							<select name="expM" id="expM" class="txt_area">
							  <?php for($i=1; $i<=12; $i++) { ?>
							  <option>
								  <?php if($i<10){echo '0'.$i; }else {echo $i;}?>
							  </option>
							  <?php                         } ?>		
							</select>
						</div>
						<div class="col-xs-12 col-sm-6">
							<select name="expY" id="expY" class="txt_area">
							  <?php for($i=date('Y'); $i<=(date('Y')+50); $i++) { ?>
							  <option>
								  <?php echo $i;?>
							  </option>
							  <?php } ?>
							  </select>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="form_main_btt_outer">
			<div class="row">
				<div class="col-xs-12 col-sm-12">
					<input type="submit" class="button" name="process" id="process" value="Confirm">
				</div>
			</div>
		</div>
		   
        </form>



     </div>


     </div>







<div class="clear"></div>
</div>


<div class="clear"></div>
</div>



<div class="clear"></div>
</div>

