<%= OutputCSS() %>
<% Dim objcon, objRS, strSQL, catName, disTitle, disHead, arrCat Dim i, id, ub, types, typesHidden, catID,groupPermissionOn types = request("types") typesHidden = "" SELECT CASE types Case "editForum" disTitle = "Edit Forum" Case "addForum" disTitle = "Add Forum" Case "editCat" disTitle = "Edit Category" Case "addCat" disTitle = "Add Category" Case "selectForum" disTitle = "Configure Forum" Case "copyForum" disTitle = "Copy Forum" Case else disTitle = "Configure Category" types = "selectCat" END SELECT disHead = _ ""&disTitle&" :       "&_ "

" SELECT CASE types '========================== Case "editForum","addForum" '========================== response.write (disHead) catId = request.queryString("catid") dim ForumTitle, ForumDesc, IsPrivate, PrivateUserRight, GuestRight, AuthenticatedRight dim moderator, moderatorName, PrivateUser, PGDCode, allowsubscribe, allowUpload, modUpload, memUpload, guestUpload dim modUpSize, modUpExt, memUpSize, memUpExt, guestUpSize, guestUpExt, allowpoll, allowvote, timefilter,deleteRight dim enableRating, isModerated, ttPaging,needRevision dim NoIMGinPosts,sortOrder,upRestriction,downRestriction,smode,uploadNum if types = "editForum" then strSQL = "SELECT ForumTitle, ForumDesc, IsPrivate, PrivateUserRight, GuestRight, MemberRight, PGDCode, allowsubscribe, "&_ "allowUpload, modUpload, memUpload, guestUpload, allowpoll, allowvote, timefilter, deleteRight, enableRating, isModerated, " & _ "ttPaging,NoIMGinPosts,sortOrder,upRestriction,downRestriction, needRevision,smode, groupPermissionOn, uploadNum FROM pgd_forums WHERE ForumID="&request("id") set objRS = server.CreateObject("adodb.recordset") with objRS .open strSQL, datastore, , , adCmdText arrForum = .getrows .close end with set objRS = nothing id = request.queryString("id") ForumTitle = arrForum(0,0) ForumDesc = arrForum(1,0) IsPrivate = arrForum(2,0) PrivateUserRight = arrForum(3,0) GuestRight = arrForum(4,0) AuthenticatedRight = arrForum(5,0) PGDCode = arrForum(6,0) allowsubscribe = arrForum(7,0) allowUpload = arrForum(8,0) modUpload = arrForum(9,0) memUpload = arrForum(10,0) guestUpload = arrForum(11,0) allowpoll = arrForum(12,0) allowvote = arrForum(13,0) timefilter = arrForum(14,0) deleteRight = arrForum(15,0) enableRating = arrForum(16,0) isModerated = arrForum(17,0) ttPaging = arrForum(18,0) NoIMGinPosts = arrForum(19,0) sortOrder = arrForum(20,0) upRestriction = arrForum(21,0) downRestriction = arrForum(22,0) needRevision = arrForum(23,0) smode = arrForum(24,0) groupPermissionOn = arrForum(25,0) uploadNum = arrForum(26,0) erase arrForum else NoIMGinPosts = 0 isModerated = 0 IsPrivate = 0 PGDCode = 1 allowpoll = 1 allowvote = 0 PrivateUserRight = 4 GuestRight = 1 AuthenticatedRight = 4 enableRating = 0 ttPaging = 2 smode = 1 groupPermissionOn = 0 uploadNum = 1 allowUpload = Application(dbName&"upload") if lcase(allowUpload) <> "noupload" then allowUpload = 1 modUpload = UpLoadSizeLimit&"|"&UploadFormat memUpload = UpLoadSizeLimit&"|"&UploadFormat guestUpload = UpLoadSizeLimit&"|"&UploadFormat end if timefilter = "0,1,7,14,|30|,90,180,365" deleteRight = 1 sortOrder = 1 upRestriction = 0 downRestriction = 0 needRevision = 0 end if Dim tempArr if modUpload <> "" then tempArr = split(modUpload,"|") if isArray(tempArr) then modUpSize = tempArr(0) if ubound(tempArr)=1 then modUpExt = tempArr(1) end if end if if memUpload <> "" then tempArr = split(memUpload,"|") if isArray(tempArr) then memUpSize = tempArr(0) if ubound(tempArr)=1 then memUpExt = tempArr(1) end if end if if guestUpload <> "" then tempArr = split(guestUpload,"|") if isArray(tempArr) then guestUpSize = tempArr(0) if ubound(tempArr)=1 then guestUpExt = tempArr(1) end if end if %>
<% if types = "editForum" then response.write ( _ ""&_ " ") if IsPrivate = 1 then _ response.write(" ") if groupPermissionOn = 1 then _ response.write("") end if %>
<%= disTitle %>
nowrap valign="top">Forum Title:   > " maxLength="50">   
nowrap valign="top">Forum Description:   >
nowrap valign="top">Display topics from last ? of days:   >
nowrap valign="top">Default Sort Order:   >  
nowrap valign="top">Private forum?  > class="radiocheck">  
nowrap valign="top">Private User Right:  >
nowrap valign="top">Member Right:  >   
nowrap valign="top">Guest Right:   >
nowrap valign="top">Allow Subscription in this forum?  >
nowrap valign="top">Allow Poll Creation?   >
nowrap valign="top">Vote Permission:   >
nowrap valign="top">Allow post deletion?   >
nowrap valign="top">Enable post rating?  >
nowrap valign="top">Enable Group based Permission (slow)?  > class="radiocheck">
nowrap valign="top">Allow PGDCode in post?  > class="radiocheck">
nowrap valign="top">Disable IMG Code in post?  > class="radiocheck">
nowrap valign="top">Do new posts require moderation?
(admin/moderator approval required) 
> class="radiocheck">
nowrap valign="top">Enable Revision on edited messages?
(can waste a lot of db space) 
> class="radiocheck">
nowrap valign="top">Allow Upload? > class="radiocheck"> (site-wide upload has to be enabled.)
Maximum # of Uploads
nowrap valign="top">Moderator upload size limit and
file extension
(note: Administrator can upload
as many types as he wants, and
as big the file size as he wants)
> kb;
(0=not allowed)
"> extensions (e.g. "txt/gif/jpg")
(empty = not allowed)
nowrap valign="top">Members upload size limit and
file extension
> kb;
(0=not allowed)
"> extensions (e.g. "txt/gif/jpg")
(empty = not allowed)
nowrap valign="top">Members upload requirement and
download requirement
(based on number of posts,
min = 0, max = 255)
>upload:
download:
NOTE: setting values > 0 will disable guest upload and download
nowrap valign="top">Guest upload size limit and
file extension
> kb;
(0=not allowed)
"> extensions (e.g. "txt/gif/jpg")
(empty = not allowed)




<% '============= Case "editCat" '============= id = request("id") set objRS = server.CreateObject("adodb.recordset") with objRS .open "SELECT CatName FROM pgd_category WHERE CatID="&id, datastore, , , adCmdText catName = .fields("CatName") .close end with set objRS = nothing response.write(disHead) response.write("
") response.write("
") response.write("") response.write _ ( ""&_ ""&_ ""&_ ""&_ "
Category Name :
"&typesHidden&"
*Maximum 50 characters
") response.write("
") response.write ("
  "&_ "") response.write ("
") '============ Case "addCat" '============ response.write(disHead) response.write("
") response.write("
") response.write("") response.write _ ( ""&_ ""&_ ""&_ "
Category Name :

"&typesHidden&"
*Maximum 50 characters

") response.write("
") response.write ("
  "&_ "") response.write ("
") '================= Case "selectForum" '================= response.write(disHead) if request.queryString("from") = "merger" then response.write ("Posts merged successful!") catID = request("catID") set objRS = server.CreateObject("adodb.recordset") with objRS .open "SELECT ForumID, ForumTitle, sort FROM pgd_forums WHERE catID="& catID &" ORDER BY sort DESC;", datastore, , ,adcmdtext if not .EOF then dim arrForum arrForum = .getrows end if .close end with set objRS = nothing arrCat = Application(dbName&"Category") Dim iCat:iCat = 0 Dim iForum:iForum = 0 %> <% response.write("
") response.write("
") response.write("") response.write("") if isArray(arrForum) then for i=0 to ubound(arrForum,2) response.write ("") response.write ("") next 'erase arrForum else response.write ("") end if response.write("
"&disTitle&"
 ") response.write (HTMLEncode(""&arrForum(1,i))&"") response.write (" ") response.write ("
") if ubound(arrForum,2)<>0 then SELECT CASE i CASE 0 response.write ("move down") CASE ubound(arrForum,2) response.write ("move up") CASE ELSE response.write ("move up "&_ "move down") END SELECT end if response.write ("") response.write ("") response.write ("
There is currently no forum defined in this category.
") response.write("
") response.write _ ("
  ") if isArray(arrForum) then _ response.write("  ") response.write("
") '======== Case "copyForum" '======== catID = request("catID") set objRS = server.CreateObject("adodb.recordset") with objRS .open "SELECT forumid, forumtitle from pgd_forums WHERE catID="&catID&" order by sort desc", datastore, , , adCmdText arrForum = .getrows .close end with set objRS = nothing response.write(disHead) response.write("
") response.write("
") response.write("") response.write("") if isArray(arrForum) then for i=0 to ubound(arrForum,2) response.write ("") next else response.write ("") end if response.write("
"&disTitle&"
 ") response.write (" ") response.write (HTMLEncode(""&arrForum(1,i))&"
There is currently no forum defined in this category.
") response.write("


") response.write("
") response.write("") response.write("") response.write ("") response.write ("") response.write ("") response.write("
Addional Options
Copy Moderators
Copy Private Users
Copy Group Permissions
") response.write("


") response.write("
  ") response.write("
") response.write("") response.write("
") '======== Case else '======== set objRS = server.CreateObject("adodb.recordset") with objRS .open "SELECT catID, catName, sort, (SELECT count(*) FROM pgd_forums f WHERE f.CatID=c.CatID) FROM pgd_category c ORDER BY c.sort DESC; ", datastore, , , adCmdText arrCat = .getrows .close end with set objRS = nothing response.write(disHead) response.write("
") response.write("") end if next response.write("
") response.write("") response.write("") ub = ubound(arrCat,2) for i=0 to ub response.write ("") else response.write ("
"&disTitle&"
 ") response.write (""&arrCat(1,i)&" ("&arrCat(3,i)&")") response.write ("
") if ub<>0 then SELECT CASE i CASE 0 response.write ("move down") CASE ub response.write ("move up") CASE ELSE response.write ("move up "&_ "move down") END SELECT end if response.write ("") response.write ("") if arrCat(0,i)<>0 then response.write ("
") response.write("") response.write _ ("
"&_ "  "&_ "
") response.write ("
Default Category Can't be deleted.") erase arrCat END SELECT %>