$val) { if ($key == $state_code) return $val; } return ""; } function getCanadaName($state_code) { global $config; foreach ($config['canada_options'] as $key => $val) { if ($key == $state_code) return $val; } return ""; } function getMapID($state_code) { global $config; foreach ($config['map_options'] as $key => $val) { if ($key == $state_code) return $val; } return ""; } $xml = "\n". "\n". "0xffffff\n". "0xffffff\n". "2\n". "0x7AA0B7\n". "0\n". "1\n". "0xffffff\n". "on\n". "\n"; $conn = dbconnect(); $map = "\n"; $x=1; foreach ($config['map_options'] as $key => $val) { $state_name = getStateName($key); $map_id = $val; $sql = "SELECT count(*) cnt FROM can_members WHERE state = '$key'"; $res2 = dbquery($sql,$conn); $cnt = 0; $row2 = mysql_fetch_array($res2); $cnt = $cnt + $row2["cnt"]; $sql = "select count(*) cnt FROM certified_installers WHERE state = '$key'"; $res = dbquery($sql,$conn); $row = mysql_fetch_array($res); $cnt = $cnt + $row["cnt"]; if ($state_name > "") { $map .= "\n". "".$map_id."\n". "".$state_name."\n". "javascript:getState('".$key."');\n". "\n". "0x003471\n". "0x1CBBB4\n". "_top\n". "\n". "\n"; } } $map .= "\n". ""; $path = realpath("."); $filename = $path."\color_set\usa_locator.xml"; $fp = fopen($filename, "w"); // Write the data to the file fwrite($fp, $xml.$map); // Close the file fclose($fp); $map = "\n"; $x=1; foreach ($config['canada_options'] as $key => $val) { $state_name = getCanadaName($key); $map_id = $val; /* $sql = "SELECT count(*) cnt FROM can_members WHERE state = '$key'"; $res2 = dbquery($sql,$conn); $cnt = 0; $row2 = mysql_fetch_array($res2); $cnt = $cnt + $row2["cnt"]; $sql = "select count(*) cnt FROM certified_installers WHERE state = '$key'"; $res = dbquery($sql,$conn); $row = mysql_fetch_array($res); $cnt = $cnt + $row["cnt"]; */ if ($state_name > "") { $map .= "\n". "".$map_id."\n". "".$state_name."\n". "javascript:getState('".$key."');\n". "\n". "0x003471\n". "0x1CBBB4\n". "_top\n". "\n". "\n"; } } $map .= "\n". ""; $xml = "\n". "\n"; $path = realpath("."); $filename = $path."\color_set\canada_locator.xml"; $fp = fopen($filename, "w"); // Write the data to the file fwrite($fp, $xml.$map); // Close the file fclose($fp); $sql = "SELECT * FROM distributor_members"; $res = dbquery($sql,$conn); $cat = ""; while ($row = mysql_fetch_array($res)) { $cat .= "{"; $cat .= "'rec_type': 'a',"; $cat .= "'rec_num': ".$row["distributor_id"].","; $cat .= "'latitude': ". $row['latitude']. ","; $cat .= "'longitude': ". $row['longitude'] .","; $cat .= "'company': '". addslashes($row['dealer']). "',"; $cat .= "'address': '". addslashes($row['address']). "',"; $cat .= "'city': '". addslashes($row['city']) ."',"; $cat .= "'state': '". addslashes($row['state']) ."',"; $cat .= "'zip': '". addslashes($row['zip_code']) ."',"; $cat .= "'phone': '". addslashes($row["phone"]) ."',"; $cat .= "'email': '". addslashes($row['email_address']) ."',"; $cat .= "'website': '". addslashes($row["website"]) ."'"; $cat .= "},"; } if (strlen($cat)>0) $cat2 = substr($cat,0,-1); else $cat2 = ""; $cat = "var markers = [" .$cat2. "];"; ?> Commercial Foundation Repair | Home Foundation Repair | Helical and Resistance Piers

Finding a CHANCE Certified Installer is FAST and EASY!

Simply click on the MAP below OR fill in some basic information on the right such as STATE/PROVINCE
or your POSTAL/ZIP CODE with a RADIUS (max 250 miles)

Results will indicate those CHANCE Certified Installers in your STATE/PROVINCE,
listed alphabetically by city OR by shortest distance to the POSTAL/ZIP CODE entered.



U.S.

Canada

Carribean


Search Criteria

State/Province:   
OR   
ZIP/Postal:      Radius: