		</div>
		<!-- /.content-wrapper -->

		<!-- Main Footer -->
		<footer class="main-footer" style="display: none;">
		<?php echo str_replace('_YEAR_', date('Y'), $this->lang->line('footer_copyright'));?>
		</footer>
	</div>
	<!-- ./wrapper -->

	<!-- REQUIRED SCRIPTS -->
	<!-- jQuery -->
	<script src="<?php echo base_url();?>assets/plugins/jquery/jquery.min.js"></script>
	<!-- Bootstrap -->
	<script src="<?php echo base_url();?>assets/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
	<!-- overlayScrollbars -->
	<script src="<?php echo base_url();?>assets/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
	<!-- bs-custom-file-input -->
	<script src="<?php echo base_url();?>assets/plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script>
	<!-- AdminLTE App -->
	<script src="<?php echo base_url();?>assets/dist/js/adminlte.js"></script>

	<!-- PAGE PLUGINS -->
	<!-- jQuery Mapael -->
	<script src="<?php echo base_url();?>assets/plugins/jquery-mousewheel/jquery.mousewheel.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/raphael/raphael.min.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/jquery-mapael/jquery.mapael.min.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/jquery-mapael/maps/usa_states.min.js"></script>
	<!-- ChartJS -->
	<script src="<?php echo base_url();?>assets/plugins/chart.js/Chart.min.js"></script>
	<script src="<?php echo base_url();?>assets/js/layer/layer.js"></script>
	<script src="<?php echo base_url();?>assets/js/jquery.number.min.js"></script>
	
	<script>
		var js_text_records_per_page = "<?php echo $this->lang->line('js_text_records_per_page');?> ";
		var js_no_matching_records_found = "<?php echo $this->lang->line('js_no_matching_records_found');?> ";
		var js_filtered = "<?php echo $this->lang->line('js_filtered');?> ";
		var js_text_search = "<?php echo $this->lang->line('js_text_search');?> ";
		var js_paginate_first = "<?php echo $this->lang->line('js_paginate_first');?> ";
		var js_paginate_last = "<?php echo $this->lang->line('js_paginate_last');?> ";
		var js_text_prev = "<?php echo $this->lang->line('js_text_prev');?> ";
		var js_text_next = "<?php echo $this->lang->line('js_text_next');?> ";
		var js_text_show_info = "<?php echo $this->lang->line('js_text_show_info');?> ";
		var js_text_show_info_empty = "<?php echo $this->lang->line('js_text_show_info_empty');?> ";
		var js_text_loading = "<?php echo $this->lang->line('js_text_loading');?> ";
		var js_text_processing = "<?php echo $this->lang->line('js_text_processing');?> ";
		var js_text_currency_cny = "<?php echo $this->lang->line('currency_cny_without_symbol');?>";
		var js_text_currency_hkd = "<?php echo $this->lang->line('currency_hkd_without_symbol');?>";
		var js_text_currency_myr = "<?php echo $this->lang->line('currency_myr_without_symbol');?>";
		var js_text_currency_usdt = "<?php echo $this->lang->line('currency_usdt');?>";
		var js_text_currency_thb = "<?php echo $this->lang->line('currency_thb_without_symbol');?>";
		var js_text_currency_sgd = "<?php echo $this->lang->line('currency_sgd_without_symbol');?>";
		var js_text_currency_vnd = "<?php echo $this->lang->line('currency_vnd_without_symbol');?>";
		var js_text_currency_idr = "<?php echo $this->lang->line('currency_idr_without_symbol');?>";
		var js_text_currency_ping = "<?php echo $this->lang->line('currency_ping');?>";
	</script>
	
	<!-- DataTables  & Plugins -->
	<script src="<?php echo base_url();?>assets/plugins/datatables/jquery.dataTables.min.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/jszip/jszip.min.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/pdfmake/pdfmake.min.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/pdfmake/vfs_fonts.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/datatables-buttons/js/buttons.html5.min.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/datatables-buttons/js/buttons.print.min.js"></script>
	<script src="<?php echo base_url();?>assets/plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
	
	<script type="text/javascript">
		var api_url = '<?php echo base_url();?>';
		var is_allowed = true;
		
		// $(document).ready(function() {
			// $('#sound').click(function() {
				// var obj = $('#sound');
				// if(obj.hasClass('volume-up')) {
					// obj.removeClass('volume-up').addClass('volume-mute');
					// $('audio#pop')[0].pause();
				// }
				// else {
					// obj.removeClass('volume-mute').addClass('volume-up');
					// $('audio#pop')[0].play();
				// }
			// });
		// });		
		
		<?php 
		if( ! $this->session->userdata('read_notice')) {
		?>
		// layer.open({
			// type: 2,
			// title: '<?php echo $this->lang->line('js_text_info');?>',
			// area: ['90%', '500px'],
			// shade: 0.8,
			// closeBtn: 0,
			// shadeClose: false,
			// move: false,
			// content: '<?php echo base_url() . 'home/notice/';?>',
			// // end: function(){
				// // layer.open({
					// // type: 2,
					// // title: false,
					// // area: ['90%', '500px'],
					// // shade: 0.8,
					// // closeBtn: 1,
					// // shadeClose: false,
					// // content: '<?php echo base_url() . 'home/notice/2/';?>'
				// // });
			// // }
		// })
		<?php }?>
		
		<?php 
			if($this->session->userdata('read_notice') == 1) {
		?>
		// layer.open({
			// type: 2,
			// title: false,
			// area: ['80%', '500px'],
			// shade: 0.8,
			// closeBtn: 1,
			// shadeClose: false,
			// content: '<?php echo base_url() . 'home/notice/2/';?>',
			// end: function(){
				// layer.open({
					// type: 2,
					// title: false,
					// area: ['80%', '500px'],
					// shade: 0.8,
					// closeBtn: 1,
					// shadeClose: false,
					// content: '<?php echo base_url() . 'home/notice/3/';?>',
					// end: function(){ parent.location.reload(); }
				// });
			// }
		// })
		<?php 
				$this->session->set_userdata('read_notice', 2);
			}
		?>
		
		function topup_page() {
			<?php if($this->session->userdata('member_allowed_topup') AND $this->session->userdata('member_allowed_topup') == 1) {?>
			location.href = api_url + 'topup/'; 
			<?php } else {?>
			layer.alert("<?php echo $this->lang->line('permission_denied');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			<?php }?>
		}
		
		function transfer_page() {
			<?php if($this->session->userdata('member_allowed_transfer') AND $this->session->userdata('member_allowed_transfer') == 1) {?>
			location.href = api_url + 'transfer/'; 
			<?php } else {?>
			layer.alert("<?php echo $this->lang->line('permission_denied');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			<?php }?>
		}
		
		function convert_page() {
			<?php if($this->session->userdata('member_allowed_convert') AND $this->session->userdata('member_allowed_convert') == 1) {?>
			location.href = api_url + 'convert/'; 
			<?php } else {?>
			layer.alert("<?php echo $this->lang->line('permission_denied');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			<?php }?>
		}
		
		function withdrawal_page() {
			<?php if($this->session->userdata('member_allowed_withdraw') AND $this->session->userdata('member_allowed_withdraw') == 1) {?>
			location.href = api_url + 'withdrawal/'; 
			<?php } else {?>
			layer.alert("<?php echo $this->lang->line('permission_denied');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			<?php }?>
		}
		
		function login_password_update() {
			if(is_allowed == true) {
				is_allowed = false;
				
				$.ajax({url: api_url + 'account/login_password_submit/',
					data: $('#login-password-form').serialize(),
					type: 'post',                  
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						if(result == "<?php echo STATUS_200;?>") {
							layer.alert("<?php echo $this->lang->line('profile_change_login_password_successful_message');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
							$("#login-password-form")[0].reset();
						}
						else {
							layer.alert(result, {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
						}	
						
						is_allowed = true;
					},
					error: function (request,error) {
						is_allowed = true;
					}
				});  
			}	
			else {
				layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			}
		}
		
		function security_password_update() {
			if(is_allowed == true) {
				is_allowed = false;
		
				$.ajax({url: api_url + 'account/security_password_submit/',
					data: $('#security-password-form').serialize(),
					type: 'post',                  
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						if(result == "<?php echo STATUS_200;?>") {
							layer.alert("<?php echo $this->lang->line('profile_change_security_password_successful_message');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
							$("#security-password-form")[0].reset();
						}
						else {
							layer.alert(result, {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
						}	
						
						is_allowed = true;
					},
					error: function (request,error) {
						is_allowed = true;
					}
				});  
			}	
			else {
				layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			}	
		}
		
		function get_bank_name(country)
		{
			if(is_allowed == true) {
				is_allowed = false;
				
				$.ajax({url: api_url + 'account/get_bank/' + country + '/',
					type: 'get',                  
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						$('#bank_name').html(result);
						
						is_allowed = true;
					},
					error: function (request,error) {
						is_allowed = true;
					}
				});  
			}	
			else {
				layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			}
		}
		
		$('#bank_account_no').keypress(function(e) {
			var verified = (e.which == 8 || e.which == undefined || e.which == 0) ? null : String.fromCharCode(e.which).match(/[^0-9]/);
			if (verified) {e.preventDefault();}
		});
		
		function profile_update() {
			if(is_allowed == true) {
				is_allowed = false;
				
				$.ajax({url: api_url + 'account/profile_submit/',
					data: $('#profile-form').serialize(),
					type: 'post',                  
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						if(result == "<?php echo STATUS_200;?>") {
							layer.alert("<?php echo $this->lang->line('profile_updated_message');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'}, function (){ location.reload(); });
							
						}
						else {
							layer.alert(result, {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
						}	
						
						is_allowed = true;
					},
					error: function (request,error) {
						is_allowed = true;
					}
				});  
			}	
			else {
				layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			}	
		}
		
		function account_binding_submit() {
			if(is_allowed == true) {
				is_allowed = false;
				
				$.ajax({url: api_url + 'account/account_binding_submit/',
					data: $('#account-binding-form').serialize(),
					type: 'post',                  
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						if(result == "<?php echo STATUS_200;?>") {
							layer.alert("<?php echo $this->lang->line('profile_binding_successful_message');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'}, function (){ location.reload(); });
							
						}
						else {
							layer.alert(result, {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
						}	
						
						is_allowed = true;
					},
					error: function (request,error) {
						is_allowed = true;
					}
				});  
			}	
			else {
				layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			}	
		}
		
		$('#package_type').change(function(e) {
			var new_package = parseFloat($('option:selected', this).attr('data-value'));
			var current_package = parseFloat($('#current_package').val());
			var amt = (new_package - current_package);
			$('#diff_amount').html(amt);
		});
		
		$('#transaction_amount_4').keypress(function(e) {
			var verified = (e.which == 8 || e.which == undefined || e.which == 0) ? null : String.fromCharCode(e.which).match(/[^0-9]/);
			if (verified) {e.preventDefault();}
		});
		
		function buy_submit() {
			if(is_allowed == true) {
				is_allowed = false;
				
				$.ajax({url: api_url + 'buy/submit/',
					data: $('#buy-form').serialize(),
					type: 'post',                  
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						if(result == "<?php echo STATUS_200;?>") {
							layer.alert("<?php echo $this->lang->line('buy_successful_message');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'}, function (){ location.href = api_url + 'buy/'; });
						}
						else {
							layer.alert(result, {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
						}
						
						is_allowed = true;
					},
					error: function (request,error) {
						is_allowed = true;
					}
				});  
			}	
			else {
				layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			}		
		}
		
		function topup_package_submit() {
			if(is_allowed == true) {
				is_allowed = false;
				
				$.ajax({url: api_url + 'buy/topup_package_submit/',
					data: $('#topup-package-form').serialize(),
					type: 'post',                  
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						if(result == "<?php echo STATUS_200;?>") {
							layer.alert("<?php echo $this->lang->line('buy_topup_package_successful_message');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'}, function (){ location.href = api_url + 'buy/topup_package/'; });
						}
						else {
							layer.alert(result, {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
						}
						
						is_allowed = true;
					},
					error: function (request,error) {
						is_allowed = true;
					}
				});  
			}	
			else {
				layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			}		
		}
		
		function register_submit() {
			if(is_allowed == true) {
				is_allowed = false;
				
				$.ajax({url: api_url + 'register/submit/',
					data: $('#register-form').serialize(),
					type: 'post',                  
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						if(result == "<?php echo STATUS_200;?>") {
							layer.alert("<?php echo $this->lang->line('registration_successful_message');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'}, function (){ location.reload(); });
						}
						else {
							layer.alert(result, {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
						}
						
						is_allowed = true;
					},
					error: function (request,error) {
						is_allowed = true;
					}
				});  
			}	
			else {
				layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			}		
		}
		
		function get_downline(id, username) {
			var obj = $('#ht-' + id);
			var num = obj.attr('data-value');
			
			if(num == 1) {
				if(obj.parent().find('.nested:first').attr('data-switch') == 1) {
					obj.parent().find('.nested:first').removeClass('active').attr('data-switch', 0);
					obj.removeClass('caret-down');
				}
				else {
					obj.parent().find('.nested:first').addClass('active').attr('data-switch', 1);
					obj.addClass('caret-down');
				}
			}
			else {
				$.ajax({url: api_url + 'network/downline/' + username + '/',
					type: 'get',                  
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						if(result != '') {
							obj.parent().append(result);
							obj.addClass('caret-down').attr('data-value', 1);
						}
					},
					error: function (request,error) {
					}
				});
			}
		}
		
		$('#transaction_amount_3').keypress(function(e) {
			var verified = (e.which == 8 || e.which == undefined || e.which == 0) ? null : String.fromCharCode(e.which).match(/[^0-9]/);
			if (verified) {e.preventDefault();}
		}).keyup(function(e) {
			var current_rate = parseFloat($('#currency_rate').html());
			var amt = $(this).val();
			var actual_amt = (amt * current_rate);
			$('#actual_amount').html(actual_amt).number(true, 2);
		});
		
		$('#transaction_amount_5').keypress(function(e) {
			var verified = (e.which == 8 || e.which == undefined || e.which == 0) ? null : String.fromCharCode(e.which).match(/[^0-9]/);
			if (verified) {e.preventDefault();}
		}).keyup(function(e) {
			var current_rate = parseFloat($('#currency_rate_2').html());
			var amt = $(this).val();
			var actual_amt = (amt * current_rate);
			$('#actual_amount_2').html(actual_amt).number(true, 2);
		});
		
		function change_payment_method(m_id) {
			var amt = $('#transaction_amount_3').val();
			var amt_2 = $('#transaction_amount_5').val();
			var cny_rate = $('#cny_rate').val();
			var myr_rate = $('#myr_rate').val();
			var usdt_rate = $('#usdt_rate').val();
			var thb_rate = $('#thb_rate').val();
			var sgd_rate = $('#sgd_rate').val();
			var vnd_rate = $('#vnd_rate').val();
			var idr_rate = $('#idr_rate').val();
			var ping_rate = $('#ping_rate').val();
			var ping_rate_pb = $('#ping_rate_pb').val();
			var actual_amt = 0;
			var actual_amt_2 = 0;
			
			if(m_id == 1) {
				$('#currency_rate').html(myr_rate);
				$('#currency_name').html(js_text_currency_myr);
				$('#tf-panel-1').show();
				$('#tf-panel-2').hide();
				actual_amt = (amt * myr_rate);
			}
			else if(m_id == 2) {
				$('#currency_rate').html(myr_rate);
				$('#currency_name').html(js_text_currency_myr);
				$('#tf-panel-1').show();
				$('#tf-panel-2').hide();
				actual_amt = (amt * myr_rate);
			}
			else if(m_id == 3) {
				$('#currency_rate').html(cny_rate);
				$('#currency_name').html(js_text_currency_cny);
				$('#tf-panel-1').show();
				$('#tf-panel-2').hide();
				actual_amt = (amt * cny_rate);
			}
			else if(m_id == 4) {
				$('#currency_rate_2').html(usdt_rate);
				$('#currency_name_1').html(js_text_currency_usdt);
				$('#currency_name_2').html('USDT.TRC20');
				$('#tf-panel-1').hide();
				$('#tf-panel-2').show();
				actual_amt_2 = (amt_2 * usdt_rate);
			}
			else if(m_id == 6) {
				$('#tf-panel-1').show();
				$('#tf-panel-2').hide();
			}
			else if(m_id == 7) {
				$('#currency_rate_2').html(ping_rate_pb);
				$('#currency_name_1').html(js_text_currency_ping);
				$('#currency_name_2').html(js_text_currency_ping);
				$('#tf-panel-1').hide();
				$('#tf-panel-2').show();
				actual_amt_2 = (amt_2 * ping_rate_pb);
			}
			else if(m_id == 11 || m_id == 17) {
				$('#currency_rate').html(idr_rate);
				$('#currency_name').html(js_text_currency_idr);
				
				if(m_id == 17) {
					$('#bank_code_1').hide();
					$('#bank_code_2').show();
				}	
				else {
					$('#bank_code_1').show();
					$('#bank_code_2').hide();
				}
				
				$('#tf-panel-1').show();
				$('#tf-panel-2').hide();
				actual_amt = (amt * idr_rate);
			}
			else if(m_id == 12) {
				$('#currency_rate').html(cny_rate);
				$('#currency_name').html(js_text_currency_cny);
				$('#tf-panel-1').show();
				$('#tf-panel-2').hide();
				actual_amt = (amt * cny_rate);
			}
			else if(m_id == 13 || m_id == 15 || m_id == 19) {
				$('#currency_rate').html(thb_rate);
				$('#currency_name').html(js_text_currency_thb);
				
				if(m_id == 19) {
					$('#bank_code_1').hide();
					$('#bank_code_2').hide();
					$('#bank_code_3').show();
				}	
				else if(m_id == 15) {
					$('#bank_code_1').hide();
					$('#bank_code_2').show();
					$('#bank_code_3').hide();
				}	
				else {
					$('#bank_code_1').show();
					$('#bank_code_2').hide();
					$('#bank_code_3').hide();
				}
				
				$('#tf-panel-1').show();
				$('#tf-panel-2').hide();
				actual_amt = (amt * thb_rate);
			}
			else if(m_id == 14 || m_id == 16) {
				$('#currency_rate').html(vnd_rate);
				$('#currency_name').html(js_text_currency_vnd);
				
				if(m_id == 16) {
					$('#bank_code_1').hide();
					$('#bank_code_2').show();
				}	
				else {
					$('#bank_code_1').show();
					$('#bank_code_2').hide();
				}
				
				$('#tf-panel-1').show();
				$('#tf-panel-2').hide();
				actual_amt = (amt * vnd_rate);
			}
			else if(m_id == 18) {
				$('#currency_rate').html(sgd_rate);
				$('#currency_name').html(js_text_currency_sgd);
				$('#tf-panel-1').show();
				$('#tf-panel-2').hide();
				actual_amt = (amt * sgd_rate);
			}
			
			$('#actual_amount').html(actual_amt).number(true, 2);
			$('#actual_amount_2').html(actual_amt_2).number(true, 2);
		}
		
		function topup_submit() {
			if(is_allowed == true) {
				is_allowed = false;
				
				$.ajax({url: api_url + 'topup/submit/',
					data: $('#topup-form').serialize(),
					type: 'post',                  
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						var arr = result.split('|');
						
						if(arr[0] == "<?php echo STATUS_200;?>") {
							// layer.alert("<?php echo $this->lang->line('topup_successful_message');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'}, function (){ location.reload(); });
							location.href = arr[1];
						}
						else {
							layer.alert(arr[1], {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
						}	
						
						is_allowed = true;
					},
					error: function (request,error) {
						is_allowed = true;
					}
				});  
			}	
			else {
				layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			}	
		}
		
		$('#transaction_amount').keypress(function(e) {
			var verified = (e.which == 8 || e.which == undefined || e.which == 0) ? null : String.fromCharCode(e.which).match(/[^0-9]/);
			if (verified) {e.preventDefault();}
		});
		
		function transfer_submit() {
			layer.confirm('<?php echo $this->lang->line('js_text_confirm_to_proceed');?>', {
				icon: 1, 
				title: '<?php echo $this->lang->line('js_text_info');?>',
				btn: '<?php echo $this->lang->line('js_text_confirm');?>'
			},
			function() {
				if(is_allowed == true) {
					is_allowed = false;
					
					$.ajax({url: api_url + 'transfer/submit/',
						data: $('#transfer-form').serialize(),
						type: 'post',                  
						async: 'true',
						beforeSend: function() {
							$('.loading').show();
						},
						complete: function() {
							$('.loading').hide();
						},
						success: function (result) {
							if(result == "<?php echo STATUS_200;?>") {
								layer.alert("<?php echo $this->lang->line('transfer_successful_message');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'}, function (){ location.href = api_url + 'transfer/index/'; });
							}
							else {
								layer.alert(result, {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
							}	
							
							is_allowed = true;
						},
						error: function (request,error) {
							is_allowed = true;
						}
					});  
				}	
				else {
					layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
				}
			});
		}
		
		function convert_submit() {
			if(is_allowed == true) {
				is_allowed = false;
				
				$.ajax({url: api_url + 'convert/submit/',
					data: $('#convert-form').serialize(),
					type: 'post',                  
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						if(result == "<?php echo STATUS_200;?>") {
							layer.alert("<?php echo $this->lang->line('convert_successful_message');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'}, function (){ location.href = api_url + 'convert/index/'; });
						}
						else {
							layer.alert(result, {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
						}	
						
						is_allowed = true;
					},
					error: function (request,error) {
						is_allowed = true;
					}
				});  
			}	
			else {
				layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			}	
		}
		
		$('#transaction_amount_2').keypress(function(e) {
			var verified = (e.which == 8 || e.which == undefined || e.which == 0) ? null : String.fromCharCode(e.which).match(/[^0-9]/);
			if (verified) {e.preventDefault();}
		}).keyup(function(e) {
			var current_rate = parseFloat($('#currency_rate').html());
			var other_withdrawal_fee = parseFloat($('#handling_fee_1').html());
			var usdt_withdrawal_fee = parseFloat($('#handling_fee_2').html());
			var amt = $(this).val();
			var fee = ((amt * other_withdrawal_fee) / 100);
			var trans_type = $('#currency_id').val();
			var actual_amt = 0;
			
			if(trans_type == 5) {
				var tmp_amt = (amt * current_rate);
				
				if(tmp_amt > 1) {
					actual_amt = (tmp_amt - usdt_withdrawal_fee);
				}
				else {
					actual_amt = tmp_amt;
				}
			}
			else {
				actual_amt = ((amt * current_rate) - fee);
			}
			
			$('#actual_amount').html(actual_amt).number(true, 2);
		});
		
		function change_withdrawal_type(m_id) {
			var amt = $('#transaction_amount_2').val();
			var cny_rate = $('#cny_rate').val();
			var hkd_rate = $('#hkd_rate').val();
			var myr_rate = $('#myr_rate').val();
			var usdt_rate = $('#usdt_rate').val();
			var other_withdrawal_fee = parseFloat($('#handling_fee_1').html());
			var usdt_withdrawal_fee = parseFloat($('#handling_fee_2').html());
			var fee = ((amt * other_withdrawal_fee) / 100);
			var actual_amt = 0;
			
			if(m_id == 1) {
				$('#handling_fee_panel_1').show();
				$('#handling_fee_panel_2').hide();
				$('#currency_rate').html(cny_rate);
				$('#currency_name').html(js_text_currency_cny);
				actual_amt = ((amt * cny_rate) - fee);
			}
			else if(m_id == 2) {
				$('#handling_fee_panel_1').show();
				$('#handling_fee_panel_2').hide();
				$('#currency_rate').html(hkd_rate);
				$('#currency_name').html(js_text_currency_hkd);
				actual_amt = ((amt * hkd_rate) - fee);
			}
			else if(m_id == 3) {
				$('#handling_fee_panel_1').show();
				$('#handling_fee_panel_2').hide();
				$('#currency_rate').html(myr_rate);
				$('#currency_name').html(js_text_currency_myr);
				actual_amt = ((amt * myr_rate) - fee);
			}
			else if(m_id == 5) {
				$('#handling_fee_panel_1').hide();
				$('#handling_fee_panel_2').show();
				$('#currency_rate').html(usdt_rate);
				$('#currency_name').html(js_text_currency_usdt);
				var tmp_amt = (amt * usdt_rate);
				
				if(tmp_amt > 1) {
					actual_amt = (tmp_amt - usdt_withdrawal_fee);
				}
				else {
					actual_amt = tmp_amt;
				}
			}
			
			if(m_id == 3) {
				$('#min_notice_1').show();
				$('#min_notice_2').hide();
			}
			else {
				$('#min_notice_1').hide();
				$('#min_notice_2').show();
			}
			
			$('#actual_amount').html(actual_amt).number(true, 2);
		}
		
		function withdrawal_submit() {
			if(is_allowed == true) {
				is_allowed = false;
				
				$.ajax({url: api_url + 'withdrawal/submit/',
					data: $('#withdrawal-form').serialize(),
					type: 'post',                  
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						if(result == "<?php echo STATUS_200;?>") {
							layer.alert("<?php echo $this->lang->line('withdraw_successful_message');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'}, function (){ location.href = api_url + 'withdrawal/index/'; });
						}
						else if(result == "<?php echo STATUS_201;?>") {
							layer.alert("<?php echo $this->lang->line('withdraw_successful_message_2');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'}, function (){ location.href = api_url + 'withdrawal/index/'; });
						}
						else if(result == "<?php echo STATUS_202;?>") {
							layer.alert("<?php echo $this->lang->line('withdraw_successful_message_3');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'}, function (){ location.href = api_url + 'withdrawal/index/'; });
						}
						else {
							layer.alert(result, {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
						}	
						
						is_allowed = true;
					},
					error: function (request,error) {
						is_allowed = true;
					}
				});  
			}	
			else {
				layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			}	
		}
		
		bsCustomFileInput.init();
		
		function claim_insurance_submit() {
			if(is_allowed == true) {
				is_allowed = false;
				
				// var form = $('#insurance-form');
				// var file_form = form[0];
				// var formData = new FormData(file_form);
				// $.each($("input[type='file']")[0].files, function(i, file) {
					// formData.append('file', file);
				// });
				
				var form = $('#insurance-form')[0];
				var formData = new FormData(form);
				$.each($("input[type='file']")[0].files, function(i, file) {
					formData.append('file', file);
				});
				
				$.ajax({url: api_url + 'insurance/submit/',
					data: formData,
					type: 'post',	
					processData: false,
					contentType: false,								
					async: 'true',
					beforeSend: function() {
						$('.loading').show();
					},
					complete: function() {
						$('.loading').hide();
					},
					success: function (result) {
						if(result == "<?php echo STATUS_200;?>") {
							layer.alert("<?php echo $this->lang->line('insurance_successful_message');?>", {icon: 1, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'}, function (){ location.href = api_url + 'insurance/claim/'; });
						}
						else {
							layer.alert(result, {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
						}	
						
						is_allowed = true;
					},
					error: function (request,error) {
						is_allowed = true;
					}
				});  
			}	
			else {
				layer.alert("<?php echo $this->lang->line('js_text_processing_please_wait');?>", {icon: 2, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
			}	
		}
	</script>
	
	<?php if($this->uri->segment(1) == 'topup') {?>
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/copy2clipboard.js"></script>
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/jqqrcode/jquery.qrcode.min.js"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		$('#qrcode').html('').qrcode({width: 200, height: 200, render: "canvas", text: '<?php echo $address['usdt_trc20_address']; ?>'});
	});
	</script>
	<?php }?>
	
	<?php if($this->uri->segment(1) == 'account' && $this->uri->segment(2) == 'share') {?>
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/copy2clipboard.js"></script>
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/jqqrcode/jquery.qrcode.min.js"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		$('#qrcode').html('').qrcode({width: 200, height: 200, render: "canvas", text: '<?php echo base_url() . 'register/referrer/' . $this->session->userdata('member_username') . '/';?>'});
	});
	</script>
	<?php }?>
	
	<?php 
		if($this->session->userdata('form_msg_type')) {
			$res_code = (($this->session->userdata('form_msg_type') == 100) ? 1 : 2);
	?>
	<script type="text/javascript">
		layer.alert("<?php echo $this->session->userdata('form_msg');?>", {icon: <?php echo $res_code;?>, title: '<?php echo $this->lang->line('js_text_info');?>', btn: '<?php echo $this->lang->line('js_text_close');?>'});
	</script>
	<?php 
			$this->session->unset_userdata(array('form_msg_type' => '', 'form_msg' => ''));
		}
	?>
	
	<?php if($this->uri->segment(1) == 'income') {?>
	<script type="text/javascript" src="<?php echo base_url();?>assets/js/jquery.datetimepicker.js"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		$('#from_date').datetimepicker({
			timepicker: false,
			format: 'Y-m-d'
		});
		
		$('#to_date').datetimepicker({
			timepicker: false,
			format: 'Y-m-d'
		});
	});
	</script>
	<?php }?>
	
	<?php if($this->uri->segment(1) == 'buy' && $this->uri->segment(2) == 'topup_listing') {?>
	<script type="text/javascript">
		$(document).ready(function() {
			var oTable = $('#table-listing').dataTable({
				"bProcessing": true,
				"bServerSide": true,
				"bFilter": false,
				"bAutoWidth": false,
				"responsive": true,
				"sAjaxSource": '<?php echo base_url();?>buy/getlist/',
				"iDisplayLength": 25,
				"aaSorting": [[0, 'desc']],
				"aoColumns": [
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true }
				],
				"fnInitComplete": function () {
					oTable.fnAdjustColumnSizing();
				},
				'fnServerData': function (sSource, aoData, fnCallback) {
					aoData.push({name: '<?php echo $this->security->get_csrf_token_name();?>', value : '<?php echo $this->security->get_csrf_hash();?>'});
					$.ajax
					({
						'dataType': 'json',
						'type': 'POST',
						'url': sSource,
						'data': aoData,
						'success': fnCallback
					});
				}
			});
		});
	</script>
	<?php }?>
	
	<?php if($this->uri->segment(1) == 'insurance' && $this->uri->segment(2) == 'claim_listing') {?>
	<script type="text/javascript">
		$(document).ready(function() {
			var oTable = $('#table-listing').dataTable({
				"bProcessing": true,
				"bServerSide": true,
				"bFilter": false,
				"bAutoWidth": false,
				"responsive": true,
				"sAjaxSource": '<?php echo base_url();?>insurance/getclaimlist/',
				"iDisplayLength": 25,
				"aaSorting": [[0, 'desc']],
				"aoColumns": [
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true }
				],
				"fnInitComplete": function () {
					oTable.fnAdjustColumnSizing();
				},
				'fnServerData': function (sSource, aoData, fnCallback) {
					aoData.push({name: '<?php echo $this->security->get_csrf_token_name();?>', value : '<?php echo $this->security->get_csrf_hash();?>'});
					$.ajax
					({
						'dataType': 'json',
						'type': 'POST',
						'url': sSource,
						'data': aoData,
						'success': fnCallback
					});
				}
			});
		});
	</script>
	<?php }?>
	
	<?php if($this->uri->segment(1) == 'insurance' && $this->uri->segment(2) == 'buy_listing') {?>
	<script type="text/javascript">
		$(document).ready(function() {
			var oTable = $('#table-listing').dataTable({
				"bProcessing": true,
				"bServerSide": true,
				"bFilter": false,
				"bAutoWidth": false,
				"responsive": true,
				"sAjaxSource": '<?php echo base_url();?>insurance/getbuylist/',
				"iDisplayLength": 25,
				"aaSorting": [[0, 'desc']],
				"aoColumns": [
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true }
				],
				"fnInitComplete": function () {
					oTable.fnAdjustColumnSizing();
				},
				'fnServerData': function (sSource, aoData, fnCallback) {
					aoData.push({name: '<?php echo $this->security->get_csrf_token_name();?>', value : '<?php echo $this->security->get_csrf_hash();?>'});
					$.ajax
					({
						'dataType': 'json',
						'type': 'POST',
						'url': sSource,
						'data': aoData,
						'success': fnCallback
					});
				}
			});
		});
	</script>
	<?php }?>
	
	<?php if($this->uri->segment(1) == 'topup' && $this->uri->segment(2) == 'listing') {?>
	<script type="text/javascript">
		$(document).ready(function() {
			var oTable = $('#table-listing').dataTable({
				"bProcessing": true,
				"bServerSide": true,
				"bFilter": false,
				"bAutoWidth": false,
				"responsive": true,
				"sAjaxSource": '<?php echo base_url();?>topup/getlist/',
				"iDisplayLength": 25,
				"aaSorting": [[0, 'desc']],
				"aoColumns": [
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true }
				],
				"fnInitComplete": function () {
					oTable.fnAdjustColumnSizing();
				},
				'fnServerData': function (sSource, aoData, fnCallback) {
					aoData.push({name: '<?php echo $this->security->get_csrf_token_name();?>', value : '<?php echo $this->security->get_csrf_hash();?>'});
					$.ajax
					({
						'dataType': 'json',
						'type': 'POST',
						'url': sSource,
						'data': aoData,
						'success': fnCallback
					});
				}
			});
		});
	</script>
	<?php }?>
	
	<?php if($this->uri->segment(1) == 'transfer' && $this->uri->segment(2) == 'listing') {?>
	<script type="text/javascript">
		$(document).ready(function() {
			var oTable = $('#table-listing').dataTable({
				"bProcessing": true,
				"bServerSide": true,
				"bAutoWidth": false,
				"responsive": true,
				"sAjaxSource": '<?php echo base_url();?>transfer/getlist/',
				"iDisplayLength": 25,
				"aaSorting": [[0, 'desc']],
				"aoColumns": [
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": true, "bSortable": true },
					{ "bVisible": true, "bSearchable": true, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true }
				],
				"fnInitComplete": function () {
					oTable.fnAdjustColumnSizing();
				},
				'fnServerData': function (sSource, aoData, fnCallback) {
					aoData.push({name: '<?php echo $this->security->get_csrf_token_name();?>', value : '<?php echo $this->security->get_csrf_hash();?>'});
					$.ajax
					({
						'dataType': 'json',
						'type': 'POST',
						'url': sSource,
						'data': aoData,
						'success': fnCallback
					});
				}
			});
		});
	</script>
	<?php }?>
	
	<?php if($this->uri->segment(1) == 'convert' && $this->uri->segment(2) == 'listing') {?>
	<script type="text/javascript">
		$(document).ready(function() {
			var oTable = $('#table-listing').dataTable({
				"bProcessing": true,
				"bServerSide": true,
				"bFilter": false,
				"bAutoWidth": false,
				"responsive": true,
				"sAjaxSource": '<?php echo base_url();?>convert/getlist/',
				"iDisplayLength": 25,
				"aaSorting": [[0, 'desc']],
				"aoColumns": [
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true }
				],
				"fnInitComplete": function () {
					oTable.fnAdjustColumnSizing();
				},
				'fnServerData': function (sSource, aoData, fnCallback) {
					aoData.push({name: '<?php echo $this->security->get_csrf_token_name();?>', value : '<?php echo $this->security->get_csrf_hash();?>'});
					$.ajax
					({
						'dataType': 'json',
						'type': 'POST',
						'url': sSource,
						'data': aoData,
						'success': fnCallback
					});
				}
			});
		});
	</script>
	<?php }?>
	
	<?php if($this->uri->segment(1) == 'withdrawal' && $this->uri->segment(2) == 'listing') {?>
	<script type="text/javascript">
		$(document).ready(function() {
			var oTable = $('#table-listing').dataTable({
				"bProcessing": true,
				"bServerSide": true,
				"bAutoWidth": false,
				"responsive": true,
				"sAjaxSource": '<?php echo base_url();?>withdrawal/getlist/',
				"iDisplayLength": 25,
				"aaSorting": [[0, 'desc']],
				"aoColumns": [
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true }
				],
				"fnInitComplete": function () {
					oTable.fnAdjustColumnSizing();
				},
				'fnServerData': function (sSource, aoData, fnCallback) {
					aoData.push({name: '<?php echo $this->security->get_csrf_token_name();?>', value : '<?php echo $this->security->get_csrf_hash();?>'});
					$.ajax
					({
						'dataType': 'json',
						'type': 'POST',
						'url': sSource,
						'data': aoData,
						'success': fnCallback
					});
				}
			});
		});
	</script>
	<?php }?>
	
	<?php if($this->uri->segment(1) == 'network') {?>
	<script type="text/javascript">
		$(document).ready(function() {
			var oTable = $('#table-listing').dataTable({
				"bProcessing": true,
				"bServerSide": true,
				"bAutoWidth": false,
				"responsive": true,
				"sAjaxSource": '<?php echo base_url();?>network/getlist/',
				"iDisplayLength": 25,
				"aaSorting": [[0, 'desc']],
				"aoColumns": [
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": true, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true }
				],
				"fnInitComplete": function () {
					oTable.fnAdjustColumnSizing();
				},
				'fnServerData': function (sSource, aoData, fnCallback) {
					aoData.push({name: '<?php echo $this->security->get_csrf_token_name();?>', value : '<?php echo $this->security->get_csrf_hash();?>'});
					$.ajax
					({
						'dataType': 'json',
						'type': 'POST',
						'url': sSource,
						'data': aoData,
						'success': fnCallback
					});
				}
			});
		});
	</script>
	<?php }?>
	
	<?php if($this->uri->segment(1) == 'income') {?>
	<script type="text/javascript">
		$(document).ready(function() {
			var oTable = $('#table-listing').dataTable({
				"bProcessing": true,
				"bServerSide": true,
				"bAutoWidth": false,
				"responsive": true,
				"sAjaxSource": '<?php echo base_url();?>income/getlist/',
				"iDisplayLength": 25,
				"aaSorting": [[0, 'desc']],
				"aoColumns": [
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true }
				],
				"fnInitComplete": function () {
					oTable.fnAdjustColumnSizing();
				},
				'fnServerData': function (sSource, aoData, fnCallback) {
					aoData.push({name: '<?php echo $this->security->get_csrf_token_name();?>', value : '<?php echo $this->security->get_csrf_hash();?>'});
					$.ajax
					({
						'dataType': 'json',
						'type': 'POST',
						'url': sSource,
						'data': aoData,
						'success': fnCallback
					});
				}
			});
		});
	</script>
	<?php }?>
	
	<?php if($this->uri->segment(1) == 'message') {?>
	<script type="text/javascript">
		$(document).ready(function() {
			var oTable = $('#table-listing').dataTable({
				"bProcessing": true,
				"bServerSide": true,
				"bAutoWidth": false,
				"responsive": true,
				"sAjaxSource": '<?php echo base_url();?>message/getlist/',
				"iDisplayLength": 25,
				"aaSorting": [[0, 'desc']],
				"aoColumns": [
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": true, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true }
				],
				"fnInitComplete": function () {
					oTable.fnAdjustColumnSizing();
				},
				'fnServerData': function (sSource, aoData, fnCallback) {
					aoData.push({name: '<?php echo $this->security->get_csrf_token_name();?>', value : '<?php echo $this->security->get_csrf_hash();?>'});
					$.ajax
					({
						'dataType': 'json',
						'type': 'POST',
						'url': sSource,
						'data': aoData,
						'success': fnCallback
					});
				}
			});
		});
	</script>
	<?php }?>
	
	<?php if($this->uri->segment(1) == 'announcement') {?>
	<script type="text/javascript">
		$(document).ready(function() {
			var oTable = $('#table-listing').dataTable({
				"bProcessing": true,
				"bServerSide": true,
				"bAutoWidth": false,
				"responsive": true,
				"sAjaxSource": '<?php echo base_url();?>announcement/getlist/',
				"iDisplayLength": 25,
				"aaSorting": [[0, 'desc']],
				"aoColumns": [
					{ "bVisible": true, "bSearchable": false, "bSortable": true },
					{ "bVisible": true, "bSearchable": true, "bSortable": true },
					{ "bVisible": true, "bSearchable": false, "bSortable": true }
				],
				"fnInitComplete": function () {
					oTable.fnAdjustColumnSizing();
				},
				'fnServerData': function (sSource, aoData, fnCallback) {
					aoData.push({name: '<?php echo $this->security->get_csrf_token_name();?>', value : '<?php echo $this->security->get_csrf_hash();?>'});
					$.ajax
					({
						'dataType': 'json',
						'type': 'POST',
						'url': sSource,
						'data': aoData,
						'success': fnCallback
					});
				}
			});
		});
	</script>
	<?php }?>
</body>
</html>