ModelName = ClassRegistry::init($model); $cnd=array('fields'=>array($model.'.'.$fld_id,$model.'.'.$fld_lbl)); $tags= $this->ModelName->find('all',$cnd); $arr_reg=array(); foreach($tags as $x) $arr_reg[(string)($x[$model][$fld_id])]=$x[$model][$fld_lbl]; return $arr_reg; } public function get_req_field($id,$field,$model) { App::uses('ClassRegistry', 'Utility'); $this->ModelName = ClassRegistry::init($model); $cond = array( 'conditions' => array(''.$model.'.id' => $id), //array of conditions 'fields' => array(''.$model.'.'.$field.''), //array of field names ); $data = $this->ModelName->find('all',$cond); return $data[0][$model]; } } ?> Quick Office Pro - Errors Html->meta( 'favicon.ico', $this->webroot.'favicon.ico', array('type' => 'icon') ); ?>
element('header')?> element('pagenotfound')?> element('footer')?>