function pageindex($inPath) { $url = $this->getUrlParams($inPath); $aid = (int) $url['aid']; $this->params['aid'] = $aid; $adminObj = new m_admin($aid); if ($aid) { if ($_POST['group'] > 0) { $post = base_Utils::shtmlspecialchars($_POST); if ($post['pwd']) { $adminObj->set("admin_pwd", md5($post['pwd'])); } if ($post['group']) { $adminObj->set("gid", $post['group']); } if ($adminObj->save($aid)) { $this->ShowMsg('修改成功', $this->createUrl('/account/index'), '', '1'); } $this->ShowMsg('修改出错!原因:' . $adminObj->getError()); } else { $groupObj = new m_group(); $this->params['group'] = $groupObj->select()->items; $this->params['account'] = $adminObj->get(); return $this->render('account/indexshow.html', $this->params); } } $prefix = base_Constant::TABLE_PREFIX; $account = $adminObj->select('', '', '', '', array("{$prefix}group" => "{$prefix}group.gid={$prefix}admin.gid"))->items; $this->params['account'] = $account; return $this->render('account/index.html', $this->params); }