コード例 #1
0
ファイル: formIgreja.php プロジェクト: CarolinePaixao/SCI
<?php

if ($_SESSION['login']['role'] < 2) {
    echo '<h2 style="text-align: center; vertical-align: middle">Página Restrita</h2>';
} else {
    include_once 'class/Church.php';
    $id = filter_input(INPUT_GET, 'cod', FILTER_SANITIZE_NUMBER_INT);
    if (Church::getChurch("WHERE id_church = {$id}")) {
        $church = Church::getChurch("WHERE id_church = {$id}");
    } else {
        echo '<script>window.location = "index.php"</script>';
    }
    ?>
<div class="row">
    <div class="col-lg-12">
        <h1 class="page-header">Alterar Igreja</h1>
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
        <div class="col-md-6 col-md-offset-3">
            <ul class="nav nav-wizard">
                <li class="active" id="1"><a href="#">Dados da Igreja</a></li>
                <li class="disabled" id="2"><a href="#">Endereço</a></li>
                <li class="disabled" id="3"><a href="#">Finalizar</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
コード例 #2
0
ファイル: controllerDet.php プロジェクト: CarolinePaixao/SCI
        <p><label>Status</label>: <?php 
        echo $team->getStatus();
        ?>

        <p><label>Integrantes</label>:<br/>
            <?php 
        foreach ($team->getMembers() as $member) {
            echo $member->getId() . ' - ' . $member->getName() . '<br />';
        }
        ?>
</p>
        <?php 
        break;
    case 'church':
        $cod = filter_input(INPUT_POST, 'cod', FILTER_SANITIZE_NUMBER_INT);
        $chur = Church::getChurch('WHERE id_church = ' . $cod);
        ?>
        <p><label>Nome</label>: <?php 
        echo $chur->getName();
        ?>
</p>
        <p><label>Pastor</label>: <?php 
        echo $chur->getPastor();
        ?>
</p>
        <p><label>Status</label>: <?php 
        echo $chur->getStatus();
        ?>

        <h4>Endereço</h4>
        <p><label>CEP</label>:  <?php 
コード例 #3
0
ファイル: HistoryChurch.php プロジェクト: CarolinePaixao/SCI
 public static function getHistorys($where = null)
 {
     $dados = Database::ReadAll('history', '*', $where);
     if (!$dados) {
         return false;
     }
     foreach ($dados as $dado) {
         $history = new HistoryChurch();
         $history->setId($dado['ID_HISTORY']);
         $history->setNamePastor($dado['NAME_PASTOR']);
         $church = Church::getChurch("WHERE id_church = " . $dado['ID_CHURCH']);
         $history->setChurch($church);
         $history->setDateInicial($dado['DATE_INICIAL']);
         $history->setDateFinal($dado['DATE_FINAL']);
         $historys[] = $history;
     }
     return $historys;
 }
コード例 #4
0
ファイル: Mission.php プロジェクト: CarolinePaixao/SCI
 public static function getMissions($where = null)
 {
     $dados = Database::ReadAll("mission", "*", $where);
     if (!$dados) {
         return '';
     }
     foreach ($dados as $dado) {
         $mission = new Mission();
         $mission->setId($dado['ID_MISSION']);
         $mission->setName($dado['NAME_MISSION']);
         $mission->setDateBegin($dado['DATE_INICIAL']);
         $mission->setDateEnd($dado['DATE_END']);
         $mission->setStatus($dado['STATUS']);
         $team = Team::getTeam("WHERE id_team = " . $dado['ID_TEAM']);
         $mission->setTeam($team);
         if (!empty($dado['ID_ADDRESS'])) {
             $address = Address::getAddress("AND id_address = " . $dado['ID_ADDRESS']);
             $mission->setAddress($address);
         }
         if (!empty($dado['ID_CHURCH'])) {
             $church = Church::getChurch("WHERE id_church = " . $dado['ID_CHURCH']);
             $mission->setChurch($church);
         }
         $missions[] = $mission;
     }
     return $missions;
 }