base_Query( $q ); while( $row = $DB->base_Fetch_Array() ) { $STATE_KEYS[] = $row['state_key']; } $q = "SELECT * FROM states"; $q = validateQuery( $q ); $DB->base_Query( $q ); while( $row = $DB->base_Fetch_Array() ) { if( in_array( $row['stateKey'], $STATE_KEYS ) ) { if( $SK == $row['stateKey'] ) { $sel = 'selected'; } else { $sel = ''; } $statesList .= "\n"; } } if( $SK ) { # Set the ORDER_BY variable, for the query that gets all the reports if( !$ORDER_BY ) $ORDER_BY = "dttm DESC"; $q = "SELECT longName FROM states WHERE stateKey = '$SK'"; $q = validateQuery( $q ); $DB->base_Query( $q ); $row = $DB->base_Fetch_Array(); $stateName = $row['longName']; $stateTitle = "$stateName"; $statePageTitle = "$stateTitle Fly Fishing Reports"; # Get all the reports for this page $REPORTS = array(); $q = "SELECT * FROM reports WHERE state_key = '$SK' ORDER BY $ORDER_BY"; $q = validateQuery( $q ); $DB->base_Query( $q ); while( $row = $DB->base_Fetch_Array() ) { array_push( $REPORTS, $row ); } for( $i=0; $i < count($REPORTS); $i++ ) { $flies = explode( "|", $REPORTS[$i]['flies'] ); $stateReports .= "

\n"; $stateReports .= "

" . db_clean($REPORTS[$i]['title']) . " (" . date('M d, Y',$REPORTS[$i]['dttm']) . ")

\n"; if( $REPORTS[$i]['water'] ) { $stateReports .= "Body of Water: " . db_clean($REPORTS[$i]['water']) . "
\n"; } $stateReports .= db_clean($REPORTS[$i]['report']); /* if( count($flies) > 0 ) { $stateReports .= "

\n"; $stateReports .= "

Recommended Flies:

\n"; for( $c=0; $c < count($flies); $c++ ) { $flyInfo = getFlyInfo($flies[$c]); if( $flyInfo['image_sm'] ) { $stateReports .= "
\n"; } else { $stateReports .= "
\n"; } $stateReports .= "" . $flyInfo['name'] . "\n"; if( $flyInfo['buy_url'] ) { $stateReports .= "   |   Buy This Fly\n"; } if( $flyInfo['tie_instr'] ) { $stateReports .= "   |   Tying Instructions\n"; } $stateReports .= "
\n"; } } */ $stateReports .= "

\n"; } } if($statePageTitle) { $tit = $statePageTitle; } else { $tit = "Fly Fishing Reports"; } commonHeader($tit,1); ?> isLoggedIn()); ?>
isLoggedIn()); ?>

Fly Fishing Reports

isLoggedIn()) { ?> Submit your fly fishing report to ! Login or Create Account to write submit a fly fishing report .