will
Posts: 88
|
| Posted: 08/31/2008, 4:02 PM |
|
i have 2 panels on 1 include page and i 4 diffent groups
1 2 3 4
panel one I only want to show if the user group id is 1
and panel 2 i only want to show if user group is is not 1
basicly panel one should only show to users that group id is 1
and panel2 is to only show if user group Id is 2,3,4 but what ever i use it does not work
|
 |
 |
maxhugen
Posts: 272
|
| Posted: 08/31/2008, 8:03 PM |
|
Are you using a BeforeShow event?
Basically, code should look something like:
switch (group_id) {
case 1:
Panel1->Visible = True;
Panel2->Visible = False;
default:
Panel1->Visible = False;
Panel2->Visible = True;
}
Does this help?
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
will
Posts: 88
|
| Posted: 08/31/2008, 9:27 PM |
|
I have done that it does nothing
|
 |
 |
maxhugen
Posts: 272
|
| Posted: 08/31/2008, 9:38 PM |
|
It might help if you post your actual code here...
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
will
Posts: 88
|
| Posted: 08/31/2008, 9:56 PM |
|
Panel1 beforeshow
if (!CCGetSession("auth_id")>1){
$Component->Visible = true;
} else {
$Component->Visible = false;
}
Panel2 beforeshow
if (!CCGetSession("auth_id")>1){
$Component->Visible = false;
} else {
$Component->Visible = true;
}
|
 |
 |
datadoit
|
| Posted: 09/01/2008, 6:07 AM |
|
Do some basic debugging by tossing in some echo statements to make
certain your session has values as expected.
In addition, remove the conditions to make sure the panels are
showing/hiding as expected.
|
|
|
 |