<link rel="stylesheet" href="<?php echo base_url();?>assets/js/validationEngine.jquery.css" type="text/css" />
<link rel="stylesheet" href="<?php echo base_url();?>assets/css/cust_paginition.css" type="text/css" />
<div id="addMagezine">
			<div class="modal-dialog">
				<div class="modal-content"> 
					<!-- Modal heading -->
					<div class="modal-header">
						<!--  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>-->
						<h4 class="modal-title" align="center">Make Payment</h4>
					</div>
					<!-- // Modal heading END --> 
					<div class="modal-body">
                            <div class="innerAll">
                                <div class="innerLR">
                                    <form class="form-horizontal" role="form" id = "edit_magezine" method = "post" enctype="multipart/form-data" action="<?php echo base_url();?>index.php/subscriber/proceed_payment">
                                        <?php $this->load->view('admin/flashdata_admin'); ?>
                                        <div class="form-group mmar">
                                            <label  class="col-sm-3 control-label text-center">Subscriber Id: </label>
                                            <label  class="col-sm control-label text-center"><?php echo $subscriber_id ?></label>

                                        </div>
                                        <div class="form-group mmar">
                                            <label  class="col-sm-3 control-label text-center">Magazine Id: </label>
                                            <label  class="col-sm control-label text-center"><?php echo $magazine_details ?></label>

                                        </div>
                                        <div class="form-group mmar">
                                            <label  class="col-sm-3 control-label text-center">Magazine Currency: </label>
                                            <label  class="col-sm control-label text-center"><?php echo $currency ?></label>

                                        </div>
                                        <div class="form-group">
                                            <label  class="col-sm-3 control-label text-center">Total Discount Amount: </label>
                                            <label  class="col-sm control-label text-center"><?php echo base64_decode($discount_amount); ?></label>
                                        </div>

                                        <div  class="form-group mmar">
                                            <label  class="col-sm-3 control-label text-center">Magazine Amount: </label>
                                            <label  class="col-sm control-label text-center"><?php echo $magazine_amount ?></label>
                                        </div>
                                        <div class="form-group mmar">
                                            <label  class="col-sm-3 control-label text-center">Total due amount: </label>
                                            <label  class="col-sm control-label text-center"><?php echo $final_amount." ".$currency; ?></label>
                                        </div>
                                        <div class="form-group mmar">
                                            <label  class="col-sm-3 control-label text-center">Payment made by: </label>
                                            <div class="col-sm-9">
                                                <select class="cust_select col-md-12 marl-n validate[required] text-input" id = "subscriber_type" name = "payment_type">
                                                    <option value = "">--Select--</option>
                                                    <option value = "1">Cash</option>
                                                    <option value = "2">Cheque</option>
                                                    <option value = "3">Credit Card</option>
                                                    <option value = "4">Online Transfer</option>
                                                </select>
                                            </div>

                                        </div>

                                        <div class = "form-group mmar" id = "sub_details">

                                        </div>

                                        <input type="hidden" name="subscriber_id" value="<?php echo base64_encode($subscriber_id); ?>" >
                                        <input type="hidden" name="magazine_id" value="<?php echo base64_encode($magazine_details); ?>" >
                                        <input type="hidden" name="currency" value="<?php echo base64_encode($currency); ?>" >
                                        <input type="hidden" name="magazine_amount" value="<?php echo base64_encode($magazine_amount); ?>" >
                                        <input type="hidden" name="discount_amount" value="<?php echo base64_encode($discount_amount); ?>" >
                                        <input type="hidden" name="total_amount" value="<?php echo base64_encode($final_amount); ?>" >
                                        <div class="form-group">
                                            <div class="col-sm-offset-4 col-sm-8">
                                                <button type="submit" class="btn btn-primary" id ="btnSubmit">Submit</button>
                                                <button type="submit" class="btn btn-primary">Cancel</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    <!-- // Modal body END -->
				</div>
			</div>
		</div>
		<script src="<?php echo base_url();?>assets/js/main.js" type="text/javascript"></script>
		<script src="<?php echo base_url();?>assets/js/jquery.validationEngine-en.js" type="text/javascript"></script>
		<script src="<?php echo base_url();?>assets/js/jquery.validationEngine.js" type="text/javascript"></script>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
        <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" />
		
		<script>
		$(document).ready(function() {
			$("#edit_magezine").validationEngine();

            $('#subscriber_type').change(function() {
                var company_name = $('#comp_name').val();
                var guardian_name = $('#guard_name').val();
                $('#sub_details').text('');
                if ($('#subscriber_type').val() == '1') {
                    var html = '<label  class="col-sm-3 control-label text-center">campaign Name: </label>' +
                               '<input type="text" class="form-control" value="" name= "cname"  style="width:360px !important"/> <br>'+
                                '<label  class="col-sm-3 control-label text-center">Location: </label>' +
                                '<input type = "text" class="form-control"  style="width:360px !important" name= "location">';
                    $('#sub_details').html($(html));
                }

                if($('#subscriber_type').val() == '2') {
                    var html = '<label  class="col-sm-3 control-label text-center">Cheque Date: </label>' +
                        '<input type="text" class="form-control validate[required] text-input" value="" name= "cheque_date"  style="width:360px !important" /> <br>'+
                        '<label  class="col-sm-3 control-label text-center">Cheque Number: </label>' +
                        '<input type = "text" class="form-control validate[required] text-input"  style="width:360px !important" name="cheque_num"> <br>' +
                        '<label  class="col-sm-3 control-label text-center">Bank Name: </label>' +
                        '<input type = "text" class="form-control validate[required] text-input"  style="width:360px !important" name="bank_num">';
                    $('#sub_details').html($(html));
                }

                if($('#subscriber_type').val() == '3') {
                    var html = '<label  class="col-sm-3 control-label text-center">Name on credit card: </label>' +
                        '<input type="text" class="form-control validate[required] text-input" value="" name= "cc_name"  style="width:360px !important" /> <br>'+
                        '<label  class="col-sm-3 control-label text-center">Expiry Date: </label>' +
                        '<input type = "text" class="form-control validate[required] text-input"  style="width:360px !important" name="exp_date"> <br>' +
                        '<label  class="col-sm-3 control-label text-center">Issued Bank Name: </label>' +
                        '<input type = "text" class="form-control validate[required] text-input"  style="width:360px !important" name="issue_bank_num">';
                    $('#sub_details').html($(html));
                }

                if($('#subscriber_type').val() == '4') {
                    var html = '<label  class="col-sm-3 control-label text-center">Bank name: </label>' +
                        '<input type="text" class="form-control validate[required] text-input" value="" name= "bank_name"  style="width:360px !important" /> <br>'+
                        '<label  class="col-sm-3 control-label text-center">Online Transaction Id: </label>' +
                        '<input type = "text" class="form-control validate[required] text-input"  style="width:360px !important" name="transaction_id"> <br>' +
                        '<label  class="col-sm-3 control-label text-center">Transaction Date: </label>' +
                        '<input type = "text" class="form-control validate[required] text-input"  style="width:360px !important" name="transaction_date">';
                    $('#sub_details').html($(html));
                }

            });



		});
		</script>
		
