close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problem with Show Region

Thread began 12/20/2012 3:37 pm by Sally | Last modified 12/20/2012 6:31 pm by Jason Byrnes | 455 views | 3 replies |

Sally

Problem with Show Region

I have a security table set up where GroupID 1 is User, 2 is Superuser and 3 is Admin. I've been using this with SA's Show Region without problems.

On one page I am trying to use a rule that says to show an Admin Sermons region if <?php echo $_SESSION['UserGroupID']; ?> >= 2 In other words, I want it to show if the user is a Superuser or Admin.

But for some reason, when I add it to the div it removes the content if it's a Superuser signed in. It shows it if a User or Admin are signed in.

Also, there's a rule applied to a Menu div called If Not Superuser which is supposed to prevent that div from showing if it is the Superuser. It does prevent the content, but not the <p> that says Menu, even though rule is before that in the code.

I've attached the files. Any help would be appreciated. Thank you.

Attached Files
show.zip
Sign in to reply to this post

Jason ByrnesWebAssist

are you sure the userlevels are being set as you expect?

add the following code to your page just before the </body> tag:
<?php var_dump($_SESSION); ?>

this will show the contents of the session variables.

I suspect the user you are testing with has the userlevel set to 2 when it should be set to 1,


for the menu issue, you have a paragraph at line 105:
<p class="infopost">Menu</p>

outside the access rules, this is probably the cause of the menu you are seeing.

Sign in to reply to this post

Sally

Jason, you rock!

I knew this used to work, so I couldn't figure out what happened. Your script showed that the security group ID was 0. I don't even have a zero! But sure enough, back in the database it was set to zero. hmmm.

I tracked it down to a page where they can update their registration info. Even though they did not have access to the user GroupID field, it was setting it to 0 in the database whenever they updated their info.

All better now - thanks too for catching the menu duplication.

WebAssist software is great, but it doesn't stop dumb user errors. Thanks so much for the great support!

Sign in to reply to this post

Jason ByrnesWebAssist

No worries, glad to hear you found the problem.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...