public function migrarParticipantes() { $p = new Participante(); $g = new Grupo(); $gorigem = new Grupo(); $oD = new Distribuicao(); $idGrupo = $g->md5_decrypt($_REQUEST['idGrupoPara']); $idGrupoDe = $g->md5_decrypt($_REQUEST['idGrupoDe']); $g->getById($idGrupo); $gorigem->getById($idGrupoDe); $usuario = new Usuario(); $usuario->id = $_SESSION['ag_idUsuario']; $data = date("Y-m-d H:i:s"); foreach ($_REQUEST['participante'] as $key => $id) { $p->getById($id); $p->grupo = $g; $p->valorTotal = $g->getValorTotal($p->pacoteOpcional); $p->custoTotal = $g->getCustoTotal($p->pacoteOpcional); $p->save(); $p->atualiza_status(); //grava log de pagamento $oLog = new LogUsuario(); $movimento = "MIGRAR PARTICIPANTE<BR> CLIENTE: " . $p->cliente->nomeCompleto . "<BR> GRUPO ORIGEM: " . $gorigem->nomePacote . "<BR> GRUPO DESTINO: " . $g->nomePacote; $oLog->usuario = $usuario; $oLog->data = $data; $oLog->movimento = $movimento; $oLog->save(); //fim da log //remover distribuicao dos quartos $oD->remover($id); } $_SESSION['tupi.mensagem'] = 57; }
function Main() { header('Content-Type: text/html; charset=iso-8859-1'); $grupo = isset($_POST["cg"]) && is_numeric($_POST["cg"]) ? $_POST["cg"] : 0; $permissoes = isset($_POST["p"]) && trim($_POST["cg"]) != "" ? $_POST["p"] : ""; if ($grupo != 0) { if ($permissoes != "") { try { $g = new Grupo(); $g->setCodigo($grupo); if ($g->DeletaTodasPermissoes()) { $permissoes = split("-", $permissoes); foreach ($permissoes as $perm) { $g->AdicionaPermissaoGrupoUsuario($perm); } } echo "OK"; } catch (Exception $ex) { throw new Exception($ex->getMessage(), $ex->getCode()); } } else { $g = new Grupo(); $g->setCodigo($grupo); if ($g->DeletaTodasPermissoes()) { echo "OK"; } else { echo "Erro"; } } } else { echo Comuns::Idioma("@lng[Grupo não informado]"); } }
private function factory($arrStrDados) { $obj = new Usuario(); if (isset($arrStrDados["USU_ID"])) { $obj->setId($arrStrDados["USU_ID"]); } $objGrupo = new Grupo(); if (isset($arrStrDados["GRU_ID"])) { $objGrupo->setId($arrStrDados["GRU_ID"]); if (isset($arrStrDados["GRU_Descricao"])) { $objGrupo->setDescricao($arrStrDados["GRU_Descricao"]); } } $obj->setGrupo($objGrupo); $obj->setNome($arrStrDados["USU_Nome"]); $obj->setLogin($arrStrDados["USU_Login"]); $obj->setEmail($arrStrDados["USU_Email"]); $obj->setTelefone($arrStrDados["USU_Telefone"]); if (isset($arrStrDados["USU_DataHoraCadastro"])) { $obj->setDataHoraCadastro($arrStrDados["USU_DataHoraCadastro"]); } else { $obj->setDataHoraCadastro(date("Y-m-d H:i:s")); } if (isset($arrStrDados["USU_DataHoraUltimoAcesso"])) { $obj->setDataHoraUltimoAcesso($arrStrDados["USU_DataHoraUltimoAcesso"]); } if (isset($arrStrDados["USU_Status"])) { $obj->setStatus($arrStrDados["USU_Status"]); } else { $obj->setStatus("A"); } return $obj; }
function Main() { try { $u = unserialize($_SESSION["usu"]); $mensagem = $_GET["m"]; $tpl = file_get_contents("tpl/usuariosgrupos.html"); $tpl = str_replace("<!--telatopo-->", Comuns::GeraTopoPagina($u), $tpl); $tpl = str_replace("<!--Mensagem-->", isset($mensagem) && $mensagem != "" ? base64_decode($mensagem) : "", $tpl); $botoes = Botao::BotaoSalvar("fntGravaUsuariosGrupo();", "@lng[Salvar as alterações]"); $tpl = str_replace("<!--itens-toolbar-->", $botoes, $tpl); $grupos = new Grupo(); $rs = $grupos->ListaRecordSet(); if ($rs != 0) { if (mysql_num_rows($rs) > 0) { $opts .= '<option value="">@lng[Selecione]</option>'; while ($linha = mysql_fetch_array($rs)) { $opts .= '<option value="' . $linha["Codigo"] . '">' . $linha["Descricao"] . '</option>'; } } else { $opts = '<option value="-1">@lng[Nenhum grupo cadastrado]</option>'; } } else { $opts = '<option value="-1">@lng[Erro ao carregar]</option>'; } $tpl = str_replace("##OptsGrupos##", $opts, $tpl); $tpl = str_replace("##OptsTU##", "", $tpl); $tpl = str_replace("##OptsUDG##", "", $tpl); echo Comuns::Idioma($tpl); } catch (Exception $ex) { $msg = base64_encode($ex->getMessage()); header("Location:vwerro.php?m=" . $msg); } }
function Main() { $cod = $_POST["c"]; $des = urldecode($_POST["d"]); header('Content-Type: text/html; charset=iso-8859-1'); try { $g = new Grupo(); if ($cod != "") { $g->setCodigo($cod); } if ($des != "") { $g->setDescricao($des); } if ($cod == "") { if ($g->AdicionaGrupoUsuario()) { echo "GRAVADO"; } } else { if ($g->AtualizaGrupoUsuario()) { echo "GRAVADO"; } } } catch (Exception $ex) { echo $ex->getMessage(); } }
public function del() { $grupo = new Grupo($this->data->idGrupo); $delete = explode(':', $this->data->marca); $grupo->deleteAssociationById('usuarios', $delete); $this->grid(); }
function Main() { header('Content-Type: text/html; charset=iso-8859-1'); $grupo = isset($_POST["cg"]) && is_numeric($_POST["cg"]) ? $_POST["cg"] : 0; $usuarios = isset($_POST["u"]) ? $_POST["u"] : ""; $msg = ""; if ($grupo != 0) { if ($usuarios != "") { try { $g = new Grupo(); $g->setCodigo($grupo); if ($g->DeletaTodosOsUsuarios()) { $usuarios = split("-", $usuarios); foreach ($usuarios as $usuario) { $g->AdicionaUsuarioAoGrupo($usuario); } return "GRAVOU"; } else { $msg = "@lng[Não consegui excluir]"; } } catch (Exception $ex) { throw new Exception($ex->getMessage(), $ex->getCode()); } } else { $msg = "@lng[Usuarios não informados]"; } } else { $msg = "@lng[Grupo não informado]"; } echo Comuns::Idioma($msg); }
public function alterar(Grupo $obj) { $strSQL = "UPDATE CAD_GRU_GRUPOS_USUARIOS SET "; $strSQL .= "GRU_Descricao = '" . $obj->getDescricao() . "', "; $strSQL .= "GRU_Status = '" . $obj->getStatus() . "' "; $strSQL .= "WHERE GRU_ID = " . $obj->getId(); return Db::getInstance()->executar($strSQL); }
public function incluir() { $oGrupo = new Grupo(); $oGrupo->getById($oGrupo->md5_decrypt($_REQUEST['idGrupo'])); $this->grupo = $oGrupo; $this->numero = $_REQUEST['numero']; $this->capacidade = $_REQUEST['capacidade']; $newid = $this->save(); $_SESSION['tupi.mensagem'] = 29; return $newid; }
function fntGravaDados() { $nome = $_POST['txtNome']; $usuario = $_POST['txtUsuario']; $email = $_POST['txtEmail']; $senha = $_POST['txtSenha']; $senhaII = $_POST['txtRepetirSenha']; $ins = $_POST['selInstituicao']; if (trim($senha) != "" && trim($senhaII) != "") { if ($senha == $senhaII) { try { $u = new Usuario(); $g = new Grupo(); $u->setNome($nome); $u->setUsuario($usuario); $u->setEmail($email); $u->setSenha($senha); $u->setCodigoInstituicao($ins); $ret = $u->CadastraNovoUsuario(2); $g->setCodigo(3); $g->AdicionaUsuarioAoGrupo($u->getCodigo()); $_SESSION['usu'] = serialize($u); $ret = "OK"; try { $mensagem = "Foi realizado um novo cadastro de usuário no SIACC.<br />"; $mensagem .= "Nome: " . $u->getNome() . " (" . $u->getUsuario() . ")<br />"; $mensagem .= "E-mail: " . $u->getEmail() . "<br />"; //$mensagem .= "Instituição: " . $u->getNomeInstituicao() . " - " . $u->getSiglaInstituicao() . "<br />"; //$mensagem .= "Cidade/UF: " . $u->getCidadeInstituicao() . "/" . $u->getUFInstituicao() . "<br /><br />"; $mensagem .= 'Acesse o SIACC agora clicando <a href="http://siacc.regisls.net">aqui</a> para ativar a conta deste usuário e liberar seu acesso a ferramenta'; $mail = new Email(); $mail->setRemetente("Regis Leandro Sebastiani <*****@*****.**>"); $mail->setAssunto("[SIACC] Novo cadastro de usuário"); $mail->setDestinatario("*****@*****.**"); $mail->setMensagem($mensagem); $mail->Enviar(); } catch (Exception $exEmail) { Log::RegistraLog("Erro ao enviar e-mail de cadastro de usuário realizado pelo site", true); } } catch (Exception $ex) { $ret = "@lng[Erro ao gravar usuário.] " . $ex->getMessage(); } } else { $ret = "@lng[As senhas informadas não são identicas. Verifique.]"; } } else { $ret = "@lng[A senha não pode ser vazia]"; } echo $ret; }
public function selectProfessor($idProfessor) { $sql = 'select * from grupo gp where gp.grp_professor = ' . $idProfessor; $result = $this->retrieve($sql); $lista = array(); while ($qr = mysqli_fetch_array($result)) { $gru = new Grupo(); $gru->setGrp_id($qr["grp_id"]); $gru->setGrp_grupo($qr["grp_grupo"]); $gru->setGrp_escola($qr["grp_escola"]); $gru->setGrp_professor($qr["grp_professor"]); array_push($lista, $gru); } return $lista; }
function Main() { if (isset($_POST["cg"]) && $_POST["cg"] != "") { $codgrupo = $_POST["cg"]; $pesquisa = $_POST["m"]; if ($pesquisa == 2) { $rs = Grupo::ListaUsuariosGrupo($codgrupo); } else { if ($pesquisa == 1) { $rs = Grupo::ListaUsuariosForaDoGrupo($codgrupo); } } if ($rs != 0) { if (mysql_num_rows($rs) > 0) { while ($linha = mysql_fetch_array($rs)) { $opts .= '<option ' . ($linha["Ativo"] == true ? '' : 'class="item-inativo"') . ' value="' . $linha["Codigo"] . '">' . $linha["NomeCompleto"] . ' (' . $linha["NomeUsuario"] . ($linha["Ativo"] == true ? '' : ' - X') . ')</option>'; } } else { $opts = ''; } } else { $opts = ''; } header('Content-Type: text/html; charset=iso-8859-1'); echo $opts; } else { throw new Exception("@lng[Selecione um grupo para realizar esta operação]", 1000); } }
function Main() { if (isset($_POST["cg"]) && $_POST["cg"] != "") { $codgrupo = $_POST["cg"]; $rs = Grupo::ListaPermissoesTodas($codgrupo); if ($rs != false) { $opts .= '<select id="selPermissoes" name="selPermissoes" class="selmultiplo largo" size="10" multiple="multiple">'; if (mysql_num_rows($rs) > 0) { while ($linha = mysql_fetch_array($rs)) { if ($linha["Pode"] == 1) { $opts .= '<option selected="selected" value="' . $linha["Codigo"] . '">' . $linha["Descricao"] . '</option>'; } else { $opts .= '<option value="' . $linha["Codigo"] . '">' . $linha["Descricao"] . '</option>'; } } } $opts .= '</select>'; } else { $opts .= 'vazio'; } header('Content-Type: text/html; charset=iso-8859-1'); echo $opts; } else { throw new Exception("@lng[Selecione um grupo para realizar esta operação]", 1000); } }
public function add() { $grupo = Grupo::create($this->data->idGrupo); $ids = array_merge($grupo->getUsuarios()->getId(), array($this->data->idUsuario)); $grupo->saveAssociationById('usuarios', $ids); $this->grid(); }
public function run() { Grupo::create(['grupo' => 'Grupo 101']); Grupo::create(['grupo' => 'Grupo 102']); Grupo::create(['grupo' => 'Grupo 103']); Grupo::create(['grupo' => 'Grupo 104']); Grupo::create(['grupo' => 'Grupo 201']); Grupo::create(['grupo' => 'Grupo 202']); Grupo::create(['grupo' => 'Grupo 203']); Grupo::create(['grupo' => 'Grupo 204']); Grupo::create(['grupo' => 'Grupo 301']); Grupo::create(['grupo' => 'Grupo 302']); Grupo::create(['grupo' => 'Grupo 303']); Grupo::create(['grupo' => 'Grupo 304']); Grupo::create(['grupo' => 'Grupo 401']); Grupo::create(['grupo' => 'Grupo 402']); Grupo::create(['grupo' => 'Grupo 403']); Grupo::create(['grupo' => 'Grupo 404']); Grupo::create(['grupo' => 'Grupo 501']); Grupo::create(['grupo' => 'Grupo 502']); Grupo::create(['grupo' => 'Grupo 503']); Grupo::create(['grupo' => 'Grupo 504']); Grupo::create(['grupo' => 'Grupo 601']); Grupo::create(['grupo' => 'Grupo 602']); Grupo::create(['grupo' => 'Grupo 603']); Grupo::create(['grupo' => 'Grupo 604']); }
public function incluir() { $oGrupo = new Grupo(); $oGrupo->getById($oGrupo->md5_decrypt($_REQUEST['idGrupo'])); $oCA = new CompanhiaAerea(); $oCA->id = $_REQUEST['companhiaAerea']; $this->companhiaAerea = $oCA; $this->grupo = $oGrupo; $this->dataEmbarque = $this->convdata($_REQUEST['dataEmbarque'], "ntm"); $this->horaEmbarque = $_REQUEST['horaEmbarque']; $this->horaChegada = $_REQUEST['horaChegada']; $this->trecho = $_REQUEST['trecho']; $this->numeroVoo = $_REQUEST['numeroVoo']; $newid = $this->save(); $_SESSION['tupi.mensagem'] = 26; return $newid; }
private function factoryPermissaoGrupo($arrStrDados) { $obj = new PermissaoGrupo(); // formulario $objFormulario = new Formulario(); $objFormulario->setId($arrStrDados["FRM_ID"]); $obj->setFormulario($objFormulario); // acao $objAcao = new Acao(); $objAcao->setId($arrStrDados["ACO_ID"]); $obj->setAcao($objAcao); // grupo $objGrupo = new Grupo(); $objGrupo->setId($arrStrDados["GRU_ID"]); $obj->setGrupo($objGrupo); return $obj; }
public function destroy($id) { $grupo = Grupo::find($id); $grupo->delete(); Session::flash('message', "El Grupo Eliminado Correctamente...!"); Session::flash('class', 'success'); return Redirect::to('grupo'); }
public function getModificar($id = null) { if ($id == null) { $data['grupo'] = new \Grupo(); $permisosGlobales = \Grupo::$permisos; try { $sentryGroup = \Sentry::findAllGroups(); } catch (Exception $ex) { $sentryGroup = null; } if (is_object($sentryGroup)) { $data['permisos'] = array(); foreach ($permisosGlobales as $key => $permiso) { $data['permisos'][$key] = array('Descripcion' => array_values($permiso)[0]); $tiene = false; foreach ($permiso as $per => $descripcion) { if ($sentryGroup->hasAccess($per)) { $data['permisos'][$key][$per] = $descripcion; $tiene = true; } } if (!$tiene) { unset($data['permisos'][$key]); } } } else { $data['permisos'] = array('' => array()); } return \View::make('administracion.seguridad.creargrupos', $data); } $data['grupo'] = \Grupo::find($id); $permisosGlobales = \Grupo::$permisos; try { $sentryGroup = \Sentry::findGroupById($id); } catch (Exception $ex) { $sentryGroup = null; } if (is_object($sentryGroup)) { $data['permisos'] = array(); foreach ($permisosGlobales as $key => $permiso) { $data['permisos'][$key] = array('Descripcion' => array_values($permiso)[0]); $tiene = false; foreach ($permiso as $per => $descripcion) { if ($sentryGroup->hasAccess($per)) { $data['permisos'][$key][$per] = $descripcion; $tiene = true; } } if (!$tiene) { unset($data['permisos'][$key]); } } } else { $data['permisos'] = array('' => array()); } return \View::make('administracion.seguridad.gruposform', $data); }
/** * Displays a particular model. * @param integer $id the ID of the model to be displayed */ public function actionView($id) { $model = Contato::model()->findByPk($id); $model->listaNomeGrupos = Grupo::model()->getGroups($id); $this->render('view', array('model' => $model)); // $this->render('view', array( // 'model' => $this->loadModel($id), // )); }
public function modifyAlumno($id, $nombre, $apellido1, $apellido2, $edad, $sexo) { $bd = BD::getConexion(); $sql = "UPDATE alumno SET nombre =:nombre,apellido1=:apellido1,apellido2=:apellido2,edad=:edad,sexo=:sexo WHERE id=:id "; $stmt = $bd->prepare($sql); $valido = $stmt->execute([":id" => $id, ":nombre" => $nombre, ":apellido1" => $apellido1, ":apellido2" => $apellido2, ":edad" => $edad, ":sexo" => $sexo]); if ($valido) { $this->setGrupos(Grupo::obtenerGrupo($this->getId())); } return $valido; }
public function login() { // Verificamos que el usuario no esté autenticado if (Auth::check()) { // Si está autenticado lo mandamos a la raíz donde estara el mensaje de bienvenida. return Redirect::route('p'); } // Mostramos la vista login.blade.php (Recordemos que .blade.php se omite.) $grupos = Grupo::where("status", "=", 1)->get(); return View::make('login.login', compact('grupos')); }
/** * Construtor da página */ public function __construct() { parent::__construct(); // instancia um formulário $this->form = new FormWrapper(new Form('form_pessoas')); // cria os campos do formulário $codigo = new Entry('id'); $nome = new Entry('nome'); $endereco = new Entry('endereco'); $bairro = new Entry('bairro'); $telefone = new Entry('telefone'); $email = new Entry('email'); $cidade = new Combo('id_cidade'); $grupo = new CheckGroup('ids_grupos'); $grupo->setLayout('horizontal'); // carrega as cidades do banco de dados Transaction::open('livro'); $cidades = Cidade::all(); $items = array(); foreach ($cidades as $obj_cidade) { $items[$obj_cidade->id] = $obj_cidade->nome; } $cidade->addItems($items); $grupos = Grupo::all(); $items = array(); foreach ($grupos as $obj_grupo) { $items[$obj_grupo->id] = $obj_grupo->nome; } $grupo->addItems($items); Transaction::close(); $this->form->addField('Código', $codigo, 40); $this->form->addField('Nome', $nome, 300); $this->form->addField('Endereço', $endereco, 300); $this->form->addField('Bairro', $bairro, 200); $this->form->addField('Telefone', $telefone, 200); $this->form->addField('Email', $email, 200); $this->form->addField('Cidade', $cidade, 200); $this->form->addField('Grupo', $grupo, 200); // define alguns atributos para os campos do formulário $codigo->setEditable(FALSE); $codigo->setSize(100); $nome->setSize(300); $endereco->setSize(300); $this->form->addAction('Salvar', new Action(array($this, 'onSave'))); // adiciona o formulário na página parent::add($this->form); }
public function edit() { $alumno = Auth::user()->join('alumnos', 'users.id', '=', 'alumnos.usuario_id')->where('users.id', Auth::user()->id)->first(); $alumnoGrupo = DB::table('alumnos')->join('grupos', 'alumnos.grupo_id', '=', 'grupos.id')->where('alumnos.usuario_id', Auth::user()->id)->first(); $alumnoTurno = DB::select('select usuario_id, nombres, grupo, turno from alumnos join grupos on alumnos.grupo_id = grupos.id join turnos on grupos.turno_id = turnos.id where alumnos.usuario_id = ?', [Auth::user()->id]); $alumnoSemestre = DB::select('select usuario_id, nombres, grupo, semestre from alumnos join grupos on alumnos.grupo_id = grupos.id join semestres on grupos.semestre_id = semestres.id where alumnos.usuario_id = ? limit 1', [Auth::user()->id]); $grupo = Grupo::where('status', 1)->get(); $turno = Turno::all(); $semestre = Semestre::all(); return View::make('datos_escolares.edit', compact('alumno', 'alumnoGrupo', 'alumnoTurno', 'alumnoSemestre', 'grupo', 'turno', 'semestre')); }
public function selectByProfessor($idProfessor) { $sql = 'select * from grupo where grp_professor = ' . $idProfessor . ' order by grp_serie, grp_periodo'; //echo $sql; $result = $this->retrieve($sql); $lista = array(); while ($qr = mysqli_fetch_array($result)) { $gru = new Grupo(); $gru->setGrp_id($qr["grp_id"]); $gru->setGrp_grupo($qr["grp_grupo"]); $gru->setGrp_escola($qr["grp_escola"]); $gru->setGrp_professor($qr["grp_professor"]); $gru->setGrp_serie($qr["grp_serie"]); $gru->setGrp_periodo($qr["grp_periodo"]); array_push($lista, $gru); } //echo $sql; //select * from grupo where grp_professor = 2 return $lista; }
public function executeList() { $this->labels = $this->getLabels(); $this->processSort(); $this->processFilters(); // pager $this->pager = new sfPropelPager('Grupo', sfConfig::get('app_listas_default')); $c = new Criteria(); if (!$this->getRequestParameter('sort')) { $c->addAscendingOrderByColumn(GrupoPeer::NOMBRE); } $this->addSortCriteria($c); $this->addFiltersCriteria($c); $this->pager->setCriteria($c); $this->pager->setPage($this->getRequestParameter('page', 1)); $this->pager->init(); //Ana: $this->grupos = Grupo::arbolGrupos(false); }
public function run() { Eloquent::unguard(); DB::table('grupos')->delete(); Grupo::create(['id' => 1, 'nombre' => 'Prejardín', 'abrev' => 'Prej', 'year_id' => 1, 'grado_id' => 1, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 1, 'caritas' => true]); Grupo::create(['id' => 2, 'nombre' => 'Jardín', 'abrev' => 'Jar', 'year_id' => 1, 'grado_id' => 2, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 2, 'caritas' => true]); Grupo::create(['id' => 3, 'nombre' => 'Transición', 'abrev' => 'Tra', 'year_id' => 1, 'grado_id' => 5, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 3, 'caritas' => true]); Grupo::create(['id' => 4, 'nombre' => 'Primero', 'abrev' => '1', 'year_id' => 1, 'grado_id' => 6, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 4, 'caritas' => true]); Grupo::create(['id' => 5, 'nombre' => 'Segundo', 'abrev' => '2', 'year_id' => 1, 'grado_id' => 7, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 5, 'caritas' => true]); Grupo::create(['id' => 6, 'nombre' => 'Tercero', 'abrev' => '3', 'year_id' => 1, 'grado_id' => 14, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 6, 'caritas' => false]); Grupo::create(['id' => 7, 'nombre' => 'Cuarto', 'abrev' => '4', 'year_id' => 1, 'grado_id' => 9, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 7, 'caritas' => false]); Grupo::create(['id' => 8, 'nombre' => 'Quinto', 'abrev' => '5', 'year_id' => 1, 'grado_id' => 10, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 8, 'caritas' => false]); Grupo::create(['id' => 9, 'nombre' => 'Sexto', 'abrev' => '6', 'year_id' => 1, 'grado_id' => 11, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 9, 'caritas' => false]); Grupo::create(['id' => 10, 'nombre' => 'Séptimo', 'abrev' => '7', 'year_id' => 1, 'grado_id' => 12, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 10, 'caritas' => false]); Grupo::create(['id' => 11, 'nombre' => 'Octavo', 'abrev' => '8', 'year_id' => 1, 'grado_id' => 13, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 11, 'caritas' => false]); Grupo::create(['id' => 12, 'nombre' => 'Noveno', 'abrev' => '9', 'year_id' => 1, 'grado_id' => 14, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 12, 'caritas' => false]); Grupo::create(['id' => 13, 'nombre' => 'Décimo', 'abrev' => '10', 'year_id' => 1, 'grado_id' => 15, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 13, 'caritas' => false]); Grupo::create(['id' => 14, 'nombre' => 'Once', 'abrev' => '11', 'year_id' => 1, 'grado_id' => 16, 'valormatricula' => 0, 'valorpension' => 0, 'orden' => 14, 'caritas' => false]); $this->command->info("Grupos agregados."); }
include "tupi.inicializar.php"; include "tupi.template.inicializar.php"; $codAcesso = 8; include "tupi.seguranca.php"; if (!isset($_REQUEST['ajax'])) { $tpl->BREADCRUMB = '<ul class="breadcrumb"> <li> <a href="home.php">Home</a> <span class="divider">/</span> </li> <li> <a href="#">Grupos</a> <span class="divider">/</span> </li> <li class="active">Lista Grupos</li> </ul>'; } $oGrupo = new Grupo(); $totalGrupos = $oGrupo->recuperaTotalAndamento(); $oParticipante = new Participante(); $configPaginacao = $oGrupo->paginar($totalGrupos, isset($_REQUEST['pagina']) ? $_REQUEST['pagina'] : 1); $rsGrupos = $oGrupo->getRows($configPaginacao['primeiroRegistro'], $configPaginacao['quantidadePorPagina'], array("dataEmbarque" => "ASC"), array("status" => "=" . $oGrupo->STATUS_ANDAMENTO())); if ($configPaginacao['totalPaginas'] > 1) { $tpl->block("BLOCK_PAGINACAO"); } $tpl->PAGINA = isset($_REQUEST['pagina']) ? $_REQUEST['pagina'] : 1; $tpl->TOTAL_PAGINAS = $configPaginacao['totalPaginas']; $tpl->PAGINA_ANTERIOR = $configPaginacao['paginaAnterior']; $tpl->PROXIMA_PAGINA = $configPaginacao['proximaPagina']; foreach ($rsGrupos as $key => $Grupo) { $hoje = date("d/m/Y"); $dataviagem = $oGrupo->convdata($Grupo->dataEmbarque, "mtn"); $dias = $oGrupo->diferenca_dias($hoje, $dataviagem);
} $arrvalormatricula = precios($_POST[idprograma], $_POST["nivel"], $link, $cedula); $valor_matricula = $arrvalormatricula[0]; $fecha_const_matricula = $matriculita->sumaDia($fechamatricula, 1); if ($arrvalormatricula[1] == 0) { $idmatricula = $matriculita->ins_matricula1($numatricula, $fechamatricula, $idperiodo, $_POST[idprograma], $nivelgrupo, $_POST[cedula], $valor_matricula, $fecha_const_matricula, $refcarne, $consigcarne, $valor_carne); } else { $valor_carne = 0; $idmatricula = $matriculita->ins_matricula2($numatricula, $fechamatricula, $idperiodo, $_POST[idprograma], $nivelgrupo, $_POST[cedula], $valor_matricula, $fecha_const_matricula, 0, 1, 0); } $RegAno = date("Y"); $seguimiento = new Seguimiento(); $seguimiento->ins_seguimiento($idperiodo, $RegAno, $_POST[cedula], $_POST[idprograma], $nivelgrupo); $matriculita->ins_mat_grupo($numatricula, $indicegrupo); //echo "<hr />Matricula ins:".$idmatricula; $grupo = new Grupo(); //$grupo->upd_cupos_grupo($indicegrupo); $configuracion[0] = "/var/www/html/htdocs/comunidad/dependencias/ilud/recibos"; $configuracion[1] = "/fuentes/"; $codigoBarras = new codigoBarras($configuracion); $valortotal = $valor_matricula + $valor_carne; //echo $valortotal; //$cadenatratarfechalimite = str_replace("-", "", $fecha_const_matricula); con_registro_recibo($configuracion, $codigoBarras, "{$_POST['cedula']}", "{$numatricula}", "{$valortotal}", "{$fecha_const_matricula}"); $pdf = new PDF_Invoice('P', 'mm', 'letter'); $pdf->AddPage(); $pdf->SetLineWidth(0.1); /* Line entrecortada $pdf->SetDash(1,1); //5mm on, 5mm off $pdf->Line(0,93,216,93); $pdf->SetDash(); */
<?php include "tupi.inicializar.php"; include "tupi.template.inicializar.php"; $codAcesso = 19; include "tupi.seguranca.php"; if (!isset($_REQUEST['ajax'])) { $tpl->BREADCRUMB = '<ul class="breadcrumb"> <li> <a href="home.php">Home</a> <span class="divider">/</span> </li> <li> <a href="#">Relatórios</a> <span class="divider">/</span> </li> <li class="active">Crachás de Participantes</li> </ul>'; } $oGrupo = new Grupo(); $rsAnos = $oGrupo->recuperaAnos(); //$rsGrupos = $oGrupo->getRows(0,999,array("ano"=>"desc"),array()); while ($row = mysql_fetch_array($rsAnos)) { $tpl->ID_ANO = $row['ano']; $tpl->LABEL_ANO = $row['ano']; $tpl->block("BLOCK_ANO"); } include "tupi.template.finalizar.php";