コード例 #1
0
	                <?php 
if ($fotografias > 0) {
    ?>
		                <div class="tab-pane" id="fotografias">
		                	<h5>Historial de Fotografia de Pacientes</h5>
		                	<table class="table table-condensed">
		                		<tr>
		                			<th>Fecha</th>
		                			<th>Descripción</th>
		                			<th>Fotografias</th>
		                			<th></th>
		                		</tr>
		                
		                	<?php 
    $lasFotografias = PacienteFotografias::model()->findAll("paciente_id = {$model->id}");
    foreach ($lasFotografias as $las_fotografias) {
        $nFotografias = PacienteFotografiasDetalle::model()->count("paciente_fotografias_id = {$las_fotografias->id}");
        ?>
						 			<tr>
						 				<td><?php 
        echo Yii::app()->dateformatter->format("dd-MM-yyyy", $las_fotografias->fecha);
        ?>
</td>
						 				<td><?php 
        echo $las_fotografias->comentario;
        ?>
</td>
						 				<td><?php 
        echo $nFotografias;
        ?>
コード例 #2
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 $id the ID of the model to be loaded
  * @return PacienteFotografias the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = PacienteFotografias::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }