Christadelphian Ecclesias in $rname \n"; ?>

View a map of all ecclesias in Canada by clicking here.

\n"; } else { print "

View a map of all ecclesias in the United States by clicking here.

\n"; } $i = 0; $myfile = fopen("ecclesialist.txt", "r"); // Output one line until end-of-file while(!feof($myfile)) { $line = fgets($myfile); if (substr($line,0,2) == $r) { // print $line . "
"; $stateinfo[$i] = $line; $i++; } } fclose($myfile); if ($i > 5) { $lnk = 1; $j = 0; $outcount = 1; $incountlim = ($i + 2) / 3; print "
\n\n
\n\n \n"; while ($outcount <= 3) { $in = 1; print " \n"; $outcount++; } print " \n"; print "
\n"; while (($in <= $incountlim) && ($j <= $i)) { while (substr($stateinfo[$j], 3, 1) == "#") { $j++; } $loc = strpos($stateinfo[$j], "\t"); $nam = substr($stateinfo[$j], 3, $loc-3); $loc = strpos($nam, "/"); if ($loc > 0) { $nam=substr($nam, 0, $loc); } $linknam[$j] = trim($nam); $amd = 0; if (substr($nam, 0, 1) == "*") { $nam = substr($nam, 1, strlen($nam)-1); $amd = 1; $linknam[$j] = trim($nam)."1"; $nam .= "*"; } print " $nam
\n"; $in++; $j++; } print "
\n"; print "
\n\n"; } $a = 0; for ($j=0; $j<$i; $j++) { if (substr($stateinfo[$j], 3, 1) == "%") { include("noecclesia.htm"); } elseif (substr($stateinfo[$j], 3, 1) == "#") { print substr($stateinfo[$j], 4, strlen($stateinfo[$j])-4); } else { $loc = strpos($stateinfo[$j], "\t"); $nam = substr($stateinfo[$j], 3, $loc - 3); $amd = 0; if (substr($nam, 0, 1) == "*") { $nam = substr($nam, 1, strlen($nam)-1); $amd = 1; $a = 1; } $site = ""; $loc = strpos($nam, "/"); if ($loc > 0) { $site=substr($nam, $loc + 1, strlen($nam)- $loc + 1); $nam=substr($nam,0,$loc); } if ($i > 5) { print "\n"; } print "


\n"; print "

"; print "$nam Ecclesia "; if ($amd == 1) { print "*"; } print ""; if (strlen($site) > 0) { print "
Please visit our website."; } print "

\n"; print "

\n"; print " Sunday Meeting Location:
\n"; $loc = strpos($stateinfo[$j], "\t"); $ecc=substr($stateinfo[$j], $loc + 1, strlen($stateinfo[$j]) - $loc - 1); $loc = strpos($ecc, "\t"); $x = substr($ecc, 0, 1); //number of address lines $addr = substr($ecc, 2, $loc - 2); /* if ($x == "9") { latlon=rest(loc,"/") loc=first(loc,"/") }*/ print "$addr\n
"; if ($x > 0) { /* if y == 9 lat=first(latlon,",") lon=rest(latlon,",") printf("Map this address with Google, ",lat,lon) printf(" or with MapBlast, ",lat,lon) printf(" or with MapQuest.
",lat,lon) else */ while ($x > 1) { $loc = strpos($addr, ","); $addr = substr($addr, $loc + 1, strlen($addr) - $loc - 1); $x--; } $loc = strpos($addr, "<"); if ($loc > 0) { $addr = substr($addr, 0, $loc); } $loc = strpos($addr, ","); $st=substr($addr, 0, $loc); $csz=trim(substr($addr, $loc + 1, strlen($addr) - $loc - 1)); $loc = strpos($csz, ","); $ci=substr($csz, 0, $loc); $prov=trim(substr($csz, $loc + 1, strlen($csz) - $loc - 1)); if (strpos($prov, " ") > 0) { $prov = substr($prov, 0, strpos($prov, " ")-1); } $st = str_replace(" ", "%20", $st); $st = str_replace("&", "%26", $st); $ci = str_replace(" ", "%20", $ci); $csz = str_replace(" ", "%20", $csz); if ($cntry == "ca") { $cntry1 = "CAN"; } else { $cntry1 = "USA"; } print "Map this address with Google, "; print " or with Yahoo! maps, "; print " or with MapQuest.
"; // endif } print "

\n"; print "

Meeting Times: \n"; print "

\n\n"; print "

For Details:"; $ecc=substr($ecc, $loc + 1, strlen($ecc) - $loc - 1); if (strlen($ecc) > 2) { print " Please contact "; if (strpos($ecc, "/") > 0) { $loc = strpos($ecc, "/"); $add1 = substr($ecc, 0, $loc); $add2 = substr($ecc, $loc + 1, strlen($ecc) - $loc - 1); } else { $add1=$ecc; $add2 = ""; } if (substr($add1, 0, 1) == "#") { print substr($add1, 1, strlen($add1) - 1); } else { $loc = strpos($add1, " "); $cona = substr($add1, 0, $loc); $conn = substr($add1, $loc + 1, strlen($add1) - $loc - 1); print "$conn"; } if (strlen($add2) > 0) { if (substr($add2, 0, 1) == "#") { print substr($add2, 1, strlen($add2) - 1); } else { $loc = strpos($add2, " "); $cona = substr($add2, 0, $loc); $conn = substr($add2, $loc + 1, strlen($add2) - $loc - 1); print " or $conn"; } } } else { include("contact.htm"); } print "


\n\n"; } } if ($a == 1) { include("unamended.htm"); } include "pagecredit.html"; print "
\n"; print "\n"; print "\n"; ?>