Esempio n. 1
0
 public function run()
 {
     //echo 'www.neologys.com'.$this->ruta.'/css/jgauge.css';
     echo '<div style="width::200px; float:left;" >';
     $this->widget('zii.widgets.grid.CGridView', array('id' => 'leyenda', 'dataProvider' => Estado::model()->search_por_docu($this->documento), 'itemsCssClass' => '.grid-views', 'hideHeader' => true, 'summaryText' => '', 'columns' => array('estado', array('name' => 'st.', 'header' => 'st', 'type' => 'raw', 'value' => 'CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"].$data->codocu.$data->codestado.".png")'))));
     echo "</div>";
 }
Esempio n. 2
0
 public function validaSistema()
 {
     $status_model = Estado::model()->ultimo()->find();
     if ($status_model->estado == 'CERRADO') {
         return true;
     } else {
         return false;
     }
 }
Esempio n. 3
0
 /**
 * Updates a particular model.
 * If update is successful, the browser will be redirected to the 'view' page.
 * @param integer $id the ID of the model to be updated
 */
 public function actionUpdate($id)
 {
     $model = $this->loadModel($id);
     $user = Yii::app()->user;
     $selectEstados = Estado::model()->selectEstados();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Torneo'])) {
         $model->attributes = $_POST['Torneo'];
         if ($model->save()) {
             $user->setFlash('success', "Datos han sido modificados <strong>satisfactoriamente</strong>.");
             $this->redirect(array('admin'));
         }
     }
     $this->render('update', array('model' => $model, 'selectEstados' => $selectEstados));
 }
Esempio n. 4
0
 /**
  *
  * @param query $valores
  * @return array para valores de la serie
  */
 public static function valoresGraficaEventos()
 {
     $eventos = '';
     $estados = '';
     $pie = '';
     $resultados = Yii::app()->db->createCommand()->select('count(*) AS eventos, estado_id AS estado')->from('semana s')->group('estado_id')->order('count(*) DESC')->queryAll();
     foreach ($resultados as $k => $data) {
         //para la grafica de barras
         //$eventos.=$data['eventos'].', ';
         //$estados.="'".Estado::model()->findByPk($data['estado'])->nombre."', ";
         $pie .= "['" . Estado::model()->findByPk($data['estado'])->nombre . "', " . $data['eventos'] . '], ';
     }
     //return array('eventos'=>'['.substr($eventos, 0, -2).']', 'estados'=>'['.substr($estados, 0, -2).']');
     return array('pie' => '[' . substr($pie, 0, -2) . ']');
 }
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  */
 public function loadModel()
 {
     if ($this->_model === null) {
         if (isset($_GET['id'])) {
             $this->_model = Estado::model()->findbyPk($_GET['id']);
         }
         if ($this->_model === null) {
             throw new CHttpException(404, Yii::t('App', 'The requested page does not exist.'));
         }
     }
     return $this->_model;
 }
Esempio n. 6
0
	</div>
		<div class="row">
			<?php 
echo $form->label($model, 'txtmaterial');
?>
			<?php 
echo $form->textField($model, 'txtmaterial', array('size' => 40, 'maxlength' => 40));
?>
		</div>

		<div class="row">
			<?php 
echo $form->labelEx($model, 'estado');
?>
			<?php 
$datos111 = CHTml::listData(Estado::model()->findAll("codocu=:vcodocu", array(":vcodocu" => CODIGO_DOC_SOLPE)), 'codestado', 'estado');
?>

			<?php 
echo $form->dropDownList($model, 'estado', $datos111, array('empty' => '--Seleccione un estado--'));
?>

		</div>

		<div class="row">
			<?php 
echo $form->labelEx($model, 'escompra');
?>
			<?php 
$datos1 = CHtml::listData(Tiposolpe::model()->findAll(), 'codtipo', 'destipo');
echo $form->DropDownList($model, 'escompra', $datos1, array('empty' => '--Seleccione un tipo--', 'disabled' => !$model->isNewRecord ? 'disabled' : ''));
Esempio n. 7
0
 public function actioncargaestadodestino()
 {
     $criteria = new CDbCriteria();
     $criteria->addCondition("c_hcod=:proved");
     $valor = $_POST['Eventos']['codocu'];
     $data = CHtml::listData(Estado::model()->findAll("codocu='" . $valor . "'"), "codestado", "estado");
     echo CHtml::tag('option', array('value' => null), CHtml::encode('Escoja una direccion'), true);
     foreach ($data as $value => $name) {
         echo CHtml::tag('option', array('value' => $value), CHtml::encode($name), true);
     }
 }
Esempio n. 8
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);
     }
 }
Esempio n. 9
0
 public function actioncargaestado()
 {
     $valor = $_POST['Opcionesbarra']['codocu'];
     $criteria = new CDbCriteria();
     $criteria->addCondition("codocu=:vcodocu");
     $criteria->params = array(":vcodocu" => $valor);
     $data = CHtml::listData(Estado::model()->findAll($criteria), "codestado", "estado");
     echo CHtml::tag('option', array('value' => null), CHtml::encode('Escoja el estado'), true);
     foreach ($data as $value => $name) {
         echo CHtml::tag('option', array('value' => $value), CHtml::encode($name), true);
     }
 }
Esempio n. 10
0
		<?php 
echo $form->textArea($model, 'textolargo', array('rows' => 6, 'cols' => 50));
?>
		<?php 
echo $form->error($model, 'textolargo');
?>
	</div>

	</fieldset>
	 <fieldset>
      <legend> Status </legend>
	<div class="row">
		
		<?php 
echo $form->labelEx($model, 'codigoestado');
echo $form->DropDownList($model, 'codigoestado', CHtml::listData(Estado::model()->findAll(" codocu='042'", array()), "codestado", "estado"), array("empty" => "--", "class" => "bolsitas", "disabled" => "disabled"));
?>
	 </DIV>
	
	</fieldset>

	

	

	

	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Solicitar' : 'Grabar');
?>
Esempio n. 11
0
 /**
  * Retorna los estados por país
  * @return Array estados con su país concatenado en el nombre "Estado, Pais"
  */
 public function selectEstados()
 {
     $model = Estado::model()->findAll(array('with' => array('idPais'), 'select' => array('CONCAT(t.nombre,", ",idPais.nombre) as nombre', 'id'), 'order' => 't.nombre'));
     $lista = CHtml::listdata($model, 'id', 'nombre');
     return $lista;
 }
Esempio n. 12
0
	
	
	<div class="row">
		<?php 
echo $form->labelEx($model, 'codestado');
?>
	<?php 
$documento = '032';
$criteria = new CDbCriteria();
$criteria->condition = 'codocu=:docu';
$criteria->params = array(':docu' => $documento);
//$post = Post::model()->find($criteria);
//$datos = CHtml::listData(Estado::model()->find('codocu=:c_hcod', array(':c_hcod'=>$documento)),'codestado','estado');
//datos = CHtml::listData(Estado::model()->find($criteria),'codestado','estado');
$datos = CHtml::listData(Estado::model()->findall(), 'codestado', 'codocu', 'estado');
echo $form->DropDownList($model, 'codestado', $datos, array('empty' => '--Indique el status--'));
?>
	<?php 
echo $form->error($model, 'codestado');
?>
	</div>
	
	
	<div class="row">
		<?php 
echo $form->labelEx($model, 'tipo');
?>
	<?php 
$datos = array('A' => 'Maquinaria embarcaciones ', 'B' => 'Artefactos operaciones flota', 'C' => 'Muebles oficina', 'D' => 'Equipos de computo', 'E' => 'Equipos del local', 'F' => 'Seguridad naval');
echo $form->DropDownList($model, 'tipo', $datos, array('empty' => '--Indique el tipo--'));
Esempio n. 13
0
<h1>Mensajes Envio #<?php 
echo $_GET['envioid'];
?>
</h1>
<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'mensaje-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('class' => 'CCheckBoxColumn'), array('name' => 'id', 'value' => $model->id, 'htmlOptions' => array('style' => 'width:50px')), 'telefono', array('name' => 'operadoraid', 'value' => '$data->operadora->nombre', 'filter' => CHtml::listData(Operadora::model()->findAll(), 'id', 'nombre')), array('name' => 'estadoid', 'value' => '$data->estado->nombre', 'filter' => CHtml::listData(Estado::model()->findAll(), 'id', 'nombre')), array('name' => 'createtime', 'value' => 'date("d.m.Y h:i a",strtotime($data->createtime))'), 'mensaje')));
?>

Esempio n. 14
0
?>
		<?php 
echo $form->textField($model, 'numformato', array('style' => 'font-size:12px; color:red; font-weight:bold; ', 'size' => 17, 'maxlength' => 17, 'disabled' => 'disabled'));
?>
		<?php 
echo $form->error($model, 'numformato');
?>
	</div>
	<div class="row">
		<?php 
if (!$model->isNewRecord) {
    echo $form->labelEx($model, 'codestado');
    ?>
		    
			<?php 
    echo CHtml::textField('hola', '( ' . $model->codestado . ' ) ' . Estado::model()->find('codestado=:miestado and codocu=:midocumento', array(':midocumento' => '017', ':miestado' => $model->codestado))->estado, array('id' => 'pepin', 'disabled' => 'disabled', 'size' => 20));
    ?>
			  <?php 
    echo CHtml::ajaxLink('Finalizar', $this->createUrl('/controlactivos/cambiaestado', array('id' => $model->idformato)), array('replace' => '#pepin'));
}
?>
		
	</div>
			
			
		
	
	<div class="row">
	<div style="display:table-cell">
	<?php 
echo $form->labelEx($model, 'codtipoop');
Esempio n. 15
0
    echo CHtml::TextField('fggf', $model->documnetos->desdocu);
    ?>
		<?php 
}
?>
		<?php 
echo $form->error($model, 'codocu');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'codestado');
?>
		<?php 
$datos3 = CHtml::listData(Estado::model()->findAll(), 'codestado', 'estado');
echo $form->DropDownList($model, 'codestado', $datos3, array('empty' => '--Seleccione un Estado--'));
?>
		<?php 
echo $form->error($model, 'codestado');
?>
	</div>


	<div class="row">
		<?php 
echo $form->labelEx($model, 'action');
?>
		<?php 
echo $form->TextField($model, 'action', array('size' => '50'));
?>
Esempio n. 16
0
 public function actionAdmin()
 {
     $status_model = Estado::model()->ultimo()->find();
     Yii::app()->user->setFlash('notice', "SISTEMA :  " . $status_model->estado . " ");
     $model = new Estado('search');
     $model->unsetAttributes();
     if (isset($_GET['Estado'])) {
         $model->setAttributes($_GET['Estado']);
     }
     $this->render('admin', array('model' => $model));
 }
Esempio n. 17
0
$provedo = $model->search();
/* print_r($provedo->getKeys());
 yii::app()->end();*/
$rutaimagenesx = Yii::getPathOfAlias('webroot.fotosinv') . DIRECTORY_SEPARATOR;
$baserutacorta = substr($rutaimagenesx, strpos($rutaimagenesx, yii::app()->baseUrl));
$_SESSION['sesion_Inventario_busqueda'] = $provedo->getKeys();
?>

 
<?php 
$gridWidget = $this->widget('zii.widgets.grid.CGridView', array('id' => 'inventario-grid', 'dataProvider' => $provedo, 'itemsCssClass' => 'table table-striped table-bordered table-hover', 'columns' => array(array('name' => 'barcoactual.nomep', 'header' => 'Actual', 'value' => '$data->barcoactual->nomep'), array('name' => '.', 'header' => '.', 'type' => 'raw', 'value' => 'CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"]."estado".$data->codestado.".png","",array("width"=>15,"height"=>15))'), array('name' => 'codigosap', 'header' => 'C. Sap', 'type' => 'raw', 'value' => 'CHtml::link($data->codigosap,array("inventario/detalle","id"=>$data->idinventario),array("onClick"=>"Loading.show(); return true;"))'), array('name' => 'imagen', 'type' => 'raw', 'value' => '(file_exists(Yii::getPathOfAlias(\'webroot.fotosinv\').DIRECTORY_SEPARATOR.$data->codpropietario.DIRECTORY_SEPARATOR.trim($data->idinventario).\'.JPG\'))?
						CHtml::image(Yii::app()->baseUrl.DIRECTORY_SEPARATOR.\'fotosinv\'.DIRECTORY_SEPARATOR.$data->codpropietario.DIRECTORY_SEPARATOR.trim($data->idinventario).\'.JPG\',$data->codigosap,array(\'width\'=>60,\'height\'=>50)):
						"--"'), array('name' => 'codigoaf', 'header' => 'Plaquita', 'type' => 'raw', 'value' => 'CHtml::link($data->codigoaf,array("inventario/update","id"=>$data->idinventario),array("onClick"=>"Loading.show(); return true;"))'), array('name' => 'descripcion', 'header' => 'Descripcion del activo', 'value' => '$data->descripcion'), 'marca', 'modelo', 'serie', array('name' => '.', 'header' => '.', 'type' => 'raw', 'value' => '(!$data->rocoto=="1")?CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"]."ancla.png","",array("width"=>15,"height"=>15)):CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"]."truck.png","",array("width"=>15,"height"=>15))'), array('name' => 'lugares_lugar', 'header' => 'Lugar', 'value' => '$data->lugares->deslugar'), 'documentox.desdocu', array('name' => 'fecha', 'value' => 'date("d/m/Y",strtotime($data->fecha))'), 'numerodocumento')));
//$this->endWidget();
?>

<?php 
//Capture your CGridView widget on a variable
//$gridWidget=$this->widget('bootstrap.widgets.TbGridView', array( . . .
$this->renderExportGridButton($gridWidget, 'Exportar resultados', array('class' => 'btn btn-info pull-right'));
?>
 
 <div style="float:left; width=200px height=200px ; border 1px #000 solid;">
							<?php 
$gridWidget = $this->widget('zii.widgets.grid.CGridView', array('id' => 'estados-grid', 'summaryText' => '', 'dataProvider' => Estado::model()->search_por_docu('390'), 'cssFile' => '/motoristas/css/grid/grilla_natanja.css', 'columns' => array(array('name' => 'estado'), array('name' => '.', 'header' => '.', 'type' => 'raw', 'value' => 'CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"]."estado".$data->codestado.".png","",array("width"=>15,"height"=>15))'))));
?>
					
				</div>	
 </div>

Esempio n. 18
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = Estado::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Esempio n. 19
0
    /**
     *
     * @param int $cp_id
     * @param int $cp
     * @param string $direccion
     * @param int $tipoCol
     * @param string $colonia
     * @param string $municipio
     * @param string $ciudad
     * @param int $ciudadID
     * @param string $estado
     * @param int $pais
     * @return string de los datos de la ubicacion por cada etiqueta
     */
    private function datosDomicilio($cp_id, $cp, $direccion, $tipoCol, $colonia, $municipio, $ciudad, $ciudadID, $estado, $pais, $internacional, $debug = false)
    {
        $domicilio = "";
        $direccion_r = trim($direccion);
        if (!$debug) {
            empty($direccion_r) ? $domicilio .= '' : ($domicilio .= '<br>' . $direccion);
        } else {
            empty($direccion_r) ? $domicilio .= '<br><b>VERIFICAR CALLE Y NUMERO</b> (NO TIENE)' : ($domicilio .= '<br>' . $direccion);
        }
        if (empty($cp_id)) {
            $tipoColonia_r = trim($tipoCol);
            $colonia_r = trim($colonia);
            $municipio_r = trim($municipio);
            $ciudad_r = trim($ciudad);
            $ciudadID_r = trim($ciudadID);
            $estado_r = trim($estado);
            $cp_r = trim($cp);
            if (!empty($tipoColonia_r)) {
                $domicilio .= '<br>' . TipoAsentamiento::model()->findByPk($tipoCol)->nombre;
                if ($internacional || !$debug) {
                    empty($colonia_r) ? $domicilio .= '' : ($domicilio .= ' ' . $colonia);
                } else {
                    empty($colonia_r) ? $domicilio .= ' <b>VERIFICAR COLONIA</b> (NO TIENE)' : ($domicilio .= ' ' . $colonia);
                }
            } else {
                if ($internacional || !$debug) {
                    empty($colonia_r) ? $domicilio .= '' : ($domicilio .= '<br>' . $colonia);
                } else {
                    empty($colonia_r) ? $domicilio .= '<br><b>VERIFICAR COLONIA</b> (NO TIENE)' : ($domicilio .= '<br>' . $colonia);
                }
            }
            if ($internacional && !empty($cp_r)) {
                $domicilio .= '<br>' . $cp;
            } elseif (!empty($cp_r)) {
                $domicilio .= '<br>' . $cp;
            }
            if (!empty($municipio_r) || !empty($ciudad_r) || !empty($ciudadID_r)) {
                if (!empty($municipio_r)) {
                    $domicilio .= ' ' . $municipio;
                } elseif (!empty($ciudadID_r)) {
                    $ciudadConsulta = Ciudad::model()->findByPk($ciudadID);
                    if ($ciudadConsulta != null) {
                        $domicilio .= ' ' . $ciudadConsulta->nombre;
                    }
                } elseif (!empty($ciudad_r)) {
                    $domicilio .= ' ' . $ciudad;
                }
            } else {
                if ($internacional || !$debug) {
                    $domicilio .= '';
                } else {
                    $domicilio .= ' <b>VERIFICAR MUNICIPIO O CIUDAD</b> (NO TIENE NINGUNO)';
                }
            }
            if (!empty($estado_r)) {
                $estadoConsulta = Estado::model()->findByPk($estado);
                if ($estadoConsulta != null) {
                    $domicilio .= ', ' . $estadoConsulta->nombre;
                } else {
                    $domicilio .= ', ' . $estado;
                }
            } else {
                if ($internacional || !$debug) {
                    $domicilio .= '';
                } else {
                    $domicilio .= ', <b>VERIFICAR ESTADO</b> (NO TIENE)';
                }
            }
            $domicilio .= '<br>' . $pais;
        } else {
            $ubicacion = Yii::app()->db->createCommand()->select('c.id AS cp_id, a.id AS id_a, a.nombre AS nombre_a, asen.id AS id_asen, asen.nombre AS nombre_asen,
					m.id AS id_m, m.nombre AS nombre_m, cd.id AS id_cd, cd.nombre AS nombre_cd, e.id AS id_e, e.nombre AS nombre_e')->from('codigo_postal c')->leftJoin('asentamiento a', 'c.asentamiento_id=a.id')->leftJoin('tipo_asentamiento asen', 'a.tipo_asentamiento_id=asen.id')->leftJoin('municipio m', 'a.municipio_id=m.id')->leftJoin('ciudad cd', 'm.ciudad_id=cd.id')->leftJoin('estado e', 'm.estado_id=e.id')->where('c.id=' . $cp_id)->queryRow();
            $domicilio .= '<br>' . $ubicacion['nombre_asen'] . ' ' . $ubicacion['nombre_a'];
            $domicilio .= '<br>' . $cp . ' ' . $ubicacion['nombre_m'] . ', ' . $ubicacion['nombre_e'];
            $domicilio .= '<br>' . $pais;
        }
        return $domicilio;
    }
Esempio n. 20
0
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     date_default_timezone_set('America/Argentina/Buenos_Aires');
     $model = new Usuario();
     $send = new SendEmailService();
     $userv = new UsuarioService();
     $profesor = new FichaUsuario();
     $localidad = new Localidad();
     $estado = new Estado();
     // Uncomment the following line if AJAX validation is needed
     //$this->performAjaxValidation(array($model,$profesor));
     if (isset($_POST['enviar'])) {
         $valexito = 1;
         // si las validaciones se realizaron con exito.
         $model->email = $_POST['email'];
         $usuario = Yii::app()->db->createCommand("SELECT id_usuario FROM usuario where email = '{$model->email}'")->queryRow();
         if ($usuario['id_usuario'] != '') {
             echo "err_mail_dup/";
             $valexito = 0;
         } else {
             echo "/";
         }
         $model->password = $_POST['password'];
         $model->id_perfil = $_POST['id_perfil'];
         $profesor->nombre = $_POST['nombre'];
         $profesor->apellido = $_POST['apellido'];
         $profesor->dni = $_POST['dni'];
         $usuario = Yii::app()->db->createCommand("SELECT id_usuario FROM ficha_usuario where dni = '{$profesor->dni}'")->queryRow();
         if ($usuario['id_usuario'] != '') {
             echo "err_dni_dupl/";
             $valexito = 0;
         } else {
             echo "/";
         }
         $profesor->sexo = $_POST['sexo'];
         $profesor->fechanac = $_POST['fechanac'];
         $profesor->telfijo = $_POST['telfijo'];
         $profesor->conemer = $_POST['conemer'];
         $profesor->telemer = $_POST['telemer'];
         $profesor->direccion = $_POST['direccion'];
         $profesor->piso = $_POST['piso'];
         $profesor->depto = $_POST['depto'];
         $model->fhcreacion = new CDbExpression('NOW()');
         $model->fhultmod = new CDbExpression('NOW()');
         $model->cusuario = $model->email;
         $passencr = md5($model->password);
         // encripto la password en MD5
         $estado = Estado::model()->findByPk(0);
         $model->id_estado = $estado->id_estado;
         $localidad->id_provincia = $_POST['provincia'];
         $localidad->fhcreacion = new CDbExpression('NOW()');
         $localidad->fhultmod = new CDbExpression('NOW()');
         $localidad->cusuario = $model->email;
         $profesor->fhcreacion = new CDbExpression('NOW()');
         $profesor->fhultmod = new CDbExpression('NOW()');
         $profesor->cusuario = $model->email;
         $profesor->id_localidad = $_POST['localidad'];
         $mail = $model->email;
         if ($valexito == 1) {
             if ($model->save()) {
                 Usuario::model()->updateAll(array('password' => $passencr), 'email="' . $mail . '"');
                 $usuario = Usuario::model()->findByAttributes(array('email' => $mail));
                 $profesor->id_usuario = $usuario->id_usuario;
                 if ($profesor->save()) {
                     $send->Send($model->email);
                     echo "actusuok";
                 }
             }
         }
     } else {
         $this->render('create', array('model' => $model, 'ficha_usuario' => $profesor, 'localidad' => $localidad));
     }
 }
Esempio n. 21
0
<?php

$this->breadcrumbs = array('Mensajes' => array('admin'), Yii::t('App', 'Manage'));
$this->menu = array(array('label' => Yii::t('App', 'List') . ' Mensaje', 'url' => array('admin')), array('label' => Yii::t('App', 'Create') . ' Mensaje', 'url' => array('create')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').slideToggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('mensaje-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1><?php 
echo Yii::t('App', 'Manage');
?>
 Mensajes</h1>

<?php 
echo CHtml::link(Yii::t('App', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'mensaje-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('class' => 'CCheckBoxColumn'), array('name' => 'id', 'value' => $model->id, 'htmlOptions' => array('style' => 'width:50px')), array('name' => 'operadoraid', 'value' => '$data->operadora->nombre', 'filter' => CHtml::listData(Operadora::model()->findAll(), 'id', 'nombre')), array('name' => 'usuarioid', 'value' => '$data->usuario->username', 'filter' => CHtml::listData(Usuario::model()->findAll(), 'id', 'username')), array('name' => 'estadoid', 'value' => '$data->estado->nombre', 'filter' => CHtml::listData(Estado::model()->findAll(), 'id', 'nombre')), array('name' => 'envioid', 'value' => '$data->envio->grupos', 'filter' => CHtml::listData(Envio::model()->findAll(), 'id', 'grupos')), 'telefono', array('class' => 'CButtonColumn', 'template' => '{update} {delete}'))));
Esempio n. 22
0
echo $form->textField($model, 'Pagado');
?>
		<?php 
echo $form->error($model, 'Pagado');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'Estado');
?>
		<?php 
//echo $form->textField($model,'IdEstado');
?>
		<?php 
echo $form->dropDownList($model, 'IdEstado', CHtml::listData(Estado::model()->findAll(array('order' => 'Nombre')), 'IdEstado', 'Nombre'), array('prompt' => 'Seleccione un Estado'));
?>
		<?php 
echo $form->error($model, 'IdEstado');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'DomicilioEnvio');
?>
		<?php 
echo $form->textField($model, 'DomicilioEnvio', array('size' => 60, 'maxlength' => 100));
?>
		<?php 
echo $form->error($model, 'DomicilioEnvio');
Esempio n. 23
0
 public function actionBuscarEstado()
 {
     $parametros = Util::getParametrosJSON();
     $estado = Estado::model()->findByPk($parametros['id']);
     Util::setParametrosJSON($estado);
 }
Esempio n. 24
0
echo $form->error($model, 'codcentro');
?>
	</div>

</div>
<div class="panelderecho">


	<div class="row">
		<?php 
echo $form->labelEx($model, 'codestadovale');
?>
		
		<?php 
if (!$model->isNewRecord) {
    echo CHtml::textField('hola', Estado::model()->find('codestado=:miestado and codocu=:midocumento', array(':midocumento' => '010', ':miestado' => $model->cestadovale))->estado, array('disabled' => 'disabled', 'size' => 20));
}
?>
		
	</div>

	

	

	<div class="row">
		<?php 
echo $form->labelEx($model, 'fechacont');
?>
		<?php 
if ($model->isNewRecord) {
Esempio n. 25
0
    ?>
                <div class="col-md-12">

                    <div class="col-md-4">
                        <div class="form-group btn-primary" style="padding-left: 10px">
                            <label class="control-label" style="width: 100%">Tarea:</label>
                            <label style="width: 100%;font-size: 20px;font-weight: lighter;"><?php 
    echo $ta->tarea->nombre;
    ?>
</label>
                        </div>
                    </div>

                    <div class="col-md-4">
                    <?php 
    echo $form->dropDownListGroup($ta, '[' . $ta->tarea_id . ']estado_id', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => CHtml::listData(Estado::model()->findAll(), 'id', 'nombre'), 'htmlOptions' => array('prompt' => 'Seleccione Estado'))));
    ?>
                    </div>

                    <?php 
    $this->widget('booster.widgets.TbButton', array('label' => '?', 'htmlOptions' => array('data-title' => 'Descripción', 'data-placement' => 'right', 'data-content' => $ta->tarea->descripcion, 'data-toggle' => 'popover', 'data-html' => true)));
    ?>

                </div>
               <?php 
}
?>

            </div>
        </div>
    </div>
Esempio n. 26
0
	
	
	
	
	
	<div class="row">
    <?php 
$documento = '032';
$criteria = new CDbCriteria();
$criteria->condition = 'codocu=:docu';
$criteria->params = array(':docu' => $documento);
//$post = Post::model()->find($criteria);
//$datos = CHtml::listData(Estado::model()->find('codocu=:c_hcod', array(':c_hcod'=>$documento)),'codestado','estado');
//datos = CHtml::listData(Estado::model()->find($criteria),'codestado','estado');
echo $form->label($model, 'codestado');
$datos = CHtml::listData(Estado::model()->findall($criteria), 'codestado', 'estado');
echo $form->DropDownList($model, 'codestado', $datos, array('empty' => '--Indique el status--'));
?>
	</div>
	<?php 
echo CHtml::submitButton('Filtrar', array('class' => 'botoncito'));
?>
    	</FIELDSET>
</div>

 </FIELDSET>
 </div>
 </div>
		
	
Esempio n. 27
0
echo $form->labelEx($model, 'detalle');
?>
		<?php 
echo $form->textArea($model, 'detalle', array('rows' => 6, 'cols' => 50));
?>
		<?php 
echo $form->error($model, 'detalle');
?>
	</div>

	<div class="row">
		
		<?php 
if (!$model->isNewRecord) {
    echo $form->labelEx($model, 'estadodetalle');
    echo CHtml::textField('hola', Estado::model()->find('codestado=:miestado and codocu=:midocumento', array(':midocumento' => '022', ':miestado' => $model->estadodetalle))->estado, array('id' => 'pepin', 'disabled' => 'disabled', 'size' => 20));
}
?>
		
	</div>


	<div class="row">
		<?php 
echo $form->labelEx($model, 'um');
?>
		<?php 
$datos = CHtml::listData(Ums::model()->findAll(), 'um', 'desum');
echo $form->DropDownList($model, 'um', $datos, array('empty' => '--Unidad de medida--'));
?>
		<?php 
Esempio n. 28
-1
$form = $this->beginWidget('CActiveForm', array('enableAjaxValidation' => true, 'method' => 'GET'));
?>
<div class="row">
	<div class='botones'>
		<?php 
echo CHtml::imageButton(Yii::app()->getTheme()->baseUrl . '/img/seleccionar.png', array('width' => 25, 'height' => 25, 'value' => 'Buscar', 'onClick' => 'Loading.show();Loading.hide();'));
?>
	</div>
</div>

<?php 
$documento = '032';
$criteria = new CDbCriteria();
$criteria->condition = 'codocu=:docu';
$criteria->params = array(':docu' => $documento);
//$post = Post::model()->find($criteria);
//$datos = CHtml::listData(Estado::model()->find('codocu=:c_hcod', array(':c_hcod'=>$documento)),'codestado','estado');
//datos = CHtml::listData(Estado::model()->find($criteria),'codestado','estado');
// $datos = CHtml::listData(Estado::model()->findall($criteria),'codestado','estado');
?>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'inventario-grid', 'dataProvider' => $model->searchlimpio(), 'cssFile' => Yii::app()->getTheme()->baseUrl . '/css/grilla_naranja.css', 'filter' => $model, 'columns' => array(array('class' => 'CCheckBoxColumn', 'selectableRows' => 10, 'value' => '$data->idinventario', 'checkBoxHtmlOptions' => array('name' => 'checkselected[]')), array('name' => 'codigoaf', 'header' => 'Codigo Placa', 'htmlOptions' => array('width' => '5')), array('name' => 'codigosap', 'header' => 'Codigo SAP', 'htmlOptions' => array('width' => '5')), array('name' => 'descripcion', 'header' => 'Descripcion', 'htmlOptions' => array('width' => '25')), array('name' => 'marca', 'header' => 'Marca', 'htmlOptions' => array('width' => '10')), array('name' => 'modelo', 'header' => 'Modelo', 'htmlOptions' => array('width' => '10')), array('name' => 'codlugar', 'value' => '$data->lugares->deslugar', 'filter' => CHtml::listdata(Lugares::model()->findall(), 'codlugar', 'deslugar')), array('name' => 'codestado', 'value' => '$data->estado->estado', 'filter' => CHtml::listdata(Estado::model()->findall($criteria), 'codestado', 'estado')), array('name' => 'codep', 'value' => '$data->barcoactual->nomep', 'filter' => CHtml::listdata(Embarcaciones::model()->findall(), 'codep', 'nomep')))));
?>
<div class="row buttons">
		<?php 
echo CHtml::submitButton('Seleccionar');
?>
	</div>
<?php 
$this->endWidget();