<?php 

function debit_user_cb() {
	$email = "";
	if(isset($_GET['id'])) {
		$user = new user;
		$email = $user->get_user_meta($_GET['id'])['email'];
	}
	$email = isset($_GET['e']) ? $_GET['e'] : $email;
	?>
	<div class="row">
		<div class="col-md-6">
			<div class="card">
			    <div class="card-header">
			        <strong class="card-title">Enter Details of Debit</strong>
			    </div>
			    <div class="card-body">
			      	<form id="debit-user-form" method="post" enctype="multipart/form-data" action="contents/plugins/payment_module/ajax.php" data-clearform="true">
			      		<?php input(['label' => apply_filters('pm_credit_user_email', 'Email'), 'id' => 'username', 'required' => 'required', 'value' => $email]); ?>
			      		<div id="verify-username"></div>
			      		<input type="hidden" id="user_id" name="user_id" value="" required="">
			      		<?php 
			      			input(['label' => 'Amount ('.get_option('default_currency').')', 'id' => 'amount', 'class' => 'form-control numbers-only', 'required' => 'required']);
			      			textarea(['label' => 'Narration', 'id' => 'narration', 'required' => 'required']); 
			      			alert(); submit_btn("debit_user", "Submit"); 
			      		?>
			      	</form>
			    </div>
			</div>
		</div>
	</div>
	<?php
	global $post_meta;
	add_page_javascript('contents/plugins/payment_module/js/credit-user.js');
	add_page_javascript('app/assets/js/page-scripts/submit.js');
	add_page_javascript('app/assets/js/page-scripts/koweb.js');
	do_action("pm_quick_menu");
}