cacee8f53c02dfabd70e94d5029e60d4300b4324
[mirrors/SokoMan.git] / assistants / store.inc.php
1 <?php
2 switch($SUBPATH[0]) {
3 default: case 1:
4 echo $this->html->form("$URL/2", 'GET', array(
5 array('barcode','','text',false,'autofocus','model_barcode:'),
6 array(false,'STORE','submit')
7 ));
8 break;
9 case 2:
10 $model_id = $this->db->map_unique('model_barcode', $_GET['barcode'], 'model_id', 'model');
11 $columns = $this->db->get_columns('item');
12 $selectbox = $this->db->columns_get_selectbox($columns, 'item');
13
14 //print_r(array('<pre>', $selectbox));
15 //foreach($selectbox['model_id'] as $id => $name) if($id != $model_id) unset($selectbox['model_id'][$id]);
16 $current = array(array(
17 'model_id' => $model_id,
18 'item_quantity' => 1,
19 'status_id' => 1
20 ));
21
22 $action = $_SERVER['SCRIPT_NAME'].'/item/new';
23 echo $this->html->render_insert_form('item', $columns, $selectbox, $current, false, $action);
24 break;
25 }
This page took 0.261893 seconds and 3 git commands to generate.