protected function loadAssets() { Portabilis_View_Helper_Application::loadChosenLib($this->viewInstance); Portabilis_View_Helper_Application::loadAjaxChosenLib($this->viewInstance); $jsFile = '/modules/Portabilis/Assets/Javascripts/Frontend/Inputs/MultipleSearchAjax.js'; Portabilis_View_Helper_Application::loadJavascript($this->viewInstance, $jsFile); }
public function Gerar() { Portabilis_View_Helper_Application::loadStylesheet($this, '/modules/HistoricoEscolar/Static/styles/processamento.css'); $this->inputsHelper()->dynamic(array('ano', 'instituicao', 'escola')); $this->inputsHelper()->dynamic(array('curso', 'serie', 'turma', 'matricula'), array('required' => false)); $resourceOptionsTable = "<table id='resource-options' class='styled horizontal-expand hide-on-search disable-on-apply-changes'>\r\n\r\n <tr>\r\n <td><label for='dias-letivos'>Quantidade dias letivos *</label></td>\r\n <td colspan='2'><input type='text' id='dias-letivos' name='quantidade-dias-letivos' class='obrigatorio disable-on-search clear-on-change-curso validates-value-is-numeric'></input></td>\r\n </tr>\r\n\r\n <tr>\r\n <td><label for='grade-curso'>Grade curso *</label></td>\r\n <td>{$this->getSelectGradeCurso()}</td>\r\n </tr>\r\n\r\n <tr>\r\n <td><label for='percentual-frequencia'>% Frequência *</label></td>\r\n <td>\r\n <select id='percentual-frequencia' class='obrigatorio disable-on-search'>\r\n <option value=''>Selecione</option>\r\n <option value='buscar-boletim'>Usar do boletim</option>\r\n <option value='informar-manualmente'>Informar manualmente</option>\r\n </select>\r\n </td>\r\n <td><input id='percentual-frequencia-manual' name='percentual-frequencia-manual' style='display:none;'></input></td>\r\n </tr>\r\n\r\n <tr>\r\n <td><label for='situacao'>Situação *</label></td>\r\n <td colspan='2'>\r\n <select id='situacao' class='obrigatorio disable-on-search'>\r\n <option value=''>Selecione</option>\r\n <option value='buscar-matricula'>Usar do boletim</option>\r\n <option value='em-andamento'>Em andamento</option>\r\n <option value='aprovado'>Aprovado</option>\r\n <option value='reprovado'>Reprovado</option>\r\n <option value='transferido'>Transferido</option>\r\n </select>\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td><label for='disciplinas'>Disciplinas *</label></td>\r\n <td>\r\n <select id='disciplinas' name='disciplinas' class='obrigatorio disable-on-search'>\r\n <option value=''>Selecione</option>\r\n <option value='buscar-boletim'>Usar do boletim</option>\r\n <option value='informar-manualmente'>Informar manualmente</option>\r\n </select>\r\n </td>\r\n <td>\r\n <table id='disciplinas-manual' style='display:none;'>\r\n <tr>\r\n <th>Nome</th>\r\n <th>Nota</th>\r\n <th>Falta</th>\r\n <th>Ação</th>\r\n </tr>\r\n <tr class='disciplina'>\r\n <td><input class='nome obrigatorio disable-on-search change-state-with-parent' style='display:none;'></input></td>\r\n <td><input class='nota' ></input></td>\r\n <td>\r\n <input class='falta validates-value-is-numeric'></input>\r\n </td>\r\n <td>\r\n <a class='remove-disciplina-line' href='#'>Remover</a>\r\n </td>\r\n </tr>\r\n <tr class='actions'>\r\n <td colspan='4'>\r\n <input type='button' class='action' id='new-disciplina-line' name='new-line' value='Adicionar nova'></input>\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n\r\n <tr>\r\n <td><label for='notas'>Notas *</label></td>\r\n <td>\r\n <select id='notas' class='obrigatorio disable-on-search disable-and-hide-wen-disciplinas-manual'>\r\n <option value=''>Selecione</option>\r\n <option value='buscar-boletim'>Lançadas no boletim</option>\r\n <option value='AP'>AP</option>\r\n <option value='informar-manualmente'>Informar manualmente</option>\r\n </select>\r\n </td>\r\n <td><input id='notas-manual' name='notas-manual' style='display:none;'></input></td>\r\n </tr>\r\n\r\n <tr>\r\n <td><label for='faltas'>Faltas *</label></td>\r\n <td>\r\n <select id='faltas' class='obrigatorio disable-on-search disable-and-hide-wen-disciplinas-manual'>\r\n <option value=''>Selecione</option>\r\n <option value='buscar-boletim'>Lançadas no boletim</option>\r\n <option value='informar-manualmente'>Informar manualmente</option>\r\n </select>\r\n </td>\r\n <td><input id='faltas-manual' name='faltas-manual' style='display:none;'></input></td>\r\n </tr>\r\n\r\n <tr>\r\n <td><label for='registro'>Registro (arquivo)</label></td>\r\n <td colspan='2'><input type='text' id='registro' name='registro'></input></td>\r\n </tr>\r\n\r\n <tr>\r\n <td><label for='livro'>Livro</label></td>\r\n <td colspan='2'><input type='text' id='livro' name='livro'></input></td>\r\n </tr>\r\n\r\n <tr>\r\n <td><label for='dias-letivos'>Folha</label></td>\r\n <td colspan='2'><input type='text' id='folha' name='folha'></input></td>\r\n </tr>\r\n\r\n <tr>\r\n <td><label for='observacao'>Observação</label></td>\r\n <td colspan='2'><textarea id='observacao' name='observacao' cols='60' rows='5'></textarea></td>\r\n </tr>\r\n\r\n <tr>\r\n <td><label for='extra-curricular'>Extra curricular</label></td>\r\n <td colspan='2'><input type='checkbox' id='extra-curricular' name='extra-curricular'></input></td>\r\n </tr>\r\n\r\n </table>"; $this->appendOutput($resourceOptionsTable); Portabilis_View_Helper_Application::loadJQueryUiLib($this); Portabilis_View_Helper_Application::loadJavascript($this, array('/modules/Portabilis/Assets/Javascripts/Utils.js', '/modules/Portabilis/Assets/Javascripts/Frontend/Inputs/SimpleSearch.js', '/modules/HistoricoEscolar/Static/scripts/processamento.js')); }
protected function js($objectName, $attrName, $options) { // load simple search js $jsFile = '/modules/Portabilis/Assets/Javascripts/Frontend/Inputs/SimpleSearch.js'; Portabilis_View_Helper_Application::loadJavascript($this->viewInstance, $jsFile); // setup simple search /* all search options (including the option autocompleteOptions, that is passed for jquery autocomplete plugin), can be overwritten adding "var = simpleSearch<ObjectName>Options = { option : '...', optionName : '...' };" in the script file for the resource controller. */ $resourceOptions = "simpleSearch" . Portabilis_String_Utils::camelize($objectName) . "Options"; $js = "{$resourceOptions} = typeof {$resourceOptions} == 'undefined' ? {} : {$resourceOptions};\n simpleSearchHelper.setup('{$objectName}', '{$attrName}', '" . $options['searchPath'] . "', {$resourceOptions});"; // this script will be executed after the script for the current controller (if it was loaded in the view); Portabilis_View_Helper_Application::embedJavascript($this->viewInstance, $js, $afterReady = true); }
function Gerar() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); // Verificação de permissão para cadastro. $this->obj_permissao = new clsPermissoes(); $this->nivel_usuario = $this->obj_permissao->nivel_acesso($this->pessoa_logada); $this->titulo = 'Aluno - Detalhe'; $this->cod_aluno = $_GET['cod_aluno']; $tmp_obj = new clsPmieducarAluno($this->cod_aluno); $registro = $tmp_obj->detalhe(); if (!$registro) { header('Location: educar_aluno_lst.php'); die; } else { foreach ($registro as $key => $value) { $this->{$key} = $value; } } if ($this->ref_idpes) { $obj_pessoa_fj = new clsPessoaFj($this->ref_idpes); $det_pessoa_fj = $obj_pessoa_fj->detalhe(); $obj_fisica = new clsFisica($this->ref_idpes); $det_fisica = $obj_fisica->detalhe(); $obj_fisica_raca = new clsCadastroFisicaRaca(); $lst_fisica_raca = $obj_fisica_raca->lista($this->ref_idpes); if ($lst_fisica_raca) { $det_fisica_raca = array_shift($lst_fisica_raca); $obj_raca = new clsCadastroRaca($det_fisica_raca['ref_cod_raca']); $det_raca = $obj_raca->detalhe(); } $objFoto = new clsCadastroFisicaFoto($this->ref_idpes); $detalheFoto = $objFoto->detalhe(); if ($detalheFoto) { $caminhoFoto = $detalheFoto['caminho']; } $registro['nome_aluno'] = strtoupper($det_pessoa_fj['nome']); $registro['cpf'] = int2IdFederal($det_fisica['cpf']); $registro['data_nasc'] = dataToBrasil($det_fisica['data_nasc']); $registro['sexo'] = $det_fisica['sexo'] == 'F' ? 'Feminino' : 'Masculino'; $obj_estado_civil = new clsEstadoCivil(); $obj_estado_civil_lista = $obj_estado_civil->lista(); $lista_estado_civil = array(); if ($obj_estado_civil_lista) { foreach ($obj_estado_civil_lista as $estado_civil) { $lista_estado_civil[$estado_civil['ideciv']] = $estado_civil['descricao']; } } $registro['ideciv'] = $lista_estado_civil[$det_fisica['ideciv']->ideciv]; $registro['email'] = $det_pessoa_fj['email']; $registro['url'] = $det_pessoa_fj['url']; $registro['nacionalidade'] = $det_fisica['nacionalidade']; $registro['naturalidade'] = $det_fisica['idmun_nascimento']->detalhe(); $registro['naturalidade'] = $registro['naturalidade']['nome']; $registro['pais_origem'] = $det_fisica['idpais_estrangeiro']->detalhe(); $registro['pais_origem'] = $registro['pais_origem']['nome']; $registro['ref_idpes_responsavel'] = $det_fisica['idpes_responsavel']; $this->idpes_pai = $det_fisica['idpes_pai']; $this->idpes_mae = $det_fisica['idpes_mae']; $this->sus = $det_fisica['sus']; $this->nm_pai = $registro['nm_pai']; $this->nm_mae = $registro['nm_mae']; if ($this->idpes_pai) { $obj_pessoa_pai = new clsPessoaFj($this->idpes_pai); $det_pessoa_pai = $obj_pessoa_pai->detalhe(); if ($det_pessoa_pai) { $registro['nm_pai'] = $det_pessoa_pai['nome']; // CPF $obj_cpf = new clsFisica($this->idpes_pai); $det_cpf = $obj_cpf->detalhe(); if ($det_cpf['cpf']) { $this->cpf_pai = int2CPF($det_cpf['cpf']); } } } if ($this->idpes_mae) { $obj_pessoa_mae = new clsPessoaFj($this->idpes_mae); $det_pessoa_mae = $obj_pessoa_mae->detalhe(); if ($det_pessoa_mae) { $registro['nm_mae'] = $det_pessoa_mae['nome']; // CPF $obj_cpf = new clsFisica($this->idpes_mae); $det_cpf = $obj_cpf->detalhe(); if ($det_cpf['cpf']) { $this->cpf_mae = int2CPF($det_cpf['cpf']); } } } $registro['ddd_fone_1'] = $det_pessoa_fj['ddd_1']; $registro['fone_1'] = $det_pessoa_fj['fone_1']; $registro['ddd_fone_2'] = $det_pessoa_fj['ddd_2']; $registro['fone_2'] = $det_pessoa_fj['fone_2']; $registro['ddd_fax'] = $det_pessoa_fj['ddd_fax']; $registro['fone_fax'] = $det_pessoa_fj['fone_fax']; $registro['ddd_mov'] = $det_pessoa_fj['ddd_mov']; $registro['fone_mov'] = $det_pessoa_fj['fone_mov']; $obj_deficiencia_pessoa = new clsCadastroFisicaDeficiencia(); $obj_deficiencia_pessoa_lista = $obj_deficiencia_pessoa->lista($this->ref_idpes); if ($obj_deficiencia_pessoa_lista) { $deficiencia_pessoa = array(); foreach ($obj_deficiencia_pessoa_lista as $deficiencia) { $obj_def = new clsCadastroDeficiencia($deficiencia['ref_cod_deficiencia']); $det_def = $obj_def->detalhe(); $deficiencia_pessoa[$deficiencia['ref_cod_deficiencia']] = $det_def['nm_deficiencia']; } } $ObjDocumento = new clsDocumento($this->ref_idpes); $detalheDocumento = $ObjDocumento->detalhe(); $registro['rg'] = $detalheDocumento['rg']; if ($detalheDocumento['data_exp_rg']) { $registro['data_exp_rg'] = date('d/m/Y', strtotime(substr($detalheDocumento['data_exp_rg'], 0, 19))); } $registro['sigla_uf_exp_rg'] = $detalheDocumento['sigla_uf_exp_rg']; $registro['tipo_cert_civil'] = $detalheDocumento['tipo_cert_civil']; $registro['num_termo'] = $detalheDocumento['num_termo']; $registro['num_livro'] = $detalheDocumento['num_livro']; $registro['num_folha'] = $detalheDocumento['num_folha']; if ($detalheDocumento['data_emissao_cert_civil']) { $registro['data_emissao_cert_civil'] = date('d/m/Y', strtotime(substr($detalheDocumento['data_emissao_cert_civil'], 0, 19))); } $registro['sigla_uf_cert_civil'] = $detalheDocumento['sigla_uf_cert_civil']; $registro['cartorio_cert_civil'] = $detalheDocumento['cartorio_cert_civil']; $registro['num_cart_trabalho'] = $detalheDocumento['num_cart_trabalho']; $registro['serie_cart_trabalho'] = $detalheDocumento['serie_cart_trabalho']; if ($detalheDocumento['data_emissao_cart_trabalho']) { $registro['data_emissao_cart_trabalho'] = date('d/m/Y', strtotime(substr($detalheDocumento['data_emissao_cart_trabalho'], 0, 19))); } $registro['sigla_uf_cart_trabalho'] = $detalheDocumento['sigla_uf_cart_trabalho']; $registro['num_tit_eleitor'] = $detalheDocumento['num_titulo_eleitor']; $registro['zona_tit_eleitor'] = $detalheDocumento['zona_titulo_eleitor']; $registro['secao_tit_eleitor'] = $detalheDocumento['secao_titulo_eleitor']; $registro['idorg_exp_rg'] = $detalheDocumento['ref_idorg_rg']; $obj_endereco = new clsPessoaEndereco($this->ref_idpes); if ($obj_endereco_det = $obj_endereco->detalhe()) { $registro['id_cep'] = $obj_endereco_det['cep']->cep; $registro['id_bairro'] = $obj_endereco_det['idbai']->idbai; $registro['id_logradouro'] = $obj_endereco_det['idlog']->idlog; $registro['numero'] = $obj_endereco_det['numero']; $registro['letra'] = $obj_endereco_det['letra']; $registro['complemento'] = $obj_endereco_det['complemento']; $registro['andar'] = $obj_endereco_det['andar']; $registro['apartamento'] = $obj_endereco_det['apartamento']; $registro['bloco'] = $obj_endereco_det['bloco']; $registro['nm_logradouro'] = $obj_endereco_det['logradouro']; $registro['cep_'] = int2CEP($registro['id_cep']); $obj_bairro = new clsBairro($registro['id_bairro']); $obj_bairro_det = $obj_bairro->detalhe(); if ($obj_bairro_det) { $registro['nm_bairro'] = $obj_bairro_det['nome']; } $obj_log = new clsLogradouro($registro['id_logradouro']); $obj_log_det = $obj_log->detalhe(); if ($obj_log_det) { $registro['nm_logradouro'] = $obj_log_det['nome']; $registro['idtlog'] = $obj_log_det['idtlog']->detalhe(); $registro['idtlog'] = $registro['idtlog']['descricao']; $obj_mun = new clsMunicipio($obj_log_det['idmun']); $det_mun = $obj_mun->detalhe(); if ($det_mun) { $registro['cidade'] = ucfirst(strtolower($det_mun['nome'])); } } $obj_bairro = new clsBairro($registro["id_bairro"]); $obj_bairro_det = $obj_bairro->detalhe(); if ($obj_bairro_det) { $registro['nm_bairro'] = $obj_bairro_det['nome']; } } else { $obj_endereco = new clsEnderecoExterno($this->ref_idpes); if ($obj_endereco_det = $obj_endereco->detalhe()) { $registro['id_cep'] = $obj_endereco_det['cep']; $registro['cidade'] = $obj_endereco_det['cidade']; $registro['nm_bairro'] = $obj_endereco_det['bairro']; $registro['nm_logradouro'] = $obj_endereco_det['logradouro']; $registro['numero'] = $obj_endereco_det['numero']; $registro['letra'] = $obj_endereco_det['letra']; $registro['complemento'] = $obj_endereco_det['complemento']; $registro['andar'] = $obj_endereco_det['andar']; $registro['apartamento'] = $obj_endereco_det['apartamento']; $registro['bloco'] = $obj_endereco_det['bloco']; $registro['idtlog'] = $obj_endereco_det['idtlog']->detalhe(); $registro['idtlog'] = $registro['idtlog']['descricao']; $det_uf = $obj_endereco_det['sigla_uf']->detalhe(); $registro['ref_sigla_uf'] = $det_uf['nome']; $registro['cep_'] = int2CEP($registro['id_cep']); } } } // Adiciona a informação de zona de localização junto ao bairro do // endereço. $zona = App_Model_ZonaLocalizacao::getInstance(); $registro['nm_bairro'] = sprintf('%s (Zona %s)', $registro['nm_bairro'], $zona->getValue($obj_endereco_det['zona_localizacao'])); if ($registro['cod_aluno']) { $this->addDetalhe(array('Código Aluno', $registro['cod_aluno'])); } // código inep $alunoMapper = new Educacenso_Model_AlunoDataMapper(); $alunoInep = NULL; try { $alunoInep = $alunoMapper->find(array('aluno' => $this->cod_aluno)); $this->addDetalhe(array('Código inep', $alunoInep->alunoInep)); } catch (Exception $e) { } // código estado $this->addDetalhe(array('Código estado', $registro['aluno_estado_id'])); if ($registro['caminho_foto']) { $this->addDetalhe(array('Foto', sprintf('<img src="arquivos/educar/aluno/small/%s" border="0">', $registro['caminho_foto']))); } if ($registro['nome_aluno']) { if ($caminhoFoto != null and $caminhoFoto != '') { $this->addDetalhe(array('Nome Aluno', $registro['nome_aluno'] . '<p><img height="117" src="' . $caminhoFoto . '"/></p>')); } else { $this->addDetalhe(array('Nome Aluno', $registro['nome_aluno'])); } } if (idFederal2int($registro['cpf'])) { $this->addDetalhe(array('CPF', $registro['cpf'])); } if ($registro['data_nasc']) { $this->addDetalhe(array('Data de Nascimento', $registro['data_nasc'])); } /** * Analfabeto. */ $this->addDetalhe(array('Analfabeto', $registro['analfabeto'] == 0 ? 'Não' : 'Sim')); if ($registro['sexo']) { $this->addDetalhe(array('Sexo', $registro['sexo'])); } if ($registro['ideciv']) { $this->addDetalhe(array('Estado Civil', $registro['ideciv'])); } if ($registro['id_cep']) { $this->addDetalhe(array('CEP', $registro['cep_'])); } if ($registro['ref_sigla_uf']) { $this->addDetalhe(array('UF', $registro['ref_sigla_uf'])); } if ($registro['cidade']) { $this->addDetalhe(array('Cidade', $registro['cidade'])); } if ($registro['nm_bairro']) { $this->addDetalhe(array('Bairro', $registro['nm_bairro'])); } if ($registro['nm_logradouro']) { $logradouro = ''; if ($registro['idtlog']) { $logradouro .= $registro['idtlog'] . ' '; } $logradouro .= $registro['nm_logradouro']; $this->addDetalhe(array('Logradouro', $logradouro)); } if ($registro['numero']) { $this->addDetalhe(array('Número', $registro['numero'])); } if ($registro['letra']) { $this->addDetalhe(array('Letra', $registro['letra'])); } if ($registro['complemento']) { $this->addDetalhe(array('Complemento', $registro['complemento'])); } if ($registro['bloco']) { $this->addDetalhe(array('Bloco', $registro['bloco'])); } if ($registro['andar']) { $this->addDetalhe(array('Andar', $registro['andar'])); } if ($registro['apartamento']) { $this->addDetalhe(array('Apartamento', $registro['apartamento'])); } if ($registro['naturalidade']) { $this->addDetalhe(array('Naturalidade', $registro['naturalidade'])); } if ($registro['nacionalidade']) { $lista_nacionalidade = array('NULL' => 'Selecione', 1 => 'Brasileiro', 2 => 'Naturalizado Brasileiro', 3 => 'Estrangeiro'); $registro['nacionalidade'] = $lista_nacionalidade[$registro['nacionalidade']]; $this->addDetalhe(array('Nacionalidade', $registro['nacionalidade'])); } if ($registro['pais_origem']) { $this->addDetalhe(array('País de Origem', $registro['pais_origem'])); } $responsavel = $tmp_obj->getResponsavelAluno(); if ($responsavel) { $this->addDetalhe(array('Responsável Aluno', $responsavel['nome_responsavel'])); } if ($registro['ref_idpes_responsavel']) { $obj_pessoa_resp = new clsPessoaFj($registro['ref_idpes_responsavel']); $det_pessoa_resp = $obj_pessoa_resp->detalhe(); if ($det_pessoa_resp) { $registro['ref_idpes_responsavel'] = $det_pessoa_resp['nome']; } $this->addDetalhe(array('Responsável', $registro['ref_idpes_responsavel'])); } if ($registro['nm_pai']) { $this->addDetalhe(array('Pai', $registro['nm_pai'])); } if ($registro["nm_mae"]) { $this->addDetalhe(array('Mãe', $registro['nm_mae'])); } if ($registro['fone_1']) { if ($registro['ddd_fone_1']) { $registro['ddd_fone_1'] = sprintf('(%s) ', $registro['ddd_fone_1']); } $this->addDetalhe(array('Telefone 1', $registro['ddd_fone_1'] . $registro['fone_1'])); } if ($registro['fone_2']) { if ($registro['ddd_fone_2']) { $registro['ddd_fone_2'] = sprintf('(%s) ', $registro['ddd_fone_2']); } $this->addDetalhe(array('Telefone 2', $registro['ddd_fone_2'] . $registro['fone_2'])); } if ($registro['fone_mov']) { if ($registro['ddd_mov']) { $registro['ddd_mov'] = sprintf('(%s) ', $registro['ddd_mov']); } $this->addDetalhe(array('Celular', $registro['ddd_mov'] . $registro['fone_mov'])); } if ($registro['fone_fax']) { if ($registro['ddd_fax']) { $registro['ddd_fax'] = sprintf('(%s) ', $registro['ddd_fax']); } $this->addDetalhe(array('Fax', $registro['ddd_fax'] . $registro['fone_fax'])); } if ($registro['email']) { $this->addDetalhe(array('E-mail', $registro['email'])); } if ($registro['url']) { $this->addDetalhe(array('Página Pessoal', $registro['url'])); } if ($registro['ref_cod_aluno_beneficio']) { $obj_beneficio = new clsPmieducarAlunoBeneficio($registro['ref_cod_aluno_beneficio']); $obj_beneficio_det = $obj_beneficio->detalhe(); $this->addDetalhe(array('Benefício', $obj_beneficio_det['nm_beneficio'])); } if ($registro['ref_cod_religiao']) { $obj_religiao = new clsPmieducarReligiao($registro['ref_cod_religiao']); $obj_religiao_det = $obj_religiao->detalhe(); $this->addDetalhe(array('Religião', $obj_religiao_det['nm_religiao'])); } if ($det_raca['nm_raca']) { $this->addDetalhe(array('Raça', $det_raca['nm_raca'])); } if ($deficiencia_pessoa) { $tabela = '<table border="0" width="300" cellpadding="3"><tr bgcolor="#A1B3BD" align="center"><td>Deficiências</td></tr>'; $cor = '#D1DADF'; foreach ($deficiencia_pessoa as $indice => $valor) { $cor = $cor == '#D1DADF' ? '#E4E9ED' : '#D1DADF'; $tabela .= sprintf('<tr bgcolor="%s" align="center"><td>%s</td></tr>', $cor, $valor); } $tabela .= '</table>'; $this->addDetalhe(array('Deficiências', $tabela)); } if ($registro['rg']) { $this->addDetalhe(array('RG', $registro['rg'])); } if ($registro['data_exp_rg']) { $this->addDetalhe(array('Data de Expedição RG', $registro['data_exp_rg'])); } if ($registro['idorg_exp_rg']) { $this->addDetalhe(array('Órgão Expedição RG', $registro['idorg_exp_rg'])); } if ($registro['sigla_uf_exp_rg']) { $this->addDetalhe(array('Estado Expedidor', $registro['sigla_uf_exp_rg'])); } /** * @todo CoreExt_Enum? */ if ($registro['tipo_cert_civil']) { $lista_tipo_cert_civil = array(); $lista_tipo_cert_civil["0"] = 'Selecione'; $lista_tipo_cert_civil[91] = 'Nascimento'; $lista_tipo_cert_civil[92] = 'Casamento'; $this->addDetalhe(array('Tipo Certificado Civil', $registro['tipo_cert_civil'])); } if ($registro['num_termo']) { $this->addDetalhe(array('Termo', $registro['num_termo'])); } if ($registro['num_livro']) { $this->addDetalhe(array('Livro', $registro['num_livro'])); } if ($registro['num_folha']) { $this->addDetalhe(array('Folha', $registro['num_folha'])); } if ($registro['data_emissao_cert_civil']) { $this->addDetalhe(array('Emissão Certidão Civil', $registro['data_emissao_cert_civil'])); } if ($registro['sigla_uf_cert_civil']) { $this->addDetalhe(array('Sigla Certidão Civil', $registro['sigla_uf_cert_civil'])); } if ($registro['cartorio_cert_civil']) { $this->addDetalhe(array('Cartório', $registro['cartorio_cert_civil'])); } if ($registro['num_tit_eleitor']) { $this->addDetalhe(array('Título de Eleitor', $registro['num_tit_eleitor'])); } if ($registro['zona_tit_eleitor']) { $this->addDetalhe(array('Zona', $registro['zona_tit_eleitor'])); } if ($registro['secao_tit_eleitor']) { $this->addDetalhe(array('Seção', $registro['secao_tit_eleitor'])); } // Transporte escolar. $transporteMapper = new Transporte_Model_AlunoDataMapper(); $transporteAluno = NULL; try { $transporteAluno = $transporteMapper->find(array('aluno' => $this->cod_aluno)); } catch (Exception $e) { } $this->addDetalhe(array('Transporte escolar', isset($transporteAluno) && $transporteAluno->responsavel != 'Não utiliza' ? 'Sim' : 'Não')); if ($transporteAluno && $transporteAluno->responsavel != 'Não utiliza') { $this->addDetalhe(array('Responsável transporte', $transporteAluno->responsavel)); } if ($this->obj_permissao->permissao_cadastra(578, $this->pessoa_logada, 7)) { $this->url_novo = '/module/Cadastro/aluno'; $this->url_editar = '/module/Cadastro/aluno?id=' . $registro['cod_aluno']; $this->array_botao = array('Nova matrícula', 'Atualizar Histórico'); $this->array_botao_url_script = array(sprintf('go("educar_matricula_cad.php?ref_cod_aluno=%d");', $registro['cod_aluno']), sprintf('go("educar_historico_escolar_lst.php?ref_cod_aluno=%d");', $registro['cod_aluno'])); } $objFichaMedica = new clsModulesFichaMedicaAluno($this->cod_aluno); $reg = $objFichaMedica->detalhe(); if ($reg) { $this->addDetalhe(array('<span id="fmedica"></span>Altura/metro', $reg['altura'])); if (trim($reg['peso']) != '') { $this->addDetalhe(array('Peso/kg', $reg['peso'])); } if (trim($reg['grupo_sanguineo']) != '') { $this->addDetalhe(array('Grupo sanguíneo', $reg['grupo_sanguineo'])); } if (trim($reg['fator_rh']) != '') { $this->addDetalhe(array('Fator RH', $reg['fator_rh'])); } if (trim($this->sus) != '') { $this->addDetalhe(array('Número do cartão do SUS', $this->sus)); } $this->addDetalhe(array('Possui alergia a algum medicamento', $reg['alergia_medicamento'] == 'S' ? 'Sim' : 'Não')); if (trim($reg['desc_alergia_medicamento']) != '') { $this->addDetalhe(array('Quais', $reg['desc_alergia_medicamento'])); } $this->addDetalhe(array('Possui alergia a algum alimento', $reg['alergia_alimento'] == 'S' ? 'Sim' : 'Não')); if (trim($reg['desc_alergia_alimento']) != '') { $this->addDetalhe(array('Quais', $reg['desc_alergia_alimento'])); } $this->addDetalhe(array('Possui alguma doenca congênita', $reg['doenca_congenita'] == 'S' ? 'Sim' : 'Não')); if (trim($reg['desc_doenca_congenita']) != '') { $this->addDetalhe(array('Quais', $reg['desc_doenca_congenita'])); } $this->addDetalhe(array('É fumante', $reg['fumante'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Já contraiu caxumba', $reg['doenca_caxumba'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Já contraiu sarampo', $reg['doenca_sarampo'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Já contraiu rubeola', $reg['doenca_rubeola'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Já contraiu catapora', $reg['doenca_catapora'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Já contraiu escarlatina', $reg['doenca_escarlatina'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Já contraiu coqueluche', $reg['doenca_coqueluche'] == 'S' ? 'Sim' : 'Não')); if (trim($reg['doenca_outras']) != '') { $this->addDetalhe(array('Outras doenças que o aluno já contraiu', $reg['doenca_outras'])); } $this->addDetalhe(array('Epilético', $reg['epiletico'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Está em tratamento', $reg['epiletico_tratamento'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Hemofílico', $reg['hemofilico'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Hipertenso', $reg['hipertenso'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Asmático', $reg['asmatico'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Diabético', $reg['diabetico'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Depende de insulina', $reg['insulina'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('Faz tratamento médico', $reg['tratamento_medico'] == 'S' ? 'Sim' : 'Não')); if (trim($reg['desc_tratamento_medico']) != '') { $this->addDetalhe(array('Qual', $reg['desc_tratamento_medico'])); } $this->addDetalhe(array('Ingere medicação específica', $reg['medicacao_especifica'] == 'S' ? 'Sim' : 'Não')); if (trim($reg['desc_medicacao_especifica']) != '') { $this->addDetalhe(array('Qual', $reg['desc_medicacao_especifica'])); } $this->addDetalhe(array('Acompanhamento médico ou psicológico', $reg['acomp_medico_psicologico'] == 'S' ? 'Sim' : 'Não')); if (trim($reg['desc_acomp_medico_psicologico']) != '') { $this->addDetalhe(array('Motivo', $reg['desc_acomp_medico_psicologico'])); } $this->addDetalhe(array('Restrição para atividades físicas', $reg['restricao_atividade_fisica'] == 'S' ? 'Sim' : 'Não')); if (trim($reg['desc_restricao_atividade_fisica']) != '') { $this->addDetalhe(array('Qual', $reg['desc_restricao_atividade_fisica'])); } $this->addDetalhe(array('Teve alguma fratura ou trauma', $reg['fratura_trauma'] == 'S' ? 'Sim' : 'Não')); if (trim($reg['desc_fratura_trauma']) != '') { $this->addDetalhe(array('Qual', $reg['desc_fratura_trauma'])); } $this->addDetalhe(array('Tem plano de saúde', $reg['plano_saude'] == 'S' ? 'Sim' : 'Não')); if (trim($reg['desc_plano_saude']) != '') { $this->addDetalhe(array('Qual', $reg['desc_plano_saude'])); } $this->addDetalhe(array('<span id="tr_tit_dados_hospital">Em caso de emergência, levar para hospital ou clínica</span>')); $this->addDetalhe(array('Nome', $reg['hospital_clinica'])); $this->addDetalhe(array('Endereço', $reg['hospital_clinica_endereco'])); $this->addDetalhe(array('Telefone', $reg['hospital_clinica_telefone'])); $this->addDetalhe(array('<span id="tr_tit_dados_responsavel">Em caso de emergência, se não for possível contatar os responsáveis, comunicar</span>')); $this->addDetalhe(array('Nome', $reg['responsavel'])); $this->addDetalhe(array('Parentesco', $reg['responsavel_parentesco'])); $this->addDetalhe(array('Telefone', $reg['responsavel_parentesco_telefone'])); $this->addDetalhe(array('Celular', $reg['responsavel_parentesco_celular'])); } $objUniforme = new clsModulesUniformeAluno($this->cod_aluno); $reg = $objUniforme->detalhe(); if ($reg) { $this->addDetalhe(array('<span id="funiforme"></span>Recebeu uniforme escolar', $reg['recebeu_uniforme'] == 'S' ? 'Sim' : 'Não')); $this->addDetalhe(array('<span class="tit_uniforme">Camiseta</span>')); $this->addDetalhe(array('Quantidade', $reg['quantidade_camiseta'])); $this->addDetalhe(array('Tamanho', $reg['tamanho_camiseta'])); $this->addDetalhe(array('<span class="tit_uniforme">Blusa/Jaqueta</span>')); $this->addDetalhe(array('Quantidade', $reg['quantidade_blusa_jaqueta'])); $this->addDetalhe(array('Tamanho', $reg['tamanho_blusa_jaqueta'])); $this->addDetalhe(array('<span class="tit_uniforme">Bermuda</span>')); $this->addDetalhe(array('Quantidade', $reg['quantidade_bermuda'])); $this->addDetalhe(array('Tamanho', $reg['tamanho_bermuda'])); $this->addDetalhe(array('<span class="tit_uniforme">Calça</span>')); $this->addDetalhe(array('Quantidade', $reg['quantidade_calca'])); $this->addDetalhe(array('Tamanho', $reg['tamanho_calca'])); $this->addDetalhe(array('<span class="tit_uniforme">Saia</span>')); $this->addDetalhe(array('Quantidade', $reg['quantidade_saia'])); $this->addDetalhe(array('Tamanho', $reg['tamanho_saia'])); $this->addDetalhe(array('<span class="tit_uniforme">Calçado</span>')); $this->addDetalhe(array('Quantidade', $reg['quantidade_calcado'])); $this->addDetalhe(array('Tamanho', $reg['tamanho_calcado'])); $this->addDetalhe(array('<span class="tit_uniforme">Meia</span>')); $this->addDetalhe(array('Quantidade', $reg['quantidade_meia'])); $this->addDetalhe(array('Tamanho', $reg['tamanho_meia'])); } $objMoradia = new clsModulesMoradiaAluno($this->cod_aluno); $reg = $objMoradia->detalhe(); if ($reg) { $moradia = ''; switch ($reg['moradia']) { case 'A': $moradia = 'Apartamento'; break; case 'C': $moradia = 'Casa'; switch ($reg['material']) { case 'A': $moradia .= ' de alvenaria'; break; case 'M': $moradia .= ' de madeira'; break; case 'I': $moradia .= ' mista'; break; } break; case 'O': $moradia = 'Outra: ' . $reg['casa_outra']; break; default: $moradia = 'Não informado'; } $this->addDetalhe(array('<span id="fmoradia"></span>Moradia', $moradia)); $situacao; switch ($reg['moradia_situacao']) { case 1: $situacao = 'Alugado'; break; case 2: $situacao = 'Próprio'; break; case 3: $situacao = 'Cedido'; break; case 4: $situacao = 'Financiado'; break; case 5: $situacao = 'Outra'; break; } $this->addDetalhe(array('Situação', $situacao)); $this->addDetalhe(array('Quantidade de quartos', $reg['quartos'])); $this->addDetalhe(array('Quantidade de salas', $reg['sala'])); $this->addDetalhe(array('Quantidade de copas', $reg['copa'])); $this->addDetalhe(array('Quantidade de banheiros', $reg['banheiro'])); $this->addDetalhe(array('Quantidade de garagens', $reg['garagem'])); $this->addDetalhe(array('Possui empregada doméstica', $reg['empregada_domestica'])); $this->addDetalhe(array('Possui automóvel', $reg['automovel'])); $this->addDetalhe(array('Possui motocicleta', $reg['motocicleta'])); $this->addDetalhe(array('Possui computador', $reg['computador'])); $this->addDetalhe(array('Possui geladeira', $reg['geladeira'])); $this->addDetalhe(array('Possui fogão', $reg['fogao'])); $this->addDetalhe(array('Possui máquina de lavar', $reg['maquina_lavar'])); $this->addDetalhe(array('Possui microondas', $reg['microondas'])); $this->addDetalhe(array('Possui vídeo/dvd', $reg['video_dvd'])); $this->addDetalhe(array('Possui televisão', $reg['televisao'])); $this->addDetalhe(array('Possui celular', $reg['celular'])); $this->addDetalhe(array('Possui telefone', $reg['telefone'])); $this->addDetalhe(array('Quantidade de pessoas', $reg['quant_pessoas'])); $this->addDetalhe(array('Renda familiar', 'R$ ' . $reg['renda'])); $this->addDetalhe(array('Possui água encanada', $reg['agua_encanada'])); $this->addDetalhe(array('Possui poço', $reg['poco'])); $this->addDetalhe(array('Possui energia elétrica', $reg['energia'])); $this->addDetalhe(array('Possui tratamento de esgoto', $reg['esgoto'])); $this->addDetalhe(array('Possui fossa', $reg['fossa'])); $this->addDetalhe(array('Possui coleta de lixo', $reg['lixo'])); } $this->url_cancelar = 'educar_aluno_lst.php'; $this->largura = '100%'; $localizacao = new LocalizacaoSistema(); $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "Início", "educar_index.php" => "i-Educar - Escola", "" => "Detalhe do aluno")); $this->enviaLocalizacao($localizacao->montar()); $this->addDetalhe("<input type='hidden' id='escola_id' name='aluno_id' value='{$registro['ref_cod_escola']}' />"); $this->addDetalhe("<input type='hidden' id='aluno_id' name='aluno_id' value='{$registro['cod_aluno']}' />"); // js Portabilis_View_Helper_Application::loadJQueryLib($this); $scripts = array('/modules/Portabilis/Assets/Javascripts/Utils.js', '/modules/Portabilis/Assets/Javascripts/ClientApi.js', '/modules/Cadastro/Assets/Javascripts/AlunoShow.js'); Portabilis_View_Helper_Application::loadJavascript($this, $scripts); $styles = array('/modules/Cadastro/Assets/Stylesheets/Aluno.css'); Portabilis_View_Helper_Application::loadStylesheet($this, $styles); }
function Gerar() { if ($_POST) { foreach ($_POST as $campo => $val) { $this->{$campo} = !$this->{$campo} ? $val : $this->{$campo}; } } $this->campoRotulo("cod_rota", "Código da rota", $this->cod_rota); $this->campoRotulo("descricao", "Rota", $this->descricao); $this->campoQuebra(); if (is_numeric($this->cod_rota) && !$_POST) { $obj = new clsModulesItinerarioTransporteEscolar(); $obj->setOrderby(" seq ASC"); $registros = $obj->lista(null, $this->cod_rota); $qtd_pontos = 0; if ($registros) { foreach ($registros as $campo) { $this->pontos[$qtd_pontos][] = $campo["ref_cod_ponto_transporte_escolar"] . ' - ' . $campo["descricao"]; $this->pontos[$qtd_pontos][] = $campo["hora"]; $this->pontos[$qtd_pontos][] = $campo["tipo"]; $this->pontos[$qtd_pontos][] = $campo["ref_cod_veiculo"] . ' - ' . $campo["nome_onibus"]; $qtd_pontos++; } } } $this->campoTabelaInicio("pontos", "Itinerário", array("Ponto (Requer pré-cadastro)<br/> <spam style=\" font-weight: normal; font-size: 10px;\">Digite o código ou nome do ponto e selecione o desejado</spam>", "Hora", "Tipo", "Veículo (Requer pré-cadastro)<br/> <spam style=\" font-weight: normal; font-size: 10px;\">Digite o código, nome ou placa do veículo e selecione o desejado</spam>"), $this->pontos); $this->campoTexto("ref_cod_ponto_transporte_escolar", "Ponto (Requer pré-cadastro)", $this->ref_cod_ponto_transporte_escolar, 50, 255, false, true, false, '', '', '', 'onfocus'); $this->campoHora("hora", "Hora", $this->hora); $this->campoLista("tipo", "Tipo", array('' => "Selecione", 'I' => 'Ida', 'V' => 'Volta'), $this->tipo); $this->campoTexto("ref_cod_veiculo", "Veículo", $this->ref_cod_veiculo, 50, 255, false, false, false, '', '', '', 'onfocus'); $this->campoTabelaFim(); $this->campoQuebra(); $style = "/modules/Portabilis/Assets/Stylesheets/Frontend.css"; Portabilis_View_Helper_Application::loadStylesheet($this, $style); Portabilis_View_Helper_Application::loadJQueryLib($this); Portabilis_View_Helper_Application::loadJQueryUiLib($this); Portabilis_View_Helper_Application::loadJavascript($this, array('/modules/Portabilis/Assets/Javascripts/Utils.js', '/modules/Portabilis/Assets/Javascripts/Frontend/Inputs/SimpleSearch.js', '/modules/Portabilis/Assets/Javascripts/Validator.js')); $this->addBotao('Excluir todos', "transporte_itinerario_del.php?cod_rota={$this->cod_rota}"); }
function Gerar() { if ($_POST) { foreach ($_POST as $campo => $val) { $this->{$campo} = !$this->{$campo} ? $val : $this->{$campo}; } } // primary keys $this->campoOculto("ref_cod_aluno", $this->ref_cod_aluno); $this->campoOculto("sequencial", $this->sequencial); $obj_aluno = new clsPmieducarAluno(); $lst_aluno = $obj_aluno->lista($this->ref_cod_aluno, null, null, null, null, null, null, null, null, null, 1); if (is_array($lst_aluno)) { $det_aluno = array_shift($lst_aluno); $this->nm_aluno = $det_aluno["nome_aluno"]; $this->campoRotulo("nm_aluno", "Aluno", $this->nm_aluno); } //$obj_permissoes = new clsPermissoes(); //$this->ref_cod_instituicao = $obj_permissoes->getInstituicao( $this->pessoa_logada ); //$this->campoOculto( 'ref_cod_instituicao', $this->ref_cod_instituicao ); $obj_nivel = new clsPmieducarUsuario($this->pessoa_logada); $nivel_usuario = $obj_nivel->detalhe(); if ($nivel_usuario['ref_cod_tipo_usuario'] == 1) { $obj_instituicao = new clsPmieducarInstituicao(); $lista = $obj_instituicao->lista(null, null, null, null, null, null, null, null, null, null, null, null, null, 1); $opcoes["1"] = "Selecione"; if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { $opcoes["{$registro['cod_instituicao']}"] = "{$registro['nm_instituicao']}"; } } $this->campoLista("ref_cod_instituicao", "Instituição", $opcoes, ""); } else { $obj_instituicao = new clsPmieducarInstituicao($nivel_usuario['ref_cod_instituicao']); $inst = $obj_instituicao->detalhe(); $this->campoOculto("ref_cod_instituicao", $inst['cod_instituicao']); $this->campoTexto("instituicao", "Instiuição", $inst['nm_instituicao'], 30, 255, false, false, false, "", "", "", "", true); } // text $this->campoTexto("escola", "Escola", $this->escola, 30, 255, true); $this->campoTexto("escola_cidade", "Cidade da Escola", $this->escola_cidade, 30, 255, true); $det_uf[] = array(); if ($this->escola_uf) { //busca pais do estado $obj_uf = new clsUf($this->escola_uf); $det_uf = $obj_uf->detalhe(); } $lista_pais_origem = array('45' => "País da escola"); $obj_pais = new clsPais(); $obj_pais_lista = $obj_pais->lista(null, null, null, "", "", "nome asc"); if ($obj_pais_lista) { foreach ($obj_pais_lista as $key => $pais) { $lista_pais_origem[$pais["idpais"]] = $pais["nome"]; } } $this->campoLista("idpais", "País da Escola", $lista_pais_origem, $det_uf['int_idpais']); $obj_uf = new clsUf(); $lista_uf = $obj_uf->lista(false, false, $det_uf['int_idpais'], false, false, "sigla_uf"); $lista_estado = array("SC" => "Selecione um país"); if ($lista_uf) { foreach ($lista_uf as $uf) { $lista_estado[$uf['sigla_uf']] = $uf['sigla_uf']; } } $this->campoLista("escola_uf", "Estado da Escola", $lista_estado, $this->escola_uf); $this->campoTexto("nm_curso", "Curso", $this->nm_curso, 30, 255, false); $opcoesGradeCurso = getOpcoesGradeCurso(); $this->campoLista("historico_grade_curso_id", "Grade curso", $opcoesGradeCurso, $this->historico_grade_curso_id); $this->campoTexto("nm_serie", "Série", $this->nm_serie, 30, 255, true); $this->campoNumero("ano", "Ano", $this->ano, 4, 4, true); $this->campoMonetario("carga_horaria", "Carga Horária", $this->carga_horaria, 8, 8, true); $this->campoCheck("cb_faltas_globalizadas", "Faltas Globalizadas", is_numeric($this->faltas_globalizadas) ? 'on' : ''); $this->campoNumero("faltas_globalizadas", "Faltas Globalizadas", $this->faltas_globalizadas, 4, 4, false); $this->campoNumero("dias_letivos", "Dias Letivos", $this->dias_letivos, 3, 3, true); $this->campoMonetario("frequencia", "Frequência", $this->frequencia, 8, 6, true); $this->campoCheck("extra_curricular", "Extra-Curricular", $this->extra_curricular); $this->campoCheck("aceleracao", "Aceleração", $this->aceleracao); $this->campoMemo("observacao", "Observação", $this->observacao, 60, 5, false); $opcoes = array("" => "Selecione", 1 => "Aprovado", 2 => "Reprovado", 3 => "Em Andamento", 4 => "Transferido"); $this->campoLista("aprovado", "Situação", $opcoes, $this->aprovado); $this->campoTexto("registro", "Registro (arquivo)", $this->registro, 30, 50, false); $this->campoTexto("livro", "Livro", $this->livro, 30, 50, false); $this->campoTexto("folha", "Folha", $this->folha, 30, 50, false); //---------------------INCLUI DISCIPLINAS---------------------// $this->campoQuebra(); //if ( $_POST["historico_disciplinas"] ) //$this->historico_disciplinas = unserialize( urldecode( $_POST["historico_disciplinas"] ) ); //$qtd_disciplinas = ( count( $this->historico_disciplinas ) == 0 ) ? 1 : ( count( $this->historico_disciplinas ) + 1); if (is_numeric($this->ref_cod_aluno) && is_numeric($this->sequencial) && !$_POST) { $obj = new clsPmieducarHistoricoDisciplinas(); $obj->setOrderby("nm_disciplina ASC"); $registros = $obj->lista(null, $this->ref_cod_aluno, $this->sequencial); $qtd_disciplinas = 0; if ($registros) { foreach ($registros as $campo) { $this->historico_disciplinas[$qtd_disciplinas][] = $campo["nm_disciplina"]; $this->historico_disciplinas[$qtd_disciplinas][] = $campo["nota"]; $this->historico_disciplinas[$qtd_disciplinas][] = $campo["faltas"]; $this->historico_disciplinas[$qtd_disciplinas][] = $campo["sequencial"]; $qtd_disciplinas++; } } } $this->campoTabelaInicio("notas", "Notas", array("Disciplina", "Nota", "Faltas"), $this->historico_disciplinas); //$this->campoTexto( "nm_disciplina", "Disciplina", $this->nm_disciplina, 30, 255, false, false, false, '', '', 'autoCompleteComponentesCurricular(this)', 'onfocus' ); $this->campoTexto("nm_disciplina", "Disciplina", $this->nm_disciplina, 30, 255, false, false, false, '', '', '', 'onfocus'); $this->campoTexto("nota", "Nota", $this->nota, 10, 255, false); $this->campoNumero("faltas", "Faltas", $this->faltas, 3, 3, false); //$this->campoOculto("sequencial",""); $this->campoTabelaFim(); //$this->campoOculto("ultimo_sequencial","$qtd_disciplinas"); $this->campoQuebra(); //---------------------FIM INCLUI DISCIPLINAS---------------------// // carrega estilo para feedback messages, para exibir msg validação frequencia. $style = "/modules/Portabilis/Assets/Stylesheets/Frontend.css"; Portabilis_View_Helper_Application::loadStylesheet($this, $style); Portabilis_View_Helper_Application::loadJQueryLib($this); Portabilis_View_Helper_Application::loadJQueryUiLib($this); Portabilis_View_Helper_Application::loadJavascript($this, array('/modules/Portabilis/Assets/Javascripts/Utils.js', '/modules/Portabilis/Assets/Javascripts/Frontend/Inputs/SimpleSearch.js', '/modules/Portabilis/Assets/Javascripts/Validator.js')); }
public static function embedJavascriptToFixupFieldsWidth($viewInstance) { Portabilis_View_Helper_Application::loadJQueryLib($viewInstance); Portabilis_View_Helper_Application::loadJavascript($viewInstance, '/modules/Portabilis/Assets/Javascripts/Utils.js'); Portabilis_View_Helper_Application::embedJavascript($viewInstance, 'fixupFieldsWidth();', $afterReady = true); }
protected function loadAssets() { Portabilis_View_Helper_Application::loadJQueryLib($this); Portabilis_View_Helper_Application::loadJQueryFormLib($this); $styles = array('/modules/Portabilis/Assets/Stylesheets/Frontend.css', '/modules/Portabilis/Assets/Stylesheets/Frontend/Resource.css', 'styles/localizacaoSistema.css'); Portabilis_View_Helper_Application::loadStylesheet($this, $styles); $scripts = array('/modules/Portabilis/Assets/Javascripts/ClientApi.js', '/modules/Portabilis/Assets/Javascripts/Validator.js', '/modules/Portabilis/Assets/Javascripts/Utils.js'); if (!$this->backwardCompatibility) { $scripts[] = '/modules/Portabilis/Assets/Javascripts/Frontend/Resource.js'; } Portabilis_View_Helper_Application::loadJavascript($this, $scripts); }
public function biblioteca($options = array()) { if ($this->hasNivelAcesso('POLI_INSTITUCIONAL') || $this->hasNivelAcesso('INSTITUCIONAL')) { $this->selectInput($options); } elseif ($this->hasNivelAcesso('SOMENTE_ESCOLA') || $this->hasNivelAcesso('SOMENTE_BIBLIOTECA')) { $this->stringInput($options); } Portabilis_View_Helper_Application::loadJavascript($this->viewInstance, '/modules/DynamicInput/Assets/Javascripts/Biblioteca.js'); }
function Gerar() { // js Portabilis_View_Helper_Application::loadJQueryLib($this); $scripts = array('/modules/Portabilis/Assets/Javascripts/Utils.js', '/modules/Portabilis/Assets/Javascripts/ClientApi.js', '/modules/Cadastro/Assets/Javascripts/Escola.js'); Portabilis_View_Helper_Application::loadJavascript($this, $scripts); $obj_permissoes = new clsPermissoes(); // echo "<pre>";print_r($_POST);die; if (!$this->sem_cnpj && !$this->com_cnpj) { $parametros = new clsParametrosPesquisas(); $parametros->setSubmit(1); $parametros->setPessoa('J'); $parametros->setPessoaCampo('sem_cnpj'); $parametros->setPessoaNovo("S"); $parametros->setPessoaCPF("N"); $parametros->setPessoaTela('window'); $this->campoOculto("sem_cnpj", ""); $parametros->setCodSistema(13); $parametros->adicionaCampoTexto("cnpj", "cnpj"); $this->campoCnpjPesq("cnpj", "CNPJ", $this->cnpj, "pesquisa_pessoa_lst.php", $parametros->serializaCampos(), true); // $this->acao_enviar = "obj = document.getElementById(\"cnpj\");if(obj.value != \"\" ) {document.getElementById(\"formcadastro\").submit(); } else { acao(); }"; $this->acao_enviar = false; $this->url_cancelar = false; $this->array_botao = array("Continuar", "Cancelar"); $this->array_botao_url_script = array("obj = document.getElementById('cnpj');if(obj.value != '' ) { acao(); } else { acao(); }", "go('educar_escola_lst.php');"); } else { $this->inputsHelper()->integer('escola_inep_id', array('label' => 'Código inep', 'required' => false, 'max_length' => 14)); if ($_POST) { foreach ($_POST as $campo => $val) { if ($campo != 'tipoacao' && $campo != 'sem_cnpj') { $this->{$campo} = $this->{$campo} ? $this->{$campo} : $val; } } } if ($this->sem_cnpj) { $this->campoOculto("sem_cnpj", $this->sem_cnpj); // cadastro novo sem CNPJ $this->p_ddd_telefone_1 = $this->p_ddd_telefone_1 == null ? "" : $this->p_ddd_telefone_1; $this->p_ddd_telefone_fax = $this->p_ddd_telefone_fax == null ? "" : $this->p_ddd_telefone_fax; if ($this->ref_idpes) { $objTemp = new clsPessoaJuridica($this->ref_idpes); $detalhe = $objTemp->detalhe(); } // $this->campoOculto( "passo", 4 ); // $this->campoOculto( "sem_cnpj", 0 ); $this->campoOculto("cod_escola", $this->cod_escola); // text $this->campoTexto("fantasia", "Escola", $this->fantasia, 30, 255, true); $this->campoTexto("sigla", "Sigla", $this->sigla, 30, 255, true); // foreign keys $nivel = $obj_permissoes->nivel_acesso($this->pessoa_logada); if ($nivel == 1) { $cabecalhos[] = "Instituicao"; $objInstituicao = new clsPmieducarInstituicao(); $opcoes = array("" => "Selecione"); $objInstituicao->setOrderby("nm_instituicao ASC"); $lista = $objInstituicao->lista(); if (is_array($lista)) { foreach ($lista as $linha) { $opcoes[$linha["cod_instituicao"]] = $linha["nm_instituicao"]; } } $this->campoLista("ref_cod_instituicao", "Instituição", $opcoes, $this->ref_cod_instituicao); } else { $this->ref_cod_instituicao = $obj_permissoes->getInstituicao($this->pessoa_logada); if ($this->ref_cod_instituicao) { $this->campoOculto("ref_cod_instituicao", $this->ref_cod_instituicao); } else { die("Usu�rio n�o � do nivel poli-institucional e n�o possui uma institui��o"); } } $opcoes = array("" => "Selecione"); if (class_exists("clsPmieducarEscolaRedeEnsino")) { /*$todas_redes_ensino = "rede_ensino = new Array();\n"; $objTemp = new clsPmieducarEscolaRedeEnsino(); $lista = $objTemp->lista(); if ( is_array( $lista ) && count( $lista ) ) { foreach ( $lista as $registro ) { $todas_redes_ensino .= "rede_ensino[rede_ensino.length] = new Array( {$registro["cod_escola_rede_ensino"]}, '{$registro['nm_rede']}', {$registro["ref_cod_instituicao"]} );\n"; } } echo "<script>{$todas_redes_ensino}</script>";*/ // EDITAR $script = "javascript:showExpansivelIframe(520, 120, 'educar_escola_rede_ensino_cad_pop.php');"; if ($this->ref_cod_instituicao) { $objTemp = new clsPmieducarEscolaRedeEnsino(); $lista = $objTemp->lista(null, null, null, null, null, null, null, null, 1, $this->ref_cod_instituicao); if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { $opcoes["{$registro['cod_escola_rede_ensino']}"] = "{$registro['nm_rede']}"; } } $script = "<img id='img_rede_ensino' style='display: \\'\\'' src='imagens/banco_imagens/escreve.gif' style='cursor:hand; cursor:pointer;' border='0' onclick=\"{$script}\">"; } else { $script = "<img id='img_rede_ensino' style='display: none;' src='imagens/banco_imagens/escreve.gif' style='cursor:hand; cursor:pointer;' border='0' onclick=\"{$script}\">"; } } else { echo "<!--\nErro\nClasse clsPmieducarEscolaRedeEnsino nao encontrada\n-->"; $opcoes = array("" => "Erro na geracao"); } $this->campoLista("ref_cod_escola_rede_ensino", "Rede Ensino", $opcoes, $this->ref_cod_escola_rede_ensino, "", false, "", $script); $opcoes = array("" => "Selecione"); if (class_exists("clsPmieducarEscolaLocalizacao")) { /*$todas_escolas_localizacao = "escola_localizacao = new Array();\n"; $objTemp = new clsPmieducarEscolaLocalizacao(); $lista = $objTemp->lista(); if ( is_array( $lista ) && count( $lista ) ) { foreach ( $lista as $registro ) { $todas_escolas_localizacao .= "escola_localizacao[escola_localizacao.length] = new Array( {$registro["cod_escola_localizacao"]}, '{$registro['nm_localizacao']}', {$registro["ref_cod_instituicao"]} );\n"; } } echo "<script>{$todas_escolas_localizacao}</script>";*/ // EDITAR $script = "javascript:showExpansivelIframe(520, 120, 'educar_escola_localizacao_cad_pop.php');"; if ($this->ref_cod_instituicao) { $objTemp = new clsPmieducarEscolaLocalizacao(); $lista = $objTemp->lista(null, null, null, null, null, null, null, null, 1, $this->ref_cod_instituicao); if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { $opcoes["{$registro['cod_escola_localizacao']}"] = "{$registro['nm_localizacao']}"; } } $script = "<img id='img_localizacao' style='display: \\'\\'' src='imagens/banco_imagens/escreve.gif' style='cursor:hand; cursor:pointer;' border='0' onclick=\"{$script}\">"; } else { $script = "<img id='img_localizacao' style='display: none;' src='imagens/banco_imagens/escreve.gif' style='cursor:hand; cursor:pointer;' border='0' onclick=\"{$script}\">"; } } else { echo "<!--\nErro\nClasse clsPmieducarEscolaLocalizacao nao encontrada\n-->"; $opcoes = array("" => "Erro na geracao"); } $this->campoLista("ref_cod_escola_localizacao", "Escola Localização", $opcoes, $this->ref_cod_escola_localizacao, "", false, "", $script); if (is_numeric($this->cep)) { $this->cep = int2CEP($this->cep); } // $this->campoCep( "cep","CEP", $this->cep,true,"-",false,false ); $this->campoCep("cep", "CEP", $this->cep, true, "-", false, false); $this->campoTexto("cidade", "Cidade", $this->cidade, "50", "255", true); $this->campoTexto("bairro", "Bairro", $this->bairro, "50", "20", true); $this->campoTexto("logradouro", "Logradouro", $this->logradouro, "50", "255", true); $this->campoTexto("complemento", "Complemento", $this->complemento, "22", "20", false); $this->campoNumero("numero", "Número", $this->numero, "6", "6", true); $this->campoTexto("p_ddd_telefone_1", "DDD Telefone 1", $this->p_ddd_telefone_1, "2", "2", false); $this->campoTexto("p_telefone_1", "Telefone 1", $this->p_telefone_1, "10", "15", false); $this->campoTexto("p_ddd_telefone_fax", "DDD Fax", $this->p_ddd_telefone_fax, "2", "2", false); $this->campoTexto("p_telefone_fax", "Fax", $this->p_telefone_fax, "10", "15", false); $this->campoTexto("p_email", "E-mail", $this->p_email, "50", "255", false); } if ($this->com_cnpj) { $this->campoOculto("com_cnpj", $this->com_cnpj); // die("com CNPJ"); // echo "<br>cep: ".$this->cep; // echo "<br>cep_: ".$this->cep_; if (!$this->cod_escola) { $this->cnpj = urldecode($_POST['cnpj']); $this->cnpj = idFederal2int($this->cnpj); // echo int2IdFederal($this->cnpj); $this->cnpj = int2IdFederal($this->cnpj); } // echo "sakdmk: ".$this->cnpj;die; // cadastro novo com CNPJ //echo "hehehe".idFederal2int($this->cnpj);echo "kiki".int2IdFederal($this->cnpj);die; $objJuridica = new clsPessoaJuridica(false, idFederal2int($this->cnpj)); $det = $objJuridica->detalhe(); $this->ref_idpes = $det["idpes"]; // if( $this->ref_idpes ) // { // $this->p_ddd_telefone_1 = ( $this->p_ddd_telefone_1 == null ) ? "": is_numeric( $this->p_ddd_telefone_1 ); // $this->p_ddd_telefone_2 = ( $this->p_ddd_telefone_2 == null ) ? "": is_numeric( $this->p_ddd_telefone_2 ); // $this->p_ddd_telefone_3 = ( $this->p_ddd_telefone_3 == null ) ? "": is_numeric( $this->p_ddd_telefone_3 ); // $obj_pessoa = new clsPessoa_( $this->ref_idpes ); // $det_pessoa = $obj_pessoa->detalhe(); //$this->fantasia = $det_pessoa["nome"]; // $this->nm_escola = $det["nome"]; if (!$this->fantasia) { $this->fantasia = $det["fantasia"]; } if ($this->passou) { $this->cnpj = is_numeric($this->cnpj) ? $this->cnpj : idFederal2int($this->cnpj); $this->cnpj = int2IdFederal($this->cnpj); } // $this->campoRotulo("cnpj_", "CNPJ", $this->cnpj); $this->campoOculto("cnpj", idFederal2int($this->cnpj)); $this->campoOculto("ref_idpes", $this->ref_idpes); // $this->campoOculto( "passo", 3 ); $this->campoOculto("cod_escola", $this->cod_escola); // text $this->campoTexto("fantasia", "Escola", $this->fantasia, 30, 255, true); $this->campoTexto("sigla", "Sigla", $this->sigla, 30, 20, true); // foreign keys $nivel = $obj_permissoes->nivel_acesso($this->pessoa_logada); if ($nivel == 1) { $cabecalhos[] = "Instituicao"; $objInstituicao = new clsPmieducarInstituicao(); $opcoes = array("" => "Selecione"); $objInstituicao->setOrderby("nm_instituicao ASC"); $lista = $objInstituicao->lista(); if (is_array($lista)) { foreach ($lista as $linha) { $opcoes[$linha["cod_instituicao"]] = $linha["nm_instituicao"]; } } $this->campoLista("ref_cod_instituicao", "Instituicao", $opcoes, $this->ref_cod_instituicao); } else { $this->ref_cod_instituicao = $obj_permissoes->getInstituicao($this->pessoa_logada); if ($this->ref_cod_instituicao) { $this->campoOculto("ref_cod_instituicao", $this->ref_cod_instituicao); } else { die("Usu�rio n�o � do nivel poli-institucional e n�o possui uma institui��o"); } } $opcoes = array("" => "Selecione"); if (class_exists("clsPmieducarEscolaRedeEnsino")) { /*$todas_redes_ensino = "rede_ensino = new Array();\n"; $objTemp = new clsPmieducarEscolaRedeEnsino(); $lista = $objTemp->lista( null,null,null,null,null,null,null,null,1 ); if ( is_array( $lista ) && count( $lista ) ) { foreach ( $lista as $registro ) { $todas_redes_ensino .= "rede_ensino[rede_ensino.length] = new Array( {$registro["cod_escola_rede_ensino"]}, '{$registro['nm_rede']}', {$registro["ref_cod_instituicao"]} );\n"; } } echo "<script>{$todas_redes_ensino}</script>";*/ // EDITAR $script = "javascript:showExpansivelIframe(520, 120, 'educar_escola_rede_ensino_cad_pop.php');"; if ($this->ref_cod_instituicao) { $objTemp = new clsPmieducarEscolaRedeEnsino(); $lista = $objTemp->lista(null, null, null, null, null, null, null, null, 1, $this->ref_cod_instituicao); if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { $opcoes["{$registro['cod_escola_rede_ensino']}"] = "{$registro['nm_rede']}"; } } $script = "<img id='img_rede_ensino' style='display:\\'\\'' src='imagens/banco_imagens/escreve.gif' style='cursor:hand; cursor:pointer;' border='0' onclick=\"{$script}\">"; } else { $script = "<img id='img_rede_ensino' style='display: none;' src='imagens/banco_imagens/escreve.gif' style='cursor:hand; cursor:pointer;' border='0' onclick=\"{$script}\">"; } } else { echo "<!--\nErro\nClasse clsPmieducarEscolaRedeEnsino nao encontrada\n-->"; $opcoes = array("" => "Erro na geracao"); } $this->campoLista("ref_cod_escola_rede_ensino", "Rede Ensino", $opcoes, $this->ref_cod_escola_rede_ensino, "", false, "", $script); $opcoes = array("" => "Selecione"); if (class_exists("clsPmieducarEscolaLocalizacao")) { /*$todas_escolas_localizacao = "escola_localizacao = new Array();\n"; $objTemp = new clsPmieducarEscolaLocalizacao(); $lista = $objTemp->lista( null,null,null,null,null,null,null,null,1 ); if ( is_array( $lista ) && count( $lista ) ) { foreach ( $lista as $registro ) { $todas_escolas_localizacao .= "escola_localizacao[escola_localizacao.length] = new Array( {$registro["cod_escola_localizacao"]}, '{$registro['nm_localizacao']}', {$registro["ref_cod_instituicao"]} );\n"; } } echo "<script>{$todas_escolas_localizacao}</script>";*/ // EDITAR $script = "javascript:showExpansivelIframe(520, 120, 'educar_escola_localizacao_cad_pop.php');"; if ($this->ref_cod_instituicao) { $objTemp = new clsPmieducarEscolaLocalizacao(); $lista = $objTemp->lista(null, null, null, null, null, null, null, null, 1, $this->ref_cod_instituicao); if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { $opcoes["{$registro['cod_escola_localizacao']}"] = "{$registro['nm_localizacao']}"; } } $script = "<img id='img_localizacao' style='display:\\'\\'' src='imagens/banco_imagens/escreve.gif' style='cursor:hand; cursor:pointer;' border='0' onclick=\"{$script}\">"; } else { $script = "<img id='img_localizacao' style='display: none;' src='imagens/banco_imagens/escreve.gif' style='cursor:hand; cursor:pointer;' border='0' onclick=\"{$script}\">"; } } else { echo "<!--\nErro\nClasse clsPmieducarEscolaLocalizacao nao encontrada\n-->"; $opcoes = array("" => "Erro na geracao"); } $this->campoLista("ref_cod_escola_localizacao", "Escola Localização", $opcoes, $this->ref_cod_escola_localizacao, "", false, "", $script); // Detalhes do Endereco $objUf = new clsUf(); $listauf = $objUf->lista(); $listaEstado = array("" => "Selecione"); if ($listauf) { foreach ($listauf as $uf) { $listaEstado[$uf['sigla_uf']] = $uf['sigla_uf']; } } $objTipoLog = new clsTipoLogradouro(); $listaTipoLog = $objTipoLog->lista(); $listaTLog = array("" => "Selecione"); if ($listaTipoLog) { foreach ($listaTipoLog as $tipoLog) { $listaTLog[urldecode($tipoLog['idtlog'])] = $tipoLog['descricao']; } } $this->campoOculto("isEnderecoExterno", $this->isEnderecoExterno); // echo "$this->cep ,$this->sigla_uf "; $this->campoOculto("cep_", $this->cep_); $this->campoOculto("sigla_uf_", $this->sigla_uf_); $this->campoOculto("cidade_", $this->cidade_); $this->campoOculto("bairro_", $this->bairro_); $this->campoOculto("idbai", $this->idbai); $this->campoOculto("logradouro_", $this->logradouro_); $this->campoOculto("idlog", $this->idlog); $this->campoOculto("idtlog_", $this->idtlog_); $disabled = $this->isEnderecoExterno ? false : true; if ($this->idlog && $this->idbai && $this->cep && $this->ref_idpes) { $this->campoOculto("cep_", $this->cep); $this->cep_ = int2CEP($this->cep); //$this->campoLista( "ref_cod_escola_localizacao", "Escola Localizacão", $opcoes, $this->ref_cod_escola_localizacao ); // $this->campoCep("cep_","CEP", int2CEP($this->cep),true,"-"," <img src=\"imagens/lupa.png\" border=\"0\" onclick=\"pesquisa_valores_f('pesquisa_cep3.php', 'enderecos')\" style=\"cursor: hand;\">",true); // $this->campoCep( "cep_", "CEP", int2CEP( $this->cep ), true, "-", " <img src=\"imagens/lupa.png\" border=\"0\" onclick=\"pesquisa_valores_f( 'pesquisa_cep_lst.php', 'enderecos' )\" style=\"cursor: hand;\">", false ); //$this->campoCep( "cep", "CEP", int2CEP( $this->cep ), true, "-", " <img src=\"imagens/lupa.png\" border=\"0\" onclick=\"pesquisa_valores_popless('pesquisa_cep_lst.php', 'enderecos')\" style=\"cursor: hand;\">", true ); $this->campoCep("cep", "CEP", $this->cep_, true, "-", "<img id='lupa' src=\"imagens/lupa.png\" border=\"0\" onclick=\"showExpansivel( 500,500, '<iframe name=\\'miolo\\' id=\\'miolo\\' frameborder=\\'0\\' height=\\'100%\\' width=\\'500\\' marginheight=\\'0\\' marginwidth=\\'0\\' src=\\'educar_pesquisa_cep_log_bairro.php?campo1=bairro&campo2=idbai&campo3=cep_&campo4=logradouro&campo5=idlog&campo6=sigla_uf_&campo7=cidade&campo8=idtlog_&campo9=isEnderecoExterno&campo10=cep&campo11=sigla_uf&campo12=idtlog&campo13=cidade_\\'></iframe>');\">", $disabled); $this->campoLista("sigla_uf", "Estado", $listaEstado, $this->sigla_uf, false, false, false, false, true, true); $this->campoTexto("cidade", "Cidade", $this->cidade, "50", "255", true, false, false, "", "", "", "onKeyUp", true); $this->campoTexto("bairro", "Bairro", $this->bairro, "50", "255", true, false, false, "", "", "", "onKeyUp", true); $this->campoLista("idtlog", "Tipo Logradouro", $listaTLog, $this->idtlog, false, false, false, false, true, true); $this->campoTexto("logradouro", "Logradouro", $this->logradouro, "50", "255", true, false, false, "", "", "", "onKeyUp", true); $this->campoTexto("complemento", "Complemento", $this->complemento, "22", "20", false, false); $this->campoNumero("numero", "Número", $this->numero, "6", "6", false); $this->campoNumero("andar", "Andar", $this->andar, "2", "2", false); } elseif ($this->ref_idpes && $this->cep) { $this->cep = is_numeric($this->cep) ? int2CEP($this->cep) : $this->cep; // $this->campoCep("cep_","CEP", int2CEP($this->cep),true,"-"," <img src=\"imagens/lupa.png\" border=\"0\" onclick=\"pesquisa_valores_f('pesquisa_cep3.php', 'enderecos')\" style=\"cursor: hand;\">",false); // $this->campoCep( "cep_", "CEP", int2CEP( $this->cep ), true, "-", " <img src=\"imagens/lupa.png\" border=\"0\" onclick=\"pesquisa_valores_f( 'pesquisa_cep_lst.php', 'enderecos' )\" style=\"cursor: hand;\">", false ); //$this->campoCep( "cep", "CEP", int2CEP( $this->cep ), true, "-", " <img src=\"imagens/lupa.png\" border=\"0\" onclick=\"pesquisa_valores_popless('pesquisa_cep_lst.php', 'enderecos')\" style=\"cursor: hand;\">", false ); $this->campoCep("cep", "CEP", $this->cep, true, "-", "<img id='lupa' src=\"imagens/lupa.png\" border=\"0\" onclick=\"showExpansivel( 500,500, '<iframe name=\\'miolo\\' id=\\'miolo\\' frameborder=\\'0\\' height=\\'100%\\' width=\\'500\\' marginheight=\\'0\\' marginwidth=\\'0\\' src=\\'educar_pesquisa_cep_log_bairro.php?campo1=bairro&campo2=idbai&campo3=cep_&campo4=logradouro&campo5=idlog&campo6=sigla_uf_&campo7=cidade&campo8=idtlog_&campo9=isEnderecoExterno&campo10=cep&campo11=sigla_uf&campo12=idtlog&campo13=cidade_\\'></iframe>');\">"); $this->campoLista("sigla_uf", "Estado", $listaEstado, $this->sigla_uf, "", false, "", "", false, true); $this->campoTexto("cidade", "Cidade", $this->cidade, "50", "255", true, false, false, "", "", "", "onKeyUp", false); $this->campoTexto("bairro", "Bairro", $this->bairro, "50", "255", true, false, false, "", "", "", "onKeyUp", false); $this->campoLista("idtlog", "Tipo Logradouro", $listaTLog, $this->idtlog, "", false, "", "", false, true); $this->campoTexto("logradouro", "Logradouro", $this->logradouro, "50", "255", true, false, false, "", "", "", "onKeyUp", false); $this->campoTexto("complemento", "Complemento", $this->complemento, "22", "20", false, false, false, "", "", "", "onKeyUp", false); $this->campoNumero("numero", "Número", $this->numero, 6, 6, false, "", ""); $this->campoNumero("andar", "Andar", $this->andar, "2", "2", false); } else { if (!$this->isEnderecoExterno) { $obj_bairro = new clsBairro($this->idbai); $this->cep_ = int2CEP($this->cep_); $obj_bairro_det = $obj_bairro->detalhe(); if ($obj_bairro_det) { $this->bairro = $obj_bairro_det["nome"]; } $obj_log = new clsLogradouro($this->idlog); $obj_log_det = $obj_log->detalhe(); if ($obj_log_det) { $this->logradouro = $obj_log_det["nome"]; $this->idtlog = $obj_log_det["idtlog"]->idtlog; $obj_mun = new clsMunicipio($obj_log_det["idmun"]); $det_mun = $obj_mun->detalhe(); if ($det_mun) { $this->cidade = strtoupper(ucfirst(strtolower($det_mun["nome"]))); } $this->sigla_uf = $this->sigla_uf_ = $det_mun['sigla_uf']->sigla_uf; } } else { $this->cep_ = $this->cep; } /*$obj_bairro = new clsBairro($obj_endereco_det["ref_idbai"]); $obj_bairro_det = $obj_bairro->detalhe(); if($obj_bairro_det){ $this->bairro = $obj_bairro_det["nome"]; }*/ // $this->campoCep("cep_","CEP", int2CEP($this->cep),true,"-"," <img src=\"imagens/lupa.png\" border=\"0\" onclick=\"pesquisa_valores_f('pesquisa_cep3.php', 'enderecos')\" style=\"cursor: hand;\">",true); // $this->campoCep( "cep_", "CEP", int2CEP( $this->cep ), true, "-", " <img src=\"imagens/lupa.png\" border=\"0\" onclick=\"pesquisa_valores_f( 'pesquisa_cep_lst.php', 'enderecos' )\" style=\"cursor: hand;\">", false ); // $this->campoCep( "cep_", "CEP", int2CEP( $this->cep ), true, "-", " <img src=\"imagens/lupa.png\" border=\"0\" onclick=\"pesquisa_valores_popless('pesquisa_cep_lst.php', 'enderecos')\" style=\"cursor: hand;\">", false ); $this->campoCep("cep", "CEP", $this->cep_, true, "-", "<img id='lupa' src=\"imagens/lupa.png\" border=\"0\" onclick=\"showExpansivel( 500,500, '<iframe name=\\'miolo\\' id=\\'miolo\\' frameborder=\\'0\\' height=\\'100%\\' width=\\'500\\' marginheight=\\'0\\' marginwidth=\\'0\\' src=\\'educar_pesquisa_cep_log_bairro.php?campo1=bairro&campo2=idbai&campo3=cep_&campo4=logradouro&campo5=idlog&campo6=sigla_uf_&campo7=cidade&campo8=idtlog_&campo9=isEnderecoExterno&campo10=cep&campo11=sigla_uf&campo12=idtlog&campo13=cidade_\\'></iframe>');\">", $disabled); // $this->campoCep("cep_", "CEP", $this->cep_, true, "-", "<img id='lupa' src=\"imagens/lupa.png\" border=\"0\" onclick=\"showExpansivel( 500,500, '<iframe name=\'miolo\' id=\'miolo\' frameborder=\'0\' height=\'100%\' width=\'500\' marginheight=\'0\' marginwidth=\'0\' src=\'educar_pesquisa_cep_log_bairro.php?campo1=nm_bairro&campo2=id_bairro&campo3=id_cep&campo4=nm_logradouro&campo5=id_logradouro&campo6=ref_sigla_uf&campo7=cidade&campo8=ref_idtlog_&campo9=isEnderecoExterno&campo10=cep_&campo11=ref_sigla_uf_&campo12=ref_idtlog&campo13=id_cidade\'></iframe>');\">", $disabled); $this->campoLista("sigla_uf", "Estado", $listaEstado, $this->sigla_uf, false, false, false, false, $disabled, true); $this->campoTexto("cidade", "Cidade", $this->cidade, "50", "255", true, false, false, "", "", "", "", $disabled, true); $this->campoTexto("bairro", "Bairro", $this->bairro, "50", "20", true, false, false, "", "", "", "", $disabled, true); $this->campoLista("idtlog", "Tipo Logradouro", $listaTLog, $this->idtlog, false, false, false, false, $disabled, true); $this->campoTexto("logradouro", "Logradouro", $this->logradouro, "50", "255", true, false, false, "", "", "", "", $disabled, true); $this->campoTexto("complemento", "Complemento", $this->complemento, "22", "20", false, false, false); $this->campoNumero("numero", "Número", $this->numero, "6", "6", false); $this->campoNumero("andar", "Andar", $this->andar, "2", "2", false); } $this->campoNumero("p_ddd_telefone_1", "DDD Telefone 1", $this->p_ddd_telefone_1, 2, 2, false); $this->campoNumero("p_telefone_1", "Telefone 1", $this->p_telefone_1, 10, 15, false); $this->campoNumero("p_ddd_telefone_2", "DDD Telefone 2", $this->p_ddd_telefone_2, 2, 2, false); $this->campoNumero("p_telefone_2", "Telefone", $this->p_telefone_2, 10, 15, false); $this->campoNumero("p_ddd_telefone_fax", "DDD Fax", $this->p_ddd_telefone_fax, 2, 2, false); $this->campoNumero("p_telefone_fax", "Fax", $this->p_telefone_fax, 10, 15, false); $this->campoTexto("p_http", "Site", $this->p_http, "50", "255", false); $this->campoTexto("p_email", "E-mail", $this->p_email, "50", "255", false); // } // else // { // $this->mensagem = "nop"; // } $this->passou = true; $this->campoOculto("passou", $this->passou); } // else if ( $this->passo == 3 ) // { // // // // } $this->campoCheck("bloquear_lancamento_diario_anos_letivos_encerrados", "Bloquear lançamento no diário para anos letivos encerrados", $this->bloquear_lancamento_diario_anos_letivos_encerrados); if ($_POST["escola_curso"]) { $this->escola_curso = unserialize(urldecode($_POST["escola_curso"])); } if (is_numeric($this->cod_escola) && !$_POST) { $obj = new clsPmieducarEscolaCurso($this->cod_escola); $registros = $obj->lista($this->cod_escola); if ($registros) { foreach ($registros as $campo) { $this->escola_curso[$campo["ref_cod_curso"]] = $campo["ref_cod_curso"]; } } } if ($_POST["ref_cod_curso"]) { $this->escola_curso[$_POST["ref_cod_curso"]] = $_POST["ref_cod_curso"]; unset($this->ref_cod_curso); } $this->campoQuebra(); $this->campoOculto("excluir_curso", ""); unset($aux); if ($this->escola_curso) { // echo "<pre>";print_r($this->escola_curso); foreach ($this->escola_curso as $curso) { if ($this->excluir_curso == $curso) { unset($this->escola_curso[$curso]); // = null; $this->excluir_curso = null; } else { $obj_curso = new clsPmieducarCurso($curso); $obj_curso_det = $obj_curso->detalhe(); $nm_curso = $obj_curso_det["nm_curso"]; $this->campoTextoInv("ref_cod_curso_{$curso}", "", $nm_curso, 30, 255, false, false, false, "", "<a href='#' onclick=\"getElementById('excluir_curso').value = '{$curso}'; getElementById('tipoacao').value = ''; {$this->__nome}.submit();\"><img src='imagens/nvp_bola_xis.gif' title='Excluir' border=0></a>"); $aux[$curso] = $curso; } } unset($this->escola_curso); $this->escola_curso = $aux; } $this->campoOculto("escola_curso", serialize($this->escola_curso)); $opcoes = array("" => "Selecione"); if (class_exists("clsPmieducarCurso")) { /*$todos_cursos = "curso = new Array();\n"; $objTemp = new clsPmieducarCurso(); $objTemp->setOrderby("nm_curso"); $lista = $objTemp->lista( null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1 ); if ( is_array( $lista ) && count( $lista ) ) { foreach ( $lista as $registro ) { $todos_cursos .= "curso[curso.length] = new Array({$registro["cod_curso"]},'{$registro["nm_curso"]}', {$registro["ref_cod_instituicao"]});\n"; } } echo "<script>{$todos_cursos}</script>";*/ // EDITAR if ($this->cod_escola || $this->ref_cod_instituicao) { $objTemp = new clsPmieducarCurso(); $objTemp->setOrderby("nm_curso"); $lista = $objTemp->lista(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1, null, $this->ref_cod_instituicao); if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { $opcoes["{$registro['cod_curso']}"] = "{$registro['nm_curso']}"; } } } } else { echo "<!--\nErro\nClasse clsPmieducarCurso não encontrada\n-->"; $opcoes = array("" => "Erro na geração"); } if ($aux) { $this->campoLista("ref_cod_curso", "Curso", $opcoes, $this->ref_cod_curso, "", false, "", "<a href='#' onclick=\"getElementById('incluir_curso').value = 'S'; getElementById('tipoacao').value = ''; {$this->__nome}.submit();\"><img src='imagens/nvp_bot_adiciona.gif' title='Incluir' border=0></a>", false, false); } else { $this->campoLista("ref_cod_curso", "Curso", $opcoes, $this->ref_cod_curso, "", false, "", "<a href='#' onclick=\"getElementById('incluir_curso').value = 'S'; getElementById('tipoacao').value = ''; {$this->__nome}.submit();\"><img src='imagens/nvp_bot_adiciona.gif' title='Incluir' border=0></a>"); } $this->campoOculto("incluir_curso", ""); $this->campoQuebra(); } }
function Gerar() { $this->url_cancelar = $this->retorno == 'Editar' ? 'atendidos_det.php?cod_pessoa=' . $this->cod_pessoa_fj : 'atendidos_lst.php'; $this->campoCpf('id_federal', 'CPF', $this->id_federal, FALSE); $this->campoOculto('cod_pessoa_fj', $this->cod_pessoa_fj); $this->campoTexto('nm_pessoa', 'Nome', $this->nm_pessoa, '50', '255', TRUE); $foto = false; if (is_numeric($this->cod_pessoa_fj)) { $objFoto = new ClsCadastroFisicaFoto($this->cod_pessoa_fj); $detalheFoto = $objFoto->detalhe(); if (count($detalheFoto)) { $foto = $detalheFoto['caminho']; } } else { $foto = false; } if ($foto != false) { $this->campoRotulo('fotoAtual_', 'Foto atual', '<img height="117" src="' . $foto . '"/>'); $this->campoArquivo('file', 'Trocar foto', $this->arquivoFoto, 40, '<br/> <span style="font-style: italic; font-size= 10px;">* Recomenda-se imagens nos formatos jpeg, jpg, png e gif. Tamanho máximo: 150KB</span>'); } else { $this->campoArquivo('file', 'Foto', $this->arquivoFoto, 40, '<br/> <span style="font-style: italic; font-size= 10px;">* Recomenda-se imagens nos formatos jpeg, jpg, png e gif. Tamanho máximo: 150KB</span>'); } // ao cadastrar pessoa do pai ou mãe apartir do cadastro de outra pessoa, // é enviado o tipo de cadastro (pai ou mae). $parentType = isset($_REQUEST['parent_type']) ? $_REQUEST['parent_type'] : ''; $naturalidadeObrigatoria = $parentType == '' ? true : false; // sexo $sexo = $this->sexo; // sugere sexo quando cadastrando o pai ou mãe if (!$sexo && $parentType == 'pai') { $sexo = 'M'; } elseif (!$sexo && $parentType == 'mae') { $sexo = 'F'; } $options = array('label' => 'Sexo / Estado civil', 'value' => $sexo, 'resources' => array('' => 'Sexo', 'M' => 'Masculino', 'F' => 'Feminino'), 'inline' => true); $this->inputsHelper()->select('sexo', $options); // estado civil $this->inputsHelper()->estadoCivil(array('label' => '', 'required' => empty($parentType))); // data nascimento $options = array('label' => 'Data nascimento', 'value' => $this->data_nasc, 'required' => empty($parentType)); $this->inputsHelper()->date('data_nasc', $options); // pai, mãe $this->inputPai(); $this->inputMae(); // documentos $documentos = new clsDocumento(); $documentos->idpes = $this->cod_pessoa_fj; $documentos = $documentos->detalhe(); // rg // o rg é obrigatorio ao cadastrar pai ou mãe, exceto se configurado como opcional. $required = !empty($parentType); if ($required && $GLOBALS['coreExt']['Config']->app->rg_pessoa_fisica_pais_opcional) { $required = false; } $options = array('required' => $required, 'label' => 'RG / Data emissão', 'placeholder' => 'Documento identidade', 'value' => $documentos['rg'], 'max_length' => 20, 'size' => 27, 'inline' => true); $this->inputsHelper()->integer('rg', $options); // data emissão rg $options = array('required' => false, 'label' => '', 'placeholder' => 'Data emissão', 'value' => $documentos['data_exp_rg'], 'size' => 19); $this->inputsHelper()->date('data_emissao_rg', $options); // orgão emissão rg $selectOptions = array(null => 'Orgão emissor'); $orgaos = new clsOrgaoEmissorRg(); $orgaos = $orgaos->lista(); foreach ($orgaos as $orgao) { $selectOptions[$orgao['idorg_rg']] = $orgao['sigla']; } $selectOptions = Portabilis_Array_Utils::sortByValue($selectOptions); $options = array('required' => false, 'label' => '', 'value' => $documentos['idorg_exp_rg'], 'resources' => $selectOptions, 'inline' => true); $this->inputsHelper()->select('orgao_emissao_rg', $options); // uf emissão rg $options = array('required' => false, 'label' => '', 'value' => $documentos['sigla_uf_exp_rg']); $helperOptions = array('attrName' => 'uf_emissao_rg'); $this->inputsHelper()->uf($options, $helperOptions); // Código NIS (PIS/PASEP) $options = array('required' => false, 'label' => 'NIS (PIS/PASEP)', 'placeholder' => '', 'value' => $this->nis_pis_pasep, 'max_length' => 11, 'size' => 20); $this->inputsHelper()->integer('nis_pis_pasep', $options); // Carteira do SUS $options = array('required' => false, 'label' => 'Número da carteira do SUS', 'placeholder' => '', 'value' => $this->sus, 'max_length' => 20, 'size' => 20); $this->inputsHelper()->text('sus', $options); // tipo de certidao civil $selectOptions = array(null => 'Tipo certidão civil', 'certidao_nascimento_novo_formato' => 'Nascimento (novo formato)', 91 => 'Nascimento (antigo formato)', 92 => 'Casamento'); // caso certidao nascimento novo formato tenha sido informado, // considera este o tipo da certidão if (!empty($documentos['certidao_nascimento'])) { $tipoCertidaoCivil = 'certidao_nascimento_novo_formato'; } else { $tipoCertidaoCivil = $documentos['tipo_cert_civil']; } $options = array('required' => false, 'label' => 'Tipo certidão civil', 'value' => $tipoCertidaoCivil, 'resources' => $selectOptions, 'inline' => true); $this->inputsHelper()->select('tipo_certidao_civil', $options); // termo certidao civil $options = array('required' => false, 'label' => '', 'placeholder' => 'Termo', 'value' => $documentos['num_termo'], 'max_length' => 8, 'inline' => true); $this->inputsHelper()->integer('termo_certidao_civil', $options); // livro certidao civil $options = array('required' => false, 'label' => '', 'placeholder' => 'Livro', 'value' => $documentos['num_livro'], 'max_length' => 8, 'size' => 15, 'inline' => true); $this->inputsHelper()->text('livro_certidao_civil', $options); // folha certidao civil $options = array('required' => false, 'label' => '', 'placeholder' => 'Folha', 'value' => $documentos['num_folha'], 'max_length' => 4, 'inline' => true); $this->inputsHelper()->integer('folha_certidao_civil', $options); // certidao nascimento (novo padrão) $options = array('required' => false, 'label' => '', 'placeholder' => 'Certidão nascimento', 'value' => $documentos['certidao_nascimento'], 'max_length' => 50, 'size' => 50); $this->inputsHelper()->text('certidao_nascimento', $options); // uf emissão certidão civil $options = array('required' => false, 'label' => 'Estado emissão / Data emissão', 'value' => $documentos['sigla_uf_cert_civil'], 'inline' => true); $helperOptions = array('attrName' => 'uf_emissao_certidao_civil'); $this->inputsHelper()->uf($options, $helperOptions); // data emissão certidão civil $options = array('required' => false, 'label' => '', 'placeholder' => 'Data emissão', 'value' => $documentos['data_emissao_cert_civil']); $this->inputsHelper()->date('data_emissao_certidao_civil', $options); // cartório emissão certidão civil $options = array('required' => false, 'label' => 'Cartório emissão', 'value' => $documentos['cartorio_cert_civil'], 'cols' => 45, 'max_length' => 150); $this->inputsHelper()->textArea('cartorio_emissao_certidao_civil', $options); // carteira de trabalho $options = array('required' => false, 'label' => 'Carteira de trabalho / Série', 'placeholder' => 'Carteira de trabalho', 'value' => $documentos['num_cart_trabalho'], 'max_length' => 7, 'inline' => true); $this->inputsHelper()->integer('carteira_trabalho', $options); // serie carteira de trabalho $options = array('required' => false, 'label' => '', 'placeholder' => 'Série', 'value' => $documentos['serie_cart_trabalho'], 'max_length' => 5); $this->inputsHelper()->integer('serie_carteira_trabalho', $options); // uf emissão carteira de trabalho $options = array('required' => false, 'label' => 'Estado emissão / Data emissão', 'value' => $documentos['sigla_uf_cart_trabalho'], 'inline' => true); $helperOptions = array('attrName' => 'uf_emissao_carteira_trabalho'); $this->inputsHelper()->uf($options, $helperOptions); // data emissão carteira de trabalho $options = array('required' => false, 'label' => '', 'placeholder' => 'Data emissão', 'value' => $documentos['data_emissao_cart_trabalho']); $this->inputsHelper()->date('data_emissao_carteira_trabalho', $options); // titulo eleitor $options = array('required' => false, 'label' => 'Titulo eleitor / Zona / Seção', 'placeholder' => 'Titulo eleitor', 'value' => $documentos['num_tit_eleitor'], 'max_length' => 13, 'inline' => true); $this->inputsHelper()->integer('titulo_eleitor', $options); // zona titulo eleitor $options = array('required' => false, 'label' => '', 'placeholder' => 'Zona', 'value' => $documentos['zona_tit_eleitor'], 'max_length' => 4, 'inline' => true); $this->inputsHelper()->integer('zona_titulo_eleitor', $options); // seção titulo eleitor $options = array('required' => false, 'label' => '', 'placeholder' => 'Seção', 'value' => $documentos['secao_tit_eleitor'], 'max_length' => 4); $this->inputsHelper()->integer('secao_titulo_eleitor', $options); // Cor/raça. $racas = new clsCadastroRaca(); $racas = $racas->lista(NULL, NULL, NULL, NULL, NULL, NULL, NULL, TRUE); $selectOptions = array('' => 'Raça'); foreach ($racas as $raca) { $selectOptions[$raca['cod_raca']] = $raca['nm_raca']; } $selectOptions = Portabilis_Array_Utils::sortByValue($selectOptions); $this->campoLista('cor_raca', 'Raça', $selectOptions, $this->cod_raca, '', FALSE, '', '', '', FALSE); // nacionalidade // tipos $tiposNacionalidade = array(null => 'Selecione', '1' => 'Brasileiro', '2' => 'Naturalizado brasileiro', '3' => 'Estrangeiro'); $options = array('label' => 'Nacionalidade', 'resources' => $tiposNacionalidade, 'required' => false, 'inline' => true, 'value' => $this->tipo_nacionalidade); $this->inputsHelper()->select('tipo_nacionalidade', $options); // pais origem $options = array('label' => '', 'placeholder' => 'Informe o nome do pais', 'required' => true); $hiddenInputOptions = array('options' => array('value' => $this->pais_origem_id)); $helperOptions = array('objectName' => 'pais_origem', 'hiddenInputOptions' => $hiddenInputOptions); $this->inputsHelper()->simpleSearchPais('nome', $options, $helperOptions); // naturalidade //$options = array('label' => 'Naturalidade', 'required' => true); $options = array('label' => 'Naturalidade', 'required' => $naturalidadeObrigatoria); $helperOptions = array('objectName' => 'naturalidade', 'hiddenInputOptions' => array('options' => array('value' => $this->naturalidade_id))); $this->inputsHelper()->simpleSearchMunicipio('nome', $options, $helperOptions); // Detalhes do Endereço if ($this->idlog) { $objLogradouro = new clsLogradouro($this->idlog); $detalheLogradouro = $objLogradouro->detalhe(); if ($detalheLogradouro) { $this->municipio_id = $detalheLogradouro['idmun']; } // Caso seja um endereço externo, tentamos então recuperar a cidade pelo cep } elseif ($this->cep) { $numCep = idFederal2int($this->cep); $sql = "SELECT idmun, count(idmun) as count_mun FROM public.logradouro l, urbano.cep_logradouro cl \n WHERE cl.idlog = l.idlog AND cl.cep = '{$numCep}' group by idmun order by count_mun desc limit 1"; $options = array('return_only' => 'first-field'); $result = Portabilis_Utils_Database::fetchPreparedQuery($sql, $options); if ($result) { $this->municipio_id = $result; } } if ($this->cod_pessoa_fj) { $objPE = new clsPessoaEndereco($this->cod_pessoa_fj); $det = $objPE->detalhe(); if ($det) { $this->bairro_id = $det['idbai']; $this->logradouro_id = $det['idlog']; } } if (!($this->bairro_id && $this->municipio_id && $this->logradouro_id)) { $this->bairro_id = null; $this->municipio_id = null; $this->logradouro_id = null; } $this->campoOculto('idbai', $this->idbai); $this->campoOculto('idlog', $this->idlog); $this->campoOculto('cep', $this->cep); $this->campoOculto('ref_sigla_uf', $this->sigla_uf); $this->campoOculto('ref_idtlog', $this->idtlog); $this->campoOculto('id_cidade', $this->cidade); // o endereçamento é opcional $enderecamentoObrigatorio = false; // Caso o cep já esteja definido, os campos já vem desbloqueados inicialmente $desativarCamposDefinidosViaCep = empty($this->cep); $this->campoRotulo('', '<b> Endereçamento</b>', '', '', 'Digite um CEP ou clique na lupa para<br/> busca avançada para começar'); $this->campoCep('cep_', 'CEP', $this->cep, $enderecamentoObrigatorio, '-', " <img id='lupa' src=\"imagens/lupa.png\" border=\"0\" onclick=\"showExpansivel(500, 550, '<iframe name=\\'miolo\\' id=\\'miolo\\' frameborder=\\'0\\' height=\\'100%\\' width=\\'500\\' marginheight=\\'0\\' marginwidth=\\'0\\' src=\\'educar_pesquisa_cep_log_bairro2.php?campo1=bairro&campo2=idbai&campo3=cep&campo4=logradouro&campo5=idlog&campo6=ref_sigla_uf&campo7=cidade&campo8=ref_idtlog&campo9=isEnderecoExterno&campo10=cep_&campo11=municipio_municipio&campo12=idtlog&campo13=municipio_id&campo14=zona_localizacao\\'></iframe>');\">", false); $options = array('label' => Portabilis_String_Utils::toLatin1('Município'), 'required' => $enderecamentoObrigatorio, 'disabled' => $desativarCamposDefinidosViaCep); $helperOptions = array('objectName' => 'municipio', 'hiddenInputOptions' => array('options' => array('value' => $this->municipio_id))); $this->inputsHelper()->simpleSearchMunicipio('municipio', $options, $helperOptions); $helperOptions = array('hiddenInputOptions' => array('options' => array('value' => $this->bairro_id))); $options = array('label' => Portabilis_String_Utils::toLatin1('Bairro / Zona de Localização - <b>Buscar</b>'), 'required' => $enderecamentoObrigatorio, 'disabled' => $desativarCamposDefinidosViaCep); $this->inputsHelper()->simpleSearchBairro('bairro', $options, $helperOptions); $options = array('label' => 'Bairro / Zona de Localização - <b>Cadastrar</b>', 'placeholder' => 'Bairro', 'value' => $this->bairro, 'max_length' => 40, 'disabled' => $desativarCamposDefinidosViaCep, 'inline' => true, 'required' => $enderecamentoObrigatorio); $this->inputsHelper()->text('bairro', $options); // zona localização $zonas = App_Model_ZonaLocalizacao::getInstance(); $zonas = $zonas->getEnums(); $zonas = Portabilis_Array_Utils::insertIn(null, 'Zona localização', $zonas); $options = array('label' => '', 'placeholder' => 'Zona localização ', 'value' => $this->zona_localizacao, 'disabled' => $desativarCamposDefinidosViaCep, 'resources' => $zonas, 'required' => $enderecamentoObrigatorio); $this->inputsHelper()->select('zona_localizacao', $options); $helperOptions = array('hiddenInputOptions' => array('options' => array('value' => $this->logradouro_id))); $options = array('label' => 'Tipo / Logradouro - <b>Buscar</b>', 'required' => $enderecamentoObrigatorio, 'disabled' => $desativarCamposDefinidosViaCep); $this->inputsHelper()->simpleSearchLogradouro('logradouro', $options, $helperOptions); // tipo logradouro $options = array('label' => 'Tipo / Logradouro - <b>Cadastrar</b>', 'value' => $this->idtlog, 'disabled' => $desativarCamposDefinidosViaCep, 'inline' => true, 'required' => $enderecamentoObrigatorio); $helperOptions = array('attrName' => 'idtlog'); $this->inputsHelper()->tipoLogradouro($options, $helperOptions); // logradouro $options = array('label' => '', 'placeholder' => 'Logradouro', 'value' => $this->logradouro, 'max_length' => 150, 'disabled' => $desativarCamposDefinidosViaCep, 'required' => $enderecamentoObrigatorio); $this->inputsHelper()->text('logradouro', $options); // complemento $options = array('required' => false, 'value' => $this->complemento, 'max_length' => 20); $this->inputsHelper()->text('complemento', $options); // numero $options = array('required' => false, 'label' => 'Número / Letra', 'placeholder' => 'Número', 'value' => $this->numero, 'max_length' => 6, 'inline' => true); $this->inputsHelper()->integer('numero', $options); // letra $options = array('required' => false, 'label' => '', 'placeholder' => 'Letra', 'value' => $this->letra, 'max_length' => 1, 'size' => 15); $this->inputsHelper()->text('letra', $options); // apartamento $options = array('required' => false, 'label' => 'Nº apartamento / Bloco / Andar', 'placeholder' => 'Nº apartamento', 'value' => $this->apartamento, 'max_length' => 6, 'inline' => true); $this->inputsHelper()->integer('apartamento', $options); // bloco $options = array('required' => false, 'label' => '', 'placeholder' => 'Bloco', 'value' => $this->bloco, 'max_length' => 20, 'size' => 15, 'inline' => true); $this->inputsHelper()->text('bloco', $options); // andar $options = array('required' => false, 'label' => '', 'placeholder' => 'Andar', 'value' => $this->andar, 'max_length' => 2); $this->inputsHelper()->integer('andar', $options); // contato $this->inputTelefone('1', 'Telefone residencial'); $this->inputTelefone('mov', 'Celular'); $this->inputTelefone('2', 'Telefone adicional'); $this->inputTelefone('fax', 'Fax'); $this->campoTexto('email', 'E-mail', $this->email, '50', '255', FALSE); // after change pessoa pai / mae if ($parentType) { $this->inputsHelper()->hidden('parent_type', array('value' => $parentType)); } $styles = array('/modules/Portabilis/Assets/Stylesheets/Frontend.css', '/modules/Portabilis/Assets/Stylesheets/Frontend/Resource.css', '/modules/Cadastro/Assets/Stylesheets/PessoaFisica.css'); Portabilis_View_Helper_Application::loadStylesheet($this, $styles); $script = array('/modules/Cadastro/Assets/Javascripts/PessoaFisica.js', '/modules/Cadastro/Assets/Javascripts/Endereco.js'); Portabilis_View_Helper_Application::loadJavascript($this, $script); $this->campoCep('cep_', 'CEP', $this->cep, $enderecamentoObrigatorio, '-', " <img id='lupa' src=\"imagens/lupa.png\" border=\"0\" onclick=\"showExpansivel(500, 550, '<iframe name=\\'miolo\\' id=\\'miolo\\' frameborder=\\'0\\' height=\\'100%\\' width=\\'500\\' marginheight=\\'0\\' marginwidth=\\'0\\' src=\\'educar_pesquisa_cep_log_bairro2.php?campo1=bairro_bairro&campo2=bairro_id&campo3=cep&campo4=logradouro_logradouro&campo5=logradouro_id&campo6=ref_sigla_uf&campo7=cidade&campo8=ref_idtlog&campo9=isEnderecoExterno&campo10=cep_&campo11=municipio_municipio&campo12=idtlog&campo13=municipio_id&campo14=zona_localizacao\\'></iframe>');\">", false); }
protected function loadAssets() { $jsFile = '/modules/Portabilis/Assets/Javascripts/Frontend/Inputs/Resource/SimpleSearchLogradouro.js'; Portabilis_View_Helper_Application::loadJavascript($this->viewInstance, $jsFile); }
protected function loadAssets() { $rootPath = $_SERVER['DOCUMENT_ROOT']; $style = "/modules/DynamicInput/Assets/Stylesheets/{$this->helperName()}.css"; $script = "/modules/DynamicInput/Assets/Javascripts/{$this->helperName()}.js"; if (file_exists($rootPath . $style)) { Portabilis_View_Helper_Application::loadStylesheet($this->viewInstance, $style); } if (file_exists($rootPath . $script)) { Portabilis_View_Helper_Application::loadJavascript($this->viewInstance, $script); } }
function Gerar() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $this->titulo = 'Turma - Detalhe'; $this->addBanner('imagens/nvp_top_intranet.jpg', 'imagens/nvp_vert_intranet.jpg', 'Intranet'); $this->cod_turma = $_GET['cod_turma']; $tmp_obj = new clsPmieducarTurma(); $lst_obj = $tmp_obj->lista($this->cod_turma, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, array('true', 'false')); $registro = array_shift($lst_obj); foreach ($registro as $key => $value) { $this->{$key} = $value; } if (!$registro) { header('Location: educar_turma_lst.php'); die; } if (class_exists('clsPmieducarTurmaTipo')) { $obj_ref_cod_turma_tipo = new clsPmieducarTurmaTipo($registro['ref_cod_turma_tipo']); $det_ref_cod_turma_tipo = $obj_ref_cod_turma_tipo->detalhe(); $registro['ref_cod_turma_tipo'] = $det_ref_cod_turma_tipo['nm_tipo']; } else { $registro['ref_cod_turma_tipo'] = 'Erro na geração'; } if (class_exists('clsPmieducarInfraPredioComodo')) { $obj_ref_cod_infra_predio_comodo = new clsPmieducarInfraPredioComodo($registro['ref_cod_infra_predio_comodo']); $det_ref_cod_infra_predio_comodo = $obj_ref_cod_infra_predio_comodo->detalhe(); $registro['ref_cod_infra_predio_comodo'] = $det_ref_cod_infra_predio_comodo['nm_comodo']; } else { $registro['ref_cod_infra_predio_comodo'] = 'Erro na geração'; } if (class_exists('clsPmieducarInstituicao')) { $obj_cod_instituicao = new clsPmieducarInstituicao($registro['ref_cod_instituicao']); $obj_cod_instituicao_det = $obj_cod_instituicao->detalhe(); $registro['ref_cod_instituicao'] = $obj_cod_instituicao_det['nm_instituicao']; } else { $registro['ref_cod_instituicao'] = 'Erro na geração'; } if (class_exists('clsPmieducarEscola')) { $this->ref_ref_cod_escola = $registro['ref_ref_cod_escola']; $obj_ref_cod_escola = new clsPmieducarEscola($registro['ref_ref_cod_escola']); $det_ref_cod_escola = $obj_ref_cod_escola->detalhe(); $registro['ref_ref_cod_escola'] = $det_ref_cod_escola['nome']; } else { $registro['ref_cod_escola'] = 'Erro na geração'; } if (class_exists('clsPmieducarCurso')) { $obj_ref_cod_curso = new clsPmieducarCurso($registro['ref_cod_curso']); $det_ref_cod_curso = $obj_ref_cod_curso->detalhe(); $registro['ref_cod_curso'] = $det_ref_cod_curso['nm_curso']; $padrao_ano_escolar = $det_ref_cod_curso['padrao_ano_escolar']; } else { $registro['ref_cod_curso'] = 'Erro na geração'; } if (class_exists('clsPmieducarSerie')) { $this->ref_ref_cod_serie = $registro['ref_ref_cod_serie']; $obj_ser = new clsPmieducarSerie($registro['ref_ref_cod_serie']); $det_ser = $obj_ser->detalhe(); $registro['ref_ref_cod_serie'] = $det_ser['nm_serie']; } else { $registro['ref_ref_cod_serie'] = 'Erro na geração'; } $obj_permissoes = new clsPermissoes(); $nivel_usuario = $obj_permissoes->nivel_acesso($this->pessoa_logada); if ($nivel_usuario == 1) { if ($registro['ref_cod_instituicao']) { $this->addDetalhe(array('Instituição', $registro['ref_cod_instituicao'])); } } if ($nivel_usuario == 1 || $nivel_usuario == 2) { if ($registro['ref_ref_cod_escola']) { $this->addDetalhe(array('Escola', $registro['ref_ref_cod_escola'])); } } if ($registro['ref_cod_curso']) { $this->addDetalhe(array('Curso', $registro['ref_cod_curso'])); } if ($registro['ref_ref_cod_serie']) { $this->addDetalhe(array('Série', $registro['ref_ref_cod_serie'])); } if ($registro['ref_cod_regente']) { $obj_pessoa = new clsPessoa_($registro['ref_cod_regente']); $det = $obj_pessoa->detalhe(); $this->addDetalhe(array('Professor/Regente', $det['nome'])); } if ($registro['ref_cod_infra_predio_comodo']) { $this->addDetalhe(array('Sala', $registro['ref_cod_infra_predio_comodo'])); } if ($registro['ref_cod_turma_tipo']) { $this->addDetalhe(array('Tipo de Turma', $registro['ref_cod_turma_tipo'])); } if ($registro['nm_turma']) { $this->addDetalhe(array('Turma', $registro['nm_turma'])); } if ($registro['sgl_turma']) { $this->addDetalhe(array('Sigla', $registro['sgl_turma'])); } if ($registro['max_aluno']) { $this->addDetalhe(array('Máximo de Alunos', $registro['max_aluno'])); } $this->addDetalhe(array('Situação', dbBool($registro['visivel']) ? 'Ativo' : 'Desativo')); if ($registro['multiseriada'] == 1) { if ($registro['multiseriada'] == 1) { $registro['multiseriada'] = 'sim'; } else { $registro['multiseriada'] = 'não'; } $this->addDetalhe(array('Multi-Seriada', $registro['multiseriada'])); $obj_serie_mult = new clsPmieducarSerie($registro['ref_ref_cod_serie_mult']); $det_serie_mult = $obj_serie_mult->detalhe(); $this->addDetalhe(array('Série Multi-Seriada', $det_serie_mult['nm_serie'])); } if ($padrao_ano_escolar == 1) { if ($registro['hora_inicial']) { $registro['hora_inicial'] = date('H:i', strtotime($registro['hora_inicial'])); $this->addDetalhe(array('Hora Inicial', $registro['hora_inicial'])); } if ($registro['hora_final']) { $registro['hora_final'] = date('H:i', strtotime($registro['hora_final'])); $this->addDetalhe(array('Hora Final', $registro['hora_final'])); } if ($registro['hora_inicio_intervalo']) { $registro['hora_inicio_intervalo'] = date('H:i', strtotime($registro['hora_inicio_intervalo'])); $this->addDetalhe(array('Hora Início Intervalo', $registro['hora_inicio_intervalo'])); } if ($registro['hora_fim_intervalo']) { $registro['hora_fim_intervalo'] = date('H:i', strtotime($registro['hora_fim_intervalo'])); $this->addDetalhe(array('Hora Fim Intervalo', $registro['hora_fim_intervalo'])); } } elseif ($padrao_ano_escolar == 0) { $obj = new clsPmieducarTurmaModulo(); $obj->setOrderby('data_inicio ASC'); $lst = $obj->lista($this->cod_turma); if ($lst) { $tabela = ' <table> <tr align="center"> <td bgcolor="#A1B3BD"><b>Nome</b></td> <td bgcolor="#A1B3BD"><b>Data Início</b></td> <td bgcolor="#A1B3BD"><b>Data Fim</b></td> </tr>'; $cont = 0; foreach ($lst as $valor) { if ($cont % 2 == 0) { $color = ' bgcolor="#E4E9ED" '; } else { $color = ' bgcolor="#FFFFFF" '; } $obj_modulo = new clsPmieducarModulo($valor['ref_cod_modulo']); $det_modulo = $obj_modulo->detalhe(); $nm_modulo = $det_modulo['nm_tipo']; $valor['data_inicio'] = dataFromPgToBr($valor['data_inicio']); $valor['data_fim'] = dataFromPgToBr($valor['data_fim']); $tabela .= sprintf(' <tr> <td %s align=left>%s</td> <td %s align=left>%s</td> <td %s align=left>%s</td> </tr>', $color, $nm_modulo, $color, $valor['data_inicio'], $color, $valor['data_fim']); $cont++; } $tabela .= '</table>'; } if ($tabela) { $this->addDetalhe(array('Módulo', $tabela)); } $dias_da_semana = array('' => 'Selecione', 1 => 'Domingo', 2 => 'Segunda', 3 => 'Terça', 4 => 'Quarta', 5 => 'Quinta', 6 => 'Sexta', 7 => 'Sábado'); $obj = new clsPmieducarTurmaDiaSemana(); $lst = $obj->lista(NULL, $this->cod_turma); if ($lst) { $tabela1 = ' <table> <tr align="center"> <td bgcolor="#A1B3BD"><b>Nome</b></td> <td bgcolor="#A1B3BD"><b>Hora Inicial</b></td> <td bgcolor="#A1B3BD"><b>Hora Final</b></td> </tr>'; $cont = 0; foreach ($lst as $valor) { if ($cont % 2 == 0) { $color = ' bgcolor="#E4E9ED" '; } else { $color = ' bgcolor="#FFFFFF" '; } $valor['hora_inicial'] = date('H:i', strtotime($valor['hora_inicial'])); $valor['hora_final'] = date('H:i', strtotime($valor['hora_final'])); $tabela1 .= sprintf("\n <tr>\n <td %s align=left>%s</td>\n <td %s align=left>%s</td>\n <td %s align=left>%s</td>\n </tr>", $color, $dias_da_semana[$valor['dia_semana']], $color, $valor['hora_inicial'], $color, $valor['hora_final']); $cont++; } $tabela1 .= '</table>'; } if ($tabela1) { $this->addDetalhe(array('Dia da Semana', $tabela1)); } } // Recupera os componentes curriculares da turma $componentes = array(); try { $componentes = App_Model_IedFinder::getComponentesTurma($this->ref_ref_cod_serie, $this->ref_ref_cod_escola, $this->cod_turma); } catch (Exception $e) { } $tabela3 = ' <table> <tr align="center"> <td bgcolor="#A1B3BD"><b>Nome</b></td> <td bgcolor="#A1B3BD"><b>Carga horária</b></td> </tr>'; $cont = 0; foreach ($componentes as $componente) { $color = $cont++ % 2 == 0 ? ' bgcolor="#E4E9ED" ' : ' bgcolor="#FFFFFF" '; $tabela3 .= sprintf(' <tr> <td %s align="left">%s</td> <td %s align="center">%.0f h</td> </tr>', $color, $componente, $color, $componente->cargaHoraria); } $tabela3 .= '</table>'; $this->addDetalhe(array('Componentes curriculares', $tabela3)); if ($obj_permissoes->permissao_cadastra(586, $this->pessoa_logada, 7)) { $this->url_novo = 'educar_turma_cad.php'; $this->url_editar = 'educar_turma_cad.php?cod_turma=' . $registro['cod_turma']; } $this->url_cancelar = 'educar_turma_lst.php'; $this->largura = '100%'; $localizacao = new LocalizacaoSistema(); $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "Início", "educar_index.php" => "i-Educar - Escola", "" => "Detalhe da turma")); $this->enviaLocalizacao($localizacao->montar()); $this->array_botao[] = 'Reclassificar alunos alfabeticamente'; $this->array_botao_url_script[] = "if(confirm(\"Deseja realmente reclassificar os alunos alfabeticamente?\\nAo utilizar esta opção para esta turma, a ordenação dos alunos no diário e em relatórios que é controlada por ordem de chegada após a data de fechamento da turma (campo Data de fechamento), passará a ter o controle novamente alfabético, desconsiderando a data de fechamento.\"))reclassifica_matriculas({$registro['cod_turma']})"; Portabilis_View_Helper_Application::loadJQueryLib($this); $scripts = array('/modules/Portabilis/Assets/Javascripts/Utils.js', '/modules/Portabilis/Assets/Javascripts/ClientApi.js', '/modules/Cadastro/Assets/Javascripts/TurmaDet.js'); Portabilis_View_Helper_Application::loadJavascript($this, $scripts); }
function Gerar() { // carrega estilo para feedback messages, exibindo msgs da api. $style = "/modules/Portabilis/Assets/Stylesheets/Frontend.css"; Portabilis_View_Helper_Application::loadStylesheet($this, $style); @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $this->titulo = "Matrícula - Detalhe"; $this->addBanner("imagens/nvp_top_intranet.jpg", "imagens/nvp_vert_intranet.jpg", "Intranet"); $this->ref_cod_matricula = $_GET["cod_matricula"]; $obj_matricula = new clsPmieducarMatricula(); $lst_matricula = $obj_matricula->lista($this->ref_cod_matricula); if ($lst_matricula) { $registro = array_shift($lst_matricula); } if (!$registro) { header("Location: educar_aluno_det.php?cod_aluno=" . $registro['ref_cod_aluno']); die; } // Curso $obj_ref_cod_curso = new clsPmieducarCurso($registro['ref_cod_curso']); $det_ref_cod_curso = $obj_ref_cod_curso->detalhe(); $registro['ref_cod_curso'] = $det_ref_cod_curso['nm_curso']; // Série $obj_serie = new clsPmieducarSerie($registro['ref_ref_cod_serie']); $det_serie = $obj_serie->detalhe(); $registro['ref_ref_cod_serie'] = $det_serie['nm_serie']; // Nome da instituição $obj_cod_instituicao = new clsPmieducarInstituicao($registro['ref_cod_instituicao']); $obj_cod_instituicao_det = $obj_cod_instituicao->detalhe(); $registro['ref_cod_instituicao'] = $obj_cod_instituicao_det['nm_instituicao']; // Nome da escola $obj_ref_cod_escola = new clsPmieducarEscola($registro['ref_ref_cod_escola']); $det_ref_cod_escola = $obj_ref_cod_escola->detalhe(); $registro['ref_ref_cod_escola'] = $det_ref_cod_escola['nome']; // Nome do aluno $obj_aluno = new clsPmieducarAluno(); $lst_aluno = $obj_aluno->lista($registro['ref_cod_aluno'], NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1); if (is_array($lst_aluno)) { $det_aluno = array_shift($lst_aluno); $nm_aluno = $det_aluno['nome_aluno']; } if ($registro['cod_matricula']) { $this->addDetalhe(array('Número Matrícula', $registro['cod_matricula'])); } if ($nm_aluno) { $this->addDetalhe(array('Aluno', $nm_aluno)); } if ($registro['ref_cod_instituicao']) { $this->addDetalhe(array('Instituição', $registro['ref_cod_instituicao'])); } if ($registro['ref_ref_cod_escola']) { $this->addDetalhe(array('Escola', $registro['ref_ref_cod_escola'])); } if ($registro['ref_cod_curso']) { $this->addDetalhe(array('Curso', $registro['ref_cod_curso'])); } if ($registro['ref_ref_cod_serie']) { $this->addDetalhe(array('Série', $registro['ref_ref_cod_serie'])); } // Nome da turma $enturmacoes = new clsPmieducarMatriculaTurma(); $enturmacoes = $enturmacoes->lista($this->ref_cod_matricula, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1); $nomesTurmas = array(); foreach ($enturmacoes as $enturmacao) { $turma = new clsPmieducarTurma($enturmacao['ref_cod_turma']); $turma = $turma->detalhe(); $nomesTurmas[] = $turma['nm_turma']; } $nomesTurmas = implode('<br />', $nomesTurmas); if ($nomesTurmas) { $this->addDetalhe(array('Turma', $nomesTurmas)); } else { $this->addDetalhe(array('Turma', '')); } if ($registro['ref_cod_reserva_vaga']) { $this->addDetalhe(array('Número Reserva Vaga', $registro['ref_cod_reserva_vaga'])); } $campoObs = false; if ($registro['aprovado']) { if ($registro['aprovado'] == 1) { $aprovado = 'Aprovado'; } elseif ($registro['aprovado'] == 2) { $aprovado = 'Reprovado'; } elseif ($registro['aprovado'] == 3) { $aprovado = 'Em Andamento'; } elseif ($registro['aprovado'] == 4) { $aprovado = 'Transferido'; } elseif ($registro['aprovado'] == 5) { $aprovado = 'Reclassificado'; } elseif ($registro['aprovado'] == 6) { $aprovado = 'Abandono'; $campoObs = true; } elseif ($registro['aprovado'] == 7) { $aprovado = 'Em Exame'; } $this->addDetalhe(array('Situação', $aprovado)); } if ($campoObs) { $this->addDetalhe(array('Observação', $registro['observacao'])); } $this->addDetalhe(array('Formando', $registro['formando'] == 0 ? 'Não' : 'Sim')); $obj_permissoes = new clsPermissoes(); if ($obj_permissoes->permissao_cadastra(578, $this->pessoa_logada, 7)) { // verifica se existe transferencia if ($registro['aprovado'] != 4 && $registro['aprovado'] != 6) { $obj_transferencia = new clsPmieducarTransferenciaSolicitacao(); $lst_transferencia = $obj_transferencia->lista(NULL, NULL, NULL, NULL, NULL, $registro['cod_matricula'], NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, $registro['ref_cod_aluno'], FALSE); // verifica se existe uma solicitacao de transferencia INTERNA if (is_array($lst_transferencia)) { $det_transferencia = array_shift($lst_transferencia); } $data_transferencia = $det_transferencia['data_transferencia']; } if ($registro['aprovado'] == 3 && (!is_array($lst_transferencia) && !isset($data_transferencia))) { $this->array_botao[] = 'Cancelar Matrícula'; $this->array_botao_url_script[] = "if(confirm(\"Deseja realmente cancelar esta matrícula?\"))go(\"educar_matricula_cad.php?cod_matricula={$registro['cod_matricula']}&ref_cod_aluno={$registro['ref_cod_aluno']}\")"; $this->array_botao[] = 'Ocorrências Disciplinares'; $this->array_botao_url_script[] = "go(\"educar_matricula_ocorrencia_disciplinar_lst.php?ref_cod_matricula={$registro['cod_matricula']}\")"; // Apenas libera a dispensa de disciplina quando o aluno estiver enturmado if ($registro['ref_ref_cod_serie'] && $nomesTurmas) { $this->array_botao[] = 'Dispensa de Componentes Curriculares'; $this->array_botao_url_script[] = "go(\"educar_dispensa_disciplina_lst.php?ref_cod_matricula={$registro['cod_matricula']}\")"; } $this->array_botao[] = 'Enturmar'; $this->array_botao_url_script[] = "go(\"educar_matricula_turma_lst.php?ref_cod_matricula={$registro['cod_matricula']}\")"; $this->array_botao[] = 'Abandono'; $this->array_botao_url_script[] = "go(\"educar_abandono_cad.php?ref_cod_matricula={$registro['cod_matricula']}&ref_cod_aluno={$registro['ref_cod_aluno']}\");"; if ($registro['ref_ref_cod_serie']) { $this->array_botao[] = 'Reclassificar'; $this->array_botao_url_script[] = "go(\"educar_matricula_reclassificar_cad.php?ref_cod_matricula={$registro['cod_matricula']}&ref_cod_aluno={$registro['ref_cod_aluno']}\")"; } } if ($registro['aprovado'] != 4 && $registro['aprovado'] != 6) { if (is_array($lst_transferencia) && !isset($data_transferencia)) { $this->array_botao[] = 'Cancelar Solicitação Transferência (escola do sistema)'; $this->array_botao_url_script[] = "go(\"educar_transferencia_solicitacao_cad.php?ref_cod_matricula={$registro['cod_matricula']}&ref_cod_aluno={$registro['ref_cod_aluno']}&cancela=true\")"; } else { if ($registro['ref_ref_cod_serie']) { $this->array_botao[] = 'Solicitar Transferência'; $this->array_botao_url_script[] = "go(\"educar_transferencia_solicitacao_cad.php?ref_cod_matricula={$registro['cod_matricula']}&ref_cod_aluno={$registro['ref_cod_aluno']}\")"; } } if ($registro['aprovado'] == 3 && (!is_array($lst_transferencia) && !isset($data_transferencia))) { if ($registro['formando'] == 0) { $this->array_botao[] = 'Formando'; $this->array_botao_url_script[] = "if(confirm(\"Deseja marcar a matrícula como formando?\"))go(\"educar_matricula_formando_cad.php?ref_cod_matricula={$registro['cod_matricula']}&ref_cod_aluno={$registro['ref_cod_aluno']}&formando=1\")"; } else { $this->array_botao[] = "Desmarcar como Formando"; $this->array_botao_url_script[] = "if(confirm(\"Deseja desmarcar a matrícula como formando?\"))go(\"educar_matricula_formando_cad.php?ref_cod_matricula={$registro['cod_matricula']}&ref_cod_aluno={$registro['ref_cod_aluno']}&formando=0\")"; } } } if ($registro['aprovado'] == 4 && $this->canCancelTransferenciaExterna($registro['cod_matricula'], $registro['ref_cod_aluno'])) { $this->array_botao[] = 'Cancelar transferência (escola externa)'; # TODO ver se código, seta matricula como em andamento, ativa ultima matricula_turma for matricula, e desativa transferencia solicitacao $this->array_botao_url_script[] = "go(\"educar_transferencia_solicitacao_cad.php?ref_cod_matricula={$registro['cod_matricula']}&ref_cod_aluno={$registro['ref_cod_aluno']}&cancela=true&reabrir_matricula=true\")"; } if ($registro['aprovado'] == App_Model_MatriculaSituacao::ABANDONO) { $this->array_botao[] = "Desfazer abandono"; $this->array_botao_url_script[] = "deleteAbandono({$registro['cod_matricula']})"; } } $this->url_cancelar = 'educar_aluno_det.php?cod_aluno=' . $registro['ref_cod_aluno']; $this->largura = '100%'; // js Portabilis_View_Helper_Application::loadJQueryLib($this); $scripts = array('/modules/Portabilis/Assets/Javascripts/Utils.js', '/modules/Portabilis/Assets/Javascripts/ClientApi.js', '/modules/Cadastro/Assets/Javascripts/MatriculaShow.js'); Portabilis_View_Helper_Application::loadJavascript($this, $scripts); }
protected function loadCoreAssets() { parent::loadCoreAssets(); $dependencies = array('/modules/DynamicInput/Assets/Javascripts/DynamicInput.js'); Portabilis_View_Helper_Application::loadJavascript($this->viewInstance, $dependencies); }
public function escola($options = array()) { $isProfessor = Portabilis_Business_Professor::isProfessor($this->getInstituicaoId($options['instituicaoId']), $this->getCurrentUserId()); if ($this->hasNivelAcesso('POLI_INSTITUCIONAL') || $this->hasNivelAcesso('INSTITUCIONAL') || $isProfessor) { $this->selectInput($options); } elseif ($this->hasNivelAcesso('SOMENTE_ESCOLA') || $this->hasNivelAcesso('SOMENTE_BIBLIOTECA')) { $this->stringInput($options); } Portabilis_View_Helper_Application::loadJavascript($this->viewInstance, '/modules/DynamicInput/Assets/Javascripts/Escola.js'); }
protected function loadResourceAssets($dispatcher) { $rootPath = $_SERVER['DOCUMENT_ROOT']; $controllerName = ucwords($dispatcher->getControllerName()); $actionName = ucwords($dispatcher->getActionName()); $style = "/modules/{$controllerName}/Assets/Stylesheets/{$actionName}.css"; $script = "/modules/{$controllerName}/Assets/Javascripts/{$actionName}.js"; if (file_exists($rootPath . $style)) { Portabilis_View_Helper_Application::loadStylesheet($this, $style); } if (file_exists($rootPath . $script)) { Portabilis_View_Helper_Application::loadJavascript($this, $script); } }