/** * 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 Complex the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Complex::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
break; } $array[$j['id']] = $court . "-" . $j['judge_name'] . "-" . $j['desg_code'] . "-" . $j['judge_code']; } ?> <?php echo $form->dropDownListControlGroup($model, 'judge_id', $array, array()); ?> <?php echo $form->dropDownListControlGroup($model, 'est_id', CHtml::listData(Establishments::model()->findAll(array('order' => 'est_name ASC')), 'id', 'est_name'), array('span' => 5)); ?> <?php $complex = Complex::model()->findAllByAttributes(array('district' => $model->dist), array('order' => 'name ASC')); //print_r($model->distcode);exit; $array = array(); foreach ($complex as $j) { $array[$j['type'] . "-" . $j['name']] = $j['type'] . "-" . $j['name']; } ?> <?php echo $form->dropDownListControlGroup($model, 'complex', $array, array()); ?> <?php } ?>