".$first->county_name." COUNTY\n"; $quads = pg_fetch_all( $rCounty ); echo << EOT; //start the output table echo <<
EOT; //loop through the quads, checking for files foreach( $quads as $i=>$quad ) { if( $i % 2 == 0 ) $rowclass = "lightRow"; else $rowclass = "darkRow"; $quad_code = $quad['vtm_quad']; $quad_name = $quad['vtm_name']; $num_photos = $quad['num_photos']; $quad_name_lower = depunctuate( $quad_name ); $quad_code_link = "$quad_code"; /* //check for georeferenced plot map $file_path = "Plot/Georeferenced/$quad_code/".$quad_code."_".$quad_name_lower.".zip"; if( file_exists( "$file_root/$file_path" ) ) $gplotmap = "Georeferenced Map (". human_filesize( filesize( $file_path ) ) . ")"; else $gplotmap = "(none)"; //check for raw plot map $file_path = "Plot/Raw/$quad_code.zip"; if( file_exists( "$file_root/$file_path" ) ) $rplotmap = "Raw Map (". human_filesize( filesize( $file_path ) ) . ")"; else $rplotmap = "(none)"; //check for plot points shapefile $file_path = "Plot/Vectorized/$quad_code/".$quad_code."_".$quad_name_lower."_plots.zip"; if( file_exists( "$file_root/$file_path" ) ) $plotpointshp = "Shapefile (". human_filesize( filesize( $file_path ) ) . ")"; else $plotpointshp = "(none)"; //check for raw veg map $file_path = "Veg/Raw/$quad_code.zip"; if( file_exists( "$file_root/$file_path" ) ) $rvegmap = "Raw Map (". human_filesize( filesize( $file_path ) ) . ")"; else { $temp_quad = rtrim( $quad_code, "abcdefghijklmnopqrstuvwxyz" ); $subquad = ltrim( $quad_code, "0123456789" ); if( $subquad == strtolower( $subquad ) && file_exists( "$file_root/Veg/Raw/".$temp_quad."_$subquad.zip" ) ) $rvegmap = "Raw Map (". human_filesize( filesize( "$file_root/Veg/Raw/".$temp_quad."_$subquad.zip" ) ) . ")"; else $rvegmap = "(none)"; } */ //check for georeferenced plot map $file_path = "Plot/Georeferenced/$quad_code/".$quad_code."_".$quad_name_lower."-plotmap.zip"; if( file_exists( $file_root.$file_path ) ) $gplotmap = "Georeferenced Map (". human_filesize( filesize( $file_root.$file_path ) ) . ")"; else $gplotmap = "(none)"; //check for raw plot map $file_path = "Plot/Raw/$quad_code.zip"; if( file_exists( $file_root.$file_path ) ) $rplotmap = "Raw Map (". human_filesize( filesize( $file_root.$file_path ) ) . ")"; else $rplotmap = "(none)"; //check for plot points shapefile $file_path = "Plot/Vectorized/$quad_code/".$quad_code."_".$quad_name_lower. "-plots.zip"; if( file_exists( $file_root.$file_path ) ) $plotpointshp = "Shapefile (". human_filesize( filesize( $file_root.$file_path ) ) . ")"; else $plotpointshp = "(none)"; //check for plot data archive $file_path = "Plot/Data/$quad_code/".$quad_code."_".$quad_name_lower."-plotdata.zip"; if( file_exists( $file_root.$file_path ) ) $plotdata = "Plot Data (". human_filesize( filesize( $file_root.$file_path ) ) . ")"; else $plotdata = "(none)"; //check for raw veg map $file_path = "Veg/Raw/$quad_code.zip"; if( file_exists( $file_root.$file_path ) ) $rvegmap = "Raw Map (". human_filesize( filesize( $file_root.$file_path ) ) . ")"; else { $temp_quad = rtrim( $quad_code, "abcdefghijklmnopqrstuvwxyz" ); $subquad = ltrim( $quad_code, "0123456789" ); if( $subquad == strtolower( $subquad ) && file_exists( $file_root."/Veg/Raw/".$temp_quad."_$subquad.zip" ) ) $rvegmap = "Download (". human_filesize( filesize( $file_root."/Veg/Raw/".$temp_quad."_$subquad.zip" ) ) . ")"; else $rvegmap = "(none)"; } //check photos if( $num_photos != 0 ) $photos = "$num_photos photos"; else $photos = "(none)"; echo << EOT; } echo <<
Quad Name Plots Vegetation Photos
{$quad_code_link} {$quad_name} {$gplotmap} {$rplotmap} {$plotpointshp} {$plotdata} {$rvegmap} {$photos}
EOT; pg_close(); } ?>