<?php /* @var $this PromocionesController */ /* @var $model Promociones */ $this->menu = array(array('label' => 'Crear Promociones', 'url' => array('create')), array('label' => 'Buscar Promociones Activas', 'url' => array('admin', 'estado' => 'Activa')), array('label' => 'Buscar Promociones Vencidas', 'url' => array('admin', 'estado' => 'Vencida'))); $lasVencidas = Promociones::model()->findAll("estado = 'Vencida'"); ?> <style> #anuncios table{ width:90%; border-collapse: collapse; border:black 1px solid; } #anuncios tr { border: black 1px solid; } #anuncios td { border: black 1px solid; } </style> <h2>Promociones Vencidas</h2> <hr> <?php if (!$lasVencidas) { echo "<h4 class='text-error'>No hay promociones vencidas</h4>"; }
<?php /* @var $this PromocionesController */ /* @var $model Promociones */ $this->menu = array(array('label' => 'Crear Promociones', 'url' => array('create')), array('label' => 'Buscar Promociones Activas', 'url' => array('admin', 'estado' => 'Activa')), array('label' => 'Buscar Promociones Vencidas', 'url' => array('admin', 'estado' => 'Vencida'))); $lasActivas = Promociones::model()->findAll("estado = 'Activa'"); ?> <style> #anuncios table{ width:90%; border-collapse: collapse; border:black 1px solid; } #anuncios tr { border: black 1px solid; } #anuncios td { border: black 1px solid; } </style> <h2>Promociones Activas</h2> <hr> <?php if (!$lasActivas) { echo "<h4 class='text-error'>No hay promociones activas</h4>"; } foreach ($lasActivas as $las_activas) {
/** * 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 Promociones the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Promociones::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }