Hi. Is there a way to modify this code to include more then two files? I would like to be able to include two more. I played around with it a little bit but I could not quite figure it out. Any help or suggestions would be appreciated. Thank you.function pageheader($section, $meta = '')
{
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir;
// this is the place where the custom header file gets included
if(empty($custom_header)){
ob_start();
include('menu_main.htm');
$custom_header = cleanup_custom_includes(ob_get_contents());
ob_clean();
}
header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
user_save_profile();
$template_vars = array('{LANG_DIR}' => $lang_text_dir,
'{TITLE}' => $CONFIG['gallery_name'] . ' - ' . $section,
'{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
'{META}' => $meta,
'{GAL_NAME}' => $CONFIG['gallery_name'],
'{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
'{MAIN_MENU}' => theme_main_menu(),
'{ADMIN_MENU}' => theme_admin_mode_menu(),
'{CUSTOM_HEADER}' => $custom_header,
);
echo template_eval($template_header, $template_vars);
}
// Function for writing a pagefooter
function pagefooter()
{
global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;
global $template_footer;
// this is the place where the custom footer file gets included
if(empty($custom_footer)){
ob_start();
include('stopka_for.php');
$custom_footer = cleanup_custom_includes(ob_get_contents());
ob_clean();
}
if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
cpg_debug_output();
}
$template_vars = array(
'{CUSTOM_FOOTER}' => $custom_footer,
);
echo template_eval($template_footer, $template_vars);
}
// Function to clean up any double html leftovers from the custom header and footer that are not meant to get parsed
function cleanup_custom_includes($string) {
$string = str_replace('<HTML>', '', $string);
$string = str_replace('<HEAD>', '', $string);
$string = str_replace('<BODY>', '', $string);
$string = str_replace('</HTML>', '', $string);
$string = str_replace('</HEAD>', '', $string);
$string = str_replace('</BODY>', '', $string);
return $string;
}