<%
dim types, arrPM, i, objRS, disHead, disTitle, id, strSQL, searchBy, criteria, SQL , catId, gid
types = request.queryString("types")
id = request.queryString("id")
gid = request.queryString("gid")
catId = request.queryString("catID")
SELECT CASE types
Case "gpfirst"
strSQL = dbOwnerPrefix&"spGroupPermissionSetup ("&id&")"
disHead = _
"Group Permission : "&_
"
"
Dim arrGroupIn, arrGroupNotIn, arrUserIn
set objRS = server.createobject("adodb.recordset")
With objRS
.open strSQL, datastore, , , adCmdStoredProc
if not (.eof and .bof) then arrGroupIn = .getrows
End With
set objRS = objRS.NextRecordset
With objRS
if not (.eof and .bof) then arrGroupNotIn = .getrows
End With
set objRS = nothing
%>
<% response.write (disHead) %>
Current User Group(s) in Permission Table
<%
if isArray(arrGroupIn) then
for i = 0 to ubound(arrGroupIn,2)
%>
<%
Case "editgroup","addgroup"
Dim post_reply,poll,vote,rate,uploadSize,uploadRestriction,tempArr,isActive
Dim groupPermissionSet
disHead = _
"Group Permission : "&_
"
"
if types = "editgroup" then
strSQL = "SELECT post_reply,poll,vote,rate,uploadRestriction, isActive from pgd_groupPermission where forumid="&id&" and GID="&gid
set objRS = server.createobject("adodb.recordset")
with objRS
.CacheSize = 150
.open strSQL, datastore, , , adCmdText
If not (.EOF or .BOF) then
groupPermissionSet = .getrows
End if
.close
end with
set objRS=nothing
post_reply = groupPermissionSet(0,0)
poll = groupPermissionSet(1,0)
vote = groupPermissionSet(2,0)
rate = groupPermissionSet(3,0)
uploadRestriction = groupPermissionSet(4,0)
isActive = groupPermissionSet(5,0)
if uploadRestriction <> "" then
tempArr = split(uploadRestriction,"|")
if isArray(tempArr) then
uploadSize = tempArr(0)
if ubound(tempArr)=1 then uploadFormat = tempArr(1)
end if
end if
else
post_reply = 4
poll = 1
vote = 1
rate = 1
uploadSize = "100"
uploadFormat = "txt/jpg/gif"
isActive = 1
end if
%>
<% response.write (disHead) %>
<%
Case "removegroup"
Dim objCon
SET objCon = server.createObject("ADODB.connection")
with objCon
.open datastore
.execute "delete from pgd_grouppermission where forumid="&id&" and gid="&gid, , adExecuteNoRecords + adCmdtext 'adCmdStoredProc
.close
end with
Set objCon = nothing
response.redirect ("admin_g_psetup.asp?types=gpfirst&id="&id&"&catid="&catid)
END SELECT
%>