Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.51
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
fichatecnica /
includes /
[ HOME SHELL ]
Name
Size
Permission
Action
Conecciones
[ DIR ]
drwxr-xr-x
RecuperarFotos.php
552
B
-rw-r--r--
db.php
847
B
-rw-r--r--
guardaTabTanques.php
2.46
KB
-rw-r--r--
logout.php
168
B
-rw-r--r--
obtener_datos.php
430
B
-rw-r--r--
procesarFormulario.php
3.55
KB
-rw-r--r--
procesarFormulario2.php
2.52
KB
-rw-r--r--
procesarTablaTableroElectico.p...
2.74
KB
-rw-r--r--
procesarTablaVentas.php
3.01
KB
-rw-r--r--
recuperarDatos.php
1.31
KB
-rw-r--r--
recuperarDatos2.php
812
B
-rw-r--r--
recuperarTabTanques.php
1.26
KB
-rw-r--r--
recuperarTablaControlVentas.ph...
1.59
KB
-rw-r--r--
recuperarTablaTabElectrico.php
1.42
KB
-rw-r--r--
subir_imagen.php
1.53
KB
-rw-r--r--
user.php
1.11
KB
-rw-r--r--
user_sesion.php
619
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : procesarFormulario2.php
<?php require_once 'user_sesion.php'; require_once 'db.php'; // Crear una instancia de la clase DB $db = new DB(); $userSession = new UserSesion(); // Realizar la conexión a la base de datos $pdo = $db->connect(); try { $idUsuario = $userSession->getCurrentUser(); // Obtener el último ID del usuario específico $sqlUltimoId = "SELECT ott FROM formulario WHERE usuario_id = :idUsuario ORDER BY ott DESC LIMIT 1"; $stmtUltimoId = $pdo->prepare($sqlUltimoId); $stmtUltimoId->bindValue(':idUsuario', $idUsuario, PDO::PARAM_INT); $stmtUltimoId->execute(); $ultimoIdRow = $stmtUltimoId->fetch(PDO::FETCH_ASSOC); $ultimoId = $ultimoIdRow['ott']; // Obtener los datos de todas las filas $tableData = json_decode($_POST['tableData'], true); $usuario = $userSession->getCurrentUser(); // Preparar la consulta SQL para insertar los datos en la tabla "tabla_equipos" $sqlInsert = "INSERT INTO tabla_equipos (ott, equipo, marca, serial, modelo, referencia, usuario_id) VALUES (:ott, :equipo, :marca, :serial, :modelo, :referencia, :usuario_id)"; $stmtInsert = $pdo->prepare($sqlInsert); // Variable para verificar si se ingresaron datos en los campos $datosIngresados = false; // Vincular los parámetros y ejecutar la inserción en "tabla_equipos" para cada fila foreach ($tableData as $rowData) { $equipo = $rowData['equipo']; $marca = $rowData['marca']; $serial = $rowData['serial']; $modelo = $rowData['modelo']; $referencia = $rowData['referencia']; // Verificar si algún campo está vacío if (!empty($equipo) || !empty($marca) || !empty($serial) || !empty($modelo) || !empty($referencia)) { $datosIngresados = true; $stmtInsert->bindParam(':ott', $ultimoId); $stmtInsert->bindParam(':equipo', $equipo); $stmtInsert->bindParam(':marca', $marca); $stmtInsert->bindParam(':serial', $serial); $stmtInsert->bindParam(':modelo', $modelo); $stmtInsert->bindParam(':referencia', $referencia); $stmtInsert->bindParam(':usuario_id', $usuario); $stmtInsert->execute(); } } if ($datosIngresados) { echo 'Datos insertados correctamente en la base de datos.'; } else { echo 'No se ingresaron datos en los campos.'; } } catch (PDOException $e) { echo "Error de conexión a la base de datos: " . $e->getMessage(); }
Close