예제 #1
0
파일: grouping.php 프로젝트: hughnguy/php
    //For key edit dialog
    $key_makes = $key->listMakes();
    $key_locktypes = $key->listLockTypes();
    $key_empassign = $key->listEmployees();
    //For cpu edit dialog
    $cpu_makes = $cpu->listMakes();
    $cpu_assign = $cpu->listEmployees();
    $cpu_departments = $cpu->listDepartments();
    //For mon edit dialog
    $mon_makes = $mon->listMakes();
    $mon_assign = $mon->listEmployees();
    $mon_departments = $mon->listDepartments();
    //For per edit dialog
    $per_types = $per->listTypes();
    $per_assign = $per->listEmployees();
    $per_departments = $per->listDepartments();
    $render = true;
    $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']);
예제 #2
0
파일: per.php 프로젝트: hughnguy/php
    } else {
        $cur_dep = $_GET['dep'];
    }
    $status = $_GET['status'];
    $depfil = $SESSION->department;
    $data = $equip->listItems($cur_dep, $_GET["status"]);
    foreach ($data as $key => $d) {
        $data[$key]['tag'] = $equip->listTags($data[$key]['per_id']);
        $data[$key]['conn'] = $equip->listConn($data[$key]['per_id']);
    }
    $allTags = $equip->listAllTags();
    $allConn = $equip->listAllConn();
    $duplicateper = $equip->listDuplPer();
    $types = $equip->listTypes();
    $employees = $equip->listEmployees();
    $departments = $equip->listDepartments();
    $listStatus = $equip->listStatus();
    $allBuildings = $equip->listAllBuildings();
    $render = true;
    $l10nFile = 'l10n/per.php';
    $viewFile = 'views/per.php';
} elseif ($_GET['page'] === "fetch") {
    //Fetch specific computer information
    $editdata = $equip->fetchItem($_POST['per_id']);
    header('Content-Type: application/json; charset=utf-8');
    echo json_encode($editdata);
    exit;
} elseif ($_GET['page'] === "add") {
    $data = $equip->addItem($_POST);
    header('Content-Type: application/json; charset=utf-8');
    echo json_encode($data);