-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.php
52 lines (44 loc) · 1.46 KB
/
admin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
ini_set('display_errors', 1);
include ("dbaccess.php");
$saved = '<div class=\"alert alert-info alert-dismissible fade show\" role=\"alert\">
Saved.
<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button></div>';
// Update onHandEnd
if ($_POST['submit'] == 'onHandEnd') {
$edit = $fm->newEditCommand('web', $_POST['id']);
$edit->setField('Inventory::onHandEnd', $_POST['onHandEnd']);
$edit->execute();
echo stripslashes($saved);
}
// Update proposed
if ($_POST['submit'] == 'proposed') {
$edit = $fm->newEditCommand('web', $_POST['id']);
$edit->setField('Inventory::proposed', $_POST['proposed']);
$edit->execute();
echo stripslashes($saved);
}
// Update requested
if ($_POST['submit'] == 'requested') {
$edit = $fm->newEditCommand('web', $_POST['id']);
$edit->setField('Inventory::requested', $_POST['requested']);
$edit->execute();
echo stripslashes($saved);
}
// Update received
if ($_POST['submit'] == 'received') {
$edit = $fm->newEditCommand('web', $_POST['id']);
$edit->setField('Inventory::received', $_POST['received']);
$edit->execute();
echo stripslashes($saved);
}
// Update location
if ($_POST['submit'] == 'location') {
$edit = $fm->newEditCommand('web', $_POST['id']);
$edit->setField('cupboardLocation', $_POST['cupboard']);
$edit->execute();
echo stripslashes($saved);
}
?>