include/post.fun.php 文件的group_select函数增加 排除参数 except
function group_select($name = ‘groupid’, $title = ”, $groupid = ”, $extend = ”,$except = ”) {
global $GROUP;
if(!$GROUP) $GROUP = cache_read(‘group.php’);
$select = ‘<select name=”‘.$name.'” ‘.$extend.’><option value=”0″>’.$title.'</option>’;
$except = $except ? explode(‘,’, $except) : array();
foreach($GROUP as $k=>$v) {
if(in_array($k, $except)) continue;
$select .= ‘<option value=”‘.$k.'”‘.($k == $groupid ? ‘ selected’ : ”).’>’.$v[‘groupname’].'</option>’;
}
$select .= ‘</select>’;
return $select;
}
在现实会员组下拉框的地方 group_select(。。。。。,’1,3,5′)
例如 :echo group_select(‘groupid’, ‘会员组’, 0, ‘id=”mgroupid”‘,’1,3,5’);