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