����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 216.73.216.112
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/muebles/application/customer2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/muebles/application/customer2/j_customer.js



	
	$( "#txtclientB" ).autocomplete({
		search  : function(){$(this).addClass('working');},
		open    : function(){$(this).removeClass('working');},
		source: function(request, response) {
			$.getJSON("autocomplete_client.php", { term: $('#txtclientB').val() }, 
				response); },
			minLength:1,
			select:function(event, ui){
					
					
					$("#txtclientA").val(ui.item.id_client);
					
					$("#modal-customer_job").modal("show");	
					
			}
		}).autocomplete( "instance" )._renderItem = function( ul, item ) {
		return $( "<li>" )
		.append( "<dl><dt>"+item.id + "</dt>"+item.name+ "</dl>"   )
		.appendTo( ul );
	};
	
	
		//iniciar tabla de job
		init_dataJob();
		
		init_dataAvals();
		
				$('#txtpaydate').datepicker({
					format: 'dd-mm-yyyy',
				});

			// function to repair keyboard tab in modal dialog adminlte
			(function (){
				var close = window.swal.close;
				var previousWindowKeyDown = window.onkeydown;
				window.swal.close = function() {
					close();
					window.onkeydown = previousWindowKeyDown;
				};
			})();


			
			
			$("#btn-cob").click(function(){
				//modal-customer
				$("#modal-customer_job").modal("show");
				
				
				set_focus("#txtclientA");
				
			});
		
			
			
			
			//btnAbrirAdi
			$("#btnAbrirAdi").click(function(){
				//modal-customer_job
				$("#modal-customer_job").modal("show");
				$("#crudA").val("N");
			});
			
		
		$(document).on("click",".btn-hapus",function(){
			let current_row = $(this).parents('tr'); 
			if (current_row.hasClass('child')) { 
				current_row = current_row.prev(); 
			}
			let table = $('#table-customer2').DataTable(); 
			let data = table.row( current_row).data();
			let idcust = data.id_cust;
			swal({
				title: "Borrar",
				text: "Eliminar permanentemente, esta seguro ?",
				type: "warning",
				showCancelButton: true,
				confirmButtonClass: "btn-danger",
				confirmButtonText: "Borrar",
				closeOnConfirm: false,
				showLoaderOnConfirm: true
			},
			function(){

				let ajax = {
					method : "delete_customer",
					id_cust : idcust,
				}
				$.ajax({
					url:"customer.php",
					type: "POST",
					data: ajax,
					success: function(data, textStatus, jqXHR)
					{
						$resp = JSON.parse(data);
						if($resp['status'] == true){
							swal("Correctamento eliminado");
							let xtable = $('#table-customer2').DataTable(); 
							xtable.ajax.reload( null, false );
						}else{
							swal("Error al borrar cliente  : "+$resp['message'])
						}
						
					},
					error: function (request, textStatus, errorThrown) {
						swal("Error ", request.responseJSON.message, "error");
					}
				});
			});
		});
			
		
			
			
});



function init_dataJob(){

	var value = {
		method : "getdata"
	};
	$('#table-employed').DataTable({
		"paging": false,
		"lengthChange": false,
		"searching": false,
		"ordering": false,
		"info": false,
		"responsive": true,
		"autoWidth": true,
		"pageLength": 50,
		"dom": '<"top"f>rtip',
		"columnDefs": [
		{ className: "textright", "targets": [ 3,4,5,6 ] }
		],
		"ajax": {
			"url": "customer.php",
			"type": "POST",
			"data":value,
		},
		"columns": [
		{ "data": "id_cust" },
		{ "data": "cliente" },
		{ "data": "workplace" },
		{ "data": "labor_Old" },
		{ "data": "salary" },
		{ "data": "payment_periodicity" },
		{ "data": "endorsements" },
		{ "data": "created_at" },
		{ "data": "button" },
		]
	});
	
}




//tabla de conbranza
function init_dataAvals(){

	var value = {
		method : "list_customer"
	};
	$('#table-customer').DataTable({
		"paging": false,
		"lengthChange": false,
		"searching": false,
		"ordering": false,
		"info": false,
		"responsive": true,
		"autoWidth": true,
		"pageLength": 50,
		"dom": '<"top"f>rtip',
		"columnDefs": [
		{ className: "textright", "targets": [ 3,4,5,6 ] }
		],
		"ajax": {
			"url": "customer.php",
			"type": "POST",
			"data":value,
		},
		"columns": [
		{ "data": "id_cust" },
		{ "data": "contract" },
		{ "data": "name" },
		{ "data": "conyugue" },
		{ "data": "direccion" },
		{ "data": "credito" },
		{ "data": "poblacion" },
		{ "data": "phone" },
		]
	});
	
}
		
	
	

$(document).ready(function(){
   $("#cliente_ultimo").load('../model/cliente_ultimo.php');
});


$(document).on("blur","#selector-seller",function (){
	var valor =  document.getElementById('selector-seller').value ;
	document.getElementById('id_seller').innerHTML = valor;
	document.getElementById('id_seller_ok').value = valor;
});

//	edit_customer($("#txtcontract").val(),$("#txtnombre").val(),$("#txtconyugue").val(),$("#txtdireccion").val(),$("#txtcome_in").val(),$("#txttelefono").val(), $("#cbocredito").val(), $("#txtpoblacion").val());
function edit_customer(cont,nom,con,dire,come,tel,cred,pob){
			let ajax = {
				method: "edit_customer",
				contract : cont,
				nombre:nom,
				conyugue:con,
				direccion:dire,
				come_in:come,
				telefono:tel,
				credito:cred,
				poblacion:pob
			}
			$.ajax({
				url:  "customer.php",
				type: "POST",
				data: ajax,
				success: function(data, textStatus, jqXHR)
				{
					
						$("#modal-customer").modal("hide");
						swal("Se Actualizo Registro! ");
						
						let xtable = $('#table-customer2').DataTable(); 
						xtable.ajax.reload( null, false );
					
				},
				error: function (request, textStatus, errorThrown) {
					swal("Error ", request.responseJSON.message, "error");

				}
			});
		}

Youez - 2016 - github.com/yon3zu
LinuXploit