find($id); } else { $data = false; } return $data; } # 获取角色 public function getRole() { $role = Dever::db('store/member')->config['role']; $html = ' 全选'; $info = $this->getData(); foreach ($role as $k => $v) { $checked = ''; if ($info && $info['role_id']) { $temp = explode(',', $info['role_id']); if (in_array($k, $temp)) { $checked = 'checked'; } } $html .= ' '.$v.' '; } return $html; } # 订单列表 public function getList() { $data = Dever::db('store/member')->list(array('store_id' => $this->id)); $html = ''; if ($data) { $role = Dever::db('store/member')->config['role']; foreach ($data as $k => $v) { $edit = Dever::url('user_edit?id=' . $v['id'], 'store'); $temp = explode(',', $v['role_id']); $v['role_name'] = array(); foreach ($temp as $k1 => $v1) { if (isset($role[$v1])) { $v['role_name'][] = $role[$v1]; } } $v['role_name'] = implode(',', $v['role_name']); $cdate = date('Y-m-d H:i', $v['cdate']); $button = ''; if ($v['state'] == 1) { $state = 2; } else { $state = 1; } $del = Dever::url('admin/user.del?id=' . $v['id'] . '&state=' . $state, 'store'); if ($state == 2) { $button .= ' '; } else { $button .= ' '; } $html .= '