document.write("<div class=\"pastie\">\n");
document.write("  <link href=\"http://pastie.org/stylesheets/embed.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  <link href=\"http://pastie.org/stylesheets/clean.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  \n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("	\n");
document.write("	<div class=\"allcode\">\n");
document.write("		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n");
document.write("		<tr>\n");
document.write("			<td>\n");
document.write("				\n");
document.write("				<pre class=\"textmate-source-numbers\">1\n");
document.write("2\n");
document.write("3\n");
document.write("4\n");
document.write("5\n");
document.write("6\n");
document.write("7\n");
document.write("8\n");
document.write("9\n");
document.write("10\n");
document.write("11\n");
document.write("12\n");
document.write("13\n");
document.write("14\n");
document.write("15\n");
document.write("16\n");
document.write("<\/pre>\n");
document.write("			<\/td>\n");
document.write("		<td>\n");
document.write("		<pre class=\"textmate-source\"><pre class=\"sunburst\"><span class=\'source source_php source_php_embedded source_php_embedded_block source_php_embedded_block_html\'>&lt;?php\n");
document.write("\n");
document.write("<span class=\'meta meta_function meta_function_php\'><span class=\'storage storage_type storage_type_function storage_type_function_php\'>function<\/span> <span class=\'entity entity_name entity_name_function entity_name_function_php\'>displaySitemap<\/span>(<span class=\'meta meta_function meta_function_arguments meta_function_arguments_php\'><span class=\'meta meta_function meta_function_argument meta_function_argument_no-default meta_function_argument_no-default_php\'><span class=\'variable variable_other variable_other_php\'>$n<\/span><\/span><\/span>)<\/span> {\n");
document.write("	<span class=\'variable variable_other variable_other_php\'>$query<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'support support_function support_function_php_mysql support_function_php_mysql_php\'>mysql_query<\/span>(<span class=\'string string_quoted string_quoted_double string_quoted_double_sql string_quoted_double_sql_php\'>&quot;<span class=\'source source_sql source_sql_embedded source_sql_embedded_php\'><span class=\'keyword keyword_other keyword_other_DML keyword_other_DML_sql\'>SELECT<\/span> * <span class=\'keyword keyword_other keyword_other_DML keyword_other_DML_sql\'>FROM<\/span> category <span class=\'keyword keyword_other keyword_other_DML keyword_other_DML_sql\'>WHERE<\/span> parent_id = <span class=\'string string_quoted string_quoted_single string_quoted_single_sql\'>\'<span class=\'variable variable_other variable_other_php\'>$n<\/span>\'<\/span> <span class=\'keyword keyword_other keyword_other_DML keyword_other_DML_sql\'>ORDER BY<\/span> name<\/span>&quot;<\/span>);\n");
document.write("	<span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'support support_function support_function_php_mysql support_function_php_mysql_php\'>mysql_num_rows<\/span>(<span class=\'variable variable_other variable_other_php\'>$query<\/span>)) {\n");
document.write("		<span class=\'support support_function support_function_construct support_function_construct_php\'>echo<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>&lt;ul&gt;<\/span>\'<\/span>;\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>while<\/span> (<span class=\'variable variable_other variable_other_php\'>$category<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'support support_function support_function_php_mysql support_function_php_mysql_php\'>mysql_fetch_assoc<\/span>(<span class=\'variable variable_other variable_other_php\'>$query<\/span>)) {\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>echo<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>&lt;li&gt;&lt;a href=&quot;category.php?id=<\/span>\'<\/span><span class=\'keyword keyword_operator keyword_operator_string keyword_operator_string_php\'>.<\/span><span class=\'variable variable_other variable_other_php\'>$category<\/span>[<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>id<\/span>\'<\/span>]<span class=\'keyword keyword_operator keyword_operator_string keyword_operator_string_php\'>.<\/span><span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>&quot;&gt;<\/span>\'<\/span><span class=\'keyword keyword_operator keyword_operator_string keyword_operator_string_php\'>.<\/span><span class=\'variable variable_other variable_other_php\'>$category<\/span>[<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>name<\/span>\'<\/span>]<span class=\'keyword keyword_operator keyword_operator_string keyword_operator_string_php\'>.<\/span><span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>&lt;/a&gt;<\/span>\'<\/span>;\n");
document.write("			<span class=\'meta meta_function-call meta_function-call_php\'>displaySitemap<\/span>(<span class=\'variable variable_other variable_other_php\'>$category<\/span>[<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>id<\/span>\'<\/span>]);\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>echo<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>&lt;/li&gt;<\/span>\'<\/span>;\n");
document.write("		}\n");
document.write("		<span class=\'support support_function support_function_construct support_function_construct_php\'>echo<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>&lt;/ul&gt;<\/span>\'<\/span>;\n");
document.write("	}\n");
document.write("}\n");
document.write("\n");
document.write("<span class=\'meta meta_function-call meta_function-call_php\'>displaySitemap<\/span>(<span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>);\n");
document.write("<\/pre><\/pre>\n");
document.write("		<\/td>\n");
document.write("		<\/tr>\n");
document.write("		<\/table>\n");
document.write("	\n");
document.write("	<\/div>\n");
document.write("\n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("  <div class=\"credit\">\n");
document.write("    <div class=\"buttons\">\n");
document.write("      <a href=\"http://pastie.org/pastes/650725.txt\">\n");
document.write("      <img src=\"http://pastie.org/images/view.png\" height=\"20\" width=\"67\" /><\/a>\n");
document.write("    <\/div>\n");
document.write("  \n");
document.write("    <a href=\"http://pastie.org/650725\">Pastie #650725<\/a> linked directly from <a href=\"http://pastie.org/\">Pastie<\/a>.\n");
document.write("  <\/div><\/div>");
