SōkoMan byl pokrten
[mirrors/SokoMan.git] / assistants / store.inc.php
CommitLineData
16261142 1<?php
de77377e 2switch($SUBPATH[0]) {
16261142
TM
3 default: case 1:
4?>
de77377e 5<form action="<?=$URL?>/2" method="GET">
e390b72f 6 model_barcode: <input type="text" name="barcode" autofocus />
16261142
TM
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.145277 seconds and 4 git commands to generate.