discourse-legacysite-perl/site/roadshow/masterbrands.php
2024-06-17 22:42:14 +10:00

521 lines
18 KiB
PHP

<?PHP include("config.php");
// set the page title
$pagetitle = "Open Water Events";
// set meta tags
$meta_keywords = "triathlon, trifind, duathlon";
$meta_description = "Are you trying to find road show events in near your area? You can browse all road show events organized by states, to find which ones you want to use.";
?>
<? include("include_common_head.php"); ?>
<? include("include_common_content.php"); ?>
<!-- Start outer -->
<div id="outer">
<!-- BODY -->
<div class="content">
<!-- End left column -->
<!-- Content col -->
<strong>BRANDS LISTED BY POPULARITY OF SELECTION</strong><br />
<?
$sql_one = "SELECT * FROM gforum_ResourceFitbike";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_fitbike) AS brand_count FROM gforum_Roadshow WHERE roadshow_fitbike LIKE '%,".$arr_row[fitbike_id]."' OR roadshow_fitbike LIKE '%,".$arr_row[fitbike_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[fitbike_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[fitbike_name]"] == "" OR $holder_array["$arr_row[fitbike_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[fitbike_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "FITBIKE - $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceSaddlechange";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_saddlechange) AS brand_count FROM gforum_Roadshow WHERE roadshow_saddlechange LIKE '%,".$arr_row[saddlechange_id]."' OR roadshow_saddlechange LIKE '%,".$arr_row[saddlechange_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[saddlechange_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[saddlechange_name]"] == "" OR $holder_array["$arr_row[saddlechange_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[saddlechange_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "SADDLE CHANGE - $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceMotioncapture";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_motioncapture) AS brand_count FROM gforum_Roadshow WHERE roadshow_motioncapture LIKE '%,".$arr_row[motioncapture_id]."' OR roadshow_motioncapture LIKE '%,".$arr_row[motioncapture_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[motioncapture_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[motioncapture_name]"] == "" OR $holder_array["$arr_row[motioncapture_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[motioncapture_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "MOTION CAPTURE - $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceCustomfootbed";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_footbed) AS brand_count FROM gforum_Roadshow WHERE roadshow_footbed LIKE '%,".$arr_row[footbed_id]."' OR roadshow_footbed LIKE '%,".$arr_row[footbed_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[footbed_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[footbed_name]"] == "" OR $holder_array["$arr_row[footbed_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[footbed_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "CUSTOM FOOTBED - $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceApparelTri";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_apparel_tri) AS brand_count FROM gforum_Roadshow WHERE roadshow_apparel_tri LIKE '%,".$arr_row[apparel_tri_id]."' OR roadshow_apparel_tri LIKE '%,".$arr_row[apparel_tri_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[apparel_tri_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[apparel_tri_name]"] == "" OR $holder_array["$arr_row[apparel_tri_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[apparel_tri_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "APPAREL TRI - $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceBike";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_bike) AS brand_count FROM gforum_Roadshow WHERE roadshow_bike LIKE '%,".$arr_row[bike_id]."' OR roadshow_bike LIKE '%,".$arr_row[bike_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[bike_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[bike_name]"] == "" OR $holder_array["$arr_row[bike_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[bike_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "BIKES - $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceBikeAccessory";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_bikeaccessory) AS brand_count FROM gforum_Roadshow WHERE roadshow_bikeaccessory LIKE '%,".$arr_row[bikeaccessory_id]."' OR roadshow_bikeaccessory LIKE '%,".$arr_row[bikeaccessory_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[bikeaccessory_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[bikeaccessory_name]"] == "" OR $holder_array["$arr_row[bikeaccessory_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[bikeaccessory_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "ACCESSORY $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceBikeHelmet";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_bikehelmet) AS brand_count FROM gforum_Roadshow WHERE roadshow_bikehelmet LIKE '%,".$arr_row[bikehelmet_id]."' OR roadshow_bikehelmet LIKE '%,".$arr_row[bikehelmet_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[bikehelmet_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[bikehelmet_name]"] == "" OR $holder_array["$arr_row[bikehelmet_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[bikehelmet_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "HELMET $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceBikeBodycare";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_bikebodycare) AS brand_count FROM gforum_Roadshow WHERE roadshow_bikebodycare LIKE '%,".$arr_row[bikebodycare_id]."' OR roadshow_bikebodycare LIKE '%,".$arr_row[bikebodycare_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[bikebodycare_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[bikebodycare_name]"] == "" OR $holder_array["$arr_row[bikebodycare_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[bikebodycare_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "BODYCARE $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceBikeTrainer";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_biketrainer) AS brand_count FROM gforum_Roadshow WHERE roadshow_biketrainer LIKE '%,".$arr_row[biketrainer_id]."' OR roadshow_biketrainer LIKE '%,".$arr_row[biketrainer_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[biketrainer_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[biketrainer_name]"] == "" OR $holder_array["$arr_row[biketrainer_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[biketrainer_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "TRAINER $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceBikeElectronic";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_bikeelectronic) AS brand_count FROM gforum_Roadshow WHERE roadshow_bikeelectronic LIKE '%,".$arr_row[bikeelectronic_id]."' OR roadshow_bikeelectronic LIKE '%,".$arr_row[bikeelectronic_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[bikeelectronic_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[bikeelectronic_name]"] == "" OR $holder_array["$arr_row[bikeelectronic_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[bikeelectronic_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "ELECTRONIC $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceBikeWheel";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_bikewheel) AS brand_count FROM gforum_Roadshow WHERE roadshow_bikewheel LIKE '%,".$arr_row[bikewheel_id]."' OR roadshow_bikewheel LIKE '%,".$arr_row[bikewheel_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[bikewheel_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[bikewheel_name]"] == "" OR $holder_array["$arr_row[bikewheel_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[bikewheel_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "WHEEL $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceBikeComponent";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_bikecomponent) AS brand_count FROM gforum_Roadshow WHERE roadshow_bikecomponent LIKE '%,".$arr_row[bikecomponent_id]."' OR roadshow_bikecomponent LIKE '%,".$arr_row[bikecomponent_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[bikecomponent_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[bikecomponent_name]"] == "" OR $holder_array["$arr_row[bikecomponent_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[bikecomponent_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "COMPONENT $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceSock";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_sock) AS brand_count FROM gforum_Roadshow WHERE roadshow_sock LIKE '%,".$arr_row[sock_id]."' OR roadshow_sock LIKE '%,".$arr_row[sock_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[sock_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[sock_name]"] == "" OR $holder_array["$arr_row[sock_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[sock_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "SOCK $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceShoe";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_shoe) AS brand_count FROM gforum_Roadshow WHERE roadshow_shoe LIKE '%,".$arr_row[shoe_id]."' OR roadshow_shoe LIKE '%,".$arr_row[shoe_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[shoe_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[shoe_name]"] == "" OR $holder_array["$arr_row[shoe_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[shoe_name]"] = $list_row[brand_count];
}
}
}
/**foreach ($holder_array as $key => $val) {
echo "SHOE $key: $val<br />";
}**/
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceApparelRun";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_apparel_run) AS brand_count FROM gforum_Roadshow WHERE roadshow_apparel_run LIKE '%,".$arr_row[apparel_run_id]."' OR roadshow_apparel_run LIKE '%,".$arr_row[apparel_run_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[apparel_run_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[apparel_run_name]"] == "" OR $holder_array["$arr_row[apparel_run_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[apparel_run_name]"] = $list_row[brand_count];
}
}
}
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceRunHydrate";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_runhydrate) AS brand_count FROM gforum_Roadshow WHERE roadshow_runhydrate LIKE '%,".$arr_row[runhydrate_id]."' OR roadshow_runhydrate LIKE '%,".$arr_row[runhydrate_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[runhydrate_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[runhydrate_name]"] == "" OR $holder_array["$arr_row[runhydrate_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[runhydrate_name]"] = $list_row[brand_count];
}
}
}
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceWetsuit";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_wetsuit) AS brand_count FROM gforum_Roadshow WHERE roadshow_wetsuit LIKE '%,".$arr_row[wetsuit_id]."' OR roadshow_wetsuit LIKE '%,".$arr_row[wetsuit_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[wetsuit_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[wetsuit_name]"] == "" OR $holder_array["$arr_row[wetsuit_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[wetsuit_name]"] = $list_row[brand_count];
}
}
}
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceSwimgear";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_swimgear) AS brand_count FROM gforum_Roadshow WHERE roadshow_swimgear LIKE '%,".$arr_row[swimgear_id]."' OR roadshow_swimgear LIKE '%,".$arr_row[swimgear_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[swimgear_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[swimgear_name]"] == "" OR $holder_array["$arr_row[swimgear_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[swimgear_name]"] = $list_row[brand_count];
}
}
}
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceBodycare";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_bodycare) AS brand_count FROM gforum_Roadshow WHERE roadshow_bodycare LIKE '%,".$arr_row[bodycare_id]."' OR roadshow_bodycare LIKE '%,".$arr_row[bodycare_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[bodycare_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[bodycare_name]"] == "" OR $holder_array["$arr_row[bodycare_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[bodycare_name]"] = $list_row[brand_count];
}
}
}
?>
<?
$sql_one = "SELECT * FROM gforum_ResourceDiagnostic";
//echo $sql_one."<br />";
$arr_results = mysql_query($sql_one);
while ($arr_row = mysql_fetch_array($arr_results)) {
$sql_two = "SELECT COUNT(roadshow_diagnostic) AS brand_count FROM gforum_Roadshow WHERE roadshow_diagnostic LIKE '%,".$arr_row[diagnostic_id]."' OR roadshow_diagnostic LIKE '%,".$arr_row[diagnostic_id].",%'";
// echo $sql_two."<br />";
$list_results = mysql_query($sql_two);
while ($list_row = mysql_fetch_array($list_results)) {
//echo $arr_row[diagnostic_name].": ".$list_row[brand_count]."<br />";
if ($holder_array["$arr_row[diagnostic_name]"] == "" OR $holder_array["$arr_row[diagnostic_name]"] < $list_row[brand_count]) {
$holder_array["$arr_row[diagnostic_name]"] = $list_row[brand_count];
}
}
}
arsort($holder_array);
foreach ($holder_array as $key => $val) {
echo "$key: $val<br />";
}
unset ($holder_array);
?>
</div>
<div>
<!-- End content col -->
</div>
<!-- End BODY -->
</div>
<!-- End Outer -->
<? include("include_common_footer.php"); ?>