Comic Shop Locator Service
if ($city = $_POST['city']) {
$country = $_POST['country'];
$file = file_post('/default.asp?LocType=g','IntlSearch=Y&country='.urlencode($country).'&city='.urlencode($city));
preg_match_all('#
#s',$file,$matches, PREG_SET_ORDER);
print '
You searched for stores near '.$city.', '.$country.'...
';
print '
';
foreach ($matches as $match) {
$match[1] = preg_replace('#020 8876 3855#', 'Unknown', $match[1]);
print '- ' . preg_replace('#?t[rd]>#', '', $match[1]);
}
print '
';
#} elseif ($letter = $_POST['cityletter']) {
# $CountryName = $_POST['PassedCountryName'];
# $CountryID = $_POST['PassedCountryID'];
# $StateID = $_POST['PassedStateID'];
# $file = file_post('/csls_global.asp','PassedCountryName='.urlencode($CountryName).'&PassedCountryID='.urlencode($CountryID).'&ShowCountrySelector=NO&state='.urlencode($StateID));
# preg_match('#
#',$file,$matches);
# $StateName = $matches[1];
# preg_match_all('#
#',$file,$matches,PREG_SET_ORDER);
# $select = array();
# foreach ($matches as $match) {
# if (substr($match[1],0,1)==$letter) {
# $select[] = $match[0];
# }
# }
# sort($select);
/* $select = '
';
?>
} elseif ($StateID = $_POST['state']) {
$CountryName = $_POST['PassedCountryName'];
$CountryID = $_POST['PassedCountryID'];
$file = file_post('/csls_global.asp','PassedCountryName='.urlencode($CountryName).'&PassedCountryID='.urlencode($CountryID).'&ShowCountrySelector=NO&state='.urlencode($StateID));
preg_match('#
#',$file,$matches);
$StateName = $matches[1];
preg_match_all('#(
)#',$file,$matches,PREG_SET_ORDER);
$select = array();
foreach ($matches as $match) {
$select[] = $match[1];
}
sort($select);
if (sizeof($select)>100) {
$letts = array();
foreach ($select as $opt) {
$sss = substr($opt,15,1);
if (!isset($letts[$sss])) $letts[$sss] = 1;
}
$select = array();
foreach ($letts as $lett => $dummy) {
$select[] = '
';
}
$select = '
';
?>
} else {
$select = '
';
?>
}
*/
} elseif ($country = $_POST['country']) {
$file = file_post('/default.asp?LocType=g','country='.$country);
$file = preg_replace('#^.*?