1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
/*
** footer.c -- Apache layout module
** $Revision: 1.3 $
*/
#include "mod_layout.h"
LAYOUT_EXPORT(void)layout_footer(request_rec *r, layout_conf *cfg, layout_request *info) {
int x = 0;
int assbackwards = 0;
int status = OK;
layout_string **current_footer;
current_footer = (layout_string **) cfg->footer->elts;
for(x = 0; x < cfg->footer->nelts; x++) {
if (isOn(cfg->comment))
ap_rprintf(r, "\n\n<!-- Beginning of: %s -->\n\n", current_footer[x]->comment);
#ifdef DEBUG
printf("Calling Footer %s\n", current_footer[x]->comment);
#endif
if (current_footer[x]->type > 0){
ap_rputs(current_footer[x]->string, r);
} else {
if ((status = call_container(r, current_footer[x]->string, cfg, info, 1)) != OK) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r, "The following error occured while processing the LayoutFooter : %d", status);
}
}
if (isOn(cfg->comment))
ap_rprintf(r, "\n\n<!-- End of: %s -->\n\n", current_footer[x]->comment );
}
}
|