function Gerar() { // primary keys $this->campoOculto("cod_software_alteracao", $this->cod_software_alteracao); // foreign keys $opcoes = array("" => "Selecione"); if (class_exists("clsPmicontrolesisSoftware")) { $objTemp = new clsPmicontrolesisSoftware(); $lista = $objTemp->lista(); if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { $opcoes["{$registro['cod_software']}"] = "{$registro['nm_software']}"; } } } else { echo "<!--\nErro\nClasse clsPmicontrolesisSoftware nao encontrada\n-->"; $opcoes = array("" => "Erro na geracao"); } $this->campoLista("ref_cod_software", "Software", $opcoes, $this->ref_cod_software); $this->campoLista("motivo", "Motivo", array('' => 'Selecione', 'i' => 'Inserção', 'a' => 'Alteração', 'e' => 'Exclusão'), $this->motivo); $this->campoLista("tipo", "Tipo", array('' => 'Selecione', 's' => 'Script', 'b' => 'Banco'), $this->tipo); $this->campoTexto("script_banco", "Nome do Script/Banco", $this->script_banco, 30, 100, true); $this->campoMemo("descricao", "Descricão", $this->descricao, 60, 10, true); }
function Gerar() { @session_start(); $this->__pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $this->__titulo = "Software - Listagem"; foreach ($_GET as $var => $val) { // passa todos os valores obtidos no GET para atributos do objeto $this->{$var} = $val === "" ? null : $val; } $this->addBanner("http://ieducar.dccobra.com.br/intranet/imagens/nvp_top_intranet.jpg", "http://ieducar.dccobra.com.br/intranet/imagens/nvp_vert_intranet.jpg", "Intranet"); $this->addCabecalhos(array("Nome Software")); // Filtros de Foreign Keys // outros Filtros $this->campoTexto("nm_software", "Nome Software", $this->nm_software, 30, 255, false); // Paginador $this->__limite = 20; $this->__offset = $_GET["pagina_{$this->nome}"] ? $_GET["pagina_{$this->nome}"] * $this->__limite - $this->__limite : 0; $obj_software = new clsPmicontrolesisSoftware(); $obj_software->setOrderby("nm_software ASC"); $obj_software->setLimite($this->__limite, $this->__offset); $lista = $obj_software->lista(null, null, $this->nm_software, null, null, 1); $total = $obj_software->_total; // monta a lista if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { $this->addLinhas(array("<a href=\"controlesis_software_det.php?cod_software={$registro["cod_software"]}\">{$registro["nm_software"]}</a>")); } } $this->addPaginador2("controlesis_software_lst.php", $total, $_GET, $this->nome, $this->__limite); $this->acao = "go(\"controlesis_software_cad.php\")"; $this->nome_acao = "Novo"; $this->largura = "100%"; }
function Gerar() { @session_start(); $this->__pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $this->__titulo = "Software Patch - Listagem"; foreach ($_GET as $var => $val) { // passa todos os valores obtidos no GET para atributos do objeto $this->{$var} = $val === "" ? null : $val; } $this->addBanner("http://ieducar.dccobra.com.br/intranet/imagens/nvp_top_intranet.jpg", "http://ieducar.dccobra.com.br/intranet/imagens/nvp_vert_intranet.jpg", "Intranet"); $this->addCabecalhos(array("Software", "Data Patch")); // Filtros de Foreign Keys $opcoes = array("" => "Selecione"); if (class_exists("clsPmicontrolesisSoftware")) { $objTemp = new clsPmicontrolesisSoftware(); $lista = $objTemp->lista(); if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { $opcoes["{$registro['cod_software']}"] = "{$registro['nm_software']}"; } } } else { echo "<!--\nErro\nClasse clsPmicontrolesisSoftware nao encontrada\n-->"; $opcoes = array("" => "Erro na geracao"); } $this->campoLista("ref_cod_software", "Software", $opcoes, $this->ref_cod_software); // outros Filtros $this->campoData("data_patch", "Data Patch", $this->data_patch, false); // Paginador $this->__limite = 20; $this->__offset = $_GET["pagina_{$this->nome}"] ? $_GET["pagina_{$this->nome}"] * $this->__limite - $this->__limite : 0; $obj_software_patch = new clsPmicontrolesisSoftwarePatch(); $obj_software_patch->setOrderby("data_patch DESC"); $obj_software_patch->setLimite($this->__limite, $this->__offset); $lista = $obj_software_patch->lista(null, null, $this->ref_cod_software, $this->data_patch_ini, $this->data_patch_fim, null, null, 1); $total = $obj_software_patch->_total; // monta a lista if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { // muda os campos data $registro["data_patch_time"] = strtotime(substr($registro["data_patch"], 0, 16)); $registro["data_patch_br"] = date("d/m/Y", $registro["data_patch_time"]); $registro["data_cadastro_time"] = strtotime(substr($registro["data_cadastro"], 0, 16)); $registro["data_cadastro_br"] = date("d/m/Y H:i", $registro["data_cadastro_time"]); $registro["data_exclusao_time"] = strtotime(substr($registro["data_exclusao"], 0, 16)); $registro["data_exclusao_br"] = date("d/m/Y H:i", $registro["data_exclusao_time"]); // pega detalhes de foreign_keys if (class_exists("clsFuncionario")) { $obj_ref_funcionario_cad = new clsFuncionario($registro["ref_funcionario_cad"]); $det_ref_funcionario_cad = $obj_ref_funcionario_cad->detalhe(); if (is_object($det_ref_funcionario_cad["idpes"])) { $det_ref_funcionario_cad = $det_ref_funcionario_cad["idpes"]->detalhe(); $registro["ref_funcionario_cad"] = $det_ref_funcionario_cad["nome"]; } else { $pessoa = new clsPessoa_($det_ref_funcionario_cad["idpes"]); $det_ref_funcionario_cad = $pessoa->detalhe(); $registro["ref_funcionario_cad"] = $det_ref_funcionario_cad["nome"]; } } else { $registro["ref_funcionario_cad"] = "Erro na geracao"; echo "<!--\nErro\nClasse nao existente: clsFuncionario\n-->"; } if (class_exists("clsFuncionario")) { $obj_ref_funcionario_exc = new clsFuncionario($registro["ref_funcionario_exc"]); $det_ref_funcionario_exc = $obj_ref_funcionario_exc->detalhe(); if (is_object($det_ref_funcionario_exc["idpes"])) { $det_ref_funcionario_exc = $det_ref_funcionario_exc["idpes"]->detalhe(); $registro["ref_funcionario_exc"] = $det_ref_funcionario_exc["nome"]; } else { $pessoa = new clsPessoa_($det_ref_funcionario_exc["idpes"]); $det_ref_funcionario_exc = $pessoa->detalhe(); $registro["ref_funcionario_exc"] = $det_ref_funcionario_exc["nome"]; } } else { $registro["ref_funcionario_exc"] = "Erro na geracao"; echo "<!--\nErro\nClasse nao existente: clsFuncionario\n-->"; } if (class_exists("clsPmicontrolesisSoftware")) { $obj_ref_cod_software = new clsPmicontrolesisSoftware($registro["ref_cod_software"]); $det_ref_cod_software = $obj_ref_cod_software->detalhe(); $registro["ref_cod_software"] = $det_ref_cod_software["nm_software"]; } else { $registro["ref_cod_software"] = "Erro na geracao"; echo "<!--\nErro\nClasse nao existente: clsPmicontrolesisSoftware\n-->"; } $this->addLinhas(array("<a href=\"controlesis_software_patch_det.php?cod_software_patch={$registro["cod_software_patch"]}\">{$registro["ref_cod_software"]}</a>", "<a href=\"controlesis_software_patch_det.php?cod_software_patch={$registro["cod_software_patch"]}\">{$registro["data_patch_br"]}</a>")); } } $this->addPaginador2("controlesis_software_patch_lst.php", $total, $_GET, $this->nome, $this->__limite); $this->acao = "go(\"controlesis_software_patch_cad.php\")"; $this->nome_acao = "Novo"; $this->largura = "100%"; }
function Gerar() { @session_start(); $this->__pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $this->__titulo = "Software Alteracao - Listagem"; foreach ($_GET as $var => $val) { // passa todos os valores obtidos no GET para atributos do objeto $this->{$var} = $val === "" ? null : $val; } $this->addBanner("/intranet/imagens/nvp_top_intranet.jpg", "/intranet/imagens/nvp_vert_intranet.jpg", "Intranet"); $this->addCabecalhos(array("Software", "Motivo", "Tipo", "Descricão")); // Filtros de Foreign Keys $opcoes = array("" => "Selecione"); if (class_exists("clsPmicontrolesisSoftware")) { $objTemp = new clsPmicontrolesisSoftware(); $lista = $objTemp->lista(); if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { $opcoes["{$registro['cod_software']}"] = "{$registro['nm_software']}"; } } } else { echo "<!--\nErro\nClasse clsPmicontrolesisSoftware nao encontrada\n-->"; $opcoes = array("" => "Erro na geracao"); } $this->campoLista("ref_cod_software", "Software", $opcoes, $this->ref_cod_software); // outros Filtros $this->campoLista("motivo", "Motivo", array('' => 'Selecione', 'i' => 'Inserção', 'a' => 'Alteração', 'e' => 'Exclusão'), $this->motivo); $this->campoLista("tipo", "Tipo", array('' => 'Selecione', 's' => 'Script', 'b' => 'Banco'), $this->tipo); // Paginador $this->__limite = 20; $this->__offset = $_GET["pagina_{$this->nome}"] ? $_GET["pagina_{$this->nome}"] * $this->__limite - $this->__limite : 0; $obj_software_alteracao = new clsPmicontrolesisSoftwareAlteracao(); $obj_software_alteracao->setOrderby("motivo ASC"); $obj_software_alteracao->setLimite($this->__limite, $this->__offset); $lista = $obj_software_alteracao->lista(null, null, $this->ref_cod_software, $this->motivo, $this->tipo, $this->descricao, null, null, 1); $total = $obj_software_alteracao->_total; // monta a lista if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { // muda os campos data $registro["data_cadastro_time"] = strtotime(substr($registro["data_cadastro"], 0, 16)); $registro["data_cadastro_br"] = date("d/m/Y H:i", $registro["data_cadastro_time"]); $registro["data_exclusao_time"] = strtotime(substr($registro["data_exclusao"], 0, 16)); $registro["data_exclusao_br"] = date("d/m/Y H:i", $registro["data_exclusao_time"]); // pega detalhes de foreign_keys if (class_exists("clsFuncionario")) { $obj_ref_funcionario_exc = new clsFuncionario($registro["ref_funcionario_exc"]); $det_ref_funcionario_exc = $obj_ref_funcionario_exc->detalhe(); if (is_object($det_ref_funcionario_exc["idpes"])) { $det_ref_funcionario_exc = $det_ref_funcionario_exc["idpes"]->detalhe(); $registro["ref_funcionario_exc"] = $det_ref_funcionario_exc["nome"]; } else { $pessoa = new clsPessoa_($det_ref_funcionario_exc["idpes"]); $det_ref_funcionario_exc = $pessoa->detalhe(); $registro["ref_funcionario_exc"] = $det_ref_funcionario_exc["nome"]; } } else { $registro["ref_funcionario_exc"] = "Erro na geracao"; echo "<!--\nErro\nClasse nao existente: clsFuncionario\n-->"; } if (class_exists("clsFuncionario")) { $obj_ref_funcionario_cad = new clsFuncionario($registro["ref_funcionario_cad"]); $det_ref_funcionario_cad = $obj_ref_funcionario_cad->detalhe(); if (is_object($det_ref_funcionario_cad["idpes"])) { $det_ref_funcionario_cad = $det_ref_funcionario_cad["idpes"]->detalhe(); $registro["ref_funcionario_cad"] = $det_ref_funcionario_cad["nome"]; } else { $pessoa = new clsPessoa_($det_ref_funcionario_cad["idpes"]); $det_ref_funcionario_cad = $pessoa->detalhe(); $registro["ref_funcionario_cad"] = $det_ref_funcionario_cad["nome"]; } } else { $registro["ref_funcionario_cad"] = "Erro na geracao"; echo "<!--\nErro\nClasse nao existente: clsFuncionario\n-->"; } if (class_exists("clsPmicontrolesisSoftware")) { $obj_ref_cod_software = new clsPmicontrolesisSoftware($registro["ref_cod_software"]); $det_ref_cod_software = $obj_ref_cod_software->detalhe(); $registro["ref_cod_software"] = $det_ref_cod_software["nm_software"]; } else { $registro["ref_cod_software"] = "Erro na geracao"; echo "<!--\nErro\nClasse nao existente: clsPmicontrolesisSoftware\n-->"; } $opcoes = array('i' => 'Inserção', 'a' => 'Alteração', 'e' => 'Exclusão'); $registro["motivo"] = $opcoes[$registro["motivo"]]; $opcoes = array('s' => 'Script', 'b' => 'Banco'); $registro["tipo"] = $opcoes[$registro["tipo"]]; $this->addLinhas(array("<a href=\"controlesis_software_alteracao_det.php?cod_software_alteracao={$registro["cod_software_alteracao"]}\">{$registro["ref_cod_software"]}</a>", "<a href=\"controlesis_software_alteracao_det.php?cod_software_alteracao={$registro["cod_software_alteracao"]}\">{$registro["motivo"]}</a>", "<a href=\"controlesis_software_alteracao_det.php?cod_software_alteracao={$registro["cod_software_alteracao"]}\">{$registro["tipo"]}</a>", "<a href=\"controlesis_software_alteracao_det.php?cod_software_alteracao={$registro["cod_software_alteracao"]}\">" . truncate($registro["descricao"], 30) . "</a>")); } } $this->addPaginador2("controlesis_software_alteracao_lst.php", $total, $_GET, $this->nome, $this->__limite); $this->acao = "go(\"controlesis_software_alteracao_cad.php\")"; $this->nome_acao = "Novo"; $this->largura = "100%"; }
function Gerar() { // primary keys $this->campoOculto("cod_software_patch", $this->cod_software_patch); // foreign keys $opcoes = array("" => "Selecione"); if (class_exists("clsPmicontrolesisSoftware")) { $objTemp = new clsPmicontrolesisSoftware(); $lista = $objTemp->lista(); if (is_array($lista) && count($lista)) { foreach ($lista as $registro) { $opcoes["{$registro['cod_software']}"] = "{$registro['nm_software']}"; } } } else { echo "<!--\nErro\nClasse clsPmicontrolesisSoftware nao encontrada\n-->"; $opcoes = array("" => "Erro na geracao"); } $this->campoLista("ref_cod_software", "Software", $opcoes, $this->ref_cod_software); // text // data $this->campoData("data_patch", "Data Patch", $this->data_patch, true); // time }