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.NAO13th
<?php
include 'db.php';

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

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

    for ($i = 0; $i < count($items); $i++) {
        $item_name = trim($items[$i]);
        if ($item_name === '') continue;

        $quantity = intval($quantities[$i] ?? 1);
        $price = floatval($prices[$i] ?? 0);
        $taxable = isset($taxable_flags[$i]) ? 1 : 0;
        $note = trim($notes[$i] ?? '');

        $stmt->bind_param("isdiis", $customer_id, $item_name, $price, $quantity, $taxable, $note);
        $stmt->execute();
    }

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

echo "Invalid request.";
?>

Youez - 2016 - github.com/yon3zu
LinuXploit