Commit fad79c4dfedfbc6c0f4af50e661caff4858a5b63
Exists in
master
Merge branch 'localizacao-usuario' of https://github.com/i-educar-unb/ieducar into devel-unb
Showing
19 changed files
with
305 additions
and
27 deletions
Show diff stats
ieducar/intranet/agenda_admin_lst.php
| ... | ... | @@ -28,6 +28,7 @@ $desvio_diretorio = ""; |
| 28 | 28 | require_once ("include/clsBase.inc.php"); |
| 29 | 29 | require_once ("include/clsListagem.inc.php"); |
| 30 | 30 | require_once ("include/clsBanco.inc.php"); |
| 31 | +require_once 'include/localizacaoSistema.php'; | |
| 31 | 32 | |
| 32 | 33 | class clsIndex extends clsBase |
| 33 | 34 | { |
| ... | ... | @@ -36,6 +37,7 @@ class clsIndex extends clsBase |
| 36 | 37 | { |
| 37 | 38 | $this->SetTitulo( "{$this->_instituicao} Agenda" ); |
| 38 | 39 | $this->processoAp = "343"; |
| 40 | + $this->addEstilo( "localizacaoSistema" ); | |
| 39 | 41 | } |
| 40 | 42 | } |
| 41 | 43 | |
| ... | ... | @@ -86,6 +88,13 @@ class indice extends clsListagem |
| 86 | 88 | $this->nome_acao = "Novo"; |
| 87 | 89 | |
| 88 | 90 | $this->largura = "100%"; |
| 91 | + | |
| 92 | + $localizacao = new LocalizacaoSistema(); | |
| 93 | + $localizacao->entradaCaminhos( array( | |
| 94 | + $_SERVER['SERVER_NAME']."/intranet" => "i-Educar", | |
| 95 | + "" => "Agenda Admin" | |
| 96 | + )); | |
| 97 | + $this->enviaLocalizacao($localizacao->montar()); | |
| 89 | 98 | } |
| 90 | 99 | } |
| 91 | 100 | ... | ... |
ieducar/intranet/agenda_responsavel.php
| ... | ... | @@ -28,6 +28,7 @@ $desvio_diretorio = ""; |
| 28 | 28 | require_once ("include/clsBase.inc.php"); |
| 29 | 29 | require_once ("include/clsListagem.inc.php"); |
| 30 | 30 | require_once ("include/clsBanco.inc.php"); |
| 31 | +require_once 'include/localizacaoSistema.php'; | |
| 31 | 32 | |
| 32 | 33 | class clsIndex extends clsBase |
| 33 | 34 | { |
| ... | ... | @@ -36,6 +37,7 @@ class clsIndex extends clsBase |
| 36 | 37 | { |
| 37 | 38 | $this->SetTitulo( "{$this->_instituicao} Agenda" ); |
| 38 | 39 | $this->processoAp = "341"; |
| 40 | + $this->addEstilo( "localizacaoSistema" ); | |
| 39 | 41 | } |
| 40 | 42 | } |
| 41 | 43 | |
| ... | ... | @@ -98,6 +100,13 @@ class indice extends clsListagem |
| 98 | 100 | $this->addPaginador2( "agenda_responsavel.php", $total, $_GET, $this->nome, $limite ); |
| 99 | 101 | |
| 100 | 102 | $this->largura = "100%"; |
| 103 | + | |
| 104 | + $localizacao = new LocalizacaoSistema(); | |
| 105 | + $localizacao->entradaCaminhos( array( | |
| 106 | + $_SERVER['SERVER_NAME']."/intranet" => "i-Educar", | |
| 107 | + "" => "Agendas" | |
| 108 | + )); | |
| 109 | + $this->enviaLocalizacao($localizacao->montar()); | |
| 101 | 110 | } |
| 102 | 111 | } |
| 103 | 112 | ... | ... |
ieducar/intranet/diaria_grupo_lst.php
| ... | ... | @@ -28,6 +28,7 @@ $desvio_diretorio = ""; |
| 28 | 28 | require_once ("include/clsBase.inc.php"); |
| 29 | 29 | require_once ("include/clsListagem.inc.php"); |
| 30 | 30 | require_once ("include/clsBanco.inc.php"); |
| 31 | +require_once 'include/localizacaoSistema.php'; | |
| 31 | 32 | |
| 32 | 33 | class clsIndex extends clsBase |
| 33 | 34 | { |
| ... | ... | @@ -36,6 +37,7 @@ class clsIndex extends clsBase |
| 36 | 37 | { |
| 37 | 38 | $this->SetTitulo( "{$this->_instituicao} Diária Grupo" ); |
| 38 | 39 | $this->processoAp = "297"; |
| 40 | + $this->addEstilo( "localizacaoSistema" ); | |
| 39 | 41 | } |
| 40 | 42 | } |
| 41 | 43 | |
| ... | ... | @@ -79,6 +81,13 @@ class indice extends clsListagem |
| 79 | 81 | $this->nome_acao = "Novo"; |
| 80 | 82 | |
| 81 | 83 | $this->largura = "100%"; |
| 84 | + | |
| 85 | + $localizacao = new LocalizacaoSistema(); | |
| 86 | + $localizacao->entradaCaminhos( array( | |
| 87 | + $_SERVER['SERVER_NAME']."/intranet" => "i-Educar", | |
| 88 | + "" => "Diárias Grupo" | |
| 89 | + )); | |
| 90 | + $this->enviaLocalizacao($localizacao->montar()); | |
| 82 | 91 | } |
| 83 | 92 | } |
| 84 | 93 | |
| ... | ... | @@ -86,6 +95,7 @@ class indice extends clsListagem |
| 86 | 95 | $pagina = new clsIndex(); |
| 87 | 96 | |
| 88 | 97 | $miolo = new indice(); |
| 98 | + | |
| 89 | 99 | $pagina->addForm( $miolo ); |
| 90 | 100 | |
| 91 | 101 | $pagina->MakeAll(); | ... | ... |
ieducar/intranet/diaria_lst.php
| ... | ... | @@ -28,6 +28,7 @@ $desvio_diretorio = ""; |
| 28 | 28 | require_once ("include/clsBase.inc.php"); |
| 29 | 29 | require_once ("include/clsListagem.inc.php"); |
| 30 | 30 | require_once ("include/clsBanco.inc.php"); |
| 31 | +require_once 'include/localizacaoSistema.php'; | |
| 31 | 32 | |
| 32 | 33 | class clsIndex extends clsBase |
| 33 | 34 | { |
| ... | ... | @@ -36,6 +37,7 @@ class clsIndex extends clsBase |
| 36 | 37 | { |
| 37 | 38 | $this->SetTitulo( "{$this->_instituicao} Diaria" ); |
| 38 | 39 | $this->processoAp = "293"; |
| 40 | + $this->addEstilo( "localizacaoSistema" ); | |
| 39 | 41 | } |
| 40 | 42 | } |
| 41 | 43 | |
| ... | ... | @@ -136,6 +138,13 @@ class indice extends clsListagem |
| 136 | 138 | $this->nome_acao = "Novo"; |
| 137 | 139 | |
| 138 | 140 | $this->largura = "100%"; |
| 141 | + | |
| 142 | + $localizacao = new LocalizacaoSistema(); | |
| 143 | + $localizacao->entradaCaminhos( array( | |
| 144 | + $_SERVER['SERVER_NAME']."/intranet" => "i-Educar", | |
| 145 | + "" => "Diárias" | |
| 146 | + )); | |
| 147 | + $this->enviaLocalizacao($localizacao->montar()); | |
| 139 | 148 | } |
| 140 | 149 | } |
| 141 | 150 | ... | ... |
ieducar/intranet/educar_aluno_lst.php
| ... | ... | @@ -29,6 +29,7 @@ require_once 'include/clsListagem.inc.php'; |
| 29 | 29 | require_once 'include/clsBanco.inc.php'; |
| 30 | 30 | require_once 'include/pmieducar/geral.inc.php'; |
| 31 | 31 | require_once 'Educacenso/Model/AlunoDataMapper.php'; |
| 32 | +require_once 'include/localizacaoSistema.php'; | |
| 32 | 33 | |
| 33 | 34 | class clsIndexBase extends clsBase |
| 34 | 35 | { |
| ... | ... | @@ -36,7 +37,8 @@ class clsIndexBase extends clsBase |
| 36 | 37 | { |
| 37 | 38 | $this->SetTitulo( "{$this->_instituicao} i-Educar - Aluno" ); |
| 38 | 39 | $this->processoAp = "578"; |
| 39 | - } | |
| 40 | + $this->addEstilo( "localizacaoSistema" ); | |
| 41 | + } | |
| 40 | 42 | } |
| 41 | 43 | |
| 42 | 44 | class indice extends clsListagem |
| ... | ... | @@ -112,7 +114,9 @@ class indice extends clsListagem |
| 112 | 114 | $this->campoTexto("nome_mae", "Nome da Mãe", $this->nome_mae, 50, 255); |
| 113 | 115 | $this->campoTexto("nome_responsavel", "Nome do Responsável", $this->nome_responsavel, 50, 255); |
| 114 | 116 | |
| 115 | - $obj_permissoes = new clsPermissoes(); | |
| 117 | + | |
| 118 | + | |
| 119 | + $obj_permissoes = new clsPermissoes(); | |
| 116 | 120 | $cod_escola = $obj_permissoes->getEscola( $this->pessoa_logada ); |
| 117 | 121 | if ($cod_escola) |
| 118 | 122 | { |
| ... | ... | @@ -131,7 +135,7 @@ class indice extends clsListagem |
| 131 | 135 | |
| 132 | 136 | $this->addCabecalhos( array( |
| 133 | 137 | "Código Aluno", |
| 134 | - "Código INEP", | |
| 138 | + "Código INEP", | |
| 135 | 139 | "Nome do Aluno", |
| 136 | 140 | "Nome da Mãe", |
| 137 | 141 | "Nome do Responsável", |
| ... | ... | @@ -170,7 +174,7 @@ class indice extends clsListagem |
| 170 | 174 | $this->nome_pai, |
| 171 | 175 | $this->nome_mae, |
| 172 | 176 | $this->nome_responsavel, |
| 173 | - $this->cod_inep | |
| 177 | + $this->cod_inep | |
| 174 | 178 | ); |
| 175 | 179 | |
| 176 | 180 | $total = $aluno->_total; |
| ... | ... | @@ -209,7 +213,16 @@ class indice extends clsListagem |
| 209 | 213 | } |
| 210 | 214 | //** |
| 211 | 215 | $this->largura = "100%"; |
| 212 | - } | |
| 216 | + | |
| 217 | + $localizacao = new LocalizacaoSistema(); | |
| 218 | + $localizacao->entradaCaminhos( array( | |
| 219 | + $_SERVER['SERVER_NAME']."/intranet" => "i-Educar", | |
| 220 | + "educar_index.php" => "Escola", | |
| 221 | + "" => "Cadastro de Aluno" | |
| 222 | + )); | |
| 223 | + $this->enviaLocalizacao($localizacao->montar()); | |
| 224 | + | |
| 225 | + } | |
| 213 | 226 | |
| 214 | 227 | protected function loadNomeMae($aluno) { |
| 215 | 228 | $nome = $aluno['nm_mae']; |
| ... | ... | @@ -221,8 +234,8 @@ class indice extends clsListagem |
| 221 | 234 | $pessoaMae = new clsPessoaFj($pessoaAluno['idpes_mae']); |
| 222 | 235 | $pessoaMae = $pessoaMae->detalhe(); |
| 223 | 236 | $nome = $pessoaMae['nome']; |
| 224 | - } | |
| 225 | - | |
| 237 | + } | |
| 238 | + | |
| 226 | 239 | return $nome; |
| 227 | 240 | } |
| 228 | 241 | |
| ... | ... | @@ -236,10 +249,14 @@ class indice extends clsListagem |
| 236 | 249 | catch(Exception $e) { |
| 237 | 250 | $id = ''; |
| 238 | 251 | } |
| 239 | - | |
| 252 | + | |
| 240 | 253 | return $id; |
| 241 | - } | |
| 242 | -} | |
| 254 | + | |
| 255 | + } | |
| 256 | + | |
| 257 | + | |
| 258 | + } | |
| 259 | + | |
| 243 | 260 | // cria uma extensao da classe base |
| 244 | 261 | $pagina = new clsIndexBase(); |
| 245 | 262 | // cria o conteudo | ... | ... |
ieducar/intranet/educar_biblioteca_lst.php
| ... | ... | @@ -28,6 +28,7 @@ require_once ("include/clsBase.inc.php"); |
| 28 | 28 | require_once ("include/clsListagem.inc.php"); |
| 29 | 29 | require_once ("include/clsBanco.inc.php"); |
| 30 | 30 | require_once( "include/pmieducar/geral.inc.php" ); |
| 31 | +require_once ("include/localizacaoSistema.php"); | |
| 31 | 32 | |
| 32 | 33 | class clsIndexBase extends clsBase |
| 33 | 34 | { |
| ... | ... | @@ -35,6 +36,7 @@ class clsIndexBase extends clsBase |
| 35 | 36 | { |
| 36 | 37 | $this->SetTitulo( "{$this->_instituicao} i-Educar - Biblioteca" ); |
| 37 | 38 | $this->processoAp = "591"; |
| 39 | + $this->addEstilo( "localizacaoSistema" ); | |
| 38 | 40 | } |
| 39 | 41 | } |
| 40 | 42 | |
| ... | ... | @@ -196,7 +198,16 @@ class indice extends clsListagem |
| 196 | 198 | } |
| 197 | 199 | |
| 198 | 200 | $this->largura = "100%"; |
| 201 | + | |
| 202 | + $localizacao = new LocalizacaoSistema(); | |
| 203 | + $localizacao->entradaCaminhos( array( | |
| 204 | + $_SERVER['SERVER_NAME']."/intranet" => "i-Educar", | |
| 205 | + "educar_biblioteca_index.php" => "Biblioteca", | |
| 206 | + "" => "Cadastro de Biblioteca" | |
| 207 | + )); | |
| 208 | + $this->enviaLocalizacao($localizacao->montar()); | |
| 199 | 209 | } |
| 210 | + | |
| 200 | 211 | } |
| 201 | 212 | // cria uma extensao da classe base |
| 202 | 213 | $pagina = new clsIndexBase(); | ... | ... |
ieducar/intranet/educar_index.php
| ... | ... | @@ -44,19 +44,18 @@ class indice |
| 44 | 44 | function RenderHTML() |
| 45 | 45 | { |
| 46 | 46 | return " |
| 47 | - <table width='100%' style='height: 100%;'> | |
| 48 | - <tr align=center valign='top'><td></td></tr> | |
| 49 | - </table> | |
| 50 | - "; | |
| 47 | + <table width='100%' style='height: 100%;'> | |
| 48 | + <tr align=center valign='top'><td></td></tr> | |
| 49 | + </table>"; | |
| 51 | 50 | } |
| 52 | 51 | } |
| 53 | 52 | |
| 54 | - | |
| 55 | 53 | $pagina = new clsIndex(); |
| 56 | 54 | |
| 57 | 55 | $miolo = new indice(); |
| 56 | + | |
| 58 | 57 | $pagina->addForm( $miolo ); |
| 59 | 58 | |
| 60 | 59 | $pagina->MakeAll(); |
| 61 | 60 | |
| 62 | 61 | -?> |
| 62 | +?> | |
| 63 | 63 | \ No newline at end of file | ... | ... |
ieducar/intranet/educar_instituicao_lst.php
| ... | ... | @@ -28,6 +28,7 @@ require_once ("include/clsBase.inc.php"); |
| 28 | 28 | require_once ("include/clsListagem.inc.php"); |
| 29 | 29 | require_once ("include/clsBanco.inc.php"); |
| 30 | 30 | require_once( "include/pmieducar/geral.inc.php" ); |
| 31 | +require_once ("include/localizacaoSistema.php"); | |
| 31 | 32 | |
| 32 | 33 | class clsIndexBase extends clsBase |
| 33 | 34 | { |
| ... | ... | @@ -36,6 +37,7 @@ class clsIndexBase extends clsBase |
| 36 | 37 | { |
| 37 | 38 | $this->SetTitulo( "{$this->_instituicao} i-Educar - Instituicao" ); |
| 38 | 39 | $this->processoAp = "559"; |
| 40 | + $this->addEstilo( "localizacaoSistema" ); | |
| 39 | 41 | } |
| 40 | 42 | } |
| 41 | 43 | |
| ... | ... | @@ -149,6 +151,14 @@ class indice extends clsListagem |
| 149 | 151 | $this->nome_acao = "Novo"; |
| 150 | 152 | } |
| 151 | 153 | $this->largura = "100%"; |
| 154 | + | |
| 155 | + $localizacao = new LocalizacaoSistema(); | |
| 156 | + $localizacao->entradaCaminhos( array( | |
| 157 | + $_SERVER['SERVER_NAME']."/intranet" => "i-Educar", | |
| 158 | + "educar_index.php" => "Escola", | |
| 159 | + "" => "Cadastro de Instituição" | |
| 160 | + )); | |
| 161 | + $this->enviaLocalizacao($localizacao->montar()); | |
| 152 | 162 | } |
| 153 | 163 | } |
| 154 | 164 | // cria uma extensao da classe base | ... | ... |
ieducar/intranet/funcionario_lst.php
| ... | ... | @@ -27,6 +27,7 @@ |
| 27 | 27 | require_once ("include/clsBase.inc.php"); |
| 28 | 28 | require_once ("include/clsListagem.inc.php"); |
| 29 | 29 | require_once ("include/clsBanco.inc.php"); |
| 30 | +require_once 'include/localizacaoSistema.php'; | |
| 30 | 31 | |
| 31 | 32 | class clsIndex extends clsBase |
| 32 | 33 | { |
| ... | ... | @@ -35,6 +36,7 @@ class clsIndex extends clsBase |
| 35 | 36 | { |
| 36 | 37 | $this->SetTitulo( "{$this->_instituicao} Usuários!" ); |
| 37 | 38 | $this->processoAp = "36"; |
| 39 | + $this->addEstilo( "localizacaoSistema" ); | |
| 38 | 40 | } |
| 39 | 41 | } |
| 40 | 42 | |
| ... | ... | @@ -75,6 +77,13 @@ class indice extends clsListagem |
| 75 | 77 | $this->nome_acao = "Novo"; |
| 76 | 78 | |
| 77 | 79 | $this->largura = "100%"; |
| 80 | + | |
| 81 | + $localizacao = new LocalizacaoSistema(); | |
| 82 | + $localizacao->entradaCaminhos( array( | |
| 83 | + $_SERVER['SERVER_NAME']."/intranet" => "i-Educar", | |
| 84 | + "" => "Cadastro de Funcionários" | |
| 85 | + )); | |
| 86 | + $this->enviaLocalizacao($localizacao->montar()); | |
| 78 | 87 | } |
| 79 | 88 | } |
| 80 | 89 | ... | ... |
ieducar/intranet/funcionario_vinculo_lst.php
| ... | ... | @@ -29,6 +29,7 @@ $desvio_diretorio = ""; |
| 29 | 29 | require_once ("include/clsBase.inc.php"); |
| 30 | 30 | require_once ("include/clsListagem.inc.php"); |
| 31 | 31 | require_once ("include/clsBanco.inc.php"); |
| 32 | +require_once 'include/localizacaoSistema.php'; | |
| 32 | 33 | |
| 33 | 34 | class clsIndex extends clsBase |
| 34 | 35 | { |
| ... | ... | @@ -37,6 +38,7 @@ class clsIndex extends clsBase |
| 37 | 38 | { |
| 38 | 39 | $this->SetTitulo( "{$this->_instituicao} Vínculo Funcionários!" ); |
| 39 | 40 | $this->processoAp = "190"; |
| 41 | + $this->addEstilo( "localizacaoSistema" ); | |
| 40 | 42 | } |
| 41 | 43 | } |
| 42 | 44 | |
| ... | ... | @@ -83,6 +85,14 @@ class indice extends clsListagem |
| 83 | 85 | $this->addLinhas( array( "<img src='imagens/noticia.jpg' border=0> <a href='funcionario_vinculo_det.php?cod_func=$cod_func_vinculo'>$nome</a>") ); |
| 84 | 86 | } |
| 85 | 87 | $this->largura = "100%"; |
| 88 | + | |
| 89 | + $localizacao = new LocalizacaoSistema(); | |
| 90 | + $localizacao->entradaCaminhos( array( | |
| 91 | + $_SERVER['SERVER_NAME']."/intranet" => "i-Educar", | |
| 92 | + "" => "Vínculos" | |
| 93 | + )); | |
| 94 | + $this->enviaLocalizacao($localizacao->montar()); | |
| 95 | + | |
| 86 | 96 | // Paginador |
| 87 | 97 | $this->addPaginador2( "funcionario_vinculo_lst.php", $total, $_GET, $this->nome, $limite ); |
| 88 | 98 | $this->acao = "go(\"funcionario_vinculo_cad.php\")"; | ... | ... |
ieducar/intranet/include/clsBase.inc.php
| ... | ... | @@ -718,7 +718,6 @@ class clsBase extends clsConfig |
| 718 | 718 | $this->CadastraAcesso(); |
| 719 | 719 | $saida_geral = $this->MakeHeadHtml(); |
| 720 | 720 | |
| 721 | - // @todo else ruim, colocar abre e fecha colchetes ao redor de foreach. | |
| 722 | 721 | if ($this->renderMenu) { |
| 723 | 722 | $saida_geral .= $this->MakeBody(); |
| 724 | 723 | } | ... | ... |
ieducar/intranet/include/clsListagem.inc.php
| ... | ... | @@ -29,6 +29,7 @@ |
| 29 | 29 | */ |
| 30 | 30 | |
| 31 | 31 | require_once 'include/clsCampos.inc.php'; |
| 32 | +require_once 'include/localizacaoSistema.php'; | |
| 32 | 33 | |
| 33 | 34 | if (class_exists('clsPmiajudaPagina')) { |
| 34 | 35 | require_once 'include/pmiajuda/clsPmiajudaPagina.inc.php'; |
| ... | ... | @@ -80,6 +81,7 @@ class clsListagem extends clsCampos |
| 80 | 81 | var $funcAcao = ''; |
| 81 | 82 | var $funcAcaoNome = ''; |
| 82 | 83 | var $rotulo_anterior; |
| 84 | + var $locale = "<b>=> PAGINA SEM LOCALIZACAO, COLOQUE POR GENTILEZA. <=</b>"; | |
| 83 | 85 | |
| 84 | 86 | var $array_botao; |
| 85 | 87 | var $array_botao_url; |
| ... | ... | @@ -121,6 +123,11 @@ class clsListagem extends clsCampos |
| 121 | 123 | |
| 122 | 124 | $this->bannerClose = $boolFechaBanner; |
| 123 | 125 | } |
| 126 | + | |
| 127 | + function enviaLocalizacao($localizao){ | |
| 128 | + if($localizao) | |
| 129 | + $this->locale = $localizao; | |
| 130 | + } | |
| 124 | 131 | |
| 125 | 132 | function addCabecalhos($coluna) |
| 126 | 133 | { |
| ... | ... | @@ -252,7 +259,7 @@ class clsListagem extends clsCampos |
| 252 | 259 | 'pos_atual', -1, TRUE); |
| 253 | 260 | |
| 254 | 261 | return NULL; |
| 255 | - } | |
| 262 | + } | |
| 256 | 263 | |
| 257 | 264 | function RenderHTML() |
| 258 | 265 | { |
| ... | ... | @@ -298,8 +305,14 @@ class clsListagem extends clsCampos |
| 298 | 305 | else { |
| 299 | 306 | $tipo = 'cad'; |
| 300 | 307 | } |
| 301 | - | |
| 302 | - $barra = '<b>Filtros de busca</b>'; | |
| 308 | + | |
| 309 | + $server = $_SERVER['SERVER_NAME']; | |
| 310 | + $endereco = $_SERVER ['REQUEST_URI']; | |
| 311 | + $enderecoPagina = $_SERVER['PHP_SELF']; | |
| 312 | + | |
| 313 | + //$barra = '<b>Localizacao: http://'.$server.$endereco.'</b><br>'; | |
| 314 | + //$barra = '<tr><td><b>Localizacao:'. $enderecoPagina .'</b><br></tr></td>'; | |
| 315 | + $barra = '<b>Filtros de busca</b>'; | |
| 303 | 316 | |
| 304 | 317 | if (class_exists('clsPmiajudaPagina')) { |
| 305 | 318 | $ajudaPagina = new clsPmiajudaPagina(); |
| ... | ... | @@ -332,7 +345,7 @@ class clsListagem extends clsCampos |
| 332 | 345 | } |
| 333 | 346 | } |
| 334 | 347 | |
| 335 | - $janela .= "<tr><td class='formdktd' colspan='2' height='24'>{$barra}</td></tr>"; | |
| 348 | + $janela .= "<tr><td class='formdktd' colspan='2' height='24'>{$barra}</td></tr>"; | |
| 336 | 349 | |
| 337 | 350 | if (empty($this->campos)) { |
| 338 | 351 | $janela .= "<tr><td class='formlttd' colspan='2'><span class='form'>Não existem campos definidos para o formulário</span></td></tr>"; |
| ... | ... | @@ -384,7 +397,12 @@ class clsListagem extends clsCampos |
| 384 | 397 | |
| 385 | 398 | $retorno .= " |
| 386 | 399 | <table class='tablelistagem' $width border='0' cellpadding='2' cellspacing='1'>"; |
| 387 | - | |
| 400 | + | |
| 401 | + $retorno .= " | |
| 402 | + <tr> | |
| 403 | + <td class='fundoLocalizacao' colspan='2' height='24'>{$this->locale}</td> | |
| 404 | + </tr>"; | |
| 405 | + | |
| 388 | 406 | $retorno .= " |
| 389 | 407 | <tr> |
| 390 | 408 | <td class='formdktd' colspan='2' height='24'>{$barra}</td> | ... | ... |
| ... | ... | @@ -0,0 +1,76 @@ |
| 1 | +<?php | |
| 2 | +class LocalizacaoSistema { | |
| 3 | + | |
| 4 | + private $localizacao = array(); | |
| 5 | + private $url = ''; | |
| 6 | + private $protocolo = ''; | |
| 7 | + private $separador = ''; | |
| 8 | + private $html = ''; | |
| 9 | + | |
| 10 | + public function __construct() { | |
| 11 | + $this->protocolo = $this->getProtocoloHttp(); | |
| 12 | + $this->url = $this->getUrl(); | |
| 13 | + $this->localizacao = $this->url( $this->url ); | |
| 14 | + $this->montarLocalizacao(); | |
| 15 | + } | |
| 16 | + | |
| 17 | + public function entradaCaminhos( array $localizacao ) { | |
| 18 | + $this->localizacao = $localizacao; | |
| 19 | + $this->montarLocalizacao(); | |
| 20 | + } | |
| 21 | + | |
| 22 | + public function get() { | |
| 23 | + return $this->localizacao; | |
| 24 | + } | |
| 25 | + | |
| 26 | + public function getProtocoloHttp() { | |
| 27 | + if( isset( $_SERVER["HTTPS"] ) && $_SERVER["HTTPS"] === 'on' ) { | |
| 28 | + $protocolo = 'https://'; | |
| 29 | + } else { | |
| 30 | + $protocolo = 'http://'; | |
| 31 | + } | |
| 32 | + return $protocolo; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public function getUrl() { | |
| 36 | + return $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; | |
| 37 | + } | |
| 38 | + | |
| 39 | + public function url( $url ) { | |
| 40 | + $fragments = array(); | |
| 41 | + $localizacao = array(); | |
| 42 | + $_url = preg_replace( array( "/[http]s?:\/\//", "/\/$/" ), array( "", "" ), $url ); | |
| 43 | + $fragments = explode( "/", $_url ); | |
| 44 | + | |
| 45 | + foreach( $fragments as $fragment ) { | |
| 46 | + $localizacao[$fragment] = $fragment; | |
| 47 | + } | |
| 48 | + | |
| 49 | + return $localizacao; | |
| 50 | + } | |
| 51 | + | |
| 52 | + private function montarLocalizacao() { | |
| 53 | + $href = ''; | |
| 54 | + $localizacao_count = sizeof( $this->localizacao ); | |
| 55 | + $i = 1; | |
| 56 | + $linkVazio="#"; | |
| 57 | + | |
| 58 | + $this->html = '<ul id="localizacao">'; | |
| 59 | + foreach( $this->localizacao as $link => $inner ) { | |
| 60 | + $href .= ( $i === 1 ) ? $this->protocolo . $link : "/$link"; | |
| 61 | + if( $i === $localizacao_count ) { | |
| 62 | + $this->html .= "<li><a href=\"$linkVazio\">$inner</a></li>"; | |
| 63 | + } else { | |
| 64 | + $this->html .= "<li><a href=\"$href\" title=\"$inner\">$inner</a></li> {$this->separador} "; | |
| 65 | + } | |
| 66 | + $i++; | |
| 67 | + } | |
| 68 | + $this->html .= '</ul>'; | |
| 69 | + } | |
| 70 | + | |
| 71 | + public function montar() { | |
| 72 | + return $this->html; | |
| 73 | + } | |
| 74 | + | |
| 75 | +} | |
| 76 | +?> | |
| 0 | 77 | \ No newline at end of file | ... | ... |
ieducar/intranet/public_bairro_lst.php
| ... | ... | @@ -35,6 +35,7 @@ require_once 'include/public/geral.inc.php'; |
| 35 | 35 | |
| 36 | 36 | require_once 'App/Model/ZonaLocalizacao.php'; |
| 37 | 37 | require_once 'CoreExt/View/Helper/UrlHelper.php'; |
| 38 | +require_once 'include/localizacaoSistema.php'; | |
| 38 | 39 | |
| 39 | 40 | /** |
| 40 | 41 | * clsIndexBase class. |
| ... | ... | @@ -52,6 +53,7 @@ class clsIndexBase extends clsBase |
| 52 | 53 | { |
| 53 | 54 | $this->SetTitulo($this->_instituicao . ' Bairro'); |
| 54 | 55 | $this->processoAp = 756; |
| 56 | + $this->addEstilo( "localizacaoSistema" ); | |
| 55 | 57 | } |
| 56 | 58 | } |
| 57 | 59 | |
| ... | ... | @@ -240,6 +242,13 @@ class indice extends clsListagem |
| 240 | 242 | $this->nome_acao = 'Novo'; |
| 241 | 243 | |
| 242 | 244 | $this->largura = '100%'; |
| 245 | + | |
| 246 | + $localizacao = new LocalizacaoSistema(); | |
| 247 | + $localizacao->entradaCaminhos( array( | |
| 248 | + $_SERVER['SERVER_NAME']."/intranet" => "i-Educar", | |
| 249 | + "" => "Bairro" | |
| 250 | + )); | |
| 251 | + $this->enviaLocalizacao($localizacao->montar()); | |
| 243 | 252 | } |
| 244 | 253 | } |
| 245 | 254 | ... | ... |
ieducar/intranet/public_logradouro_lst.php
| ... | ... | @@ -291,7 +291,7 @@ document.getElementById('idpais').onchange = function() |
| 291 | 291 | function getUf( xml_uf ) |
| 292 | 292 | { |
| 293 | 293 | var campoUf = document.getElementById('sigla_uf'); |
| 294 | - var DOM_array = xml_uf.getElementsByTagName( "uf" ); | |
| 294 | + var DOM_array = xml_uf.getElementsByTagName( "estado" ); | |
| 295 | 295 | |
| 296 | 296 | if(DOM_array.length) |
| 297 | 297 | { | ... | ... |
ieducar/intranet/public_municipio_lst.php
| ... | ... | @@ -229,7 +229,7 @@ document.getElementById('idpais').onchange = function() |
| 229 | 229 | function getUf( xml_uf ) |
| 230 | 230 | { |
| 231 | 231 | var campoUf = document.getElementById('sigla_uf'); |
| 232 | - var DOM_array = xml_uf.getElementsByTagName( "uf" ); | |
| 232 | + var DOM_array = xml_uf.getElementsByTagName( "estado" ); | |
| 233 | 233 | |
| 234 | 234 | if(DOM_array.length) |
| 235 | 235 | { | ... | ... |
| ... | ... | @@ -0,0 +1,75 @@ |
| 1 | +#localizacao{ | |
| 2 | + overflow: hidden; | |
| 3 | + width: 100%; | |
| 4 | +} | |
| 5 | + | |
| 6 | +#localizacao li{ | |
| 7 | + float: left; | |
| 8 | + margin: 0 .5em 0 1em; | |
| 9 | +} | |
| 10 | + | |
| 11 | +#localizacao a{ | |
| 12 | + font-family: arial, verdana, sans-serif, "Times New Roman"; | |
| 13 | + font-size: 11px; | |
| 14 | + font-style: normal; | |
| 15 | + font-variant: normal; | |
| 16 | + font-weight: bold; | |
| 17 | + letter-spacing: 0pt; | |
| 18 | + line-height: normal; | |
| 19 | + background: #A1B3BD; | |
| 20 | + padding: .4em 1em; | |
| 21 | + float: left; | |
| 22 | + text-decoration: none; | |
| 23 | + color: #fff; | |
| 24 | + text-shadow: 0 1px 0 rgba(255,255,255,.5); | |
| 25 | + position: relative; | |
| 26 | +} | |
| 27 | + | |
| 28 | +#localizacao a:hover{ | |
| 29 | + background: #184e7f; | |
| 30 | +} | |
| 31 | + | |
| 32 | +#localizacao a::before{ | |
| 33 | + content: ""; | |
| 34 | + position: absolute; | |
| 35 | + top: 50%; | |
| 36 | + margin-top: -1.5em; | |
| 37 | + border-width: 1.5em 0 1.5em 1em; | |
| 38 | + border-style: solid; | |
| 39 | + border-color: #A1B3BD #A1B3BD #A1B3BD transparent; | |
| 40 | + left: -1em; | |
| 41 | +} | |
| 42 | + | |
| 43 | +#localizacao a:hover::before{ | |
| 44 | + border-color: #184e7f #184e7f #184e7f transparent; | |
| 45 | +} | |
| 46 | + | |
| 47 | +#localizacao a::after{ | |
| 48 | + content: ""; | |
| 49 | + position: absolute; | |
| 50 | + top: 50%; | |
| 51 | + margin-top: -1.5em; | |
| 52 | + border-top: 1.5em solid transparent; | |
| 53 | + border-bottom: 1.5em solid transparent; | |
| 54 | + border-left: 1em solid #A1B3BD; | |
| 55 | + right: -1em; | |
| 56 | +} | |
| 57 | + | |
| 58 | +#localizacao a:hover::after{ | |
| 59 | + border-left-color: #184e7f; | |
| 60 | + content: ""; | |
| 61 | +} | |
| 62 | + | |
| 63 | +#localizacao .current, | |
| 64 | +#localizacao .current:hover{ | |
| 65 | + font-weight: bold; | |
| 66 | + background: none; | |
| 67 | +} | |
| 68 | + | |
| 69 | +#localizacao .current::after, | |
| 70 | +#localizacao .current::before{ | |
| 71 | + content: normal; | |
| 72 | +} | |
| 73 | +.fundoLocalizacao { | |
| 74 | + background-color: #E4E9ED; | |
| 75 | +} | |
| 0 | 76 | \ No newline at end of file | ... | ... |
ieducar/intranet/styles/novo.css
ieducar/intranet/urbano_cep_logradouro_lst.php
| ... | ... | @@ -28,6 +28,7 @@ require_once ("include/clsBase.inc.php"); |
| 28 | 28 | require_once ("include/clsListagem.inc.php"); |
| 29 | 29 | require_once ("include/clsBanco.inc.php"); |
| 30 | 30 | require_once( "include/urbano/geral.inc.php" ); |
| 31 | +require_once 'include/localizacaoSistema.php'; | |
| 31 | 32 | |
| 32 | 33 | class clsIndexBase extends clsBase |
| 33 | 34 | { |
| ... | ... | @@ -35,6 +36,7 @@ class clsIndexBase extends clsBase |
| 35 | 36 | { |
| 36 | 37 | $this->SetTitulo( "{$this->_instituicao} CEP Logradouro" ); |
| 37 | 38 | $this->processoAp = "758"; |
| 39 | + $this->addEstilo( "localizacaoSistema" ); | |
| 38 | 40 | } |
| 39 | 41 | } |
| 40 | 42 | |
| ... | ... | @@ -245,6 +247,13 @@ class indice extends clsListagem |
| 245 | 247 | $this->nome_acao = "Novo"; |
| 246 | 248 | |
| 247 | 249 | $this->largura = "100%"; |
| 250 | + | |
| 251 | + $localizacao = new LocalizacaoSistema(); | |
| 252 | + $localizacao->entradaCaminhos( array( | |
| 253 | + $_SERVER['SERVER_NAME']."/intranet" => "i-Educar", | |
| 254 | + "" => "CEP" | |
| 255 | + )); | |
| 256 | + $this->enviaLocalizacao($localizacao->montar()); | |
| 248 | 257 | } |
| 249 | 258 | } |
| 250 | 259 | // cria uma extensao da classe base |
| ... | ... | @@ -275,7 +284,7 @@ document.getElementById('idpais').onchange = function() |
| 275 | 284 | function getUf( xml_uf ) |
| 276 | 285 | { |
| 277 | 286 | var campoUf = document.getElementById('sigla_uf'); |
| 278 | - var DOM_array = xml_uf.getElementsByTagName( "uf" ); | |
| 287 | + var DOM_array = xml_uf.getElementsByTagName( "estado" ); | |
| 279 | 288 | |
| 280 | 289 | if(DOM_array.length) |
| 281 | 290 | { | ... | ... |