$l10nFile = 'l10n/grouping.php'; $viewFile = 'views/grouping.php'; } elseif ($_GET['page'] === 'fetch') { switch ($_POST['table']) { case 'indicium_furn': $editdata = $furniture->FetchItem($_POST['id']); $editdata['tags'] = $furniture->listTags($_POST['id']); break; case 'indicium_keys': $editdata = $key->FetchItem($_POST['id']); $editdata['tags'] = $key->listTags($_POST['id']); break; case 'indicium_cpu': $editdata = $cpu->fetchItem($_POST['id']); $editdata['tags'] = $cpu->listTags($_POST['id']); $editdata['conns'] = $cpu->listConn($_POST['id']); break; case 'indicium_mon': $editdata = $mon->fetchItem($_POST['id']); $editdata['tags'] = $mon->listTags($_POST['id']); $editdata['conns'] = $mon->listConn($_POST['id']); break; case 'indicium_per': $editdata = $per->fetchItem($_POST['id']); $editdata['tags'] = $per->listTags($_POST['id']); $editdata['conns'] = $per->listConn($_POST['id']); break; } header('Content-Type: application/json; charset=utf-8'); echo json_encode($editdata); exit;
if (!isset($_GET['dep'])) { $_GET['dep'] = $SESSION->department; if ($_GET['dep'] === '8') { $cur_dep = '0'; } else { $cur_dep = $_GET['dep']; } } else { $cur_dep = $_GET['dep']; } $status = $_GET['status']; $depfil = $SESSION->department; $data = $equip->listItems($cur_dep, $status); foreach ($data as $key => $d) { $data[$key]['tag'] = $equip->listTags($data[$key]['cpu_id']); $data[$key]['conn'] = $equip->listConn($data[$key]['cpu_id']); } $allTags = $equip->listAllTags(); $allConn = $equip->listAllConn(); $duplicateserialnum = $equip->listDuplCPU(); $duplicatemac = $equip->listDuplMAC(); $duplicateip = $equip->listDuplIP(); $makes = $equip->listMakes(); $employees = $equip->listEmployees(); $departments = $equip->listDepartments(); $listStatus = $equip->listStatus(); $allBuildings = $equip->listAllBuildings(); $render = true; $l10nFile = 'l10n/cpu.php'; $viewFile = 'views/cpu.php'; } elseif ($_GET['page'] === "fetch") {