124 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			124 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?PHP include("config.php");
 | 
						|
require_once("rating/classes/include.all.php");
 | 
						|
include("rating/int.to.words.php");
 | 
						|
 | 
						|
$results = mysql_query("SELECT retailer_state FROM gforum_Retailers WHERE retailer_state_tag='".substr(mysql_real_escape_string($_GET[state]),0,20)."' AND retailer_valid = 1 LIMIT 1");
 | 
						|
 | 
						|
$row = mysql_fetch_array($results);
 | 
						|
$statename = $row[retailer_state];
 | 
						|
 | 
						|
$none = FALSE;
 | 
						|
if(mysql_num_rows($results) < 1){
 | 
						|
$statename = substr(mysql_real_escape_string($_GET[state]),0,20);
 | 
						|
if($statename == "districtofcolumbia"){
 | 
						|
$statename = "District of Columbia";
 | 
						|
}
 | 
						|
if($statename == "centralamerica"){
 | 
						|
$statename = "Central America";
 | 
						|
}
 | 
						|
if(($statename == "newhampshire")){
 | 
						|
$statename = "New Hampshire";
 | 
						|
}
 | 
						|
if($statename == "newjersey"){
 | 
						|
$statename = "New Jersey";
 | 
						|
}
 | 
						|
if($statename == "newmexico"){
 | 
						|
$statename = "New Mexico";
 | 
						|
}
 | 
						|
if($statename == "newyork"){
 | 
						|
$statename = "New York";
 | 
						|
}
 | 
						|
if($statename == "northcarolina"){
 | 
						|
$statename = "North Carolina";
 | 
						|
}
 | 
						|
if($statename == "northdakota"){
 | 
						|
$statename = "North Dakota";
 | 
						|
}
 | 
						|
if($statename == "southcarolina"){
 | 
						|
$statename = "South Carolina";
 | 
						|
}
 | 
						|
if($statename == "southdakota"){
 | 
						|
$statename = "South Dakota";
 | 
						|
}
 | 
						|
if($statename == "westvirginia"){
 | 
						|
$statename = "West Virginia";
 | 
						|
}
 | 
						|
if($statename == "britishcolumbia"){
 | 
						|
$statename = "British Columbia";
 | 
						|
}
 | 
						|
if($statename == "newbrunswick"){
 | 
						|
$statename = "New Brunswick";
 | 
						|
}
 | 
						|
if($statename == "novascotia"){
 | 
						|
$statename = "Nova Scotia";
 | 
						|
}
 | 
						|
if($statename == "princeedwardisland"){
 | 
						|
$statename = "Prince Edward Island";
 | 
						|
}
 | 
						|
$statename = ucfirst($statename);
 | 
						|
$none = TRUE;
 | 
						|
}
 | 
						|
 | 
						|
$results = mysql_query("SELECT retailer_id, retailer_name, retailer_address, retailer_address_two, retailer_city, retailer_state, retailer_zip, retailer_phone, retailer_fax, retailer_email, retailer_website, retailer_cart FROM gforum_Retailers WHERE retailer_state_tag='".substr(mysql_real_escape_string($_GET[state]),0,20)."' AND retailer_valid=1 ORDER BY retailer_name ASC");
 | 
						|
 | 
						|
// set the page title
 | 
						|
$pagetitle = $statename;
 | 
						|
$selected_item = substr(mysql_real_escape_string($_GET[state]),0,20);
 | 
						|
 | 
						|
// set meta tags
 | 
						|
$meta_keywords = "triathlon retailers in ".$statename;
 | 
						|
$meta_description = "Trying to find triathlon retailers in ".$statename."? Here is a listing of all ".$statename." triathlon retailers. Users can even rate and comment on these retailers.";
 | 
						|
?>
 | 
						|
 | 
						|
<? 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 section-static remove-sidebar">
 | 
						|
          <div class="sidebar-b">
 | 
						|
            <? include("include_sidebar.php"); ?>
 | 
						|
          </div>
 | 
						|
          <div class="content content-has-widgets">
 | 
						|
            <div class="grid">
 | 
						|
 | 
						|
              <div class="clearfix">
 | 
						|
                <h1 class="float-left">Retailers</h1>
 | 
						|
                <a href="<? echo $site_url ?>" class="btn btn-white float-right">Back</a>
 | 
						|
                <? if (is_logged_in($user)) { ?>
 | 
						|
                <a href="<? echo $site_url . '/add.php' ?>" class="btn btn-white float-right">Add Retailer</a>
 | 
						|
                <? } ?>
 | 
						|
                <hr class="line" />
 | 
						|
                <? include("../runshops/include_region_list.php"); ?>
 | 
						|
 | 
						|
                <h2><? echo $statename ?> State</h2>
 | 
						|
                <hr />
 | 
						|
                <? if($none == TRUE) {
 | 
						|
                  echo "<p>No bike shops have been entered yet for ".$statename. ".</p>";
 | 
						|
                } ?>
 | 
						|
 | 
						|
                <? while ($row = mysql_fetch_array($results)) { ?>
 | 
						|
                  <? include("include_store.php"); ?>
 | 
						|
                <? } ?>
 | 
						|
              </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>
 | 
						|
 |