forked from hiltonbruce/Igreja
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtop_igreja.php
executable file
·248 lines (239 loc) · 9.04 KB
/
top_igreja.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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<?PHP
controle ("consulta");
//unset($_SESSION["rol"]);
//require_once ("./igreja/classes.php");
$igreja = new DBRecord ("igreja",$_GET["id"],"rol");
?>
<div>
<a <?PHP $b=id_corrente ("cadastro_igreja");?> href="./?escolha=tab_auxiliar/cadastro_igreja.php
&menu=top_igreja&uf='PB'">
<button type="button" class="btn btn-info btn-sm <?php echo $b;?>">Cadastrar Igreja</button></a>
<a <?PHP $b=id_corrente ("altexclui_igreja");?> href="./?escolha=tab_auxiliar/altexclui_igreja.php
&menu=top_igreja&uf='PB'">
<button type="button" class="btn btn-info btn-sm <?php echo $b;?>">Alterar Excluir Igreja</button></a>
<?PHP
if (id_corrente ("_membro") && empty($_GET['cargo'])) {
$b='active';
}else {
$b='';
}
?>
<a href="./?escolha=igreja/list_membro.php&menu=top_igreja">
<button type="button" class="btn btn-info btn-sm <?php echo $b;?>">Membros</button>
</a>
<a <?PHP $b=link_ativo($_GET["cargo"], "6");?> href="./?escolha=igreja/list_membro.php&menu=top_igreja&cargo=6">
<button type="button" class="btn btn-info btn-sm <?php echo $b;?>">Dirigentes</button>
</a>
<div class="btn-group" role="group">
<button type="button" class="btn btn-info btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Cartas
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#">Circular</a></li>
<li><a href="#">Convite</a></li>
</ul>
</div>
</div>
<?PHP
if (!ver_nome("cad_organica") && !ver_nome("altexclui") && !ver_nome("cadastro")) {
?>
<form id="form2" name="form2" method="post" action="" >
<fieldset>
<legend>Filtrar</legend>
<div class="row">
<?PHP
if (empty($_GET["id"])) {
$id_ig=1;
}else{
$id_ig=$_GET["id"];
}
//valor recebido do script index.php
$anterior=$id_ig-1;
$proximo=$id_ig+1;
if ($anterior<=0){
$anterior=0;
}
$link = "./?escolha={$_GET["escolha"]}&menu=top_igreja&id={$_GET["id"]}&ord={$_GET["ord"]}&cargo=";
$link_foto = "./?escolha=igreja/lst_memfoto.php&menu=top_igreja&ord={$_GET["ord"]}&id={$_GET["id"]}&cargo={$_GET["cargo"]}&foto=";
?>
<div class="col-xs-3">
<label>Congregação:</label>
<select name="menu1" onchange="MM_jumpMenu('parent',this,0)" class="form-control" >
<?PHP
$congr = new List_sele ("igreja","razao","congregacao");
$congr->List_Selec_pop ("escolha={$_GET["escolha"]}&menu={$_GET["menu"]}&foto={$_GET["foto"]}&ord={$_GET["ord"]}&cargo={$_GET["cargo"]}&id=",$_GET['id']);
?>
</select>
</div>
<?php
switch ($_GET['cargo']) {
//Define a 1� linha do proximo form
case 1:
$linhaCargo = '<option value="'.$link.'1">Auxiliar de Trabalho</option>';
$titTabela = 'Auxiliares de Trabalho';
break;
case 2:
$linhaCargo = '<option value="'.$link.'2">Diácono</option>';
$titTabela = 'Diáconos';
break;
case 3:
$linhaCargo = '<option value="'.$link.'3">Presbítero</option>';
$titTabela = 'Presbíteros';
break;
case 4:
$linhaCargo = '<option value="'.$link.'4">Evangelista</option>';
$titTabela = 'Evangelistas';
break;
case 5:
$linhaCargo = '<option value="'.$link.'5">Pastor</option>';
$titTabela = 'Pastores';
break;
case 6:
$linhaCargo = '<option value="'.$link.'6">Dirigente de Congregação</option>';
$titTabela = 'Dirigentes de Congregação';
break;
case 7:
$linhaCargo = '<option value="'.$link.'7">Mulheres</option>';
$titTabela = 'Apenas Mulheres';
break;
case 8:
$linhaCargo = '<option value="'.$link.'8">Homens</option>';
$titTabela = '• Apenas Homens';
break;
case 9:
$linhaCargo = '<option value="'.$link.'9">Falta identificar o sexo</option>';
$titTabela = '• Falta identificar o sexo';
break;
case 10:
$linhaCargo = '<option value="'.$link.'10">Doadores de Sangue</option>';
$titTabela = '• Apenas Doadores de Sangue';
break;
case 11:
$linhaCargo = '<option value="'.$link.'10">Em Comunhão</option>';
$titTabela = '• Em Comunhão';
break;
case 12:
$linhaCargo = '<option value="'.$link.'10">Com Disciplina em Aberto</option>';
$titTabela = '• Disciplinados';
break;
default:
$linhaCargo = '';
$titTabela = '• Ativos e Disciplinados';
break;
}
?>
<div class="col-xs-3">
<label>Cargo</label>
<select name="cargo" onchange="MM_jumpMenu('parent',this,0)" class="form-control">
<?php echo $linhaCargo;?>
<option>-->>Lista por cargo<<-- </option>
<option value="<?PHP echo $link;?>0">-->>Listar todos os Membros<<--</option>
<option value="<?PHP echo $link;?>1">Auxiliar de Trabalho</option>
<option value="<?PHP echo $link;?>2">Diácono</option>
<option value="<?PHP echo $link;?>3">Presbítero</option>
<option value="<?PHP echo $link;?>4">Evangelista</option>
<option value="<?PHP echo $link;?>5">Pastor</option>
<option value="<?PHP echo $link;?>6">Dirigente de Congregação</option>
<option value="<?PHP echo $link;?>7">Mulheres</option>
<option value="<?PHP echo $link;?>8">Homens</option>
<option value="<?PHP echo $link;?>9">Falta identificar o sexoo</option>
<option value="<?PHP echo $link;?>10">Doadores de Sangue</option>
</select>
</div>
<?php
//1� Linha do form (filtro)
switch ($_GET['foto']) {
case '1':
$linha1 = '<option value="'.$link.'1">Com fotos</option>';
break;
case '2':
$linha1 = '<option value="'.$link.'2">Sem fotos</option>';
break;
default:
$linha1 = '';
break;
}
?>
<div class="col-xs-3">
<label>Membros com ou sem foto</label>
<select name="foto" onchange="MM_jumpMenu('parent',this,0)" class="form-control">
<?php echo $linha1;?>
<option value="./?escolha=igreja/list_membro.php&menu=top_igreja&ord=<?php echo $_GET["ord"].'&cargo='.$_GET["cargo"];?>">-->>Listar todos<<--</option>
<option value="<?PHP echo $link_foto;?>1">Listar com fotos</option>
<option value="<?PHP echo $link_foto;?>2">Listar sem fotos</option>
</select>
</div>
</div>
</fieldset>
</form>
<?php if ($_GET["foto"]==1 || $_GET["foto"]==2) {?>
<form id="form1" name="form1" method="get" action="igreja/lst_fotoprint.php">
<input name="id" type="hidden" value="<?PHP echo $_GET["id"];?>" />
<input name="ord" type="hidden" value="<?PHP echo $_GET["ord"];?>" />
<input type="hidden" name="cargo" value="<?PHP echo $_GET["cargo"];?>" />
<input name="foto" type="hidden" value="<?PHP echo $_GET["foto"];?>" />
<input name="titTabela" type="hidden" value="<?PHP echo $titTabela;?>" />
<label> </label>
<input type="submit" class="btn btn-primary" name="Submit" value="Imprimir" />
</form>
<?php }
elseif ($_GET["cargo"]=='6'){
?>
<fieldset>
<legend>Impressão com dados pessoais:</legend>
<form id="form1" name="form1" method="get" action="controller/modeloPrint.php/" target="_blank">
<div class="radio-inline">
<label>
<input type="radio" name="ext" value="1" />Sim </label>
</div>
<div class="radio-inline">
<label>
<input type="radio" name="ext" value="0" />Não </label>
</div>
<input type="submit" class="btn btn-primary" name="Submit" value="Imprimir" />
<input name="titTabela" type="hidden" value="<?PHP echo $titTabela;?>" />
<input name='tipo' type='hidden' value='3' />
</form>
</fieldset>
<?php
} else{
?>
<fieldset>
<legend> Impressão:</legend>
<form id="form1" name="form1" method="get" action="igreja/membro_print.php" target="_blank">
<input name="id" type="hidden" value="<?PHP echo $_GET["id"];?>" />
<input name="ord" type="hidden" value="<?PHP echo $_GET["ord"];?>" />
<input type="hidden" name="cargo" value="<?PHP echo $_GET["cargo"];?>" />
<div class="row">
<div class="col-xs-2">
<label class="checkbox-inline"><input type="checkbox" name="ext" value="1" />
Com endereço</label>
</div>
<div class="col-xs-2">
<label class="checkbox-inline">
<input type="checkbox" value="1" name="foto" >
Com Foto
</label>
</div>
<div class="col-xs-2">
<label><small>Tamanho da foto (pixels)</small>
</label>
</div>
<div class="col-xs-2">
<input type="number" name="tamanho" class="form-control input-sm"/>
<?php
if (isset($_GET['ig']) && $_GET['ig']==='0') {
echo '<input type="hidden" name="ig" value="0"/>';
}
?>
</div>
<div class="col-xs-1">
<input type="submit" class="btn btn-primary" name="Submit" value="Imprimir" />
</div>
</div>
<input name="titTabela" type="hidden" value="<?PHP echo $titTabela;?>" />
</form></fieldset>
<?php
}
} ?>