/** * 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 InventarioPersonal the loaded model * @throws CHttpException */ public function loadModel($id) { $model = InventarioPersonal::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
<td> <img src="images/empleados.png"/></div> </td> </tr> </table> </header> </div> <!--Contadores --> <?php $pacientes = Paciente::model()->count(); $citas = Citas::model()->count("fecha_cita = '" . date('Y-m-d') . "' and estado = 'Programada'"); $seguimientos = SeguimientoComercial::model()->count("fecha_accion = '" . date('Y-m-d') . "'"); $vencidas = Citas::model()->count("estado = 'Vencida'"); $inventario = InventarioPersonal::model()->count("personal_id = " . Yii::app()->user->usuarioId); $tareas = 0; if (!Yii::app()->user->isGuest) { $tareas = PersonalTareas::model()->count("estado = 'Activa' and personal_id = " . Yii::app()->user->usuarioId); } ?> <div class="row"> <div class = "span4"> <?php $this->beginWidget('zii.widgets.CPortlet', array('title' => "<b>Pacientes Registrados</b>")); ?> <div class="row"> <div class="span2"> <h3>Total:</h3>