} else { $stringResponse = $stringResponse . "&namem=" . $mother->getNames() . "&lastname1m=" . $mother->getLastname1() . "&lastname2m=" . $mother->getLastname2(); } if ($gpp === NULL) { $stringResponse = $stringResponse . "&namegpp=&lastname1gpp=&lastname2gpp="; } else { $stringResponse = $stringResponse . "&namegpp=" . $gpp->getNames() . "&lastname1gpp=" . $gpp->getLastname1() . "&lastname2gpp=" . $gpp->getLastname2(); } if ($gmp === NULL) { $stringResponse = $stringResponse . "&namegmp=&lastname1gmp=&lastname2gmp="; } else { $stringResponse = $stringResponse . "&namegmp=" . $gmp->getNames() . "&lastname1gmp=" . $gmp->getLastname1() . "&lastname2gmp=" . $gmp->getLastname2(); } if ($gpm === NULL) { $stringResponse = $stringResponse . "&namegpm=&lastname1gpm=&lastname2gpm="; } else { $stringResponse = $stringResponse . "&namegpm=" . $gpm->getNames() . "&lastname1gpm=" . $gpm->getLastname1() . "&lastname2gpm=" . $gpm->getLastname2(); } if ($gmm === NULL) { $stringResponse = $stringResponse . "&namegmm=&lastname1gmm=&lastname2gmm="; } else { $stringResponse = $stringResponse . "&namegmm=" . $gmm->getNames() . "&lastname1gmm=" . $gmm->getLastname1() . "&lastname2gmm=" . $gmm->getLastname2(); } $baptism = BaptismManager::getSingleBaptism('idOwner', $child->getId()); if ($baptism !== NULL) { $baptismReg = BaptismManager::getSingleBaptismRegistry('id', $baptism->getIdBookRegistry()); $stringResponse = $stringResponse . "&idBap=" . $baptism->getId() . "&dateBap=" . DatabaseManager::databaseDateToSingleDate($baptism->getCelebrationDate()) . "&bookBap=" . $baptismReg->getBook() . "&pageBap=" . $baptismReg->getPage() . "&numbBap=" . $baptismReg->getNumber() . "&"; } else { $stringResponse = $stringResponse . "&idBap=0&dateBap=&bookBap=&pageBap=&numbBap=&"; } echo $stringResponse;
if ($baptism !== NULL) { //Create the String for Churchs of Baptism $churchString = "<option>XXXXXXXXXX</option>"; $churchId = $baptism->getIdChurch(); $baptismId = $baptism->getId(); foreach ($churchs as $singleChurch) { if ($singleChurch->getId() === $churchId) { $churchString = $churchString . "<option selected> " . $singleChurch->getName() . "</option>\n"; } else { $churchString = $churchString . "<option> " . $singleChurch->getName() . "</option>\n"; } } $string = str_replace("|ChurchOptionB|", $churchString, $string); $idBookRegistryB = $baptism->getIdBookRegistry(); $bookRegistryB = BaptismManager::getSingleBaptismRegistry('id', $idBookRegistryB); $baptismDate = DatabaseManager::databaseDateToSingleDate($baptism->getCelebrationDate()); $baptismBook = $bookRegistryB->getBook(); $baptismPage = $bookRegistryB->getPage(); $baptismNumber = $bookRegistryB->getNumber(); } else { $churchString = "<option selected>XXXXXXXXXX</option>"; $baptismId = 0; foreach ($churchs as $singleChurch) { $churchString = $churchString . "<option> " . $singleChurch->getName() . "</option>\n"; } $string = str_replace("|ChurchOptionB|", $churchString, $string); $baptismDate = ""; $baptismBook = ""; $baptismPage = ""; $baptismNumber = ""; }
} //Get File contest from template $string = file_get_contents("template/MarriageInsertion.html"); //Remplace the nav $string = str_replace("|title|", 'Change Marriage', $string); $string = str_replace("|NavBar|", SessionManager::getNavBar(), $string); //Get The Data of the Marriage $idMarriage = $_GET["id"]; $marriage = MarriageManager::getSingleMarriage('id', $idMarriage); $boyfriendId = $marriage->getIdBoyfriend(); $boyfriend = PersonManager::getSinglePerson('id', $boyfriendId); $girlfriendId = $marriage->getIdGirlfriend(); $girlfriend = PersonManager::getSinglePerson('id', $girlfriendId); $churchMarriageId = $marriage->getIdChurchMarriage(); $churchProcessId = $marriage->getIdChurchProcess(); $marriageDate = DatabaseManager::databaseDateToSingleDate($marriage->getCelebrationDate()); SessionManager::validateUserInPage('marriageChange.php', $churchMarriageId, $churchProcessId); $idRector = $marriage->getIdRector(); $objRector = RectorManager::getSingleRector('id', $idRector); $objPerRect = PersonManager::getSinglePerson('id', $objRector->getIdPerson()); $nameRector = $objPerRect->getFullNameBeginName(); $idBookRegistry = $marriage->getIdBookRegistry(); $bookRegistry = MarriageManager::getSingleMarriageRegistry('id', $idBookRegistry); $idGodFather = $marriage->getIdGodFather(); $idGodMother = $marriage->getIdGodMother(); $godMother = PersonManager::getSinglePerson('id', $idGodMother); $godFather = PersonManager::getSinglePerson('id', $idGodFather); $idWitness1 = $marriage->getIdWitness1(); $idWitness2 = $marriage->getIdWitness2(); $witness1 = PersonManager::getSinglePerson('id', $idWitness1); $witness2 = PersonManager::getSinglePerson('id', $idWitness2);
SessionManager::validateUserInPage('defuntionLook.php'); //Get File contest from template $string = file_get_contents("template/DefuntionInsertion.html"); if (!isset($_GET) || $_GET["id"] === NULL) { echo "<script src='../JS/functions.js'></script><script>href('main.php')</script>"; } //Remplace the nav $string = str_replace("|title|", 'Look Defuntion', $string); $string = str_replace("|NavBar|", SessionManager::getNavBar(), $string); //Get The Data of the Defuntion $idDefuntion = $_GET["id"]; $defuntion = DefuntionManager::getSingleDefuntion('id', $idDefuntion); $ownerId = $defuntion->getIdOwner(); $owner = PersonManager::getSinglePerson('id', $ownerId); $churchId = $defuntion->getIdChurch(); $defuntionDate = DatabaseManager::databaseDateToSingleDate($defuntion->getDeadDate()); //Create a String of options of Last Church $churchString = ""; $churchs = ChurchManager::getAllChurchs('name'); foreach ($churchs as $singleChurch) { if ($singleChurch->getId() === $churchId) { $churchString = $churchString . "<option selected> " . $singleChurch->getName() . "</option>\n"; } else { $churchString = $churchString . "<option> " . $singleChurch->getName() . "</option>\n"; } } $string = str_replace("|ChurchOption|", $churchString, $string); $saveButton = ''; $cancelButton = ''; $returnButton = '<button type="button" class="btn btn-success" onclick=\'href("defuntionMenu.php")\'> <img src="../icons/return.png" width="50px"><br>
//Remplace the nav $string = str_replace("|title|", 'Look Communion', $string); $string = str_replace("|NavBar|", SessionManager::getNavBar(), $string); if (!isset($_GET) || $_GET["id"] === NULL) { echo "<script src='../JS/functions.js'></script><script>href('main.php')</script>"; } //Get The Data of the Communion $idCommunion = $_GET["id"]; $communion = CommunionManager::getSingleCommunion('id', $idCommunion); $ownerId = $communion->getIdOwner(); $owner = PersonManager::getSinglePerson('id', $ownerId); $owner->getIdFather() !== NULL ? $fatherId = $owner->getIdFather() : ($fatherId = 0); $owner->getIdMother() !== NULL ? $motherId = $owner->getIdMother() : ($motherId = 0); $gender = $owner->getGender(); $churchId = $communion->getIdChurch(); $communionDate = DatabaseManager::databaseDateToSingleDate($communion->getCelebrationDate()); $idRector = $communion->getIdRector(); $objRector = RectorManager::getSingleRector('id', $idRector); $objPerRect = PersonManager::getSinglePerson('id', $objRector->getIdPerson()); $nameRector = $objPerRect->getFullNameBeginName(); $idBookRegistry = $communion->getIdBookRegistry(); $bookRegistry = CommunionManager::getSingleCommunionRegistry('id', $idBookRegistry); $idGodFather = $communion->getIdGodFather(); $godMother = PersonManager::getSinglePerson('id', $idGodMother); $godFather = PersonManager::getSinglePerson('id', $idGodFather); if ($godFather === NULL) { $godFather = new Person(); } if ($godMother === NULL) { $godMother = new Person(); }