'.$marketing_h2.'

'.$marketing_p.'

'; 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 '
'; if ( $filetype == "jpg" || $filetype == "png" || $filetype == "jpeg" || $filetype == "gif" || $filetype == "png"){ echo' '; } if ($filetype == "doc" || $filetype == "docx" || $filetype == "xls"|| $filetype == "xlsx"){ echo' '; } if ( $filetype == "pdf"){ echo' '.ucfirst(substr($file, 0, strpos($file, '.ucfirst(substr(substr($file, 0, strpos($file, ".")),0 ,25)).' '; } if ( $filetype == "mp4"){ echo' '; } echo'
'; } } echo '
'; } template_footer(); ?>