コード例 #1
0
ファイル: cpu.php プロジェクト: hughnguy/php
        }
    } 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") {
    //Fetch specific computer information
    $editdata = $equip->fetchItem($_POST['cpu_id']);
    header('Content-Type: application/json; charset=utf-8');
    echo json_encode($editdata);
    exit;
} elseif ($_GET['page'] === "add") {