Joe
|
| Posted: 05/27/2004, 10:00 AM |
|
I am using the current code, for on click event and it works fine, bt i have 5 groups and all groups go to a different page, do i use the "else" statement, and then and end if statement,
if Session("Usr_Group")=2 then Redirect "ProReportSearch.asp"
i need group 1 to go to page1
group 3 to page 3
ect..................
Thanks in Advance
Joe
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 05/27/2004, 10:25 AM |
|
Probably the Select Case statement would be better here. http://www.google.com/search?q=vbscript+reference+%22select+case%22
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
JOE
|
| Posted: 05/28/2004, 9:48 AM |
|
what would an example code look lik ein CCS???? Thanks
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 05/28/2004, 11:55 AM |
|
Just the standard VBScript syntax that you can find in VBScript reference.
Select Case Session("Usr_Group")
...
End Select
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
Joe
|
| Posted: 06/01/2004, 6:48 AM |
|
What is wrong with this code???
it goes no where,, any help would be great thanks,
Function Login_DoLogin_OnClick() 'Login_DoLogin_OnClick @3-FA16D195
'Login @4-A0860347
With Login
If NOT CCLoginUser(.login.Value, .password.Value) Then
.Errors.addError("Login or Password is incorrect.")
Login_DoLogin_OnClick = False
.password.Value = ""
Else
Select Case Session("Usr_Group")
Case 1 Redirect="case.asp"
Case 2 Redirect="case.asp"
Case 3 Redirect="case.asp"
Case 4 Redirect="admin_site.asp"
End Select
Login_DoLogin_OnClick = True
End If
End With
'End Login
End Function 'Close Login_DoLogin_OnClick @3-54C34B28
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 06/01/2004, 12:26 PM |
|
Possibly you never created the session named "Usr_Group".
CCS usually creates a session variable that contains the user's group as "GroupID", unless you change it in Project -> Settings -> Security -> Advanced.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
HUP
|
| Posted: 08/11/2004, 7:06 AM |
|
Thanks every1 i needed this information
|
|
|
 |
Colin Mckinney
|
| Posted: 08/11/2004, 5:32 PM |
|
This worked for me - I put a home_page field in the employee_table. I can then change where they are redirected through a maintenance grid.
Redirect = CCDLookup("home_page","Employee_table","user_id=" & Session("UserID"),DBDevLabortrack)
|
|
|
 |