if (isset($_POST['do'])) { $vbulletin->input->clean_array_gpc('p', array('do' => TYPE_STR, 'mydo' => TYPE_STR)); } else { $vbulletin->input->clean_array_gpc('r', array('do' => TYPE_STR)); } switch ($vbulletin->GPC['do']) { case 'list_nodes': //This is called from ajax.php. It returns a list of // sections and leaves for a display panel. Because //we're just returning xml for ajax we don't want any headers, etc. require_once DIR . '/includes/functions_misc.php'; $vbulletin->input->clean_array_gpc('r', array('nodeid' => TYPE_UINT, 'level' => TYPE_UINT)); if ($vbulletin->GPC_exists['nodeid']) { $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml'); $xml->add_group('root'); $xml->add_tag('html', vBCms_ContentManager::getLeafPanel($vbulletin->GPC['nodeid'], 'sel_node_' . $vbulletin->GPC['nodeid'], $vbulletin->GPC['level'])); $xml->close_group(); $xml->print_xml(); } break; case 'find_leaves': //This is also called from ajax.php. It returns a list of // sections and leaves for a display panel, with only leaves clickable. Because //we're just returning xml for ajax we don't want any headers, etc. require_once DIR . '/includes/functions_misc.php'; $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml'); $xml->add_group('root'); $xml->add_tag('html', vBCms_ContentManager::getNodeSearchResults()); $xml->close_group(); $xml->print_xml(); break;