コード例 #1
0
ファイル: grouping.php プロジェクト: hughnguy/php
    //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']);
            $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;
コード例 #2
0
ファイル: furniture.php プロジェクト: hughnguy/php
$l10n->setLanguage($SESSION->lang);
//============================================================================================
// Model
//============================================================================================
require 'models/furniture.php';
$equip = new Furniture();
//============================================================================================
// Load the page requested by the user
//============================================================================================
if (!isset($_GET['page'])) {
    if (isset($_GET['discarded']) && $_GET['discarded'] === '1') {
        $equip->showDiscarded = true;
    }
    $data = $equip->listItems($SESSION->department);
    foreach ($data as $key => $d) {
        $data[$key]['tag'] = $equip->listTags($data[$key]['furn_id']);
    }
    $allTags = $equip->listAllTags();
    $types = $equip->listTypes();
    $departments = $equip->listDepartments();
    $allBuildings = $equip->listAllBuildings();
    $render = true;
    $l10nFile = 'l10n/furniture.php';
    $viewFile = 'views/furniture.php';
} elseif ($_GET['page'] === "fetch") {
    //Fetch specific furniture information
    $editdata = $equip->fetchItem($_POST['furn_id']);
    header('Content-Type: application/json; charset=utf-8');
    echo json_encode($editdata);
    exit;
} elseif ($_GET['page'] === "add") {