예제 #1
0
파일: grouping.php 프로젝트: hughnguy/php
        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;
} elseif ($_GET['page'] === 'add') {
    $data = $equip->addItem($_POST);
    header('Content-Type: application/json; charset=utf-8');
    echo json_encode($data);
} elseif ($_GET['page'] === 'edit') {
    $data = $equip->editItem($_POST);
    header('Content-Type: application/json; charset=utf-8');
    echo json_encode($data);
예제 #2
0
파일: per.php 프로젝트: hughnguy/php
        $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);
} elseif ($_GET['page'] === 'edit') {
    $data = $equip->editItem($_POST);
    header('Content-Type: application/json; charset=utf-8');
    echo json_encode($data);
} elseif ($_GET['page'] === 'csv') {
    require_once FS_PHP . '/csv.php';
    if (!isset($_GET['status'])) {
        $_GET["status"] = 0;