$paths[] = $id; } else { $mode = M_ERROR; break; } } if ($mode > 0) { $paths_count = count($paths); $this_node_id =& $paths[$paths_count - 1]; $this_node = node_GetNodeById($this_node_id); $author_node = []; if (!empty($this_node['author']) && $this_node['author'] > 0) { $author_node = node_GetNodeById($this_node['author']); } if (!empty($this_node['parent']) && $this_node['parent'] > 0) { $parent_node = node_GetNodeById($this_node['parent']); } $nodes = node_GetNodesByParentId($this_node_id); $nodes_count = count($nodes); } } template_GetHeader(); ?> <body> <script> // Cookie Functions // function getCookie(name) { var value = "; " + document.cookie; var parts = value.split("; " + name + "="); if (parts.length == 2) return parts.pop().split(";").shift();
} } /** * @api {GET} /a/node/get/:nodeid /a/node/get * @apiName GetNode * @apiGroup Node * @apiPermission Member * @apiVersion 0.1.0 */ if ($action === 'get') { if ($arg_count === 1) { $node_id = intval($arg[0]); if ($node_id <= 0) { json_EmitError(); } $node = node_GetNodeById($node_id); if (!empty($node)) { $response[] = $node; } } else { if ($arg_count === 0) { $nodes = explode(' ', $_GET['ids']); foreach ($nodes as &$node) { $node = intval($node); } //var_dump( $nodes ); $response = node_GetNodesByIds($nodes); } } } else { json_EmitError();