示例#1
0
 public function actionReportinfra()
 {
     $modelEqp = Infra::model();
     if (isset($_POST['Infra'])) {
         $modelEqp->attributes = $_POST['Infra'];
         $this->render('reportInfra', array('model' => $modelEqp, 'idCod' => $modelEqp->COD, 'fecha' => 2013, 'excel' => 0, 'pdf' => 0));
     } else {
         $this->render('reportInfra', array('model' => $modelEqp, 'idCod' => 0, 'fecha' => 2013, 'excel' => 0, 'pdf' => 0));
     }
 }
示例#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 Infra the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Infra::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
示例#3
0
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'infra-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'Registro'); ?>
                <?php $last = Infra::model()->getLastId();
               echo $form->textField($model,'Registro',array('readonly'=>'readonly' ,'value'=>$last+1));  ?>
		<?php echo $form->error($model,'Registro'); ?>
	</div>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'FECHA'); ?>
		<?php
                /*
                 * Esta funcion llama al componente zii.widgets.jui.CJuiDatePicker
                 * Que depliega un calendario en la interface de usuario
                 */
                $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                    'language'=>'es',