/**
  * 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 FaceImageMaster the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = FaceImageMaster::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
 public function getImages($fm_id)
 {
     $images = FaceImageMaster::model()->findAllByAttributes(array('fm_id' => $fm_id));
     $image = array();
     $count = 0;
     foreach ($images as $img) {
         //            $i.='http://' . $_SERVER['HTTP_HOST'] . $this->imgPath;
         //            $i.= $img->image;
         $image[$count] = '<a class="popup-img" href="' . self::model()->imgPath . $img->image . '" ><img src="' . self::model()->imgPath . $img->image . '" height="60"  width="80"/></a>';
         //           $i.= "<br>";
         $count++;
     }
     $i = implode('<br><br>', $image);
     //        echo '<pre>';print_r($i);die;
     return $i;
 }