'', 'status' => AGENT_STATUS_ALL)); $id = (int)get_parameter('id', 0); $method = get_parameter('method', 'on_demand'); $tree = new Tree($type, $method, $id); $tree->setFilter(array( 'status' => $filter['status'], 'search' => $filter['search'])); echo json_encode(array('success' => 1, 'tree' => $tree->getArray())); return; } return; } ?>