SōkoMan byl pokrten
[mirrors/SokoMan.git] / assistants / sell.inc.php
CommitLineData
ec28d06c
TM
1<?php
2//TODO: Merge SELL and DISPOSE to single file with parameter!
b895e8ea 3//TODO: Highlight fields that should be filled (and maybe even check them when submited)
ec28d06c
TM
4//TODO: Add support for selling/disposing multiple items at once...
5//TODO: Reuse /item/$item_id/edit
de77377e 6switch($SUBPATH[0]) {
ec28d06c
TM
7 default: case 1:
8?>
de77377e 9<form action="<?=$URL?>/2" method="GET">
e390b72f 10 item_serial: <input type="text" name="serial" autofocus />
ec28d06c
TM
11 <input type="submit" value="SELL" />
12</form>
13<?php
14 break;
15 case 2:
16 $item_id = $this->db->map_unique('item_serial', $_GET['serial'], 'item_id', 'item');
17 $columns = $this->db->get_columns('item');
18 $selectbox = $this->db->columns_get_selectbox($columns, 'item');
19
20 $current = $this->db->get_listing('item', $item_id, 1);
21 $current[$item_id]['status_id'] = 3;
22
23 $action = $_SERVER['SCRIPT_NAME']."/item/$item_id/edit";
24 echo $this->html->render_insert_form('item', $columns, $selectbox, $current, false, $action);
25 break;
26}
This page took 0.135826 seconds and 4 git commands to generate.