// ########################## REQUIRE BACK-END ############################ require_once './global.php'; require_once DIR . '/includes/adminfunctions_help.php'; // ############################# LOG ACTION ############################### $vbulletin->input->clean_array_gpc('r', array('adminhelpid' => TYPE_INT)); log_admin_action(iif($vbulletin->GPC['adminhelpid'] != 0, "help id = " . $vbulletin->GPC['adminhelpid'])); // ######################################################################## // ######################### START MAIN SCRIPT ############################ // ######################################################################## if (empty($_REQUEST['do'])) { $_REQUEST['do'] = 'answer'; } // ############################### start download help XML ############## if ($_REQUEST['do'] == 'download') { $vbulletin->input->clean_array_gpc('p', array('product' => TYPE_STR)); $doc = get_help_export_xml($vbulletin->GPC['product']); require_once DIR . '/includes/functions_file.php'; file_download($doc, 'vbulletin-adminhelp.xml', 'text/xml'); } // ######################################################################### print_cp_header($vbphrase['admin_help']); if ($vbulletin->debug) { print_form_header('', '', 0, 1, 'notaform'); print_table_header($vbphrase['admin_help_manager']); print_description_row(construct_link_code($vbphrase['add_new_topic'], "help.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit") . construct_link_code($vbphrase['edit_topics'], "help.php?" . $vbulletin->session->vars['sessionurl'] . "do=manage") . construct_link_code($vbphrase['download_upload_adminhelp'], "help.php?" . $vbulletin->session->vars['sessionurl'] . "do=files"), 0, 2, '', 'center'); print_table_footer(); } // ############################### start do upload help XML ############## if ($_REQUEST['do'] == 'doimport') { $vbulletin->input->clean_array_gpc('p', array('serverfile' => TYPE_STR)); $vbulletin->input->clean_array_gpc('f', array('helpfile' => TYPE_FILE));
function autoexport_write_main_help() { require_once(DIR . '/includes/adminfunctions_options.php'); $xml = get_help_export_xml('vbulletin'); autoexport_write_file_with_backup(DIR . '/install/vbulletin-adminhelp.xml', $xml); }