';
foreach ($marketing_structure as $marketing => $folders){
$style = '';
if (!empty($product_group) && $product_group !== $marketing) {
$style = ' style="opacity: 0.5; color: #999; background-color: #f5f5f5;"';
} elseif (!empty($product_group) && $product_group === $marketing) {
$style = ' style="background-color: #007cba; color: white;"';
}
echo '
'.$marketing.'';
}
echo'
';
// Only show folders if a product group is selected
if (!empty($product_group) && isset($marketing_structure[$product_group])) {
foreach($marketing_structure[$product_group] as $folder){
echo '
'.$folder.'';
}
}
echo '
';
if (isset($product_group) && $product_group !='' && isset($product_content) && $product_content !=''){
echo '
';
$dir_name = $main_marketing_dir.$product_group.'/'.$product_content;
$files = array_diff(scandir($dir_name), array('.', '..'));
echo'';
foreach ($files as $file) {
$filetype = strtolower(pathinfo($file,PATHINFO_EXTENSION));
if ( $filetype != '' && $filetype != 'ds_store'){
echo '
';
}
}
echo '
';
}
template_footer();
?>