read())) { if( $file != '..' && $file != '.' ){ if( strpos($file,".LCK") ){ continue; } if( is_dir( $path . '/' . $file ) ){ $f[ $file ] = array(); rec_dir( $f[ $file ], $path . '/' . $file ); } else { $f[ $file ] = $file; } } } } } function stripnumbers($k){ $index = strpos($k,"_")+1; if( $index == 1 ){ $index = 0; } $display = substr($k,$index); $display = str_replace("slash","/",$display); $display = str_replace('_', ' ', $display); return $display; } $icons = array(); $menustr = ''; $id = 0; function print_dir( $f, $path, $hidden = false ){ // recurse back through and make the menus / icons global $mode, $icons, $menustr, $current_folder, $current_img, $current_src, $id, $ishome, $k; $i = 0; ksort( $f, SORT_STRING ); foreach( $f as $k => $v ){ if( $k == '_notes' ){ continue; } $display = stripnumbers( $k ); if( !$hidden ){ $hidden = ($display == 'misc') && ( $mode != 'all' ); } if( is_array( $v ) ){ //folder if(!$hidden){ $id++; $depth = substr_count( $path,"/" ); if( !$hidden ){ if( is_array( reset( $v ) ) ){ $inside = '

'.$display.'

'; } else { $inside = '

' . $display . '

'; } if ($path == "/01_Portraits" AND $k == "01_Leaders"){ $inside = '

' . $display . '

'; } } if( $depth == 0 ){ //expandable $inside = '

' . $display .'

'; } $hide = strpos( $current_folder, $path . '/' . $k ) === false && $depth == 0; //if( $ishome && $path . '/' . $k == '/Portfolios' ){ $hide = false; } $menustr .= '
' . $inside . '
'; } print_dir( $v, $path . '/' . $k, $hidden ); if( !$hidden ){ $menustr .= '
'; } } else { //it's icons $icons[ $path ] .= ''; $icons[ $path . '_count' ] += 1; if( $i == $current_img && $path == $current_folder ){ $current_src = $path . '/' . $k; } } $i++; } } $tree = array(); rec_dir( $tree, "Galleries" ); //print_r( $tree ); print_dir( $tree, "" ); ?> Executive portrait, Corporate portrait photographers, on location photography | John Earle Photography | Boston MA Concord MA John Earle Photography Logo
Contact John Earle

HOME |

"mp4" && $file_parts["extension"]<>"mov"){ $i = $icons[ $current_folder . '_count' ]; $img = '' ; if( $current_img < $i-1 ){ echo '' . $img . ''; } else { echo $img; } } elseif ($file_parts["extension"]="mp4" || $file_parts["extension"]="mov"){ $i = $icons[ $current_folder . '_count' ]; $img = '
'; echo $img; } //END BWS ?>

1){ $previ = $current_img-1; $nexti = $current_img+1; if( $previ < 0 ){ $previ = $i-1; } if( $nexti >= $i ){ $nexti = 0; } ?>

Home Page Photograph

© 2014 John Earle Photographer
All Rights Reserved

1){ ?>