close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Sessions for show if and allowing access

Thread began 2/21/2013 10:07 pm by jo271221 | Last modified 2/22/2013 1:34 pm by Jason Byrnes | 826 views | 9 replies |

jo271221

Sessions for show if and allowing access

I am having a great deal of trouble with show if rules and allowing access.
Our site has a log in page (attached), member directory, member posts and custom pages.
The member posts contain ads, news and events and I used datassist a few times to generate search and results pages. We also have a classified form which is joined with the posts.
The log in page shows session id which is what seems like I should be able to use the show if rule everywhere. Show is customerid matches the session of the user that is logged in.
The Auctions.php is working and using
<?php
if (isset($_SESSION['directoryid']) && $_SESSION['directoryid'] == $row_WADAevents['customerid']) {
?>

I tried to use the webassist show utility tool on the Accomplishments-Updates.php page both with Session directoryid and id and neither works.

Attached Files
ShowIf-Rules-Security-And-ShowRegionUtility.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the code for the show if looks corrtect:

php:
<?php

  
if ("".$row_pages['customerid']  ."" == "".$_SESSION['directoryid']  ."") {  // WebAssist Show If
?>



so the question is what are the values of the $row_pages['customerid'] and $_SESSION['directoryid']

add the following code jsut before the show if code to output the values:

php:
<?php echo("rs: ".$row_pages['customerid']."|| session: ".$_SESSION['directoryid'].""); ?>



this will help troubleshoot.

Sign in to reply to this post

jo271221

show if

Here is the page: Accomplishments-Updates.php

Here is the output: rs: 6246|| session:

Sign in to reply to this post

Jason ByrnesWebAssist

ok, so thats working. it's not showing the form because you are not logged in the recordset value does not equal the session

Sign in to reply to this post

jo271221

Not logged in?

I am logged in - see attached screen shot. I am not sure if you are stating that everything is working I am just not logged in or you are trying to tell me something I am not understand.
Attached shows I am logged in as this user.

Sign in to reply to this post

Jason ByrnesWebAssist

what do you get if you add a var dump of the session contents:

php:
<?php car_dump($_SESSION); ?>
Sign in to reply to this post

jo271221

array(15) { ["WAENCRYPTEDRETURNUSED"]=> bool(false) ["WAENCRYPTEDRETURNSUCCESS"]=> bool(false) ["EditReturn"]=> string(39) "/PrideFarms/Accomplishments-Updates.php" ["WADbSearch1_ads_horses_results"]=> string(0) "" ["WADbSearch1_custom_pages_results"]=> string(24) " AND (customerid = 6246)" ["theme"]=> string(13) "Barrel-Racing" ["SI"]=> string(2) "15" ["WAVT_postssearch_Errors"]=> string(0) "" ["WADbSearch1_posts_results"]=> string(22) " AND (interestid = 15)" ["directoryid"]=> string(4) "6246" ["email"]=> string(22) "greenforluck@yahoo.com" ["accesslevel"]=> NULL ["communityid"]=> string(1) "0" ["contact"]=> string(14) "Bryel Mulligan" ["membership_type"]=> string(26) "HotSite Hot Marketing Plus" }

Accomplishments-Updates.php

Sign in to reply to this post

Jason ByrnesWebAssist

ok, so according to this output the community ID session is 0:
["communityid"]=> string(1) "0"

which does not equal the value in the recordset:
rs: 6246

Sign in to reply to this post

jo271221

show if / session issues

I added the vardump on this page to see if we can figure out why this page is working ads-events-news-featuredFW.php and the other pages are not.

It prints this: array(15) { ["WAENCRYPTEDRETURNUSED"]=> bool(false) ["WAENCRYPTEDRETURNSUCCESS"]=> bool(false) ["EditReturn"]=> string(21) "/PrideFarms/index.php" ["WADbSearch1_ads_horses_results"]=> string(23) " AND (customerid = 226)" ["WADbSearch1_custom_pages_results"]=> string(24) " AND (customerid = 6246)" ["theme"]=> string(10) "PrideFarms" ["SI"]=> string(2) "15" ["WAVT_postssearch_Errors"]=> string(0) "" ["WADbSearch1_posts_results"]=> string(22) " AND (interestid = 15)" ["directoryid"]=> string(4) "6246" ["email"]=> string(22) "greenforluck@yahoo.com" ["accesslevel"]=> NULL ["communityid"]=> string(1) "0" ["contact"]=> string(14) "Bryel Mulligan" ["membership_type"]=> string(26) "HotSite Hot Marketing Plus" }

Why does it show customerid=226 and customerid =6246?
What can we do to get the session for customer id to work ON EVERY PAGE?

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post
loading

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...