isLoggedIn() ) $auth->goToPage( $auth->ac_login ); # get account settings $userid = getUserID($auth->userid); $q = "SELECT * FROM users WHERE id = '$userid' LIMIT 1"; $q = validateQuery($q); $DB->base_Query($q); while( $row = $DB->base_Fetch_Array() ) { $city = $row['city']; $state = getState( $row['state'], 'shortName' ); $email = $row['email']; $disp_name = $row['disp_name']; $approve_msg = $row['approve_msg']; $creel = $row['creel']; $creel = explode( "|", $creel ); $photo = $row['photo']; if( !$photo ) { $user_photo = "\n"; } else { $user_photo = "\n"; } } # get creel requests $q = "SELECT * FROM creel_request WHERE user_id = '$userid'"; $q = validateQuery($q); $DB->base_Query($q); $num_creel_req = $DB->base_Num_Rows(); if( $num_creel_req > 0 ) { $num_creel_req = "$num_creel_req [Manage Buddy List]\n"; } else { $num_creel_req = "None"; } $creel_requests = array(); while( $row = $DB->base_Fetch_Array() ) { array_push( $creel_requests, $row ); } # get messaging info $q = "SELECT count(*) as count FROM messaging WHERE user_id = '$userid' AND approved != '1'"; $q = validateQuery($q); $DB->base_Query($q); $row = $DB->base_Fetch_Array(); $num_unapproved_msg = $row[0]; if( $num_unapproved_msg > 0 ) { $num_unapproved_msg = "$num_unapproved_msg [Manage Messages]\n"; } else { $num_unapproved_msg = "None"; } $q = "SELECT * FROM messaging WHERE user_id = '$userid' ORDER BY dttm DESC limit 5"; $q = validateQuery($q); $DB->base_Query($q); if( $DB->base_Num_Rows() > 0 ) { $MSGS = array(); while( $row = $DB->base_Fetch_Array() ) { array_push( $MSGS, $row ); } } $accountSettings = "\n"; $accountSettings .= "\n"; $accountSettings .= "\n"; $accountSettings .= "\n"; $accountSettings .= "\n"; $accountSettings .= "
$user_photo
[ Update Photo ]
\n"; $accountSettings .= "Display Name: $disp_name
\n"; $accountSettings .= "Email Address: $email
\n"; $accountSettings .= "Location: $city, $state

\n"; if( $approve_msg ) { $accountSettings .= "Unapproved Messages: $num_unapproved_msg
\n"; } $accountSettings .= "Creel Requests: $num_creel_req

\n"; $accountSettings .= "
\n"; $q = "SELECT s.longName, s.stateKey FROM states s, users u WHERE u.state = s.stateKey AND u.id = '$userid' LIMIT 1"; $q = validateQuery($q); $DB->base_Query($q); $row = $DB->base_Fetch_Array(); $userState = $row[0]; $stateKey = $row[1]; # Get all the reports for this page $REPORTS = array(); $q = "SELECT * FROM reports WHERE state_key = '$stateKey' ORDER BY id DESC LIMIT 3"; $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 .= "

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

\n"; if( $REPORTS[$i]['water'] ) { $stateReports .= "Body of Water: " . $REPORTS[$i]['water'] . "
\n"; } $stateReports .= html_entity_decode($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( count($REPORTS) == 0 ) { $stateReports = "
Sorry, there are no reports for $userState. Submit the first one now
\n"; } # get the trips info $q = "SELECT * FROM trips WHERE user_id = '$userid' LIMIT 4"; $q = validateQuery($q); $DB->base_Query($q); if($DB->base_Num_Rows() > 0 ) { $trips = "\n"; while( $row = $DB->base_Fetch_Array() ) { $c++; if( $c % 2 ) { $class = "class='msg_bg_1 borderBottom'"; } else { $class = "class='msg_bg_2 borderBottom'"; } $trips .= "\n"; $trips .= "\n"; $trips .= "\n"; $trips .= "\n"; $trips .= "\n"; } $trips .= "
" . restoreQuotes($row['name']) . "" . restoreQuotes($row['water']) . "" . date('m/d/Y',$row['dttm']) . "
\n"; } else { $trips = "
You have no trips. Add your first trip now
\n"; } commonHeader("Upload Photos, Manage Profile, Create Trips from Your Account",0); ?> isLoggedIn()); ?>
isLoggedIn()); ?>

Your Account Home

Welcome to the homepage of your account! Here you will be able to recommend guide services, submit links, manage your trips, upload photos, share your profile, and so much more. Plus, with your free account, you will be able to access all areas of the website.

Account Settings

Edit Profile     View Your Profile





Buddy List

Manage Buddy List



Fishing Reports

Submit a Fishing Report