/**
  * 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 = TextoGira::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Beispiel #2
0
                                    <?php 
}
?>
                        </ul>
                    </li>
                    <li>
                        <?php 
echo CHtml::link("Contacto", array('/site/contact'));
?>
                    </li>
                     <li class='centroitem'>    
                            <?php 
$texto = "";
$cont = 0;
for ($i = 0; $i < 5; $i++) {
    $textoGira = TextoGira::model()->findAll(array('order' => 'idTexto DESC', 'limit' => 5));
    if ($textoGira == Null) {
        $i--;
    } else {
    }
}
foreach ($textoGira as $dataTe) {
    $texto = $texto . "| <<  " . $dataTe->contenido . "  >> |";
}
?>
                            <input type="text" id="marquesina" disabled="true" style="color: gold; border: none; background:none; width: 700px ;height: 40px; margin-top:3px ;margin-left: 20px; margin-right: 40px;" />
                            <script type="text/javascript">
                            <!--

                            texto = "<?php 
echo $texto;