Exemplo n.º 1
0
 function openAction()
 {
     $id = AF::get($this->params, 'id', false);
     if (!$id) {
         throw new AFHttpException(0, 'no_id');
     }
     $modelProspect = new Prospect();
     /*
     if( !$modelProspect->fillFromDbPk($id) )
         throw new AFHttpException(0, 'incorrect_id');
     */
     if (!$modelProspect->fillFromDbPkOpen($id)) {
         throw new AFHttpException(0, 'incorrect_id');
     }
     $this->addToPageTitle(__('Prospect Customer'));
     $lables = $modelProspect->attributeLabels();
     $infoFields = array('prospect_id', 'created_formatted', 'ip_formatted', 'email', 'phone', 'fname', 'lname', 'address1', 'address2', 'city', 'state_formatted', 'country_formatted', 'zip');
     $this->render('open', array('model' => $modelProspect, 'lables' => $lables, 'infoFields' => $infoFields));
 }