����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 18.227.134.222
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/app6/application/customer/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/app6/application/customer/v_customer.php
<?php 
$titlepage="Proveedores";
$idsmenu=4;
include "../../library/config.php";
require_once("../model/dbconn.php");
require_once("../model/pos.php");
require_once("../model/sql.php");
include "../layout/top-header.php"; 
include "../../library/check_login.php";
include "../../library/check_access.php";
?> 
<link rel="stylesheet" href="../../dist/css/bootstrap-switch.min.css">
<link rel="stylesheet" href="../../plugins/datepicker/datepicker3.css">

<?php include "../layout/header.php"; ?>

	<!-- Content Wrapper. Contains page content -->
	<div class="content-wrapper">
		<!-- Content Header (Page header) -->
		<section class="content-header">
			<h1>
				Proveedores
				<small>visita <a href="#">Sistemas Yusa</a> Mas Informacion</small>
			</h1>
		</section>
		<!-- Main content -->
		<section class="content">
			<!-- Default box -->
			<div class="box">
				<div class="box-body">
					<button class="btn btn-primary margin" id="btn-add" title="Cliente Proveedor"><i class="fa fa-plus"></i> Agregar Proveedores</button>
					
				<div class="row">
						<div class=" col-xs-12" style="padding-left:25px;padding-right:25px">
							<input type="text" class="form-control " id="txtsearchitem" value="" placeholder="Buscar Proveedor Por nombre...">
						</div>
				</div>	
					<div class="table-responsive margin">
						<table id="table-customer" class="table table-bordered">
							<thead>
								<tr>
									<th style="width: 10px">#</th>
									<th style="width: 150px">Nombre</th>
									<th style="width: 50px">Credito</th>
									<th style="width: 50px">Ciudad</th>
									<th style="width: 25px;">Telefono</th>
									<th style="width: 50px;"></th>
								</tr>
							</thead>
						</table>
					</div>
				</div>
				<!-- /.box-body -->
			</div>
			<!-- /.box -->
		</section>
		<!-- /.content -->
	</div>
	<!-- /.content-wrapper -->
	<!-- Modal -->
	<div class="modal fade" id="modal-customer" tabindex="-1"  role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title" id="myModalLabel">Nuevo Proveedor</h4>
				</div>
				<div class="modal-body">
					<div class="box-body">
						<div class="form-horizontal">
							<div class="form-group">
								<label class="col-sm-3 control-label">Nombre</label>
								<div class="col-sm-9">
									<input type="hidden" id="crud">
									<input type="hidden" id="txtcode">
									<input type="text" class="form-control" id="txtname" placeholder="Nombre del Cliente ">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">Credito</label>
								<div class="col-sm-9">
									<select class="form-control" id="cbogender">
										<option value="SI">SI</option>
										<option value="NO">NO</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">Ciudad</label>
								<div class="col-sm-9">
									<input type="text" class="form-control" id="txtcountry" placeholder="Ciudad">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">Telefono</label>
								<div class="col-sm-9">
									<input type="text" class="form-control" id="txtphone" placeholder="Telefono">
								</div>
							</div>

						</div>
					</div>						
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Cerrar</button>
					<button type="button" class="btn btn-primary" title="Guardar Cliente" id="btn-save"> <i class="fa fa-save"></i> Guardar</button>
				</div>
			</div>
		</div>
	</div>
	<?php include "../layout/footer.php"; //footer template ?> 
	<?php include "../layout/bottom-footer.php"; //footer template ?> 
	<script src="../../plugins/datepicker/bootstrap-datepicker.js"></script>
	<script src="../../dist/js/redirect.js"></script>
	<script src="j_pos.js"></script>

	<script src="../../bower_components/bootstrap-sweetalert/dist/sweetalert.min.js"></script>
	<script src="../../bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
	<script src="../../bower_components/datatables.net-bs/js/dataTables.bootstrap.js"></script>
	
	<script type="text/javascript">
	
		$(document).ready(function(){

			// 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;
				};
			})();
			
			
			var value = {
				method : "getdata"
			};
			$('#table_search').DataTable({
				"paging": true,
				"lengthChange": false,
				"searching": true,
				"ordering": true,
				"info": false,
				"responsive": true,
				"autoWidth": false,
				"pageLength": 50,
				"dom": '<"top"f>rtip',
				"ajax": {
					"url": "c_item.php",
					"type": "POST",
					"data":value,
				},
				"columns": [
				{ "data": "urutan" },
				{ "data": "id_item" },
				{ "data": "item_name" },
				{ "data": "price" },
				{ "data": "tax" },
				{ "data": "stock" },
				{ "data": "note" },
				{ "data": "button" },
				]
			});
			$("#table_search_filter").addClass("pull-right");


			$('#table-customer1').DataTable({
				"paging": true,
				"lengthChange": false,
				"searching": false,
				"processing": true,
				"ordering": false,
				"info": false,
				"responsive": true,
				"autoWidth": false,
				"pageLength": 100,
				"dom": '<"top"f>rtip',
				"fnDrawCallback": function( oSettings ) {
				},
				"ajax": {
					"url": "customer.php",
					"type": "POST",
					"data" : {
						method : "list_customer"
					},
					error: function (request, textStatus, errorThrown) {
						swal(request.responseJSON.message);
					}
				},

				columns: [
				{ "data": null,render :  function ( data, type, full, meta ) {
					return  meta.row + 1;
				}},
				{ "data": "name" },
				{ "data": "gender" },
				{ "data": "country" },
				{ "data": "phone" },
				{ "data": null, render : function(data,type,row){
					return "<button title='Editar' class='btn btn-edit btn-warning btn-xs'><i class='fa fa-pencil'></i> Editar</button>  <button title='borrar' class='btn btn-hapus  btn-danger btn-xs'><i class='fa fa-remove'></i> borrar</button> ";
				} 		},
				]
				
			});
			
			$("#table-customer_filter").addClass("pull-right");

			$("#btn-save").click(function(){
				if($("#txtname").val() == ''){
					swal("Ingrese nombre");
					return;
				}
				if($("#txtcountry").val() == ''){
					swal("Ingrese ciudad");
					return;
				}
				if($("#txtphone").val() == ''){
					swal("ingrese numero de telefono");
					return;
				}


				if($("#crud").val() == 'N'){
					swal({
						title: "Nuevo",
						text: "Crear Nuevo Cliente ?",
						type: "warning",
						showCancelButton: true,
						confirmButtonClass: "btn-primary",
						confirmButtonText: "Guardar",
						closeOnConfirm: false,
						showLoaderOnConfirm: true
					},
					function(){

						add_customer($("#txtname").val(),$("#txtcountry").val(),$("#cbogender").val(),$("#txtphone").val());
					});
				}else{
					swal({
						title: "Editar",
						text: "Edit Cliente ?",
						type: "warning",
						showCancelButton: true,
						confirmButtonClass: "btn-primary",
						confirmButtonText: "Actualizar",
						closeOnConfirm: false,
						showLoaderOnConfirm: true
					},
					function(){
						edit_customer($("#txtcode").val(),$("#txtname").val(),$("#txtcountry").val(),$("#cbogender").val(),$("#txtphone").val());

					});
				}
			});

			$("#btn-add").click(function(){
				$("#modal-customer").modal("show");
				$("#txtname").val("");
				$("#txtcountry").val("");
				$("#txtphone").val("");
				$("#crud").val("N");
			});
		});



		$(document).on("click",".btn-edit",function(){
			var current_row = $(this).parents('tr'); 
			if (current_row.hasClass('child')) { 
				current_row = current_row.prev(); 
			}
			var table = $('#table-customer').DataTable(); 
			var data = table.row( current_row).data();
			$("#txtname").val(data.name);
			$("#txtcode").val(data.id_cust);
			$("#txtcountry").val(data.country);
			$("#cbogender").val(data.gender)
			$("#txtphone").val(data.phone)
			$("#modal-customer").modal("show");
			setTimeout(function(){ 
				$("#txtname").focus()
			}, 1000);

			$("#crud").val("E");

		});

		$(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-customer').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-customer').DataTable(); 
							xtable.ajax.reload( null, false );
						}else{
							swal("Error delete customer : "+$resp['message'])
						}
						
					},
					error: function (request, textStatus, errorThrown) {
						swal("Error ", request.responseJSON.message, "error");
					}
				});
			});
		});


		function add_customer(nm,ctr,gdr,phn){
			let ajax = {
				method: "new_customer",
				name : nm,
				country:ctr,
				gender:gdr,
				phone:phn

			}
			$.ajax({
				url: "customer.php",
				type: "POST",
				data: ajax,
				success: function(data, textStatus, jqXHR)
				{
					$resp = JSON.parse(data);
					if($resp['status'] == true){
						$("#txtname").val("");
						$("#txtcountry").val("");
						$("#txtphone").val("");
						$("#txtcode").val("");
						$("#txtcode").focus();
						let xtable = $('#table-customer').DataTable(); 
						xtable.ajax.reload( null, false );
						swal("Registro Exitoso!");
					}else{
						swal("Error save customer : "+$resp['message'])
					}
				},
				error: function (request, textStatus, errorThrown) {
					swal("Error ", request.responseJSON.message, "error");
				}
			});
		}
		
		function edit_customer(id,nm,ctr,gdr,phn){
			let ajax = {
				method: "edit_customer",
				id_cust :  id,
				name : nm,
				country:ctr,
				gender:gdr,
				phone:phn

			}
			$.ajax({
				url:  "customer.php",
				type: "POST",
				data: ajax,
				success: function(data, textStatus, jqXHR)
				{
					$resp = JSON.parse(data);

					if($resp['status'] == true){
						$("#modal-customer").modal("hide");
						swal("Se Actualizo Registro! ");
						let xtable = $('#table-customer').DataTable(); 
						xtable.ajax.reload( null, false );
					}else{
						swal("Error save customer : "+$resp['message'])
					}
				},
				error: function (request, textStatus, errorThrown) {
					swal("Error ", request.responseJSON.message, "error");

				}
			});
		}
	</script>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit