[insert_php] include “archdiocese/directory2/web_common.inc”;

$GrpID = $_GET[“gr3ApI”];

$stmt = $d_conex->prepare(“SELECT Active, Name, Address, PostCode, Telephone, Fax, Email, WebPage, Mission, Facebook, Twitter, GooglePlus, Youtube, Instagram, Flickr FROM Dir_Groups where Active = 1 and GroupID = ?”);
$stmt->bind_param(“s”,$GrpID);
$stmt->execute();
$stmt->store_result();
$numrows = $stmt->num_rows;
$stmt->bind_result($RS_Active, $RS_GrpName, $RS_Address, $RS_PostCode, $RS_Telephone, $RS_Fax, $RS_Email3, $RS_WebPage, $RS_Mission, $RS_Facebook, $RS_Twitter, $RS_GooglePlus, $RS_Youtube, $RS_Instagram, $RS_Flickr);
$stmt->fetch();

echo “

“;
echo “

“;
if ($RS_Address!=””){
echo “

“;
}
if ($RS_Email3!=””){
echo “

“;
}
if ($RS_WebPage!=””){
echo “

“;
}

if ($RS_Facebook!=””){
echo “

“;
}
if ($RS_Twitter!=””){
echo “

“;
}
if ($RS_GooglePlus!=””){
echo “

“;
}
if ($RS_Youtube!=””){
echo “

“;
}
if ($RS_Instagram!=””){
echo “

“;
}
if ($RS_Flickr!=””){
echo “

“;
}

if ($RS_Telephone!=””){
echo “

“;
}
if ($RS_Fax!=””){
echo “

“;
}

if ($RS_Mission!=”” and $RS_Active==”1″){
echo “

“;
echo “

“;
echo “

“;
}

if ($RS_Active==”1”){
$stmt4 = $d_conex->prepare(“SELECT PersonID, GroupID, Title, JobDescription, Name, Phone, Email FROM Dir_GroupDetail WHERE GroupID = ? and Active=’Y’ order by Sequence ASC”);
$stmt4->bind_param(“s”,$GrpID);
$stmt4->execute();
$stmt4->store_result();
$numrows4 = $stmt4->num_rows;
$stmt4->bind_result($RS_PersonID, $RS_GroupID, $RS_Title, $RS_JobDescription, $RS_PersonName, $RS_Phone, $RS_Email);
while($stmt4->fetch())
{
$Name2 = “”;
$stmt5 = $d_conex->prepare(“SELECT Title, PersonID, FirstName, LastName, Birth, Suffix, Picture, OrdinatonDate, PersonID, Address, Telephone, Fax, Email, EmailWebDisplay, Website, Comments FROM Dir_Person WHERE PersonID = ?”);
$stmt5->bind_param(“s”,$RS_PersonID);
$stmt5->execute();
$stmt5->store_result();
$numrows5 = $stmt5->num_rows;
$stmt5->bind_result($RS_Title2, $RS_PersonID2, $RS_FirstName2, $RS_LastName2, $RS_Birth2, $RS_Suffix2, $RS_Picture2, $RS_OrdinatonDate2, $RS_PersonID2, $RS_Address2, $RS_Telephone2, $RS_Fax2, $RS_Email2, $RS_EmailWebDisplay2, $RS_Website2, $RS_Comments2);
while($stmt5->fetch())
{
if(strlen($RS_Suffix2)>0){
$Name2 = $RS_Title2.” “.$RS_FirstName2.” “.$RS_LastName2.”, “.$RS_Suffix2;
} else {
$Name2 = $RS_Title2.” “.$RS_FirstName2.” “.$RS_LastName2;
}
}

if ($numrows5==0){
$Name2 = $RS_PersonName;
}
$Name2 = nl2br($Name2);

if ($RS_Phone<>“”){
echo “

“;
if ($RS_PersonID2>0){
echo “

“;
} else {
echo “

“;
}
echo “

“;
if ($RS_Email2<>“” and $RS_EmailWebDisplay2 == “Y”){
echo “

“;
} else {
echo “

“;
}
if ($RS_JobDescription<>“”){
echo “

“;
}
echo “

“;
} else {
echo “

“;
if ($RS_PersonID2>0){
echo “

“;
} else {
echo “

“;
}
echo “

“;
if ($RS_Email2<>“” and $RS_EmailWebDisplay2 == “Y”){
echo “

“;
} else {
echo “

“;
}
if ($RS_JobDescription<>“”){
echo “

“;
}
}

}
echo “

“;
echo “

“;

$stmt6 = $d_conex->prepare(“select c.GroupTag, c.TagDesc from Dir_Groups a, Dir_GroupGroupTags b, Dir_GroupTags c where b.GroupID = a.GroupID and c.GroupTag = b.GroupTag and b.GroupID = ?”);
$stmt6->bind_param(“s”,$GrpID);
$stmt6->execute();
$stmt6->store_result();
$numrows6 = $stmt6->num_rows;
$stmt6->bind_result($RS_GroupTag, $RS_TagDesc);
if ($numrows6>0){
echo “

“;
}
while($stmt6->fetch()){
echo “

“;
}
}[/insert_php]

“.$RS_GrpName.”
Address:  “.$RS_Address.”
Singapore “.$RS_PostCode.”
Email:  “.$RS_Email3.”
Website:  “.$RS_WebPage.”
Facebook: “.$RS_Facebook.”
Twitter: “.$RS_Twitter.”
Google+: “.$RS_GooglePlus.”
Yuotube: “.$RS_Youtube.”
Instagram: “.$RS_Instagram.”
Flickr: “.$RS_Flickr.”
Telephone: “.$RS_Telephone.”
Fax: “.$RS_Fax.”

INFORMATION
“.$RS_Mission.”
 
“.$Name2.”
“.$Name2.”
“.$RS_Title.”
“.$RS_Email2.”
“.$RS_Email.”
  “.$RS_JobDescription.”  
Contact: “.$RS_Phone.”
 
“.$Name2.”
“.$Name2.”
“.$RS_Title.”
“.$RS_Email2.”
“.$RS_Email.”
  “.$RS_JobDescription.”  


CATEGORY LISTED / SUPPORT SERVICES RENDERED

“.$RS_TagDesc.”


* Note:
Spot a mistake in our directory? Tell us about it.