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

  <!-- Main Footer -->
  <footer class="main-footer">
    <?php echo $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>
<!-- 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>
<!-- 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;
	
	<?php
		// $ads_date = time();
		// if($ads_date >= 1654444800) {
			if( ! $this->session->userdata('read_notice')) {
	?>
	layer.open({
		type: 2,
		title: false,
		area: ['380px', '510px'],
		shade: 0.8,
		closeBtn: 1,
		shadeClose: 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 
				$this->session->set_userdata('read_notice', 1);
			}
		// }
	?>

	function profile_update() {
		if(is_allowed == true) {
			is_allowed = false;
			
			$.ajax({url: api_url + 'profile/update/',
				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 login_password_update() {
		if(is_allowed == true) {
			is_allowed = false;
			
			$.ajax({url: api_url + 'profile/login_password/',
				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 + 'profile/security_password/',
				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 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 reinvest_submit() {
		if(is_allowed == true) {
			is_allowed = false;
			
			$.ajax({url: api_url + 'reinvest/submit/',
				data: $('#reinvest-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_reinvest_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 insurance_submit() {
		if(is_allowed == true) {
			is_allowed = false;
			
			$.ajax({url: api_url + 'insurance/submit/',
				data: $('#insurance-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('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.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 miss_bet_submit() {
		if(is_allowed == true) {
			is_allowed = false;
			
			$.ajax({url: api_url + 'missbet/submit/',
				data: $('#miss-bet-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('miss_bet_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 transfer_submit() {
		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.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 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.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 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_2');?>", {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');?>'});
		}	
	}
	
	$('#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();}
	});
</script>

<?php if($this->uri->segment(1) == 'register') {?>
<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();?>register/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
				});
			}
		});
		
		$('#payment_type').change(function(){
			var opt = $(this).val();
			
			if(opt == 2) { 
				$('#wallet_panel_1').show();
				$('#wallet_panel_2').show();
			}
			else {
				$('#wallet_panel_1').hide();
				$('#wallet_panel_2').hide();
			}
		});
		
		$('#amount_1').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();}
		});
	
		$('#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();}
		});
	});
</script>
<?php }?>

<?php if($this->uri->segment(1) == 'reinvest') {?>
<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();?>reinvest/getlist/',
			"iDisplayLength": 25,
			"aaSorting": [[0, 'desc']],
			"aoColumns": [
				{ "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') {?>
<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/getlist/',
			"iDisplayLength": 25,
			"aaSorting": [[0, 'desc']],
			"aoColumns": [
				{ "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) == 'missbet') {?>
<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();?>missbet/getlist/',
			"iDisplayLength": 25,
			"aaSorting": [[0, 'desc']],
			"aoColumns": [
				{ "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') {?>
<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 }
			],
			"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') {?>
<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": false, "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') {?>
<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 },
				{ "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') {?>
<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();?>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 }
			],
			"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) == 'game') {?>
<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();?>game/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 },
				{ "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) == 'income') {?>
<script type="text/javascript">
	$(document).ready(function() {
		var oTable = $('#table-listing').dataTable({
			"bProcessing": true,
			"bServerSide": true,
			"bFilter": 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": 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 }?>

<?php if( ! $this->uri->segment(1) OR $this->uri->segment(1) == 'home') {?>
<script type="text/javascript">
	function update_wallet_balance() {
		$.ajax({url: api_url + 'home/update_wallet/',
			type: 'get',                  
			async: 'true',
			beforeSend: function() {
			},
			complete: function() {
			},
			success: function (data) {
				var json = JSON.parse(JSON.stringify(data));
				$('#platform_1').html(json.v_unit6);
				$('#platform_2').html(json.v_unit7);
				$('#rolling').html(json.v_unit8);
			},
			error: function (request,error) {
			}
		});  
	}
	
	update_wallet_balance();
	setInterval(function(){ update_wallet_balance(); }, 300000);
</script>
<?php }?>
	
<?php if($this->session->userdata('user_type') && $this->session->userdata('user_type') == MEMBER) {?>
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/625fcb8a7b967b11798b94ca/1g133660u';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
<!--End of Tawk.to Script-->
<?php }?>
</body>
</html>