����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 216.73.216.190 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/payment/nppBackup/ |
Upload File : |
<?php if ($action == 'load') { try { $sql = "SELECT * FROM payment"; $stmt = $conn->prepare($sql); $stmt->execute(); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { echo "<tr> <td>" . $row['id'] . "</td> <td>" . $row['payment_type_id'] . "</td> <td>" . $row['sale_id'] . "</td> <td>" . $row['person_id'] . "</td> <td>" . $row['week'] . "</td> <td>" . $row['val'] . "</td> <td>" . $row['pay_date'] . "</td> <td>" . $row['id_collector'] . "</td> <td>" . ($row['programmed'] == 1 ? 'Sí' : 'No') . "</td> <td> <button class='btn btn-danger deletePayment' data-id='" . $row['id'] . "'>Eliminar</button> </td> </tr>"; } } catch(PDOException $e) { echo "Error: " . $e->getMessage(); } } if ($action == 'create') { try { $payment_type_id = $_POST['payment_type_id']; $sale_id = $_POST['sale_id']; $person_id = $_POST['person_id']; $week = $_POST['week']; $val = $_POST['val']; $pay_date = $_POST['pay_date']; $id_collector = $_POST['id_collector']; $programmed = $_POST['programmed']; $note = $_POST['note']; $sql = "INSERT INTO payment (payment_type_id, sale_id, person_id, week, val, pay_date, id_collector, programmed, note) VALUES (:payment_type_id, :sale_id, :person_id, :week, :val, :pay_date, :id_collector, :programmed, :note)"; $stmt = $conn->prepare($sql); $stmt->bindParam(':payment_type_id', $payment_type_id); $stmt->bindParam(':sale_id', $sale_id); $stmt->bindParam(':person_id', $person_id); $stmt->bindParam(':week', $week); $stmt->bindParam(':val', $val); $stmt->bindParam(':pay_date', $pay_date); $stmt->bindParam(':id_collector', $id_collector); $stmt->bindParam(':programmed', $programmed); $stmt->bindParam(':note', $note); $stmt->execute(); echo "Nuevo pago guardado correctamente."; } catch(PDOException $e) { echo "Error al guardar el pago: " . $e->getMessage(); } } ?>