-
Notifications
You must be signed in to change notification settings - Fork 2
/
_rackview.php
26 lines (24 loc) · 1.11 KB
/
_rackview.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
require 'lib/global.php';
if(isset($_POST['position'])) {
$position=parsePosition($_POST['position']);
if($position['type']=='position') {
$rack=getRack($position['rack_id'],FALSE,$position['xpos'],$position['ypos']);
$table=new htmlTable('Rack '.$rack['data']['rack_name'].' in '.$rack['storage']['storage_name'],array('class' => 'rack'));
$table->addData(parseRackLayout($rack['layout']));
echo $table->render();
} elseif($position['type']=='rack') {
$rack=getRack($position['rack_id'],FALSE);
$table=new htmlTable('Rack '.$rack['data']['rack_name'].' in '.$rack['storage']['storage_name'].' '.formatStorageStatus($rack['data']['rack_status']),array('class' => 'rack'));
$table->addData(parseRackLayout($rack['layout']));
echo $table->render();
} elseif($position['type']=='storage') {
$storage=getStorage($position['storage_id']);
$table=new htmlTable('Racks in '.$storage['data']['storage_name'].' '.formatStorageStatus($storage['data']['storage_status']),array('class' => 'rack'));
$table->addData(parseStorageLayout($storage));
echo $table->render();
}
} else {
echo "Parameter missing...";
}
?>