Skip to content

Commit

Permalink
Bug print membros
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseilton C BRuce authored and Joseilton C BRuce committed Feb 18, 2020
1 parent bc26b5f commit ce2a29f
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 61 deletions.
82 changes: 36 additions & 46 deletions igreja/membro_print.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ function __autoload ($classe) {
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Lista de Membros - Igreja: <?php echo $igreja->razao();?>
</title>
<link rel="stylesheet" type="text/css" media="print, screen"
href="tabs.css" />

<link rel="stylesheet" type="text/css" href="../tesouraria/style.css" />
<link rel="stylesheet" type="text/css" href="../css/print.css" />
<link rel="stylesheet" type="text/css" href="../css/bootstrap.print.css" />

</head>
<body>

Expand All @@ -54,40 +57,39 @@ function __autoload ($classe) {

{
?>
<table>
<table class='table table-striped table-hover'>
<caption>

<h4>
<?PHP
echo $_GET['titTabela'];

require_once ('../views/secretaria/titTabIgreja.php');

?>
</h4>
</caption>

<colgroup>
<col id="Rol">
<col id="Nome">
<col id="Congrega&ccedil;&atilde;o">
<col id="albumCol" />

</colgroup>

<thead>
<tr>
<th scope="col">Rol</th>
<th scope="col">Nome</th>
<th class='text-center'><h6>Rol</h6></th>
<th class='text-center'><h6>Nome</h6></th>
<?php
if ($_GET['ext']==1) {
?>
<th scope="col">Nascido em:</th>
<th scope="col">Telefones</th>
<th class='text-center'><h6>Nascido em:</h6></th>
<th class='text-center'><h6>Telefones</h6></th>
<?php
}else {

?>
<th scope="col">Congrega&ccedil;&atilde;o</th>
<th scope="col">Cargo</th>
<th class='text-center'><h6>Congrega&ccedil;&atilde;o</h6></th>
<th class='text-center'><h6>Cargo</h6></th>
<?php
}?>
</tr>
Expand All @@ -106,55 +108,44 @@ function __autoload ($classe) {
while($coluna = mysql_fetch_array($sql3))
{

$ls++;
if (!empty($_GET['foto'])) {
$foto = '<img src='.foto($coluna["rol"]).' class="thumb" width="'.$tamW.'" height="'.$tamH.'" />';
$foto = '<img src='.foto($coluna["membroRol"]).' class="thumb" width="'.$tamW.'" height="'.$tamH.'" /> ';
}else {
$foto = '';
}

if ($ls>1){
$cor="class='dados'";
$ls=0;
}
else
{$cor="class='odd'";
}

?>
<tr>
<td class='text-center'><h6><?php echo $coluna["membroRol"];?></h6></td>
<?php
if ($_GET['ext']=='1') {
$bairro = new DBRecord( bairro, $coluna["bairro"], 'id');
$cidade = new DBRecord(cidade, $coluna["cidade"], 'id');
?>
<tr <?php echo "$cor";?>>
<td rowspan="2"><?php echo $coluna["membroRol"];?>****</td>
<td><?php
echo $foto;
echo $coluna["nome"];
// $congregacao = new DBRecord ("igreja",$coluna["congregacao"],"rol");
echo ' - Cong.: '.$coluna["razao"];
echo ', '.cargo ($coluna["rol"])['0'];

?>
?><p>
Endere&ccedil;o: <?php echo $coluna["endereco"].', N&ordm; '.
$coluna["numero"].', Bairro: '.$bairro->bairro()
.' - '.$cidade->nome().'-'.$cidade->coduf().
', Complem.: '.$coluna["complemento"];?>
</p>
</td>
<td rowspan="2" style="text-align: center;"><?php
<td class="text-center"><?php
echo conv_valor_br($coluna["datanasc"]);
?></td>
<td rowspan="2"><?php
<td><?php
echo 'Fixo: '.$coluna["fone_resid"].', Cel.:'.$coluna["celular"];
?></td>
</tr>
<tr <?php echo "$cor";?>>
<td>Endere�o: <?php echo $coluna["endereco"].', N� '.
$coluna["numero"].', Bairro: '.$bairro->bairro()
.' - '.$cidade->nome().'-'.$cidade->coduf().
', Complem.: '.$coluna["complemento"];?>
?>
</td>
</tr>
<?PHP
}else {
?>
<tr <?php echo "$cor";?>>
<td><?php echo $coluna["membroRol"];?></td>
<td>
<?php
echo $foto;
Expand All @@ -166,7 +157,7 @@ function __autoload ($classe) {
echo $coluna["razao"];
?></td>
<td><?php
echo cargo ($coluna["rol"])['0'];
echo cargo ($coluna["membroRol"])['0'];
?></td>
</tr>
<?PHP }
Expand All @@ -176,20 +167,19 @@ function __autoload ($classe) {
?>
</tbody>
</table>

<?PHP
}
echo "<br />";
echo '<br /><h4 class="bg-primary">';

if ($total>"1"){
printf("Com %s registros!",number_format($total, 0, ',', '.'));
}elseif ($total=="1") {
print "Apenas um registro!";
printf("%s registros!",number_format($total, 0, ',', '.'));
}elseif ($total=='1') {
print 'Apenas um registro!';
}else {
print "N&atilde;o h&aacute; registros para esta pesquisa!";
print 'N&atilde;o h&aacute; registros para esta pesquisa!';
}

if ($_GET["Submit"]=="Imprimir") {
echo '</h4>';
if ($_GET['Submit']=='Imprimir') {
?>
</body>
</html>
Expand Down
11 changes: 0 additions & 11 deletions models/cad_usuario.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,12 @@
}
}

// echo "string -> ".$perfil.'<br />';

$dataUser = "SELECT * FROM usuario LIMIT 1";
$stmtUser = $conn->prepare($dataUser);
$stmtUser->execute();
$resultsUser = $stmtUser->fetchAll(PDO::FETCH_ASSOC);

// var_dump($resultsUser[0]);

foreach ($resultsUser[0] as $key => $value) {
// $stmt ->bindParam($optionLimp, .$value);
$optionsVlr = strtoupper($key);

if (!empty($_POST[$key]) && $key!='id') {
Expand All @@ -58,20 +53,15 @@
}
}

// echo "string perfilUser-> ".$optWhere.'<br />';

// $optWhere .= $perfilUser;;
$addUser = "INSERT INTO usuario VALUE ($optWhere)";
$stmtAddUser = $conn->prepare($addUser);

foreach ($resultsUser[0] as $key => $value) {
$optionsVlr = ':'.strtoupper($key);
if (!empty($_POST[$key]) && $key!='id' && $key!='perfil') {
$stmtAddUser -> bindParam($optionsVlr, $_POST[$key]);
// echo "$optionsVlr -> ".$_POST[$key].'<br />';
}elseif ($key=='perfil') {
$stmtAddUser -> bindParam($optionsVlr,$perfil );
// echo "$optionsVlr -> ".$perfil.'<br />';
}
}

Expand All @@ -85,7 +75,6 @@
<p><strong>Perfil de acesso: </strong><?=$perfil?></p>
</div>
<?php

}
else
{
Expand Down
8 changes: 5 additions & 3 deletions tesouraria/receita.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
if ($rec>'12' && $rec<'20') {
session_start();
if ($_SESSION["setor"]=="2" || $_SESSION["setor"]>"50" || $_SESSION["setor"]==1){
require "../help/impressao.php";//Include de funções, classes e conexões com o BD
require "../help/impressao.php";//Include de fun��es, classes e conex�es com o BD
if ($idIgreja==0) {
$igrejaSelecionada = $igSede;
//$igLanc = $igrejaSelecionada;
Expand All @@ -28,7 +28,7 @@
}else {
$origem = $igreja->cidade();
}
require_once '../help/tes/receitaImprimir.php';//Opções de impressões para o script
require_once '../help/tes/receitaImprimir.php';//Op��es de impress�es para o script
}
}else {
$ind=1;
Expand All @@ -37,7 +37,9 @@
$_SESSION['lancar']=true;
$linkLancamento = './?escolha=tesouraria/receita.php&menu=top_tesouraria';
$linkLancamento .= '&igreja='.$_GET['igreja'];

require_once 'views/tesouraria/menu.php';//Sub-Menu de links

$dizmista = new dizresp($_SESSION['valid_user'],'',$rec);
if ($idIgreja==0) {
$igrejaSelecionada = $igSede;
Expand All @@ -62,7 +64,7 @@
require_once 'help/tes/receitaTela.php';//Opções de exibição na tela a escolha
}
} else {
echo "<script> alert('Sem permissção de acesso! Entre em contato com o Tesoureiro!');location.href='../?escolha=adm/cadastro_membro.php&uf=PB';</script>";
echo "<script> alert('Sem permiss��o de acesso! Entre em contato com o Tesoureiro!');location.href='../?escolha=adm/cadastro_membro.php&uf=PB';</script>";
$_SESSION = array();
session_destroy();
header("Location: ./");
Expand Down
7 changes: 6 additions & 1 deletion views/tesouraria/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<?PHP $b=link_ativo($_GET["rec"], "24"); ?>
<button type="button" class="btn btn-warning btn-sm dropdown-toggle <?php echo $b;?>"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Lan&ccedil; p/Sem
Lan&ccedil; Semana
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
Expand Down Expand Up @@ -75,6 +75,11 @@
$linkEstonoDefino = 'data-toggle="tooltip" data-placement="bottom" href="'.$linkLancamento.'&rec=22" title="Estorna dizimos e ofertas"'
?>
<li <?php echo $linkAtivo;?>><a <?php echo $linkEstonoDefino;?> >Estorno Definido</a></li>
<?PHP
$linkAtivo = ($_GET['rec']=='27' ) ? 'class="active"': '' ;
$linkEstonoDefino = 'data-toggle="tooltip" data-placement="bottom" href="'.$linkLancamento.'&rec=27" title="Ajusta COMADEP"'
?>
<li <?php echo $linkAtivo;?>><a <?php echo $linkEstonoDefino;?> >Ajuste Saldo Cta COMADEP</a></li>
</ul>
</div>
<?PHP
Expand Down

0 comments on commit ce2a29f

Please sign in to comment.