forked from hiltonbruce/Igreja
-
Notifications
You must be signed in to change notification settings - Fork 0
/
painel_direito.php
executable file
·216 lines (211 loc) · 9.28 KB
/
painel_direito.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<div class="rightpanel">
<div class="inquiry">
<?PHP
$igreja = $igSede;
$pendencias = new pendencias ();
$disp_pend = '';
// Se n?o houver pend?ncia no cadasdtro ? mostrador os dados da igreja matriz
if (empty($_SESSION["valid_user"]) || $pendencias->quant_pendecias()<"0" && ( !ver_nome ("adm") || !ver_nome ("tesouraria"))) {
?>
<div class="box" align="center">
<div class="box-outer">
<div class="box-inner">
<div class="box-titulo">
<?PHP echo "Pastor Local:<br /> {$igreja->pastor()}<br /><br /> Templo SEDE:<br /> {$igreja->rua()}, Nº {$igreja->numero()} <br /> {$igreja->cidade()} - {$igreja->uf()}<br />
CEP: {$igreja->cep()} - Fone: {$igreja->fone()} - Fax: {$igreja->fax()}";?>
<br />Email: <a rel="nofollow" target="_blank" href="mailton: <?PHP echo "{$igreja->email()}";?>"><?PHP echo "{$igreja->email()}";?></a>
<br /><br />Filiada à:<br /><img src="img/logo_comadep.jpg" alt="COMADEP" /><br />
Pastor Presidente:<br />José Carlos de Lima
</div></div></div></div>
<ul class="list-group">
<li class="list-group-item list-group-item-primary"><strong>Congregações:</strong></li>
</ul>
<div class="box" align="center">
<div class="box-outer">
<div class="box-inner">
<div class="box-titulo">
<?PHP
$lst_igreja = new List_congr("igreja","razao");
$lst_igreja->get();
?>
</div></div></div></div>
<?PHP
if (isset($_SESSION["valid_user"]) && $pendencias->quant_pendecias()<"0"){
echo "</div><h4>Parabens não há Pendências no Cadasdtro!</h4>";
}
}elseif (ver_nome ("tesouraria")){//Menu Tesouraria
echo "</div>";
//$menu = new menutes();
$recBuscas->mostra();
$recBuscas->buscarecibo();
}elseif (!empty($painelDireito) && file_exists($painelDireito)) {
//Verifica se h� uma chamada a um painel espec�fico
require_once $painelDireito;
}else {
echo "</div>";
//In�cio da pend�ncia
$_urlLi_pen="?escolha={$_GET["escolha"]}&bsc_rol={$_GET["bsc_rol"]}";//Montando o Link para ser passada a classe
$query_pen = "SELECT rol,nome,obs FROM membro WHERE OBS<>'' ";
$nmpp_pen="40"; //N?mero de mensagens por p?rginas
$paginacao_pen = Array();
$paginacao_pen['link'] = "?"; //Pagina??o na mesma p?gina
//Faz os calculos na pagina��o
$sql2_pen = mysql_query ($query_pen) or die (mysql_error());
$total_pen = mysql_num_rows($sql2_pen) ; //Retorna o total de linha na tabela
$paginas_pen = ceil ($total_pen/$nmpp_pen); //Retorna o total de p?ginas
$_GET["pagina1_pen"] = (empty($_GET["pagina1_pen"])) ? 0 : intval($_GET["pagina1_pen"]);
if ($_GET["pagina1_pen"]<1) {
$_GET["pagina1_pen"] = 1;
} elseif ($_GET["pagina1_pen"]>$paginas_pen) {
$_GET["pagina1_pen"] = $paginas_pen;
}
$pagina_pen = $_GET["pagina1_pen"]-1;
if ($pagina_pen<0) {$pagina_pen=0;} //Especifica um valor p vari?vel p?gina caso ela esteja setada
$inicio_pen=$pagina_pen * $nmpp_pen; //Retorna qual ser? a primeira linha a ser mostrada no MySQL
$sql3_pen = mysql_query ($query_pen." LIMIT $inicio_pen,$nmpp_pen") or die (mysql_error());
//Executa a query no MySQL com limite de linhas para ser usado pelo while e montar a array
//inicia o cabe?alho de pagina??o
$dadosMembro = new membro();
$detMemb = $dadosMembro->nomes();
?>
<div class="list-group">
<span class="list-group-item active">
<h4 class="list-group-item-heading">Rol's com Pendências</h4>
</span>
<table class='table table-bordered table-striped table-hover some_style' >
<colgroup>
<col id="Rol">
<col id="Rol">
<col id="Rol">
<col id="albumCol"/>
</colgroup>
<tbody id="pendencia" >
<?PHP
$inc_pen=0;
while($coluna_pen = mysql_fetch_array($sql3_pen))
{
if ($inc_pen=="0") { echo "<tr>"; }
$inc_pen++;
echo '<td class="text-center">';
$titlePed = $coluna_pen["nome"].' • '.strip_tags($coluna_pen['obs']);
echo "<a title='$titlePed' data-toggle='tooltip' data-placement='left' ";
echo "href='./?escolha=adm/dados_pessoais.php&bsc_rol={$coluna_pen["rol"]}&";
echo "pagina1_pen={$_GET["pagina1_pen"]}'>{$coluna_pen["rol"]}</a></td>";
if ($inc_pen=="4") { echo "</tr>";$inc_pen=0; }
}//loop while produtos
?>
</tbody>
</table>
<?PHP
//Classe que monta o rodape
$_rod_pen = new rodape($paginas_pen,$_GET["pagina1_pen"],"pagina1_pen",$_urlLi_pen,4);//(Quantidade de p?ginas,$_GET["pag_rodape"],mesmo nome dado ao parametro do $_GET anterior ,"$_urlLi",links por p?gina)
$_rod_pen->getRodape(); $_rod_pen->form_rodape('Página:','');
if ($paginas_pen>1){
echo "<br><span class='style4'>Total de $paginas_pen páginas";
}else{
echo "<br><span class='style4'>Total de $paginas_pen página";
}
echo "<br />";
if ($total_pen>"1"){
printf ("Com %s cadastros de membros, com algum tipo de pendência!",number_format($total_pen, 0, ',', '.'));
}elseif ($total_pen=="1"){
echo "Com apenas um cadastros de membro!";
}else{
echo "Com este critério não obtivemos nenhum resultado, tente melhorar seu argumento de pesquisa!";
}
?>
</div>
<div class="list-group">
<span class="list-group-item active">
<h4 class="list-group-item-heading">Disciplinados</h4>
</span>
<?php
//Fim das informa??es das pendencias
//In�cio das pendencias de disciplinados
//In�cio Disciplinas Expiradas
$_urlLi_disc='?escolha='.$escGET.'&bsc_rol='.$bsc_rol;//Montando o Link para ser passada a classe
$query_disc = "SELECT * FROM eclesiastico WHERE situacao_espiritual='2' ";
$nmpp_disc="40"; //N?mero de mensagens por p?rginas
$paginacao_disc = Array();
$paginacao_disc['link'] = "?"; //Pagina??o na mesma p?gina
//Faz os calculos na pagina��o
$sql2_disc = mysql_query ($query_disc) or die (mysql_error());
$total_disc = mysql_num_rows($sql2_disc) ; //Retorna o total de linha na tabela
$paginas_disc = ceil ($total_disc/$nmpp_disc); //Retorna o total de p?ginas
$pgDisc = (empty($_GET["pagina1_disc"])) ? '' : $_GET["pagina1_disc"] ;
if ($pgDisc<1) {
$pgDisc= 1;
} elseif ($pgDisc>$paginas_disc) {
$pgDisc = $paginas_disc;
}
$pagina_disc = $pgDisc-1;
if ($pagina_disc<0) {$pagina_disc=0;} //Especifica um valor p vari?vel p?gina caso ela esteja setada
$inicio_disc=$pagina_disc * $nmpp_disc; //Retorna qual ser? a primeira linha a ser mostrada no MySQL
$sql3_disc = mysql_query ($query_disc." LIMIT $inicio_disc,$nmpp_disc") or die (mysql_error());
//Executa a query no MySQL com limite de linhas para ser usado pelo while e montar a array
//inicia o cabe?alho de pagina??o
?>
<table class='table table-bordered table-hover table-striped some_style' id="pendencia" >
<colgroup>
<col id="Rol">
<col id="Rol">
<col id="Rol">
<col id="albumCol"/>
</colgroup>
<thead></thead>
<tbody id="pendencia" >
<?PHP
$inc_disc=0;
#print_r($detMemb);
while($coluna_disc = mysql_fetch_array($sql3_disc))
{
if ($inc_disc=="0") { echo "<tr id='pendencia'>"; }
$inc_disc++;
$exp = mysql_query ("SELECT * FROM disciplina WHERE rol = '{$coluna_disc["rol"]}' ORDER BY id DESC LIMIT 1 ");
$array_exp = mysql_fetch_array($exp);
$membro_disc = $detMemb[$coluna_disc['rol']]['5'].' • ';
$membro_disc .= strip_tags($array_exp['motivo']);
if ($array_exp["data_fim"]<date("Y-m-d") AND $array_exp["data_fim"]<>"0000-00-00") {
echo "<td id='pendencia' class='text-center' >";
echo "<a data-toggle='tooltip' data-placement='left' title='$membro_disc - ";
echo "Disciplina Concluída' href='./?escolha=adm/dados_pessoais.php";
echo "&bsc_rol={$coluna_disc["rol"]}&pagina1_disc=$pgDisc'><span ";
echo "class='text-success text-blink'>{$coluna_disc["rol"]}</span></a></td>";
$disp_pend++;
}else {
echo "<td id='pendencia' class='text-center' >";
echo "<a data-toggle='tooltip' data-placement='left' title='$membro_disc' href='./?escolha=adm/";
echo "dados_pessoais.php&bsc_rol={$coluna_disc["rol"]}&pagina1_disc=";
echo "$pgDisc'>{$coluna_disc["rol"]}<a></td>";
}
if ($inc_disc=="4") { echo "</tr>";$inc_disc=0; }
}//loop while produtos
?>
</tbody>
</table>
<?PHP
//Classe que monta o rodape
$_rod_disc = new rodape($paginas_disc,$pgDisc,"pagina1_disc",$_urlLi_disc,4);//(Quantidade de p?ginas,$_GET["pag_rodape"],mesmo nome dado ao parametro do $_GET anterior ,"$_urlLi",links por p?gina)
$_rod_disc->getRodape(); $_rod_disc->form_rodape ('Página:','');
if ($paginas_disc>1)
echo "<br><span class='style4'>Total de $paginas_disc páginas.";
else
echo "<br><span class='style4'>Total de $paginas_disc página.";
if ($disp_pend>1)
echo "<br><span class='style4'>$disp_pend disciplinados com algum tipo de pendência.";
elseif ($disp_pend==1)
echo "<br><span class='style4'>Um disciplinados com pendência!";
echo "<br />";
if ($total_disc>"1")
{
printf ("%s disciplinados!",number_format($total_disc, 0, ',', '.'));
}elseif ($total_disc=="1"){
echo "Com um membro disciplinado!";
}else{
echo "Não há nenhum disciplinado!";
}
}//Fim das pendencias de disciplinados
?>
</div>
</div>
</div>