where($map)->page($page,$row)->order('status desc,create_time desc')->select(); $count = D('Msg')->where($map)->count(); $page = set_pagination($count,$row); if($page) {$this->assign('_page', $page);} $this->assign('list_data',$data); $this->meta_title = "站内通知"; $this->m_title = '站内通知'; $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Msg/lists','status'=>1])->find()); $this->display(); } public function read($ids=0){ /* if (!empty($ids)) { $map['id'] = array('in', $ids); $res = M('Msg', 'tab_')->where($map)->setField(array('status' => 1)); } if (I('type') == 2){ $this->redirect("http://".$_SERVER['HTTP_HOST']."admin.php?s=/Msg/lists"); }else{ $this->success(); } */ if(empty($ids)){ $this->error('请选择要操作的数据'); } $map['id'] = array('in',$ids); $data = array('status' => 1); $this->editRow( 'Msg' , $data, $map, array( 'success'=>'操作成功!', 'error'=>'操作失败!')); } public function looktoread($ids=0){ $model= M('Msg', 'tab_'); if (!empty($ids)) { $map['id'] = $ids; $res = $model->where($map)->setField(array('status' => 1)); } $look= $model->where(['id'=>$ids])->find(); redirect("http://".$_SERVER['HTTP_HOST'] . '/admin.php?s=/Apply/and_lists/type/'.$look['sdk_version'].'/game_id/'.$look['game_id']); } }