| Author |
Topic Search Topic Options
|
fernan82
Mod Builder Group
Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
|
Post Options
Thanks(0)
Quote Reply
Topic: One more ASP question.... Posted: 07 March 2003 at 11:59am |
|
Ok, this is for a mod i'm making to integrate the wwf login whith the rest of the site, i need to make a variable with more than one value and then compare it with a single value variable...
example:
<%
intAllowGroups = "3,7"
If Not IntGroupID = intAllowGroups Then Response.Redirect "no_access.asp"
%>
Would that work just like that or do I need to make any changes since there's more than 1 value on the intAllowGroups variable?
Thanks in advance for your responses,
Fernan
|
 |
boyohboy
Groupie
Joined: 15 October 2002
Location: United States
Status: Offline
Points: 197
|
Post Options
Thanks(0)
Quote Reply
Posted: 07 March 2003 at 12:10pm |
|
what's in IntGroupID? intAllowGroups look like a string
|
|
|
 |
fernan82
Mod Builder Group
Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
|
Post Options
Thanks(0)
Quote Reply
Posted: 07 March 2003 at 12:21pm |
|
intGroupID is the forums Group ID #, like Moderator Group is 3, Admin 1, Guest 2, etc...
|
 |
boyohboy
Groupie
Joined: 15 October 2002
Location: United States
Status: Offline
Points: 197
|
Post Options
Thanks(0)
Quote Reply
Posted: 07 March 2003 at 12:31pm |
|
if you must use one variable intAllowGroups for that, i guess you must parse, convert it to int first before the comparison cuz intgroupid is a singular int
|
|
|
 |
fernan82
Mod Builder Group
Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
|
Post Options
Thanks(0)
Quote Reply
Posted: 07 March 2003 at 12:35pm |
That's what I need to know how to do..............that might be a dumb question but I don't know sh*t about ASP...
|
 |
boyohboy
Groupie
Joined: 15 October 2002
Location: United States
Status: Offline
Points: 197
|
Post Options
Thanks(0)
Quote Reply
Posted: 07 March 2003 at 12:45pm |
<%
arrayVar = CInt(Trim(Split(intAllowGroups , ","))) 'split, trim space, convert to int If Not IntGroupID = arrayVar(0) Then Response.Redirect "no_access.asp" End If %>
What the heck is 7 for?
|
|
|
 |
fernan82
Mod Builder Group
Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
|
Post Options
Thanks(0)
Quote Reply
Posted: 07 March 2003 at 1:10pm |
|
Thanks, 7 is the GroupID of a private group i got in my forums, i want only those members and moderators to access certain pages on my site...
|
 |
fernan82
Mod Builder Group
Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
|
Post Options
Thanks(0)
Quote Reply
Posted: 07 March 2003 at 1:19pm |
Tried it just like that and it gave me a type mismatch error on this line:
arrayVar = CInt(Trim(Split(intAllowGroups , ","))) 'split, trim space, convert to int
|
 |