Fifth pass at adding key files
This commit is contained in:
		
							
								
								
									
										9
									
								
								site/local/include_breadcrumb.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								site/local/include_breadcrumb.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
<div class="breadcrumb">
 | 
			
		||||
    <a href="<? echo $main_site_url ?>">Home</a> >
 | 
			
		||||
    <? if ( $current_page ) { ?>
 | 
			
		||||
    <a href="<? echo $main_site_url . "/local/" ?>">Local Listings</a>
 | 
			
		||||
     > <? echo $current_page  ?>
 | 
			
		||||
    <? } else { ?>
 | 
			
		||||
    <span>Local Listings</span>
 | 
			
		||||
    <? } ?>
 | 
			
		||||
</div>
 | 
			
		||||
							
								
								
									
										14
									
								
								site/local/include_common_head.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								site/local/include_common_head.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
<?PHP
 | 
			
		||||
if (eregi("include", $_SERVER['SCRIPT_NAME'])) {
 | 
			
		||||
        Header("Location: ".$site_url."/index.php"); die();
 | 
			
		||||
}
 | 
			
		||||
?>
 | 
			
		||||
<!DOCTYPE html >
 | 
			
		||||
<html lang="en">
 | 
			
		||||
<head>
 | 
			
		||||
<base href="<? echo $site_url ?>/" />
 | 
			
		||||
<title>Slowtwitch.com: <? echo $pagetitle; ?></title>
 | 
			
		||||
<? include($common_path . "/templates/include_global_head.php"); ?>
 | 
			
		||||
<? include($common_path . "/templates/google_analytics.html"); ?>
 | 
			
		||||
<? include($common_path . "/templates/fb_sdk.html"); ?>
 | 
			
		||||
</head>
 | 
			
		||||
							
								
								
									
										7
									
								
								site/local/include_sidebar.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								site/local/include_sidebar.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
<? include($common_path . "/templates/include_local_listing.php");?>
 | 
			
		||||
 | 
			
		||||
<div class="widget-divider"></div>
 | 
			
		||||
 | 
			
		||||
<div class="advert hide-on-mobile">
 | 
			
		||||
  <? include($common_path . "/ads/ad_300x600.html"); ?>
 | 
			
		||||
</div>
 | 
			
		||||
							
								
								
									
										158
									
								
								site/local/index.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										158
									
								
								site/local/index.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,158 @@
 | 
			
		||||
<?PHP include("settings.php");
 | 
			
		||||
 | 
			
		||||
// set the page title
 | 
			
		||||
$pagetitle = "Local Listings";
 | 
			
		||||
 | 
			
		||||
// set meta tags
 | 
			
		||||
$meta_keywords = "Local listings";
 | 
			
		||||
$meta_description = "Local listings";
 | 
			
		||||
?>
 | 
			
		||||
 | 
			
		||||
<? include("include_common_head.php"); ?>
 | 
			
		||||
 | 
			
		||||
<body class="listings">
 | 
			
		||||
  <? include($common_path . "/ads/ad_wallpaper.html"); ?>
 | 
			
		||||
 | 
			
		||||
  <div class="container">
 | 
			
		||||
    <? include($common_path . "/templates/include_header.php"); ?>
 | 
			
		||||
    <div class="main">
 | 
			
		||||
      <div class="contentwrapper clearfix">
 | 
			
		||||
        <? include("include_breadcrumb.php"); ?>
 | 
			
		||||
 | 
			
		||||
        <section class="section listings section-has-widgets remove-sidebar">
 | 
			
		||||
          <div class="sidebar-b">
 | 
			
		||||
            <? include("include_sidebar.php"); ?>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="content content-has-widgets">
 | 
			
		||||
            <div class="grid">
 | 
			
		||||
 | 
			
		||||
              <div class="clearfix">
 | 
			
		||||
                <h1>Local Listings</h1>
 | 
			
		||||
                <div>This collection of retailers is the most complete and comprehensive listings in North America. The purpose is to introduce triathelets to as much pertinent information as possible.</div>
 | 
			
		||||
                <div class="grid icon-view">
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-running"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/runshops">Running Stores</a></h3>
 | 
			
		||||
                      <?
 | 
			
		||||
                        $num_stores = mysql_num_rows(mysql_query("SELECT runshop_id FROM " . $prefix . "Runshops WHERE runshop_valid=1"));
 | 
			
		||||
                      ?>
 | 
			
		||||
                      <span>(<? echo $num_stores ?> stores)<span>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-biking"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/retailers">Bike Shops</a></h3>
 | 
			
		||||
                      <?
 | 
			
		||||
                        $num_retailers = mysql_num_rows(mysql_query("SELECT retailer_id FROM " . $prefix. "Retailers WHERE retailer_valid=1"));
 | 
			
		||||
                      ?>
 | 
			
		||||
                      <span>(<? echo $num_retailers ?> retailers)<span>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-coaches"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/coaches">Coaches</a></h3>
 | 
			
		||||
                      <?
 | 
			
		||||
                        $num_coaches = mysql_num_rows(mysql_query("SELECT coach_id FROM ".$prefix."Coaches WHERE coach_valid=1"));
 | 
			
		||||
                      ?>
 | 
			
		||||
                      <span>(<? echo $num_coaches ?> coaches)<span>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-fitters"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/fitters">Fitters</a></h3>
 | 
			
		||||
                      <?
 | 
			
		||||
                        $num_fitters = mysql_num_rows(mysql_query("SELECT fitter_id FROM ".$prefix."Fitters WHERE fitter_valid=1"));
 | 
			
		||||
                      ?>
 | 
			
		||||
                      <span>(<? echo $num_fitters ?> fitters)<span>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-clubs"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/triclubs">Triathlon Clubs</a></h3>
 | 
			
		||||
                      <?
 | 
			
		||||
                        $num_triclubs = mysql_num_rows(mysql_query("SELECT triclub_id FROM " . $prefix . "Triclubs WHERE triclub_valid=1"));
 | 
			
		||||
                      ?>
 | 
			
		||||
                      <span>(<? echo $num_triclubs ?> clubs)<span>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-race"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/calendar">Race Calendar</a></h3>
 | 
			
		||||
                      <?
 | 
			
		||||
                        $num_races = mysql_num_rows(mysql_query("SELECT uid FROM " . $prefix . "Triathlons WHERE valid=1 AND date > '".$min_date."'"));
 | 
			
		||||
                      ?>
 | 
			
		||||
                      <span>(<? echo $num_races ?> races)<span>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
                  
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-roadshow"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/roadshow">Road Show</a></h3>
 | 
			
		||||
                      <?
 | 
			
		||||
                        $num_stops = mysql_num_rows(mysql_query("SELECT roadshow_id FROM gforum_Roadshow WHERE roadshow_valid=1"));
 | 
			
		||||
                      ?>
 | 
			
		||||
                      <span>(<? echo $num_stops ?> road show stops)<span>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-map"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/local/map.php">Map of Everything</a></h3>
 | 
			
		||||
                      <span>(over <? echo $num_stores + $num_retailers + $num_coaches + $num_fitters + $num_triclubs + $num_races + $num_stops ?> listings)<span>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
                  
 | 
			
		||||
                </div>
 | 
			
		||||
              </div><!-- end col-2/3 -->
 | 
			
		||||
 | 
			
		||||
            </div><!-- end grid -->
 | 
			
		||||
          </div><!-- end content -->
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
      </div><!-- end contentwrapper -->
 | 
			
		||||
    </div> <!-- end main -->
 | 
			
		||||
 | 
			
		||||
  <? include($common_path . "/templates/include_footer.php") ?>
 | 
			
		||||
  </div> <!-- container  -->
 | 
			
		||||
</body>
 | 
			
		||||
<? include($common_path . "/templates/include_global_js.php") ?>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										1
									
								
								site/local/info.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								site/local/info.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
<?php //phpinfo(); ?>
 | 
			
		||||
							
								
								
									
										112
									
								
								site/local/map.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										112
									
								
								site/local/map.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,112 @@
 | 
			
		||||
<?PHP include("settings.php");
 | 
			
		||||
 | 
			
		||||
// set the page title
 | 
			
		||||
$pagetitle = "Local Listings - Map of Everything";
 | 
			
		||||
 | 
			
		||||
// set meta tags
 | 
			
		||||
$meta_keywords = "Local listings";
 | 
			
		||||
$meta_description = "Local listings";
 | 
			
		||||
?>
 | 
			
		||||
<? include("include_common_head.php"); ?>
 | 
			
		||||
 | 
			
		||||
<body class="listings">
 | 
			
		||||
  <? include($common_path . "/ads/ad_wallpaper.html"); ?>
 | 
			
		||||
 | 
			
		||||
  <div class="container">
 | 
			
		||||
    <? include($common_path . "/templates/include_header.php"); ?>
 | 
			
		||||
    <div class="main">
 | 
			
		||||
      <div class="contentwrapper clearfix">
 | 
			
		||||
        <? $current_page = 'Map Of Everything'; ?>
 | 
			
		||||
        <? $current_url  = '/local/map.php'; ?>
 | 
			
		||||
        <? include("include_breadcrumb.php"); ?>
 | 
			
		||||
 | 
			
		||||
        <section class="section listings section-has-widgets remove-sidebar">
 | 
			
		||||
          <div class="sidebar-b">
 | 
			
		||||
            <?
 | 
			
		||||
            $selected_local = 'map';
 | 
			
		||||
            include("include_sidebar.php");
 | 
			
		||||
            ?>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="content content-has-widgets">
 | 
			
		||||
            <div class="grid">
 | 
			
		||||
 | 
			
		||||
              <div class="clearfix">
 | 
			
		||||
                <h1>Local Listings</h1>
 | 
			
		||||
 | 
			
		||||
                <div class="map-control">
 | 
			
		||||
                  <span>Jump to location:</span>
 | 
			
		||||
                  <input class="text-input" type="text" placeholder="Enter Zip/Postal, City or State"/>
 | 
			
		||||
                  <span class="spacer"></span>
 | 
			
		||||
                  <span class="or">or</span>
 | 
			
		||||
<?
 | 
			
		||||
$sqlregionlist = "SELECT * FROM gforum_ResourceRegions ORDER BY regionname";
 | 
			
		||||
$regions_list = mysql_query($sqlregionlist);
 | 
			
		||||
?>
 | 
			
		||||
 | 
			
		||||
                  <select class="select">
 | 
			
		||||
                    <option value="">Select Region...</option>
 | 
			
		||||
                    <? while ($row = mysql_fetch_array($regions_list)) { ?>
 | 
			
		||||
                    <option value="<? echo $row[regionname] ?>"><? echo $row[regionlong] ?></option>
 | 
			
		||||
                    <? } ?>
 | 
			
		||||
                  </select>
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <div class="alert alert-info">
 | 
			
		||||
                  Showing results near <span class="location">your location</span>.
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="map-container">
 | 
			
		||||
 | 
			
		||||
                <div id="map" class="map map-large" data-name="everything" data-json="<? echo $main_site_url ?>/googlemaps/json/,coach,race,retailer,runshop,triclub,fitter,roadshow"></div><!--xml relative path from the html location -->
 | 
			
		||||
 | 
			
		||||
                  <div class="map-category">
 | 
			
		||||
                    <div class="category-list">
 | 
			
		||||
                      <div class="category">
 | 
			
		||||
                        <input id="retailer" type="checkbox" class="checkbox" value="retailer" checked="checked"/>
 | 
			
		||||
                        <label for="retailer"> Bike Shops <i class="map-icon sprite-biking"></i></label>
 | 
			
		||||
                      </div>
 | 
			
		||||
                      <div class="category">
 | 
			
		||||
                        <input id="runshop" type="checkbox" class="checkbox" value="runshop"  checked="checked"/>
 | 
			
		||||
                        <label for="runshop"> Run Stores <i class="map-icon sprite-running"></i></label>
 | 
			
		||||
                      </div>
 | 
			
		||||
                      <div class="category">
 | 
			
		||||
                        <input id="fitter" type="checkbox" class="checkbox" value="fitter"  checked="checked"/>
 | 
			
		||||
                        <label for="fitter"> Fitters <i class="map-icon sprite-fitter"></i></label>
 | 
			
		||||
                      </div>
 | 
			
		||||
                      <div class="category">
 | 
			
		||||
                        <input id="triclub" type="checkbox" class="checkbox" value="triclub"  checked="checked"/>
 | 
			
		||||
                        <label for="triclub"> Clubs <i class="map-icon sprite-clubs"></i></label>
 | 
			
		||||
                      </div>
 | 
			
		||||
                      <div class="category">
 | 
			
		||||
                        <input id="roadshow" type="checkbox" class="checkbox" value="roadshow"  checked="checked"/>
 | 
			
		||||
                        <label for="roadshow"> Roadshow <i class="map-icon sprite-roadshow"></i></label>
 | 
			
		||||
                      </div>
 | 
			
		||||
                      <div class="category">
 | 
			
		||||
                        <input id="coach" type="checkbox" class="checkbox" value="coach"  checked="checked"/>
 | 
			
		||||
                        <label for="coach"> Coaches <i class="map-icon sprite-coaches"></i></label>
 | 
			
		||||
                      </div>
 | 
			
		||||
                      <div class="category last">
 | 
			
		||||
                        <input id="race" type="checkbox" class="checkbox" value="race" checked="checked" />
 | 
			
		||||
                        <label for="race"> Races <i class="map-icon sprite-race"></i></label>
 | 
			
		||||
                      </div>
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="hide-button">
 | 
			
		||||
                      Hide Categories ▲
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
              </div><!-- end col-2/3 -->
 | 
			
		||||
 | 
			
		||||
            </div><!-- end grid -->
 | 
			
		||||
          </div><!-- end content -->
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
      </div><!-- end contentwrapper -->
 | 
			
		||||
    </div> <!-- end main -->
 | 
			
		||||
 | 
			
		||||
  <? include($common_path . "/templates/include_footer.php") ?>
 | 
			
		||||
  </div> <!-- container  -->
 | 
			
		||||
</body>
 | 
			
		||||
<? include($common_path . "/templates/include_global_js.php") ?>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										339
									
								
								site/local/mysql.class.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										339
									
								
								site/local/mysql.class.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,339 @@
 | 
			
		||||
<?PHP
 | 
			
		||||
###########################################
 | 
			
		||||
#-----------Users login system------------#
 | 
			
		||||
###########################################
 | 
			
		||||
/*=========================================\
 | 
			
		||||
Author      :  Mohammed Ahmed(M@@king)    \\
 | 
			
		||||
Version     :  1.0                        \\
 | 
			
		||||
Date Created:  Aug 20  2005               \\
 | 
			
		||||
----------------------------              \\
 | 
			
		||||
Last Update:   August 22 2005             \\
 | 
			
		||||
----------------------------              \\
 | 
			
		||||
Country    :   Palestine                  \\
 | 
			
		||||
City       :   Gaza                       \\
 | 
			
		||||
E-mail     :   m@maaking.com              \\
 | 
			
		||||
MSN        :   m@maaking.com              \\
 | 
			
		||||
AOL-IM     :   maa2pal                    \\
 | 
			
		||||
WWW        :   http://www.maaking.com     \\
 | 
			
		||||
Mobile/SMS :   00972-599-622235           \\
 | 
			
		||||
                                          \\
 | 
			
		||||
===========================================\
 | 
			
		||||
------------------------------------------*/
 | 
			
		||||
if (eregi("mysql.class.php", $_SERVER['SCRIPT_NAME'])) {
 | 
			
		||||
    Header("Location: ".$site_url."/index.php"); die();
 | 
			
		||||
}
 | 
			
		||||
//db class
 | 
			
		||||
if(!defined("SQL_LAYER"))
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
define("SQL_LAYER","mysql");
 | 
			
		||||
 | 
			
		||||
class sql_db
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
	var $db_connect_id;
 | 
			
		||||
	var $query_result;
 | 
			
		||||
	var $row = array();
 | 
			
		||||
	var $rowset = array();
 | 
			
		||||
	var $num_queries = 0;
 | 
			
		||||
 | 
			
		||||
	//
 | 
			
		||||
	// Constructor
 | 
			
		||||
	//
 | 
			
		||||
	function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
 | 
			
		||||
	{
 | 
			
		||||
 | 
			
		||||
		$this->persistency = $persistency;
 | 
			
		||||
		$this->user = $sqluser;
 | 
			
		||||
		$this->password = $sqlpassword;
 | 
			
		||||
		$this->server = $sqlserver;
 | 
			
		||||
		$this->dbname = $database;
 | 
			
		||||
 | 
			
		||||
		if($this->persistency)
 | 
			
		||||
		{
 | 
			
		||||
			$this->db_connect_id = @mysql_pconnect($this->server, $this->user, $this->password);
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			$this->db_connect_id = @mysql_connect($this->server, $this->user, $this->password);
 | 
			
		||||
		}
 | 
			
		||||
		if($this->db_connect_id)
 | 
			
		||||
		{
 | 
			
		||||
			if($database != "")
 | 
			
		||||
			{
 | 
			
		||||
				$this->dbname = $database;
 | 
			
		||||
				$dbselect = @mysql_select_db($this->dbname);
 | 
			
		||||
				if(!$dbselect)
 | 
			
		||||
				{
 | 
			
		||||
					@mysql_close($this->db_connect_id);
 | 
			
		||||
					$this->db_connect_id = $dbselect;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			return $this->db_connect_id;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//
 | 
			
		||||
	// Other base methods
 | 
			
		||||
	//
 | 
			
		||||
	function sql_close()
 | 
			
		||||
	{
 | 
			
		||||
		if($this->db_connect_id)
 | 
			
		||||
		{
 | 
			
		||||
			if($this->query_result)
 | 
			
		||||
			{
 | 
			
		||||
				@mysql_free_result($this->query_result);
 | 
			
		||||
			}
 | 
			
		||||
			$result = @mysql_close($this->db_connect_id);
 | 
			
		||||
			return $result;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//
 | 
			
		||||
	// Base query method
 | 
			
		||||
	//
 | 
			
		||||
	function sql_query($query = "", $transaction = FALSE)
 | 
			
		||||
	{
 | 
			
		||||
		// Remove any pre-existing queries
 | 
			
		||||
		unset($this->query_result);
 | 
			
		||||
		if($query != "")
 | 
			
		||||
                {
 | 
			
		||||
 | 
			
		||||
			$this->query_result = @mysql_query($query, $this->db_connect_id);
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
		if($this->query_result)
 | 
			
		||||
		{
 | 
			
		||||
			unset($this->row[$this->query_result]);
 | 
			
		||||
			unset($this->rowset[$this->query_result]);
 | 
			
		||||
			return $this->query_result;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return ( $transaction == END_TRANSACTION ) ? true : false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//
 | 
			
		||||
	// Other query methods
 | 
			
		||||
	//
 | 
			
		||||
	function sql_numrows($query_id = 0)
 | 
			
		||||
	{
 | 
			
		||||
		if(!$query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$query_id = $this->query_result;
 | 
			
		||||
		}
 | 
			
		||||
		if($query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$result = @mysql_num_rows($query_id);
 | 
			
		||||
			return $result;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function sql_affectedrows()
 | 
			
		||||
	{
 | 
			
		||||
		if($this->db_connect_id)
 | 
			
		||||
		{
 | 
			
		||||
			$result = @mysql_affected_rows($this->db_connect_id);
 | 
			
		||||
			return $result;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function sql_numfields($query_id = 0)
 | 
			
		||||
	{
 | 
			
		||||
		if(!$query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$query_id = $this->query_result;
 | 
			
		||||
		}
 | 
			
		||||
		if($query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$result = @mysql_num_fields($query_id);
 | 
			
		||||
			return $result;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function sql_fieldname($offset, $query_id = 0)
 | 
			
		||||
	{
 | 
			
		||||
		if(!$query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$query_id = $this->query_result;
 | 
			
		||||
		}
 | 
			
		||||
		if($query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$result = @mysql_field_name($query_id, $offset);
 | 
			
		||||
			return $result;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function sql_fieldtype($offset, $query_id = 0)
 | 
			
		||||
	{
 | 
			
		||||
		if(!$query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$query_id = $this->query_result;
 | 
			
		||||
		}
 | 
			
		||||
		if($query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$result = @mysql_field_type($query_id, $offset);
 | 
			
		||||
			return $result;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function sql_fetchrow($query_id = 0)
 | 
			
		||||
	{
 | 
			
		||||
		if(!$query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$query_id = $this->query_result;
 | 
			
		||||
		}
 | 
			
		||||
		if($query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$this->row[$query_id] = @mysql_fetch_array($query_id);
 | 
			
		||||
			return $this->row[$query_id];
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function sql_fetchrowset($query_id = 0)
 | 
			
		||||
	{
 | 
			
		||||
		if(!$query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$query_id = $this->query_result;
 | 
			
		||||
		}
 | 
			
		||||
		if($query_id)
 | 
			
		||||
		{
 | 
			
		||||
			unset($this->rowset[$query_id]);
 | 
			
		||||
			unset($this->row[$query_id]);
 | 
			
		||||
			while($this->rowset[$query_id] = @mysql_fetch_array($query_id))
 | 
			
		||||
			{
 | 
			
		||||
				$result[] = $this->rowset[$query_id];
 | 
			
		||||
			}
 | 
			
		||||
			return $result;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function sql_fetchfield($field, $rownum = -1, $query_id = 0)
 | 
			
		||||
	{
 | 
			
		||||
		if(!$query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$query_id = $this->query_result;
 | 
			
		||||
		}
 | 
			
		||||
		if($query_id)
 | 
			
		||||
		{
 | 
			
		||||
			if($rownum > -1)
 | 
			
		||||
			{
 | 
			
		||||
				$result = @mysql_result($query_id, $rownum, $field);
 | 
			
		||||
			}
 | 
			
		||||
			else
 | 
			
		||||
			{
 | 
			
		||||
				if(empty($this->row[$query_id]) && empty($this->rowset[$query_id]))
 | 
			
		||||
				{
 | 
			
		||||
					if($this->sql_fetchrow())
 | 
			
		||||
					{
 | 
			
		||||
						$result = $this->row[$query_id][$field];
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				else
 | 
			
		||||
				{
 | 
			
		||||
					if($this->rowset[$query_id])
 | 
			
		||||
					{
 | 
			
		||||
						$result = $this->rowset[$query_id][$field];
 | 
			
		||||
					}
 | 
			
		||||
					else if($this->row[$query_id])
 | 
			
		||||
					{
 | 
			
		||||
						$result = $this->row[$query_id][$field];
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			return $result;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function sql_rowseek($rownum, $query_id = 0){
 | 
			
		||||
		if(!$query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$query_id = $this->query_result;
 | 
			
		||||
		}
 | 
			
		||||
		if($query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$result = @mysql_data_seek($query_id, $rownum);
 | 
			
		||||
			return $result;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function sql_nextid(){
 | 
			
		||||
		if($this->db_connect_id)
 | 
			
		||||
		{
 | 
			
		||||
			$result = @mysql_insert_id($this->db_connect_id);
 | 
			
		||||
			return $result;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function sql_freeresult($query_id = 0){
 | 
			
		||||
		if(!$query_id)
 | 
			
		||||
		{
 | 
			
		||||
			$query_id = $this->query_result;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if ( $query_id )
 | 
			
		||||
		{
 | 
			
		||||
			unset($this->row[$query_id]);
 | 
			
		||||
			unset($this->rowset[$query_id]);
 | 
			
		||||
 | 
			
		||||
			@mysql_free_result($query_id);
 | 
			
		||||
 | 
			
		||||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function sql_error($query_id = 0)
 | 
			
		||||
	{
 | 
			
		||||
		$result["message"] = @mysql_error($this->db_connect_id);
 | 
			
		||||
		$result["code"] = @mysql_errno($this->db_connect_id);
 | 
			
		||||
 | 
			
		||||
		return $result;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
} // class sql_db
 | 
			
		||||
 | 
			
		||||
} // if ... define
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										164
									
								
								site/local/settings.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										164
									
								
								site/local/settings.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,164 @@
 | 
			
		||||
<?PHP
 | 
			
		||||
 | 
			
		||||
$dbhost = "192.168.1.10";
 | 
			
		||||
$dbuname = "slowtwitch";
 | 
			
		||||
$dbpass = "k9volqlAcpq";
 | 
			
		||||
$dbname = "slowtwitch";
 | 
			
		||||
$prefix = "gforum_";
 | 
			
		||||
 | 
			
		||||
$site_name   = "Slowtwitch.com";
 | 
			
		||||
$site_email  = "rappstar@slowtwitch.com";
 | 
			
		||||
$main_site_url = "https://www.slowtwitch.com";
 | 
			
		||||
$forum_url     = "https://forum.slowtwitch.com";
 | 
			
		||||
$calendar_url  = "https://www.slowtwitch.com/calendar/";
 | 
			
		||||
$static_url    = "/articles/static";
 | 
			
		||||
$common_path   = "/var/home/slowtwitch/site/common";
 | 
			
		||||
$mini_version  = 0; 
 | 
			
		||||
 | 
			
		||||
define("MAPS_HOST", "maps.googleapis.com");
 | 
			
		||||
define("KEY", "AIzaSyA2o3A4tWqOXdrysooewZuhEZxx9wr8glk");
 | 
			
		||||
 | 
			
		||||
// Turn off all error reporting
 | 
			
		||||
error_reporting(0);
 | 
			
		||||
 | 
			
		||||
include("mysql.class.php");
 | 
			
		||||
$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);
 | 
			
		||||
if(!$db->db_connect_id) {
 | 
			
		||||
      echo "<br><font color=red><h3><br><center>Error:</b><br><hr><br>
 | 
			
		||||
            <b>Connection to database failed</b><br>
 | 
			
		||||
            <br><br><br><br><br><br><br><br><br></b></center>";
 | 
			
		||||
 | 
			
		||||
      exit();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function geocode($address) {
 | 
			
		||||
  // Initialize delay in geocode speed
 | 
			
		||||
  $delay = 0; 
 | 
			
		||||
  $base_url = "https://" . MAPS_HOST . "/maps/api/geocode/xml?&key=" . KEY;
 | 
			
		||||
  //echo ("Base URL: ".$base_url);
 | 
			
		||||
 | 
			
		||||
  $status = "";
 | 
			
		||||
  $geocode_pending = true;
 | 
			
		||||
 | 
			
		||||
  while ($geocode_pending) {
 | 
			
		||||
    $address = str_replace(" ", "+", $address);
 | 
			
		||||
    $address = str_replace("#", "", $address);
 | 
			
		||||
    $address = str_replace("\'", "", $address);
 | 
			
		||||
    $address = str_replace("/", "", $address);
 | 
			
		||||
    $request_url = $base_url . "address=" . $address . "&sensor=false"; //urlencode($address);
 | 
			
		||||
    $request_url = mb_convert_encoding($request_url, "UTF-8", "auto");
 | 
			
		||||
    //echo ($request_url."<br />");
 | 
			
		||||
    // Create cUrl object to grab XML content using $request_url
 | 
			
		||||
        $c = curl_init();
 | 
			
		||||
        curl_setopt($c, CURLOPT_URL, $request_url);
 | 
			
		||||
        curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
 | 
			
		||||
        $xmlContent = trim(curl_exec($c));
 | 
			
		||||
        curl_close($c);
 | 
			
		||||
 | 
			
		||||
        // Create SimpleXML object from XML Content
 | 
			
		||||
        $xml = simplexml_load_string($xmlContent);
 | 
			
		||||
 | 
			
		||||
        // Print out all of the XML Object
 | 
			
		||||
        //print header("Content-type: text/plain");
 | 
			
		||||
        //print_r($xml);
 | 
			
		||||
    
 | 
			
		||||
    $resolution = $xml->result->geometry->location_type;
 | 
			
		||||
    
 | 
			
		||||
        $status = $xml->status;
 | 
			
		||||
    if (strcmp($status, "OK") == 0) {
 | 
			
		||||
      // Successful geocode
 | 
			
		||||
      $geocode_pending = false;
 | 
			
		||||
      $lat = $xml->result->geometry->location->lat;
 | 
			
		||||
      $lng = $xml->result->geometry->location->lng;
 | 
			
		||||
      $latlng_array = array($lat, $lng);
 | 
			
		||||
          return ($latlng_array);
 | 
			
		||||
    } elseif (strcmp($status, "OVER_QUERY_LIMIT") == 0)  {
 | 
			
		||||
      // failure to geocode
 | 
			
		||||
      $geocode_pending = false;
 | 
			
		||||
      $status =  "Address " . $address . " failed to geocode. ";
 | 
			
		||||
      $status = $status . "Received status " . $status . "</br></br>\n";
 | 
			
		||||
      return ($status); 
 | 
			
		||||
    } else {
 | 
			
		||||
      // failure to geocode
 | 
			
		||||
      $geocode_pending = false;
 | 
			
		||||
      $status = "Address " . $address . " failed to geocode. ";
 | 
			
		||||
      $status = $status . "Received status " . $status . "</br></br>\n";
 | 
			
		||||
      return ($status); 
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function get_sid() {
 | 
			
		||||
    if (isset($_SESSION['cookie']) and $_SESSION['cookie']) {
 | 
			
		||||
        return '';
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        return '&'.SID;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function is_admin() {
 | 
			
		||||
    if(is_logged_in($user)){
 | 
			
		||||
        $username = base64_decode($_SESSION['user']);
 | 
			
		||||
        if ($username === "Slowman" || $username === "Rappstar" || $username === "rrheisler" || $username === "Ewynn") { 
 | 
			
		||||
            return true;
 | 
			
		||||
        } else {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
    } else { 
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//global function for checking whether user is logged in or not.
 | 
			
		||||
//you will notice we will use it everwhere in the script.
 | 
			
		||||
function is_logged_in($user) {
 | 
			
		||||
    global $db,$prefix;
 | 
			
		||||
 | 
			
		||||
    // return true if we're already logged in
 | 
			
		||||
    if (isset($_SESSION['user']) && $_SESSION['user'] != '') {
 | 
			
		||||
        return 1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // try and get the session id
 | 
			
		||||
    if (isset($_REQUEST['gforum_1022870964_session'])) {
 | 
			
		||||
        $session_id = $_REQUEST['gforum_1022870964_session'];
 | 
			
		||||
    }
 | 
			
		||||
    else if ($_REQUEST['from'] == 'gforum') {
 | 
			
		||||
        foreach ($_COOKIE as $key => $value) {
 | 
			
		||||
            if (preg_match('/gforum.*session/', $key)) {
 | 
			
		||||
                $session_id = $value;
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (! isset($session_id)) {
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    // return false if we have no login info
 | 
			
		||||
    else {
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $result = mysql_query("SELECT session_user_id FROM ".$prefix."Session WHERE session_id='$session_id'") or die (mysql_error());
 | 
			
		||||
    $row = mysql_fetch_array($result);
 | 
			
		||||
    $user_id = $row['session_user_id'];
 | 
			
		||||
    $result = mysql_query("SELECT user_username,user_password,user_last_logon FROM ".$prefix."User WHERE user_id='$user_id'");
 | 
			
		||||
    $row = mysql_fetch_array($result);
 | 
			
		||||
 | 
			
		||||
    $_SESSION['user'] = base64_encode($row['user_username']);
 | 
			
		||||
    $_SESSION['password'] = base64_encode($row['user_password']);
 | 
			
		||||
    $_SESSION['user_id'] = base64_encode($user_id);
 | 
			
		||||
    $_SESSION['session_id'] = $session_id;
 | 
			
		||||
    $_SESSION['cookie'] = !(isset($_REQUEST['session']));
 | 
			
		||||
 | 
			
		||||
        if ($_SESSION['user_id'] == '') { return 0; }
 | 
			
		||||
 | 
			
		||||
    // we're now logged in, so return 1
 | 
			
		||||
    return 1;
 | 
			
		||||
 | 
			
		||||
    // TODO: SLOWTWITCH CHANGE END
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										7
									
								
								site/local/test.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								site/local/test.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
<?PHP include("settings.php"); ?>
 | 
			
		||||
 | 
			
		||||
<? 
 | 
			
		||||
list($value, $expiry) = explode("|", $_COOKIE["gforum_1022870964_session"]);
 | 
			
		||||
  
 | 
			
		||||
echo "name: " . $value . " expiry: " . time();
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										268
									
								
								site/local/user_listings.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										268
									
								
								site/local/user_listings.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,268 @@
 | 
			
		||||
<?PHP include("settings.php");
 | 
			
		||||
 | 
			
		||||
if(is_logged_in($user)){
 | 
			
		||||
    $useruid = mysql_escape_string(base64_decode($_SESSION['user_id']));
 | 
			
		||||
} else { 
 | 
			
		||||
    $useruid = false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// set the page title
 | 
			
		||||
$pagetitle = "Local Listings";
 | 
			
		||||
 | 
			
		||||
// set meta tags
 | 
			
		||||
$meta_keywords = "Local listings";
 | 
			
		||||
$meta_description = "Local listings";
 | 
			
		||||
?>
 | 
			
		||||
 | 
			
		||||
<? include("include_common_head.php"); ?>
 | 
			
		||||
 | 
			
		||||
<body class="listings">
 | 
			
		||||
  <? include($common_path . "/ads/ad_wallpaper.html"); ?>
 | 
			
		||||
 | 
			
		||||
  <div class="container">
 | 
			
		||||
    <? include($common_path . "/templates/include_header.php"); ?>
 | 
			
		||||
    <div class="main">
 | 
			
		||||
      <div class="contentwrapper clearfix">
 | 
			
		||||
        <? include("include_breadcrumb.php"); ?>
 | 
			
		||||
 | 
			
		||||
        <section class="section listings section-has-widgets remove-sidebar">
 | 
			
		||||
          <div class="sidebar-b">
 | 
			
		||||
            <? include("include_sidebar.php"); ?>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="content content-has-widgets">
 | 
			
		||||
            <div class="grid">
 | 
			
		||||
 | 
			
		||||
              <div class="clearfix">
 | 
			
		||||
                <h1>Your Local Listings</h1>
 | 
			
		||||
                
 | 
			
		||||
                
 | 
			
		||||
                <? //run through each database to determine if this userid owns any local assets
 | 
			
		||||
if ($useruid) { ?>
 | 
			
		||||
 | 
			
		||||
<div>This is a list of all local assets registered to your specific forum user ID.</div>
 | 
			
		||||
 | 
			
		||||
                <div class="grid icon-view">
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-running"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/runshops">Running Stores</a></h3>
 | 
			
		||||
                      <? //coaches [Coaches]
 | 
			
		||||
						 $sql = "SELECT runshop_id, runshop_name FROM gforum_Runshops WHERE runshop_submitted_by = ".$useruid;
 | 
			
		||||
						 $results = mysql_query($sql) OR die(mysql_error());
 | 
			
		||||
						 $i = 0;
 | 
			
		||||
						 while($row = mysql_fetch_array($results)) {
 | 
			
		||||
							 echo ("<a href=\"http://www.slowtwitch.com/runshops/individual.php?runshops_id=".$row['runshops_id']."\">".$row['runshops_name']."</a><br />");
 | 
			
		||||
							 $i++;	                    
 | 
			
		||||
						 }
 | 
			
		||||
						 if ($i == 0) {
 | 
			
		||||
							echo ("none<br />");
 | 
			
		||||
						 } ?>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-biking"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/retailers">Bike Shops</a></h3>
 | 
			
		||||
                      <? $sql = "SELECT retailer_id, retailer_name FROM gforum_Retailers WHERE retailer_submitted_by = ".$useruid;
 | 
			
		||||
						 $results = mysql_query($sql) OR die(mysql_error());
 | 
			
		||||
						 $i = 0;
 | 
			
		||||
						 while($row = mysql_fetch_array($results)) {
 | 
			
		||||
							 echo ("<a href=\"http://www.slowtwitch.com/retailers/individual.php?retailer_id=".$row['retailer_id']."\">".$row['retailer_name']."</a><br />");	                    
 | 
			
		||||
							$i++;	                    
 | 
			
		||||
						 }
 | 
			
		||||
						 if ($i == 0) {
 | 
			
		||||
							echo ("none<br />");
 | 
			
		||||
						 } ?>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-coaches"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/coaches">Coaches</a></h3>
 | 
			
		||||
                      <? //coaches [Coaches]
 | 
			
		||||
						 $sql = "SELECT coach_id, coach_name FROM gforum_Coaches WHERE coach_submitted_by = ".$useruid;
 | 
			
		||||
						 $results = mysql_query($sql) OR die(mysql_error());
 | 
			
		||||
						 $i = 0;
 | 
			
		||||
						 while($row = mysql_fetch_array($results)) {
 | 
			
		||||
							 echo ("<a href=\"http://www.slowtwitch.com/coaches/individual.php?coach_id=".$row['coach_id']."\">".$row['coach_name']."</a><br />");
 | 
			
		||||
							 $i++;	                    
 | 
			
		||||
						 }
 | 
			
		||||
						 if ($i == 0) {
 | 
			
		||||
							echo ("none<br />");
 | 
			
		||||
						 } ?>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-fitters"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/fitters">Fitters</a></h3>
 | 
			
		||||
                      <? //fitters [Fitters]
 | 
			
		||||
						 $sql = "SELECT fitter_id, fitter_name FROM gforum_Fitters WHERE fitter_submitted_by = ".$useruid;
 | 
			
		||||
						 $results = mysql_query($sql) OR die(mysql_error());
 | 
			
		||||
						 $i = 0;
 | 
			
		||||
						 while($row = mysql_fetch_array($results)) {
 | 
			
		||||
							 echo ("<a href=\"http://www.slowtwitch.com/fitters/individual.php?fitter_id=".$row['fitter_id']."\">".$row['fitter_name']."</a><br />");	 
 | 
			
		||||
							$i++;	                    
 | 
			
		||||
						 }
 | 
			
		||||
						 if ($i == 0) {
 | 
			
		||||
							echo ("none<br />");
 | 
			
		||||
						 } ?>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-clubs"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/triclubs">Triathlon Clubs</a></h3>
 | 
			
		||||
                      <? //triclubs [Tri Clubs]
 | 
			
		||||
						 $sql = "SELECT triclub_id, triclub_name FROM gforum_Triclubs WHERE triclub_submitted_by = ".$useruid;
 | 
			
		||||
						 $results = mysql_query($sql) OR die(mysql_error());
 | 
			
		||||
						 $i = 0;
 | 
			
		||||
						 while($row = mysql_fetch_array($results)) {
 | 
			
		||||
							 echo ("<a href=\"http://www.slowtwitch.com/triclubs/individual.php?triclub_id=".$row['triclub_id']."\">".$row['triclub_name']."</a><br />");	                    
 | 
			
		||||
							$i++;	                    
 | 
			
		||||
						 }
 | 
			
		||||
						 if ($i == 0) {
 | 
			
		||||
							echo ("none<br />");
 | 
			
		||||
						 } ?>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
 | 
			
		||||
                  <div class="col-1-2 listing">
 | 
			
		||||
                    <div class="icon">
 | 
			
		||||
                      <i class="sprite-race"></i>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    <div class="list">
 | 
			
		||||
                      <h3><a href="<? echo $main_site_url ?>/calendar">Race Calendar</a></h3>
 | 
			
		||||
                      <? //triathlons [Race Calendar]
 | 
			
		||||
						 $sql = "SELECT uid, name FROM gforum_Triathlons WHERE submitted_by = ".$useruid;
 | 
			
		||||
						 $results = mysql_query($sql) OR die(mysql_error());
 | 
			
		||||
						 $i = 0;
 | 
			
		||||
						 while($row = mysql_fetch_array($results)) {
 | 
			
		||||
							 echo ("<a href=\"http://calendar.slowtwitch.com/individual.php?uid=".$row['uid']."\">".$row['name']."</a><br />");	 
 | 
			
		||||
							 $i++;
 | 
			
		||||
						 }
 | 
			
		||||
						 if ($i == 0) {
 | 
			
		||||
							echo ("none<br />");
 | 
			
		||||
						 } ?>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
                  
 | 
			
		||||
                </div>
 | 
			
		||||
              </div><!-- end col-2/3 -->
 | 
			
		||||
            <? } else { echo ("<div>You must be <a href='http://forum.slowtwitch.com/forum/?do=login'>logged in</a> with cookies enabled.</div>"); } ?>
 | 
			
		||||
 | 
			
		||||
            </div><!-- end grid -->
 | 
			
		||||
          </div><!-- end content -->
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
      </div><!-- end contentwrapper -->
 | 
			
		||||
    </div> <!-- end main -->
 | 
			
		||||
 | 
			
		||||
  <? include($common_path . "/templates/include_footer.php") ?>
 | 
			
		||||
  </div> <!-- container  -->
 | 
			
		||||
</body>
 | 
			
		||||
<? include($common_path . "/templates/include_global_js.php") ?>
 | 
			
		||||
</html>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<?
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
	 //coaches [Coaches]
 | 
			
		||||
	 $sql = "SELECT coach_id, coach_name FROM gforum_Coaches WHERE coach_submitted_by = ".$useruid;
 | 
			
		||||
	 $results = mysql_query($sql) OR die(mysql_error());
 | 
			
		||||
	 $i = 0;
 | 
			
		||||
	 while($row = mysql_fetch_array($results)) {
 | 
			
		||||
		 echo ("<a href=\"http://www.slowtwitch.com/coaches/individual.php?coach_id=".$row['coach_id']."\">".$row['coach_name']."</a><br />");
 | 
			
		||||
		 $i++;	                    
 | 
			
		||||
	 }
 | 
			
		||||
	 if ($i == 0) {
 | 
			
		||||
	 	echo ("none<br />");
 | 
			
		||||
	 }
 | 
			
		||||
 | 
			
		||||
	 //fitters [Fitters]
 | 
			
		||||
	 $sql = "SELECT fitter_id, fitter_name FROM gforum_Fitters WHERE fitter_submitted_by = ".$useruid;
 | 
			
		||||
	 $results = mysql_query($sql) OR die(mysql_error());
 | 
			
		||||
	 $i = 0;
 | 
			
		||||
	 while($row = mysql_fetch_array($results)) {
 | 
			
		||||
		 echo ("<a href=\"http://www.slowtwitch.com/fitters/individual.php?fitter_id=".$row['fitter_id']."\">".$row['fitter_name']."</a><br />");	 
 | 
			
		||||
	 	$i++;	                    
 | 
			
		||||
	 }
 | 
			
		||||
	 if ($i == 0) {
 | 
			
		||||
	 	echo ("none<br />");
 | 
			
		||||
	 }
 | 
			
		||||
 | 
			
		||||
	 //runshops [Running Shops]
 | 
			
		||||
	 $sql = "SELECT runshop_id, runshop_name FROM gforum_Runshops WHERE runshop_submitted_by = ".$useruid;
 | 
			
		||||
	 $results = mysql_query($sql) OR die(mysql_error());
 | 
			
		||||
	 $i = 0;
 | 
			
		||||
	 while($row = mysql_fetch_array($results)) {
 | 
			
		||||
		 echo ("<a href=\"http://www.slowtwitch.com/runshops/individual.php?runshop_id=".$row['runshop_id']."\">".$row['runshop_name']."</a><br />");	                    
 | 
			
		||||
	 	$i++;	                    
 | 
			
		||||
	 }
 | 
			
		||||
	 if ($i == 0) {
 | 
			
		||||
	 	echo ("none<br />");
 | 
			
		||||
	 }
 | 
			
		||||
	 
 | 
			
		||||
	 //retailers [Retailers]
 | 
			
		||||
	 $sql = "SELECT retailer_id, retailer_name FROM gforum_Retailers WHERE retailer_submitted_by = ".$useruid;
 | 
			
		||||
	 $results = mysql_query($sql) OR die(mysql_error());
 | 
			
		||||
	 $i = 0;
 | 
			
		||||
	 while($row = mysql_fetch_array($results)) {
 | 
			
		||||
		 echo ("<a href=\"http://www.slowtwitch.com/retailers/individual.php?retailer_id=".$row['retailer_id']."\">".$row['retailer_name']."</a><br />");	                    
 | 
			
		||||
	 	$i++;	                    
 | 
			
		||||
	 }
 | 
			
		||||
	 if ($i == 0) {
 | 
			
		||||
	 	echo ("none<br />");
 | 
			
		||||
	 }
 | 
			
		||||
 | 
			
		||||
	 //triclubs [Tri Clubs]
 | 
			
		||||
	 $sql = "SELECT triclub_id, triclub_name FROM gforum_Triclubs WHERE triclub_submitted_by = ".$useruid;
 | 
			
		||||
	 $results = mysql_query($sql) OR die(mysql_error());
 | 
			
		||||
	 $i = 0;
 | 
			
		||||
	 while($row = mysql_fetch_array($results)) {
 | 
			
		||||
		 echo ("<a href=\"http://www.slowtwitch.com/triclubs/individual.php?triclub_id=".$row['triclub_id']."\">".$row['triclub_name']."</a><br />");	                    
 | 
			
		||||
	 	$i++;	                    
 | 
			
		||||
	 }
 | 
			
		||||
	 if ($i == 0) {
 | 
			
		||||
	 	echo ("none<br />");
 | 
			
		||||
	 }
 | 
			
		||||
 | 
			
		||||
	 //triathlons [Race Calendar]
 | 
			
		||||
	 $sql = "SELECT uid, name FROM gforum_Triathlons WHERE submitted_by = ".$useruid;
 | 
			
		||||
	 $results = mysql_query($sql) OR die(mysql_error());
 | 
			
		||||
	 $i = 0;
 | 
			
		||||
	 while($row = mysql_fetch_array($results)) {
 | 
			
		||||
		 echo ("<a href=\"http://calendar.slowtwitch.com/individual.php?uid=".$row['uid']."\">".$row['name']."</a><br />");	 
 | 
			
		||||
		 $i++;
 | 
			
		||||
	 }
 | 
			
		||||
	 if ($i == 0) {
 | 
			
		||||
	 	echo ("none<br />");
 | 
			
		||||
	 }
 | 
			
		||||
	 
 | 
			
		||||
 | 
			
		||||
	 **/
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
		Reference in New Issue
	
	Block a user