You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
570 B
PHP
20 lines
570 B
PHP
<?php
|
|
|
|
require 'required.php';
|
|
require 'dieifnotloggedin.php';
|
|
|
|
$from = $_POST['from'];
|
|
require 'readfrom.php';
|
|
|
|
$id = $_POST['id'];
|
|
if (is_empty($id)) {
|
|
sendError('Missing item ID!');
|
|
}
|
|
if ($from == 'assets') {
|
|
$database->update($from, ['name' => $_POST['name'], 'rtd_location_id' => $_POST['location'], 'order_number' => $_POST['order_number']], ['id' => $id]);
|
|
} else {
|
|
$database->update($from, ['name' => $_POST['name'], 'location_id' => $_POST['location'], 'qty' => $_POST['qty'], 'order_number' => $_POST['order_number']], ['id' => $id]);
|
|
}
|
|
|
|
sendOK();
|