示例#1
0
 public static function obtMultiples($query, $BD)
 {
     $rs = $BD->call($query, false);
     $tipos = array();
     while ($res = $BD->fetch($rs)) {
         $tipo = new Tipo($res);
         $tipos[$tipo->getId()] = $tipo;
     }
     return $tipos;
 }
示例#2
0
 public function delete()
 {
     $url = Registry::getUrl();
     $id = $_REQUEST["id"] ? $_REQUEST["id"] : $url->vars[0];
     $tipo = new Tipo($id);
     if ($tipo->id) {
         if ($tipo->delete()) {
             Registry::addMessage("Tipo de entrada eliminado satisfactoriamente", "success");
         }
     }
     Url::redirect(Url::site("tipos"));
 }
 public function getAll()
 {
     $conexion = new Conexion();
     $consulta = $conexion->prepare('SELECT * FROM ' . self::TABLA);
     $consulta->execute();
     while ($registro = $consulta->fetch()) {
         $tipo = new Tipo();
         $tipo->construir($registro);
         $array[] = $tipo;
     }
     return $array;
 }
示例#4
0
 public function run()
 {
     $faker = Faker::create();
     foreach (range(1, 10) as $index) {
         Tipo::create([]);
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new Ocorrencia();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Ocorrencia'])) {
         $model->attributes = $_POST['Ocorrencia'];
         $model->usuario_id = Yii::app()->user->objeto->id;
         $model->solicitacao = $_POST['solicitacao'];
         if ($model->save()) {
             $tiposSelecionados = $_POST['tipo'];
         }
         $peso = '';
         foreach ($tiposSelecionados as $tipo) {
             $x = new OcorrenciaTipo();
             $x->ocorrencia_id = $model->id;
             $x->tipo_id = $tipo;
             $peso += $tipo;
             $x->save();
         }
         $y = Ocorrencia::model()->findByPk($model->id);
         $y->prioridade = $peso;
         $y->save();
         $this->redirect(array('view', 'id' => $model->id));
     }
     $tipo = Tipo::model()->findAll();
     $this->render('create', array('model' => $model, 'tipo' => $tipo));
 }
 public function editar($id)
 {
     $rep = new Reporte();
     $us = new Usuario();
     $tip = new Tipo();
     if (!$_POST) {
         $this->data = $rep->getReporte($id);
         $this->usuario = $us->getUsuario($this->data->usuario_id);
         $this->tipos = $tip->getTipos();
     } else {
         $r = $rep->updateReporte($id, $_POST);
         if ($r != false) {
             Flash::success('Los datos del reporte han sido modificados.');
             Redirect::to('');
         } else {
             Flash::error('No han podido modificarse los datos del reporte.');
             Redirect::to('');
         }
     }
 }
示例#7
0
 public function get_edit($id_feriado = null)
 {
     $data['tipos'] = Tipo::all();
     $data['leyes'] = Ley::all();
     if (Session::get('feriado')) {
         $data['feriado'] = Session::get('feriado');
     } else {
         $data['feriado'] = Feriado::find($id_feriado);
     }
     $this->layout->nest('content', 'backend.feriados.form', $data);
 }
示例#8
0
 /**
  * Construtor da página
  */
 public function __construct()
 {
     parent::__construct();
     $this->connection = 'livro';
     $this->activeRecord = 'Produto';
     // instancia um formulário
     $this->form = new FormWrapper(new Form('form_produtos'));
     // cria os campos do formulário
     $codigo = new Entry('id');
     $descricao = new Entry('descricao');
     $estoque = new Entry('estoque');
     $preco_custo = new Entry('preco_custo');
     $preco_venda = new Entry('preco_venda');
     $fabricante = new Combo('id_fabricante');
     $tipo = new RadioGroup('id_tipo');
     $unidade = new Combo('id_unidade');
     // carrega os fabricantes do banco de dados
     Transaction::open('livro');
     $fabricantes = Fabricante::all();
     $items = array();
     foreach ($fabricantes as $obj_fabricante) {
         $items[$obj_fabricante->id] = $obj_fabricante->nome;
     }
     $fabricante->addItems($items);
     $tipos = Tipo::all();
     $items = array();
     foreach ($tipos as $obj_tipo) {
         $items[$obj_tipo->id] = $obj_tipo->nome;
     }
     $tipo->addItems($items);
     $unidades = Unidade::all();
     $items = array();
     foreach ($unidades as $obj_unidade) {
         $items[$obj_unidade->id] = $obj_unidade->nome;
     }
     $unidade->addItems($items);
     Transaction::close();
     // define alguns atributos para os campos do formulário
     $codigo->setEditable(FALSE);
     $this->form->addField('Código', $codigo, 100);
     $this->form->addField('Descrição', $descricao, 300);
     $this->form->addField('Estoque', $estoque, 300);
     $this->form->addField('Preço custo', $preco_custo, 200);
     $this->form->addField('Preço venda', $preco_venda, 200);
     $this->form->addField('Fabricante', $fabricante, 300);
     $this->form->addField('Tipo', $tipo, 300);
     $this->form->addField('Unidade', $unidade, 300);
     $this->form->addAction('Salvar', new Action(array($this, 'onSave')));
     // cria um painél para conter o formulário
     $panel = new Panel('Produtos');
     $panel->add($this->form);
     // adiciona o formulário na página
     parent::add($panel);
 }
示例#9
0
 public function edit()
 {
     $url = Registry::getUrl();
     $this->setData("entrada", new Entrada($url->vars[0]));
     $this->setData("moscas1", Mosca::select(array("tipoId" => 1)));
     $this->setData("moscas2", Mosca::select(array("tipoId" => 2)));
     $this->setData("tipos", Tipo::select());
     $this->setData("entradasED", Entrada::select(array("tipo" => "ED")));
     $this->setData("entradasFIN", Entrada::select(array("tipo" => "FIN")));
     $html = $this->view("views.edit");
     $this->render($html);
 }
示例#10
0
 /**
  * Resets all references to other model objects or collections of model objects.
  *
  * This method is a user-space workaround for PHP's inability to garbage collect
  * objects with circular references (even in PHP 5.3). This is currently necessary
  * when using Propel in certain daemon or large-volume/high-memory operations.
  *
  * @param boolean $deep Whether to also clear the references on all referrer objects.
  */
 public function clearAllReferences($deep = false)
 {
     if ($deep && !$this->alreadyInClearAllReferencesDeep) {
         $this->alreadyInClearAllReferencesDeep = true;
         if ($this->collArticulovariantes) {
             foreach ($this->collArticulovariantes as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->collArticulovariantevalors) {
             foreach ($this->collArticulovariantevalors as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->collPropiedads) {
             foreach ($this->collPropiedads as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->collPropiedadvalors) {
             foreach ($this->collPropiedadvalors as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->aTipo instanceof Persistent) {
             $this->aTipo->clearAllReferences($deep);
         }
         $this->alreadyInClearAllReferencesDeep = false;
     }
     // if ($deep)
     if ($this->collArticulovariantes instanceof PropelCollection) {
         $this->collArticulovariantes->clearIterator();
     }
     $this->collArticulovariantes = null;
     if ($this->collArticulovariantevalors instanceof PropelCollection) {
         $this->collArticulovariantevalors->clearIterator();
     }
     $this->collArticulovariantevalors = null;
     if ($this->collPropiedads instanceof PropelCollection) {
         $this->collPropiedads->clearIterator();
     }
     $this->collPropiedads = null;
     if ($this->collPropiedadvalors instanceof PropelCollection) {
         $this->collPropiedadvalors->clearIterator();
     }
     $this->collPropiedadvalors = null;
     $this->aTipo = null;
 }
 public function populateFromRow($data)
 {
     $this->id = isset($data['id']) ? intval($data['id']) : null;
     $this->sfid = isset($data['nombre']) ? $data['nombre'] : null;
     $this->nombre_comercial = isset($data['nombre_comercial']) ? $data['nombre_comercial'] : null;
     $this->tipo = isset($data['tipo']) ? intval($data['tipo']) : null;
     if ($this->tipo && !isset($data['no_deep'])) {
         $this->obj_tipo = Tipo::find($this->tipo);
     }
     $this->direccion = isset($data['direccion']) ? $data['direccion'] : null;
     $this->cp = isset($data['cp']) ? $data['cp'] : null;
     $this->poblacion = isset($data['poblacion']) ? intval($data['poblacion']) : null;
     if ($this->poblacion && !isset($data['no_deep'])) {
         $this->obj_poblacion = Poblacion::find($this->poblacion);
     }
     $this->lat = isset($data['lat']) ? $data['lat'] : null;
     $this->lng = isset($data['lng']) ? $data['lng'] : null;
     $this->texto_promocion = isset($data['texto_promocion']) ? $data['texto_promocion'] : null;
     $this->texto_animacion = isset($data['texto_animacion']) ? $data['texto_animacion'] : null;
 }
示例#12
0
 public function eliminarTipo($id)
 {
     $obj = new Tipo();
     $obj->eliminarTipo($id);
 }
示例#13
0
?>

    <div class="ui container">
        <div class="ui icon attached message">
            <i class="file text outline icon"></i>
            <div class="content">
                <div class="header">
                    Relatório
                </div>
                <p>Relatório sobre as listas e os produtos</p>
            </div>
        </div>

        <?php 
$script = new Script();
$tipo = new Tipo();
$item = new Item();
?>

        <div class="ui message">
            <?php 
if ($_GET) {
    $listOrd = array();
    $listKey = null;
    // Agrupa os itens iguais somando a quantidade
    foreach ($script->getList() as $key => $list) {
        if ($list['Data'] == $_GET['list']) {
            $listKey = $key;
            foreach ($list['lista'] as $key => $registro) {
                $indice = array_search($registro['Item'], array_column($listOrd, 'item'));
                if ($indice !== false) {
示例#14
0
<?php

include '../templates/header.php';
if (isset($_GET['action']) and $_GET['action'] == "edit") {
    $id = $_GET['id'];
    //include '../model/distrito.php';
    include '../model/tipo.php';
    $con = new Tipo();
    //$condis = new Distrito();
    $resultado = $con->GetById($id);
}
?>
<h3>Tipo Usuario Editar</h3>
<form action="../controller/tipo.controller.php" method="post">
    <div class="row" style="margin-left:50px; margin-right: 50; margin-top: 20px; ">
               <div class="panel panel-default">
                       <div class="panel-heading">Datos del tipo</div>
                       <div class="panel-body">
                           <div class="row" style="margin: 50px;">
                               <input type="text" name="id" hidden=""  value="<?php 
echo $resultado['id'];
?>
">
                                <div class="form-group">
                                    <label for="tipo">Codigo:</label>
                                    <input type="text" class="form-control" name="codigo"  placeholder="Codigo" required="" value="<?php 
echo $resultado['codigo'];
?>
" />
                                </div>
                               
示例#15
0
                                title: "Local",
                                icon: "http://dl.dropbox.com/u/42818496/tipos/1.png" 
                        });
                        marca.setDraggable(true);	
                        google.maps.event.addListener(marca,'dragend',
                                                              function(){
                                                                      cen = <?php echo $map; ?>.getCenter();
                                                                      $('#Evento_lat').val(cen.lat());
                                                                      $('#Evento_lon').val(cen.lng());
                                                              }
                        );      
                }
        </script>
	<div class="row">
		<?php echo $form->labelEx($model,'tipo_idtipo'); ?>
		<?php
                        echo $form->dropDownList(
                                                 $model,'tipo_idtipo',
                                                 Tipo::getTipos()
                                                )
                ?>
		<?php echo $form->error($model,'tipo_idtipo'); ?>
        </div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>
        
<?php $this->endWidget(); ?>
        
</div><!-- form -->
示例#16
0
<?php echo $form->labelEx($model,'texto'); ?>

<?php 
        $identificador = 'res';
        echo CHtml::activeTextField($model,'texto',
                                    array('id'=>'texto')
                                   ); ?>

<?php echo $form->labelEx($model,'tipo'); ?>

<?php echo $form->error($model,'tipo'); ?>

<?php
        echo CHtml::activeDropDownList(
                                 $model,'tipo',
                                 Tipo::getTiposPesquisa(),
                                 array('id' => 'tipos',)
                                );
?>
<?php echo $form->error($model,'tipo'); ?>
<hr style="width:100%;"></hr>
<div id="<?php echo $identificador; ?>"></div>
<hr style="width:100%;"></hr>
<?php $this->endWidget(); ?>
<script type="text/javascript">
$('#tipos').change(actualizaPesquisa);
$('#texto').keypress(actualizaPesquisa);

function actualizaPesquisa()
{
        var url = '<?php echo $this->createUrl('pesquisar');?>';
示例#17
0
 public static function validateHouseNumber($houseNumber, $tipoId, $ignoreId = null)
 {
     $tipo = new Tipo($tipoId);
     if (!$tipo->id) {
         Registry::addMessage("Debes seleccionar un tipo primero", "warning", "houseNumber");
     } else {
         // Siempre 14 Caracteres
         if (strlen($houseNumber) != 14) {
             Registry::addMessage("La numeración debe tener 14 caracteres", "error", "houseNumber");
         } else {
             /// No puede haber 2 iguales
             if (Self::getBy("houseNumber", $houseNumber, $ignoreId)) {
                 Registry::addMessage("Ya existe otra entrada con esta numeración", "error", "houseNumber");
             } else {
                 // Máscara
                 if (!$tipo->checkMascara($houseNumber)) {
                     Registry::addMessage("La numeración no coincide con su tipo: " . $tipo->mascara, "error", "houseNumber");
                 }
             }
         }
     }
     //Return messages avoiding deletion
     return !Registry::getMessages(true);
 }
示例#18
0
 /**
  * Filter the query by a related Tipo object
  *
  * @param   Tipo|PropelObjectCollection $tipo The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 ArticuloQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByTipo($tipo, $comparison = null)
 {
     if ($tipo instanceof Tipo) {
         return $this->addUsingAlias(ArticuloPeer::IDTIPO, $tipo->getIdtipo(), $comparison);
     } elseif ($tipo instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ArticuloPeer::IDTIPO, $tipo->toKeyValue('PrimaryKey', 'Idtipo'), $comparison);
     } else {
         throw new PropelException('filterByTipo() only accepts arguments of type Tipo or PropelCollection');
     }
 }
示例#19
0
    $cod = $_POST['codigo'];
    $desc = $_POST['descripcion'];
    include '../model/tipo.php';
    $con = new Tipo();
    $result = $con->Nuevo($cod, $desc);
    echo $result;
    if ($result > 0) {
        header('Location: ../views/tipoList.php');
    }
}
if (isset($_POST['submit']) && $_POST['submit'] == "Editar") {
    $id = $_POST['id'];
    $code = $_POST['codigo'];
    $descr = $_POST['descripcion'];
    include '../model/tipo.php';
    $con = new Tipo();
    $result = $con->Update($id, $code, $descr);
    if ($result) {
        header('Location: ../views/tipoList.php');
    }
}
if (isset($_GET['action']) and $_GET['action'] == "delete") {
    $id = $_GET['id'];
    include '../model/tipo.php';
    $con = new Tipo();
    $eliminar = $con->Delete($id);
    if ($eliminar) {
        echo '<script type="text/javascript"> alert("El registro ah sido eliminado"); history.back();</script>';
        // header('Location: ../views/pacienteList.php');
    }
}
示例#20
0
                <!--formulario-->
                <form id="frmProduto" action="../mvc/controller/Controller.php?class=Produto" role="form" class="form-horizontal frmRegistro">

                    <!--id-->
                    <input type='hidden' name='idProduto' />

                    <!--tipo-->
                    <div class="form-group">
                        <label class="control-label col-sm-2">Tipo *</label>
                        <div class="col-sm-10">
                            <div class="input-group">
                                <select name="idTipo" class="form-control" tabindex="1" required>
                                    <option value="">Selecione uma opção...</option>
                                    <?php 
$tipos = Tipo::findAll();
?>
                                    <?php 
foreach ($tipos as $tipo) {
    ?>
                                        <option value="<?php 
    echo $tipo->getIdTipo();
    ?>
"><?php 
    echo $tipo->getNmTipo();
    ?>
</option>
                                    <?php 
}
?>
                                </select>
示例#21
0
文件: tipos.php 项目: phcs93/proline
<?php

if (!isset($_GET['id'])) {
    include "html/idxCRUD.php";
    include "lst/lstTipo.php";
} else {
    $tipo = Tipo::find($_GET['id']);
    if ($tipo) {
        include "reg/regTipo.php";
    } else {
        echo "Tipo inexistente!";
    }
}
include "frm/frmTipo.php";
 public function definirTipo(Tipo $tipo)
 {
     $this->tipo = $tipo;
     $this->valor += $tipo->getValor();
 }
示例#23
0
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
include_once '../configs/sm.php';
include_once '../model/Joia.php';
include_once '../model/Tipo.php';
include_once '../model/Loja.php';
include_once '../model/Cor.php';
include_once '../model/Pedra.php';
include_once '../model/Usuario.php';
session_start();
if ($_SESSION['login'] == "true") {
    $usuario = Usuario::listaUsuario($_SESSION['usuario']);
    $sm->assign("usuario", $usuario);
    $tipo = Tipo::listaTipos();
    $cor = Cor::listaCores();
    $loja = Loja::listaLojas();
    $pedra = Pedra::listaPedras();
    $sm->assign("tipos", $tipo);
    $sm->assign("cores", $cor);
    $sm->assign("pedras", $pedra);
    $sm->assign("lojas", $loja);
    $sm->display("../view/manterJoia.html");
} else {
    header("location:../index.php?&erro=\"Login\"");
}
示例#24
0
 public function run()
 {
     DB::table('tipos')->truncate();
     Tipo::create(array('nombre' => 'Contacto'));
 }
示例#25
0
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
include_once '../configs/sm.php';
include_once '../model/Tipo.php';
include_once '../model/Usuario.php';
session_start();
if ($_SESSION['login'] == "true") {
    $usuario = Usuario::listaUsuario($_SESSION['usuario']);
    $sm->assign("usuario", $usuario);
    $opc = addslashes(trim($_GET['opc']));
    if ($opc == "Editar") {
        $cod = addslashes(trim($_GET['cod']));
        $tipo = Tipo::listaTipo($cod);
        $sm->assign("nomeTipo", $tipo->getNome_tipo());
        $sm->assign("cod", $cod);
        $sm->assign("opc", $opc);
        $sm->display("../view/manterTipo.html");
    } else {
        if ($opc == "Incluir") {
            $sm->assign("opc", $opc);
            $sm->display("../view/manterTipo.html");
        } else {
            $cod = addslashes(trim($_GET['cod']));
            $sm->assign("cod", $cod);
            $sm->assign("tipo", "Tipo");
            $sm->display("../view/remover.html");
        }
    }
示例#26
0
<?php

session_start();
// inicia sesion
//if (!empty($_SESSION["usuario"])) { //verifica si la variable de sesion no esta vacia
include '../../db/tramite/Tipo.php';
include '../../db/tramite/Tramite.php';
$select_tipo = new Tipo();
$lista_tipo = $select_tipo->getall();
if (isset($_POST["registrar"])) {
    $add = new Tramite();
    $add->add($_POST["nombre"], $_POST["duracion"], $_POST["tipo"]);
}
$combobit = "";
foreach ($lista_tipo as $row2) {
    $combobit .= "<option name='tipo' value ='" . $row2[0] . "'>" . $row2[2] . "</option>";
}
?>
    <html>
    <head>
        <link rel="stylesheet" href="../botones.css" type="text/css">
        <link rel="stylesheet" href="agperfil.css" type="text/css">
        <title>Agregar Tramite</title>
    </head>
    <body>
    * Campos con asterisco son obligatorios
    <h2 align="center">ESPECIFICACIONES TRAMITE</h2>

    <form action="" method="post">
        <h3>Nombre del Tramite:
            <input type="text" name="nombre" pattern="[A-Za-z\s]{3,50}" maxlength="50" required size="50">*</h3>
示例#27
0
<?php

/*Llamadas de archivos necesarios
por medio de require*/
$titulo = "Agregar producto";
require __DIR__ . '/../../config/auth.php';
require __DIR__ . '/../../config/config.php';
require __DIR__ . '/../templates/header.php';
require __DIR__ . '/../templates/menu.php';
require __DIR__ . '/../templates/sidebar.php';
require __DIR__ . '/../../clases/Tipo_productos.php';
$modeloTipo = new Tipo();
$listaTipo = $modeloTipo->read();
/*
|--------------------------------------------------------------------------
| Contenido del Sitio
|--------------------------------------------------------------------------
|
| Aqui se agrega toda la funcionalidad de la pagina, especialmente deberia
| haber solo HTML cn algunos tags para PHP para acceder a variables.
|
*/
?>

 <div class="content-wrapper">
	<!-- Header de la pagina -->
	<section class="content-header">
		<h1>Productos</h1>
		<ol class="breadcrumb">
			<li><a href="<?php 
echo ROOT_ADMIN;
示例#28
0
</td>
                            <?php 
        $i++;
        ?>
                            <?php 
        $estacionamiento_origen = Estacionamiento::getEstacionamientoOrigenDestino($ticket->origen_estacionamiento);
        ?>
                            <?php 
        $estacionamiento_destino = Estacionamiento::getEstacionamientoOrigenDestino($ticket->destino_estacionamiento);
        ?>
                            <td><strong><?php 
        echo $ticket->id;
        ?>
</strong></td>
                            <td class="oculto"><?php 
        echo Tipo::getReservaTipoById($ticket->TIPO_id);
        ?>
</td>
                            <td><i class="fa fa-user"></i> <?php 
        echo Usuario::getUsuarioNombreById($ticket->USUARIO_id);
        ?>
</td>
                            <td><i class="fa fa-bicycle"></i> <?php 
        echo Bicicleta::getBicicletaCodigoById($ticket->BICICLETA_id);
        ?>
</td>
                            <td><i class="fa fa-home"></i> <?php 
        echo Estacion::getEstacionNombreById($ticket->origen_puesto_alquiler) . ' - ' . $estacionamiento_origen;
        ?>
</td>
                            <td><i class="fa fa-home"></i> <?php 
示例#29
0
<?php

/*
|--------------------------------------------------------------------------
|Controlador
|--------------------------------------------------------------------------
|
| Este archivo se encarga de guardar los cambios de tipo en el sistema.
|
*/
require __DIR__ . '/../../config/config.php';
require __DIR__ . '/../../config/auth.php';
require __DIR__ . '/../../clases/Tipo_productos.php';
if (!empty($_POST['nombre'])) {
    $idtipo = isset($_GET['id']) && $_GET['id'] != "" ? $_GET['id'] : null;
    $nomTipo = $_POST['nombre'];
    $tipo = new Tipo($nomTipo);
    if ($tipo->update($idtipo)) {
        $_SESSION['success_update'] = true;
        $_SESSION['tipup'] = $nomTipo;
    } else {
        $_SESSION['error_tmp'] = "Producto no ingresado";
    }
} else {
    $_SESSION['error_tmp'] = "Todos los campos son obligatorios.";
}
header('Location: ' . ROOT_ADMIN . 'vistas/ListarTipoProducto.php');
示例#30
0
 /**
  * Vista para la informacion cuando se requiera exportar
  */
 public function actionInformacion()
 {
     if (!Yii::app()->user->isGuest) {
         $tipo = Tipo::model()->findAll();
         $tipos = '';
         $es_internacional = "'No' => 0 <br> 'Sí' => 1";
         $sect = Sector::model()->findAll();
         $sectores = '';
         $est = Estado::model()->findAll();
         $estados = '';
         $pais = Paises::model()->findAll();
         $paises = '';
         $tipo_m = TipoMedios::model()->findAll();
         $tipo_medios = '';
         $grupo = Grupos::model()->findAll();
         $grupos = '';
         $usuario = Usuarios::model()->findAll();
         $usuarios = '';
         $es_internacional = "'No' => 0 <br> 'Sí' => 1";
         foreach ($tipo as $t) {
             $tipos .= "'" . $t->nombre . "' => " . $t->id . " <br>";
         }
         foreach ($sect as $s) {
             $sectores .= "'" . $s->nombre . "' => " . $s->id . " <br>";
         }
         foreach ($usuario as $u) {
             $usuarios .= "'" . $u->nombre . ' ' . $u->apellido . "' => " . $u->id . " <br>";
         }
         foreach ($est as $e) {
             $estados .= "'" . $e->nombre . "' => " . $e->id . " <br>";
         }
         foreach ($pais as $p) {
             $paises .= "'" . $p->nombre . "' => " . $p->id . " <br>";
         }
         foreach ($tipo_m as $tm) {
             $tipo_medios .= "'" . $tm->nombre . "' => " . $tm->id . " <br>";
         }
         foreach ($grupo as $g) {
             $grupos .= "'" . $g->nombre . "' => " . $g->id . " <br>";
         }
         $datos = array('es_internacional' => $es_internacional, 'tipos' => $tipos, 'sectores' => $sectores, 'usuarios' => $usuarios, 'estados' => $estados, 'paises' => $paises, 'tipo_medios' => $tipo_medios, 'grupos' => $grupos);
         $this->render('informacion', array('datos' => $datos));
     } else {
         $this->redirect(Yii::app()->homeUrl);
     }
 }