{!--
Site:          hydro-physics.com
Page:          locations/index
Created:       Mar 24 2007
Last Modified: Jul 30 2007 [RMM]
=============================
ryan masuga, masugadesign.com
ryan@masugadesign.com 
============================= --}
{assign_variable:page_title="Hydro Physics, Inc. - Locations"}
{assign_variable:body_id="locations"}
{!-- {assign_variable:body_class=""} --}

{embed="common/pagetop" page_title="{page_title}"}
{embed="common/javascript"}
{embed="common/styles"}
</head>

{embed="common/header" body_id="{body_id}" body_class="{body_class}"}


<div id="content">
<h1 class="locations">Locations</h1>

<img class="locations-map" src="/images/site/map_locations_200707.gif" width="444" height="282" alt="Hydro Physics Locations" />


<dl class="locations-dl">

{exp:weblog:entries weblog="static_pages" disable="trackbacks|pagination|member_data|categories" category="9"}
{body}
{/exp:weblog:entries}


<?php 
$state =''; 
$fullstate =''; 
?>

{exp:query sql="
SELECT
d.member_id,
m.location AS location,
d.m_field_id_6 as firstname,
d.m_field_id_7 as lastname,
d.m_field_id_3 as address1, 
d.m_field_id_4 as address2, 
d.m_field_id_1 as city, 
d.m_field_id_2 as state, 
d.m_field_id_5 as zipcode,
d.m_field_id_8 as mainphone,
d.m_field_id_9 as tollfree, 
d.m_field_id_10 as fax, 
d.m_field_id_11 as cell,
m.email AS email,
d.m_field_id_12 as altemail,
d.m_field_id_14 as showemail,
d.m_field_id_15 as operational,
d.m_field_id_16 as statusmsg,
m.url AS website
FROM exp_members m, exp_member_data d 
WHERE m.member_id = d.member_id 
AND d.m_field_id_13 = 'yes'
AND m.group_id = 5
ORDER BY state,location ASC;
"}

<?php
$monkey = "{state}";
	
			switch ($monkey) {
		case "AK":   $fullstate = "Alaska";         break;
		case "AL":   $fullstate = "Alabama";        break;
		case "AR":   $fullstate = "Arkansas";       break;
		case "AZ":   $fullstate = "Arizona";        break;
		case "CA":   $fullstate = "California";     break;
		case "CO":   $fullstate = "Colorado";       break;
		case "CT":   $fullstate = "Connecticut";    break;
		case "DE":   $fullstate = "Delaware";       break;
		case "FL":   $fullstate = "Florida";        break;
		case "GA":   $fullstate = "Georgia";        break;
		case "HI":   $fullstate = "Hawaii";         break;
		case "IA":   $fullstate = "Iowa";           break;
		case "ID":   $fullstate = "Idaho";          break;
		case "IL":   $fullstate = "Illinois";       break;
		case "IN":   $fullstate = "Indiana";        break;
		case "KS":   $fullstate = "Kansas";         break;
		case "KY":   $fullstate = "Kentucky";       break;
		case "LA":   $fullstate = "Louisiana";      break;
		case "MA":   $fullstate = "Massachusetts";  break;
		case "MD":   $fullstate = "Maryland";       break;
		case "ME":   $fullstate = "Maine";          break;
		case "MI":   $fullstate = "Michigan";       break;
		case "MN":   $fullstate = "Minnesota";      break;
		case "MO":   $fullstate = "Missouri";       break;
		case "MS":   $fullstate = "Mississippi";    break;
		case "MT":   $fullstate = "Montana";        break;
		case "NC":   $fullstate = "North Carolina"; break;
		case "ND":   $fullstate = "North Dakota";   break;
		case "NE":   $fullstate = "Nebraska";       break;
		case "NH":   $fullstate = "New Hampshire";  break;
		case "NJ":   $fullstate = "New Jersey";     break;
		case "NM":   $fullstate = "New Mexico";     break;
		case "NV":   $fullstate = "Nevada";         break;
		case "NY":   $fullstate = "New York";       break;
		case "OH":   $fullstate = "Ohio";           break;
		case "OK":   $fullstate = "Oklahoma";       break;
		case "OR":   $fullstate = "Oregon";         break;
		case "PA":   $fullstate = "Pennsylvania";   break;
		case "RI":   $fullstate = "Rhode Island";   break;
		case "SC":   $fullstate = "South Carolina"; break;
		case "SD":   $fullstate = "South Dakota";   break;
		case "TN":   $fullstate = "Tennessee";      break;
		case "TX":   $fullstate = "Texas";          break;
		case "UT":   $fullstate = "Utah";           break;
		case "VA":   $fullstate = "Virginia";       break;
		case "VT":   $fullstate = "Vermont";        break;
		case "WA":   $fullstate = "Washington";     break;
		case "WI":   $fullstate = "Wisconsin";      break;
		case "WV":   $fullstate = "West Virginia";  break;
		case "WY":   $fullstate = "Wyoming";        break;
		/* canadian */
		case "AB":   $fullstate = "Alberta";        break;
   default:     $fullstate = $state;
	}
	
	
	if ($state != $monkey) {
			print "<dt>$fullstate</dt>\n";
			$state ='{state}';
	}
?>

<dd>

{if operational == "no"}
<strong>{location}</strong><br />
{statusmsg}

{if:else}
	<strong>{location}</strong><br />
	{if firstname != "" && lastname != ""}{firstname} {lastname}<br />{/if}
	{if address1 != ""}{address1}<br />{/if}
	{if address2 != ""}{address2}<br />{/if}
	{city}, {state} {zipcode}<br />
	{if mainphone != ""}Phone: <span class="phone">{mainphone}</span><br />{/if}
	{if fax != ""}Fax: <span class="phone">{fax}</span><br />{/if}
	{if tollfree != ""}Toll Free: <span class="phone">{tollfree}</span><br />{/if}
	{if cell != ""}Cell/Mobile: <span class="phone">{cell}</span><br />{/if}
	
	email: {encode="{email}"}
	{if altemail != ""}<br />email2: {encode="{altemail}"}{/if}
	
	{if website != ""}<br />web: <a href="{website}">{website}</a>{/if}
	
	
{/if}
</dd>

{/exp:query}



</dl>

</div>
{embed="common/footer"}