/**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Carrera('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Carrera'])) {
         $model->attributes = $_GET['Carrera'];
     }
     $this->render('admin', array('model' => $model));
 }
 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     $session = new CHttpSession();
     $session->open();
     $criteria = new CDbCriteria();
     $model = new Carrera('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Carrera'])) {
         $model->attributes = $_GET['Carrera'];
         if (!empty($model->id)) {
             $criteria->addCondition('id = "' . $model->id . '"');
         }
         if (!empty($model->nombreCarrera)) {
             $criteria->addCondition('nombreCarrera = "' . $model->nombreCarrera . '"');
         }
     }
     $session['Carrera_records'] = Carrera::model()->findAll($criteria);
     $this->render('index', array('model' => $model));
 }
 public function actionparametrizarCampos()
 {
     $tipoCarrera = new TipoCarrera('BusquedaTiposCarreras');
     $Carrera = new Carrera('BusquedaCarreras');
     $TipoEmpresa = new TipoEmpresa('BusquedaTipoEmpresa');
     $tipoCarrera->unsetAttributes();
     $Carrera->unsetAttributes();
     $TipoEmpresa->unsetAttributes();
     if (isset($_GET['TipoCarrera'])) {
         $tipoCarrera->attributes = $_GET['TipoCarrera'];
     }
     if (isset($_GET['Carrera'])) {
         $Carrera->attributes = $_GET['Carrera'];
     }
     if (isset($_GET['TipoEmpresa'])) {
         $TipoEmpresa->attributes = $_GET['TipoEmpresa'];
     }
     $this->render('parametrizarCampos', array('model' => $this->loadModel(Yii::app()->user->getId()), 'tipoCarrera' => $tipoCarrera, 'Carrera' => $Carrera, 'TipoEmpresa' => $TipoEmpresa));
 }