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