public function actionPendientes()
 {
     //Aca cargaremos todos los modelos
     $citasHoy = Citas::model()->count("fecha_cita = '" . date('Y-m-d') . "' and estado = 'Programada' and personal_id = " . Yii::app()->user->usuarioId);
     $seguimientosHoy = SeguimientoComercial::model()->count("fecha_accion = '" . date('Y-m-d') . "' and estado = 'Abierto' and responsable_id = " . Yii::app()->user->usuarioId);
     $citasVencidas = Citas::model()->count("estado = 'Vencida' and personal_id = " . Yii::app()->user->usuarioId);
     $seguimientosVencidos = SeguimientoComercial::model()->count("estado = 'Vencido' and responsable_id = " . Yii::app()->user->usuarioId);
     $tareas = PersonalTareas::model()->count("estado = 'Activa' and personal_id = " . Yii::app()->user->usuarioId);
     $tareasVencidas = PersonalTareas::model()->count("estado = 'Vencida' and personal_id = " . Yii::app()->user->usuarioId);
     $this->layout = 'main';
     $this->render('pendientes', array('citasHoy' => $citasHoy, 'seguimientosHoy' => $seguimientosHoy, 'citasVencidas' => $citasVencidas, 'seguimientosVencidos' => $seguimientosVencidos, 'tareas' => $tareas, 'tareasVencidas' => $tareasVencidas));
 }
<!--Contadores para menu-->

<?php 
//$pendientes = Reservacion::model()->count("cambio_tarifa = 'Pendiente'"); //Reservadas
$perfiles = Perfil::model()->find("estado='Activo'");
$tareas = 0;
if (!Yii::app()->user->isGuest) {
    $tareas = PersonalTareas::model()->count("estado = 'Activa' and personal_id = " . Yii::app()->user->usuarioId);
}
if ($tareas == 0) {
    $tareas = "";
}
?>

<div class="navbar navbar-inverse navbar-fixed-top">
	<div class="navbar-inner">
    <div class="container">
        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
     
          <!-- Be sure to leave the brand out there if you want it shown -->
          <a class="brand" href="#"><?php 
/*echo CHtml::encode($this->pageTitle); */
?>
Smadia Clinic</a>
          
          <div class="nav-collapse">
			<?php 
 /**
  * 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 $id the ID of the model to be loaded
  * @return PersonalTareas the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = PersonalTareas::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }