Updated: $pp_upd_profile"; } else { $pp_created=convert_from_sqldate_user($created); $last_updated="
Created: $pp_created"; } # Get roles. $qUserroles = "SELECT * from pro_userroles WHERE uname='$user' AND role in ('$rolequery') ORDER BY rank DESC"; $rUserroles = mysql_query("$qUserroles"); $userroles = mysql_fetch_array($rUserroles); $roles=""; $total_rank=0; while ($userroles) { if ( $roles ) { $roles .= ", ${userroles['role']}"; } else { $roles = "${userroles['role']}"; } // Acculmulate total rank. $total_rank+=$userroles['rank']; // Get next role. $userroles = mysql_fetch_array($rUserroles); } // Page rank - no portrait if page rank is 10. if (!$pagerolecount) { $pagerolecount=1; } $page_rank=$total_rank/$pagerolecount; if ( $page_rank < 10 ) { // Show full entry. # Get portrait. if (file_exists($portrait_dir."/T".$user.".jpg")) { $portrait = $portrait_url."/T".$user.".jpg"; $size = getimagesize($portrait_dir."/T".$user.".jpg"); } else { $portrait = $portrait_url."/Tmissing.jpg"; $size = getimagesize($portrait_dir."/Tmissing.jpg"); } # Display the user. ?> "; } } ?>
border="0">




border="0">


Invalid age category ($cat). Must be kid, youth, junior, senior or master.

"; $error="Y"; } } if ( $error != "Y" ) { if ( $category ) { $qStats = "SELECT * from pro_stats"; $rStats = mysql_query("$qStats"); $stats = mysql_fetch_array($rStats); # Get all users in this age category. while ($stats) { # Get BSA category. $dob=$stats['dob']; $cat_s=get_bsacat($dob,"q"); # Check each category passed. foreach ($cats as $cat) { $pp_cat=ucfirst($cat); if ( $cat_s == $pp_cat ) { $uname[]=$stats['uname']; } } # Get next row. $stats = mysql_fetch_array($rStats); } # See if any users this age category. $count=count($uname); if ( $count == 0 ) { echo "

No users in the $pp_category age group.

"; $error="Y"; } $pp_category=ucfirst($category); $text .= "$pp_category"; } } # Validate sex. switch ($sex) { case "": break; case "m": $pp_sex="Male"; break; case "f": $pp_sex="Female"; break; default: echo "

Invalid sex. Must be m or f.

"; $error="Y"; } if ( $sex ) { $qStats = "SELECT * from pro_stats WHERE sex='$sex'"; $rStats = mysql_query("$qStats"); $stats = mysql_fetch_array($rStats); # Get all users with this sex. while ($stats) { $uname_x[]=$stats['uname']; # Get next row. $stats = mysql_fetch_array($rStats); } # Get union of arrays so far. if ( is_array($uname) ) { $uname=array_intersect($uname,$uname_x); } else { $uname=$uname_x; } $text .= " $pp_sex"; } # Validate roles. # Generate query string for multiple roles. $pagerolecount=str_word_count($role); $role=ucwords($role); $rolequery=str_replace(" ","','",$role); $qUserroles = "SELECT * from pro_userroles WHERE role in ('$rolequery')"; $rUserroles = mysql_query("$qUserroles"); $nUserroles = mysql_num_rows($rUserroles); if ( $role && $nUserroles == 0 ) { echo "

No users with any of these roles: ".$role."

"; $error="Y"; } else { if ( $role ) { # Get all users with this role. $userroles = mysql_fetch_array($rUserroles); while ($userroles) { $uname_r[]=$userroles['uname']; # Get next row. $userroles = mysql_fetch_array($rUserroles); } # Ensure multiple user entries removed. $uname_r = array_unique($uname_r); # Populate final array. $x=count($uname); if ( is_array($uname) ) { $uname=array_intersect($uname,$uname_r); } else { $uname=$uname_r; } $text .= " $role"; } } # Add plural to current description. if ( (substr($text,-1) != "s") && ($text) ) { $text .= "s "; } # Validate sponsor. $qUsersponsors = "SELECT * from pro_usersponsors WHERE sponsor='$sponsor'"; $rUsersponsors = mysql_query("$qUsersponsors"); $nUsersponsors = mysql_num_rows($rUsersponsors); if ( $sponsor AND $nUsersponsors == 0 ) { echo "

No users with a sponsor of $sponsor.

"; $error="Y"; } else { if ( $sponsor ) { # Get all users with this sponsor. $usersponsors = mysql_fetch_array($rUsersponsors); while ($usersponsors ) { $uname_s[]=$usersponsors['uname']; # Get next row. $usersponsors = mysql_fetch_array($rUsersponsors); } # Get union of arrays so far. if ( count($uname) ) { $uname=array_intersect($uname,$uname_s); } else { $uname=$uname_s; } # Get sponsors details. $qSponsors = "SELECT * from pro_sponsors WHERE sponsor='$sponsor'"; $rSponsors = mysql_query("$qSponsors"); $sponsors = mysql_fetch_array($rSponsors); $sponsor_name=$sponsors['name']; $sponsor_expires=$sponsors['expires']; $sponsor_website=$sponsors['website']; $sponsor_text=$sponsors['text']; $text .= " sponsored by $sponsor_name"; # See if a Team page is required. $daysToExpire = expires_in($sponsor_expires); if ( $daysToExpire < 0 ) { echo "

No team page available for $sponsor_name.

"; $error="Y"; } } } # Report errors so far. if ( $error ) { include("$DOCUMENT_ROOT/profiles/footer.php"); return; } # Need to exclude any users who have expired. foreach ( $uname as $key => $user ) { $qContact = "SELECT * from pro_contact WHERE uname='$user'"; $rContact = mysql_query("$qContact"); $contact = mysql_fetch_array($rContact); $expire="${contact['expire']}"; $days=expires_in($expire); if ( ( $days < 0 ) OR ( $days == "NONEXPIRING" ) ) { unset($uname[$key]); } } # See if any users returned. $count=count($uname); if ( ! $count ) { echo "

There are no $text

"; $error="Y"; } # Report error. if ( $error ) { include("$DOCUMENT_ROOT/profiles/footer.php"); return; } # PAGE CONTENT. # Create any required headers. if ( $sponsor ) { $disp=""; # For sponsor pages. if ( $sponsor_website ) { $disp .= ""; $webdisp="

Visit the $sponsor_name website.

"; } # See if we have a logo for them. $logofile = "$logo_dir/$sponsor.jpg"; if ( file_exists($logofile) ) { $logo = "$logo_url/$sponsor.jpg"; $size = getimagesize ("$logofile"); $dims = $size[3]; $disp .= ""; } else { $disp .= "$sponsor_name"; } if ( $sponsor_website ) { $disp .= ""; } ?>

Team Page -

"; } display_users($uname); # Include any info file. $teamfile="$team_dir/$sponsor.txt"; if ( file_exists($teamfile) ) { echo "

".$sponsor_name."....

"; include("$teamfile"); } # Include any news file. $newsfile="$news_dir/$sponsor.txt"; if ( file_exists($newsfile) ) { echo "

$sponsor_name News...

"; include("$newsfile"); } # Add news link. $pp_expdate=convert_from_sqldate_user($sponsor_expires); ?>

This team page expires on $pp_expdate.
Edit News