#!/usr/local/bin/php
This page is a list of retail stores that sell Forces of Nature products. We are adding more stores so check back frequently.
If a store is listed here and you find that they are not carrying Forces of Nature products, please contact us.
';
// table of 5 columns and 10 rows
for($cols=0; $cols < 5; $cols++){
echo '
';
for($rows=0; $rows < 10; $rows++){
$n = $cols*10 + $rows; // which state is this ? based on row and col
$this_state = trim($states[$n]);
## SHOW LINK TO ANCHOR OR MAIL TO ##
if ( $counts[$this_state] > 0) {
#$link = $_SERVER['PHP_SELF']."#$this_state";
$link = "#$this_state";
} else {
$link = "mailto:info@forces-of-nature.net?subject=We want FON in $this_state!";
$link = "http://www.forces-of-nature.net/we_want_fon.htm";
}
echo "| $this_state | ";
}
echo " | ";
}
echo "
";
########################## GET STORES ##############################
$query = "select retail_store_id, city, state, store_name, store_url, store_phone,
store_address
from retail_stores
where approved = 'APPROVED'
order by state ASC, city ASC, store_name ASC";
$result = mysql_query($query);
// open first state table
echo "";
echo '';
while($result and ($row = mysql_fetch_assoc($result)) != FALSE){
//friendly variable names
foreach(array_keys($row) as $key){
${$key} = $row[$key];
}
if ($state != $last_state) {
echo <<
| |
|
|
|
EOF;
}
$etc = "";
if ($store_address) {
$etc .= "
$store_address";
}
if ($store_phone) {
$etc .= "
$store_phone";
}
echo <<
$city |
$store_name $etc |
EOF;
$last_state = $state;
} // while fetch
// close last table
echo "
";
?>