if ($simpleKeyword !== NULL) {
    $defuntionRegistries = DefuntionManager::simpleSearchDefuntion($simpleKeyword, $sortType, $numberPage);
} else {
    if ($kid !== NULL) {
        $defuntionSearch = new Defuntion();
        $kcelebration = DatabaseManager::singleDateToDatabaseDate($_GET["kcelebration"]);
        $kbornp = $_GET["kbornp"];
        $kbornd = DatabaseManager::singleDateToDatabaseDate($_GET["kbornd"]);
        $knamec = $_GET["knamec"];
        $klastname1c = $_GET["klastname1c"];
        $klastname2c = $_GET["klastname2c"];
        $knamef = $_GET["knamef"];
        $kchurch = $_GET["kchurch"];
        $defuntionSearch->setId($kid);
        $defuntionSearch->setDeadDate($kcelebration);
        $posibleNames[0] = PersonManager::searchPersonsByNames($knamec, $klastname1c, $klastname2c, false);
        $defuntionSearch->setIdOwner($posibleNames);
        $posibleChurch = ChurchManager::simpleSearchChurch($kchurch, 'id', -1);
        $defuntionSearch->setIdChurch($posibleChurch);
        $defuntionRegistries = DefuntionManager::advancedSearchDefuntion($defuntionSearch, 'AND', $sortType, $numberPage);
    } else {
        $defuntionRegistries = DefuntionManager::getAllDefuntions($sortType, $numberPage);
    }
}
//Get the total of registries
$totalRegistries = DatabaseManager::getAffectedRows();
$affectedRegistries = DatabaseManager::registriesAffectedLastQuery();
$lastPage = floor($affectedRegistries / 10);
if ($affectedRegistries % 10 === 0) {
    $lastPage = floor($affectedRegistries / 10) - 1;
}
Пример #2
0
<?php

require_once __DIR__ . "/../../Backend/SessionManager.php";
require_once __DIR__ . "/../../Backend/PersonManager.php";
require_once __DIR__ . "/../../Backend/LanguageSupport.php";
$string = file_get_contents("template/PersonList.html");
$name = $_GET["name"];
$lastname1 = $_GET["lastname1"];
$lastname2 = $_GET["lastname2"];
$posiblePerson = PersonManager::searchPersonsByNames($name, $lastname1, $lastname2);
$personList = "";
if ($posiblePerson !== NULL) {
    foreach ($posiblePerson as $singlePerson) {
        $father = PersonManager::getSinglePerson('id', $singlePerson->getIdFather());
        $mother = PersonManager::getSinglePerson('id', $singlePerson->getIdMother());
        $nameChild = $singlePerson->getNames() . ' ' . $singlePerson->getLastname1() . ' ' . $singlePerson->getLastname2();
        $nameFather = "^Not Father^";
        $nameMother = "^Not Mother^";
        $idString = '"' . $singlePerson->getId() . '",';
        if ($father !== NULL) {
            $nameFather = $father->getNames() . ' ' . $father->getLastname1() . ' ' . $father->getLastname2();
            $idString = $idString . '"' . $father->getId() . '",';
        } else {
            $idString = $idString . '"0",';
        }
        if ($mother !== NULL) {
            $nameMother = $mother->getNames() . ' ' . $mother->getLastname1() . ' ' . $mother->getLastname2();
            $idString = $idString . '"' . $mother->getId() . '",';
        } else {
            $idString = $idString . '"0",';
        }
        $marriageSearch = new Marriage();
        $kcelebration = DatabaseManager::singleDateToDatabaseDate($_GET["kcelebration"]);
        $knameb = $_GET["knameb"];
        $klastname1b = $_GET["klastname1b"];
        $klastname2b = $_GET["klastname2b"];
        $knameg = $_GET["knameg"];
        $klastname1g = $_GET["klastname1g"];
        $klastname2g = $_GET["klastname2g"];
        $kchurchc = $_GET["kchurch"];
        $kbook = $_GET["kbook"];
        $knumber = $_GET["knumber"];
        $kpape = $_GET["kpape"];
        $marriageSearch->setId($kid);
        $marriageSearch->setCelebrationDate($kcelebration);
        $posibleNames[0] = PersonManager::searchPersonsByNames($knameb, $klastname1b, $klastname2b, false);
        $posibleNames[1] = PersonManager::searchPersonsByNames($knameg, $klastname1g, $klastname2g, false);
        $marriageSearch->setIdBoyfriend($posibleNames[0]);
        $marriageSearch->setIdGirlfriend($posibleNames[1]);
        $posibleChurch = ChurchManager::simpleSearchChurch($kchurchc, 'id', -1);
        $marriageSearch->setIdChurchMarriage($posibleChurch);
        $marriageRegistry = MarriageManager::getSingleMarriageRegistry('book', $kbook, 'page', $kpape, 'number', $knumber);
        $marriageSearch->setIdBookRegistry($marriageRegistry);
        $marriageRegistries = MarriageManager::advancedSearchMarriage($marriageSearch, 'AND', $sortType, $numberPage);
    } else {
        $marriageRegistries = MarriageManager::getAllMarriages($sortType, $numberPage);
    }
}
//Get the total of registries
$totalRegistries = DatabaseManager::getAffectedRows();
$affectedRegistries = DatabaseManager::registriesAffectedLastQuery();
$lastPage = floor($affectedRegistries / 10);
        $klastname1f = $_GET["klastname1f"];
        $klastname2f = $_GET["klastname2f"];
        $knamem = $_GET["knamem"];
        $klastname1m = $_GET["klastname1m"];
        $klastname2m = $_GET["klastname2m"];
        $kchurch = $_GET["kchurch"];
        $kbook = $_GET["kbook"];
        $knumber = $_GET["knumber"];
        $kpape = $_GET["kpape"];
        $baptismSearch->setId($kid);
        $baptismSearch->setCelebrationDate($kcelebration);
        $baptismSearch->setBornPlace($kbornp);
        $baptismSearch->setBornDate($kbornd);
        $posibleNames[0] = PersonManager::searchPersonsByNames($knamec, $klastname1c, $klastname2c, false);
        $posibleNames[1] = PersonManager::searchPersonsByNames($knamef, $klastname1f, $klastname2f, false);
        $posibleNames[2] = PersonManager::searchPersonsByNames($knamem, $klastname1m, $klastname2m, false);
        $baptismSearch->setIdOwner($posibleNames);
        $posibleChurch = ChurchManager::simpleSearchChurch($kchurch, 'id', -1);
        $baptismSearch->setIdChurch($posibleChurch);
        $baptismRegistry = BaptismManager::getSingleBaptismRegistry('book', $kbook, 'page', $kpape, 'number', $knumber);
        $baptismSearch->setIdBookRegistry($baptismRegistry);
        $baptismRegistries = BaptismManager::advancedSearchBaptism($baptismSearch, 'AND', $sortType, $numberPage);
    } else {
        $baptismRegistries = BaptismManager::getAllBaptisms($sortType, $numberPage);
    }
}
//Get the total of registries
$totalRegistries = DatabaseManager::getAffectedRows();
$affectedRegistries = DatabaseManager::registriesAffectedLastQuery();
$lastPage = floor($affectedRegistries / 10);
if ($affectedRegistries % 10 === 0) {
Пример #5
0
    if ($kid !== NULL) {
        $rectorSearch = new Rector();
        $kid = $_GET["kid"];
        $kname = $_GET["kname"];
        $klastname1 = $_GET["klastname1"];
        $klastname2 = $_GET["klastname2"];
        $kchurch = $_GET["kchurch"];
        $ktype = $_GET["ktype"];
        $kstatus = $_GET["kstatus"];
        $kposition = $_GET["kposition"];
        $rector = new Rector();
        $rector->setId($kid);
        $rector->setType($ktype);
        $rector->setStatus($kstatus);
        $rector->setPosition($kposition);
        $posibleNames = PersonManager::searchPersonsByNames($kname, $klastname1, $klastname2, false);
        $rector->setIdPerson($posibleNames);
        $posibleChurch = ChurchManager::simpleSearchChurch($kchurch, 'id', -1);
        $rector->setIdActualChurch($posibleChurch);
        $rectorRegistries = RectorManager::advancedSearchRector($rector, 'AND', $sortType, $numberPage);
    } else {
        $rectorRegistries = RectorManager::getAllRectors($sortType, $numberPage);
    }
}
//Get the total of registries
$totalRegistries = DatabaseManager::getAffectedRows();
$affectedRegistries = DatabaseManager::registriesAffectedLastQuery();
if ($totalRegistries === 0 && $numberPage !== 0) {
    echo "<script src='../JS/functions.js'></script><script>nextPage('set', '0')</script>";
}
$lastPage = floor($affectedRegistries / 10);