public function editCreditType()
{
$type = t($_GET['type']);
if ($cid = intval($_GET['cid'])) {
$creditType = M('credit_type')->where("`id`={$cid}")->find();
//积分类别
if (!$creditType) {
$this->error('无此积分类型');
}
$this->assign('creditType', $creditType);
}
$this->assign('type', $type);
$typeArr = array('score', 'experience');
//这两个类型的积分类别名不能被修改
if (in_array($creditType['name'], $typeArr) && $type == 'edit') {
$this->assign('forbidEdit', true);
}
$this->display();
}