} return $this->get_nodes_html($node->childs, 1); } protected function aj_logout() { $_SESSION['logged'] = false; $_SESSION['logged_ip'] = ''; } protected function aj_get_nav_items($node_id) { $node = new Node(); if (!$node->find_by_id($node_id)) { throw new Exception('Node not found'); } if (array_key_exists($node->full_path, $this->subtree_type_handlers)) { $mod_name = $this->subtree_type_handlers[$node->full_path]; } else { if (array_key_exists($node->type, $this->modules)) { $mod_name = $node->type; } else { throw new Exception('Appropriate module not found'); } } $res = $this->modules[$mod_name]->get_navigator_items($node); $res['module'] = $mod_name; return $res; } } $page = new AdminPage(); $page->process();