<%
Function GetGroupSysChk(ByVal GroupId, ByVal ChannelName, ByVal ValType)
    GetGroupSysChk = Easp.IIf(GetGroupSysName(GroupId, ChannelName, ValType), " checked=""checked""", "")
End Function

Function GetGroupChannelChk(ByVal GroupId, ByVal ChannelId, ByVal ValType)
    GetGroupChannelChk = Easp.IIf(GetGroupChannel(GroupId, ChannelId, ValType), " checked=""checked""", "")
End Function

Function GetGroupTypeName(ByVal id)
    Dim strTemp
    Select Case CmsFun.ChkNumEric(id)
        Case 1
            strTemp = "超级用户"
        Case 2
            strTemp = "系统用户"
        Case Else
            strTemp = "角色类型错误"
    End Select
    GetGroupTypeName = strTemp
End Function

Function GetGroupType(ByVal GroupType, ByVal Val)
    Dim strTemp, ArrayList, ii
    ArrayList = Array("请选择角色类型", "超级用户(拥有所有权限,权限区域可以不用设置)", "系统用户")
    strTemp = "<select name=""GroupType"" id=""GroupType"" class=""select2"">" & vbCrLf
    strTemp = strTemp & "<option value=""0"""& Easp.IIf(Trim(Val) = Trim(0), " selected=""selected""", "") &">请选择角色类型</option>" & vbCrLf
    If GroupType < 2 Then
        strTemp = strTemp & "<option value=""1"""& Easp.IIf(Trim(Val) = Trim(1), " selected=""selected""", "") &">超级用户(拥有所有权限,权限区域可以不用设置)</option>" & vbCrLf
    End If
    strTemp = strTemp & "<option value=""2"""& Easp.IIf(Trim(Val) = Trim(2), " selected=""selected""", "") &">系统用户</option>" & vbCrLf
    strTemp = strTemp & "</select>"
    GetGroupType = strTemp
End Function

Function GetGroupType(ByVal Val, ByVal JsCode)
    Dim strTemp, ArrayList, ii
    ArrayList = Array("请选择组别类型", "超级用户", "左边漂浮广告", "右边漂浮广告", "代码广告(Html文件形式)", "代码广告(Js文件形式)")
    strTemp = "<select name=""GroupType"" id=""GroupType"" class=""select2"">" & vbCrLf
    For ii = 0 To UBound(ArrayList)
        strTemp = strTemp & "<option value="""& ii &""""& Easp.IIf(Trim(Val) = Trim(ii), " selected=""selected""", "") &">"& ArrayList(ii) &"</option>" & vbCrLf
    Next
    strTemp = strTemp & "</select>"
    GetGroupType = strTemp
End Function

Function GetGroupList(ByVal Val, ByVal GroupType)
    Dim strTemp, oRs, ArrayList, ii
    strTemp = "<select name=""GroupId"" id=""GroupId"" class=""select2"">" & vbCrLf
    strTemp = strTemp & "<option value=""0"">请选择角色</option>" & vbCrLf
    Set oRs = Easp.db.GR(TablePrefix & "Admin_Group:Id,GroupName,GroupType", "", " Id Asc")
    If Not Easp.IsN(oRs) Then
        ArrayList = oRs.GetRows()
    End If
    Easp.C oRs
    If IsArray(ArrayList) Then
        For ii = 0 To UBound(ArrayList, 2)
            If CmsFun.ChkNumEric(ArrayList(2, ii)) >= CmsFun.ChkNumEric(GroupType) Then
                strTemp = strTemp & "<option value="""& ArrayList(0, ii) &""""& Easp.IIf(Trim(Val) = Trim(ArrayList(0, ii)), " selected=""selected""", "") &">"& ArrayList(1, ii) &"</option>" & vbCrLf
            End If
        Next
    End If
    strTemp = strTemp & "</select>"
    GetGroupList = strTemp
End Function
%>