/** * 返回图片列表 * @access public */ function index() { $field = array('rotation_id', 'type', 'image_name'); $m = new Rotation(); $m->clear(); $m->setField($field); $m->setTable('vcb_rotation'); //$m->setWhere('status', '!=', '60000'); $data = $m->select(); print_r($data); //状态标题 $count = count($data); for ($i = 0; $i < $count; $i++) { //$data[$i]['status_cn'] = $m->getStatus('cn',$data[$i]['status']); //$data[$i]['status_th'] = $m->getStatus('th',$data[$i]['status']); $data[$i]['type'] = $m->getTypeCaption($data[$i]['type']); //$data[$i]['image_path'] = $m->getImage($data[$i]['category_id']); } echo "<br/>"; print_r($data); $this->assign('data', $data); }