PHP Code:
<?php if ($_SESSION['customer_id']) {
$menubg = 'topmenubg_';
} else {
if (STORE_STATUS == '0') {
$menubg = 'topmenubg_login_';
} } ?>
<?php //Smart Backgrounds - for foreground logo - 20081212
$smart_image = '';
$unique_ezpages = true;//change to false to not have diff bg for each ezpage
if ($current_page_base == 'index' or $current_page_base == 'product_info') { //change filename to $menubg and top cat id only if cat image exists
$smart_image = (file_exists(DIR_WS_TEMPLATE_IMAGES . $menubg . str_replace(strstr($_GET[cPath],'_'),'',$_GET[cPath]) . '.gif'))?$menubg . str_replace(strstr($_GET[cPath],'_'),'',$_GET[cPath] . '.gif'):HEADER_LOGO_IMAGE;
} elseif ($current_page_base == 'page' and $unique_ezpages == true) { //change filename to $menubg_page and ez-page id only if ez-page image exists
$smart_image = (file_exists(DIR_WS_TEMPLATE_IMAGES . $menubg . 'page' . $_GET[id] . '.gif'))?$menubg . 'page' . $_GET[id] . '.gif':HEADER_LOGO_IMAGE;
} else { //change filename to $menubg and pagename only if page image exists
$smart_image = (file_exists(DIR_WS_TEMPLATE_IMAGES . $menubg . $current_page_base . '.gif'))?$menubg . $current_page_base . '.gif':HEADER_LOGO_IMAGE; //default/home page image will be as defined (HEADER_LOGO_IMAGE)
}// /Smart Backgrounds
$menubg .= $smart_image;?>
Bookmarks