* This routine puts the standard HTML header at the top of the index page. * We include the DOCTYPE because we may be using features therefrom (i.e., * HEIGHT and WIDTH attributes on the icons if we're FancyIndexing). */
| 167 | * HEIGHT and WIDTH attributes on the icons if we're FancyIndexing). |
| 168 | */ |
| 169 | static void emit_preamble(request_rec *r, int xhtml, const char *title) |
| 170 | { |
| 171 | autoindex_config_rec *d; |
| 172 | |
| 173 | d = (autoindex_config_rec *) ap_get_module_config(r->per_dir_config, |
| 174 | &autoindex_module); |
| 175 | |
| 176 | if (xhtml) { |
| 177 | ap_rvputs(r, DOCTYPE_XHTML_1_0T, |
| 178 | "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n" |
| 179 | " <head>\n <title>Index of ", title, |
| 180 | "</title>\n", NULL); |
| 181 | } else { |
| 182 | ap_rvputs(r, DOCTYPE_HTML_4_01, |
| 183 | "<html>\n <head>\n" |
| 184 | " <title>Index of ", title, |
| 185 | "</title>\n", NULL); |
| 186 | } |
| 187 | |
| 188 | if (d->style_sheet != NULL) { |
| 189 | ap_rvputs(r, " <link rel=\"stylesheet\" href=\"", d->style_sheet, |
| 190 | "\" type=\"text/css\"", xhtml ? " />\n" : ">\n", NULL); |
| 191 | } |
| 192 | if (d->head_insert != NULL) { |
| 193 | ap_rputs(d->head_insert, r); |
| 194 | } |
| 195 | ap_rputs(" </head>\n <body>\n", r); |
| 196 | } |
| 197 | |
| 198 | static void push_item(apr_array_header_t *arr, char *type, const char *to, |
| 199 | const char *path, const char *data) |
no test coverage detected