403Webshell
Server IP : 173.209.174.21  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux wcfs-server 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64
User : nodor ( 1000)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/wcfs/tabs/Backups/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/wcfs/tabs/Backups/add_transaction.php.nao-add notes
<?php
include 'db.php';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $customer_id = $_POST['customer_id'];
    $quantities = $_POST['quantity'];
    $items = $_POST['item_name'];
    $prices = $_POST['price'];
    $taxables = $_POST['taxable'] ?? [];
    $notes = $_POST['notes'] ?? [];

    $stmt = $conn->prepare("INSERT INTO transactions (customer_id, quantity, item_name, price, taxable, notes, date)
                            VALUES (?, ?, ?, ?, ?, ?, CURRENT_DATE)");

    for ($i = 0; $i < count($items); $i++) {
        $item = trim($items[$i]);
        $qty = intval($quantities[$i]);
        $price = floatval($prices[$i]);
        $note = trim($notes[$i] ?? '');
        $taxable = isset($taxables[$i]) ? 1 : 0;

        if ($item !== '' && $qty > 0 && $price >= 0) {
            $stmt->bind_param("iisdds", $customer_id, $qty, $item, $price, $taxable, $note);
            $stmt->execute();
        }
    }

    header("Location: view_account.php?customer_id=" . $customer_id);
    exit;
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit