/**
  * 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 = AdminEventModel::model()->findByPk(new MongoId($id));
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #2
0
	</div>
    <div class="row">
        <?php 
echo $form->label($model, 'user_phone');
?>
        <?php 
echo $form->textField($model, 'user_phone');
?>
    </div>
	<div class="row">
		<?php 
echo $form->label($model, 'event_id');
?>
        <?php 
$c = array('conditions' => array('status' => array('==' => EventModel::_ACTIVE)));
$eventGroup = AdminEventModel::model()->findAll($c);
$eventGroupData = array();
foreach ($eventGroup as $event) {
    $eventGroupData["{$event->_id}"] = $event->name;
}
echo $form->dropDownList($model, 'event_id', $eventGroupData, array('prompt' => '--Tất cả--'));
?>
		<?php 
//echo $form->textField($model,'event_id');
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'point');
?>