close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Show If on Results

Thread began 9/18/2009 9:07 am by info271221 | Last modified 10/09/2009 1:10 pm by Jason Byrnes | 3654 views | 11 replies |

info271221

Show If on Results

I want to show the edit, update and all entries ONLY to the webmaster (which I have successfully implemented) I also want to show the member that is logged the update link ON THEIR listing only - ie allow members to view the update and update their own record BUT not anyone elses. I have attached my security files and the results page.
Here is the live page:
member_directory_Results.php

This error is displaying at the bottom of the page:
PHP Notice: Undefined variable: row_WADAmember_directory in D:\Websites\www.myDomain.org\WA_SecurityAssist\HelperGroupsRulesPHP.php on line 8

Thanks!

Sign in to reply to this post

tom92909Beta Tester

I just checked the following URL in both Firefox v3.5 and IE v8 and I see NO error message.

member_directory_LogIn.php

It all looks good to me...? Oops! I just realized I need to login....

Sign in to reply to this post

tom92909Beta Tester

The error message that you're getting...

D:\Websites\www.myDomain\WA_Secur...psRulesPHP.php on line 8

Is your website utilizing D:\Websites ?

Is that really the website Path?

Sign in to reply to this post

info271221

Neither show if working now

I just realized the webmaster show if that was working is now NOT working either.
Did you check the files that I uploaded?

On this page we have show if ID = current user and ID = 23 (webmaster)
The webmaster was working before I applied the ID.

The 23 rule quit working on this page now too:
photogallery_ResultsPhotoOfWeek.php?S_name=&Search.x=44&Search.y=9&Search=Search
But that page does not show the error (it does not the the current user ID rule on it)

As far as the path, I don't know why that displays. That is the path to my local testing server.

How can I securely give you log in credentials?
For testing the id you can use waTest pw waTest

Thanks!!

Sign in to reply to this post

tom92909Beta Tester

You can create a temporary user account for testing and then after this is resolved you should kill the record.

Sign in to reply to this post

Jason ByrnesWebAssist

The error is occurring because of comparing the recordset value in your rule. The recordset has not been crated before the check is being made.


Instead of using the security assist show if region, you will need to hand code the logic to show the edit button.

Find the following code:
<?php if(WA_Auth_RulePasses("ID Matches")){ // Begin Show Region ?>
<table class="WADAEditButton_Table">
<tr>
<td><span id="View<?php echo(rawurlencode($row_WADAmember_directory['id'])); ?>2" class="WADATextButton"><a href="member_directory_Detail.php?id=<?php echo(rawurlencode($row_WADAmember_directory['id'])); ?>">View</a></span></td>
<td><span id="Update<?php echo(rawurlencode($row_WADAmember_directory['id'])); ?>2" class="WADATextButton"><a href="member_directory_Update.php?id=<?php echo(rawurlencode($row_WADAmember_directory['id'])); ?>">Update</a></span></td>
<td><span id="Delete<?php echo(rawurlencode($row_WADAmember_directory['id'])); ?>2" class="WADATextButton"><a href="member_directory_Delete.php?id=<?php echo(rawurlencode($row_WADAmember_directory['id'])); ?>">Delete</a></span></td>
</tr>
</table>
<?php } // End Show Region ?>


and change it to:
<?php if($row_WADAmember_directory['id'] == isset($_SESSION['id'])?$_SESSION['id']:""){ // Begin Show Region ?>
<table class="WADAEditButton_Table">
<tr>
<td><span id="View<?php echo(rawurlencode($row_WADAmember_directory['id'])); ?>2" class="WADATextButton"><a href="member_directory_Detail.php?id=<?php echo(rawurlencode($row_WADAmember_directory['id'])); ?>">View</a></span></td>
<td><span id="Update<?php echo(rawurlencode($row_WADAmember_directory['id'])); ?>2" class="WADATextButton"><a href="member_directory_Update.php?id=<?php echo(rawurlencode($row_WADAmember_directory['id'])); ?>">Update</a></span></td>
<td><span id="Delete<?php echo(rawurlencode($row_WADAmember_directory['id'])); ?>2" class="WADATextButton"><a href="member_directory_Delete.php?id=<?php echo(rawurlencode($row_WADAmember_directory['id'])); ?>">Delete</a></span></td>
</tr>
</table>
<?php } // End Show Region ?>

Sign in to reply to this post

info271221

Update link is showing when not logged in

Now the errors are gone, I only added the update link as I do not need the delete or view.
The revised page is included in the zip file, the members_measurer is the member directory files, the members is the pages generated by security assist.
You may use waTest, waTest to log in and test.
Again the update button does show when you are not logged in.
Here is the live page:
member_directory_Results.php

Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

not able to reproduce the problem.

If I try to access:
member_directory_Results.php



when not logged in, I am redirected to your login page:
member_directory_LogIn.php?accesscheck=%2Fmember_measurer%2Fmember_directory_Results.php

Sign in to reply to this post

info271221

Log In to view page

Please log in so you can view the page and reproduce the error.
You may use waTest, waTest to log in and test (as mentioned in the previous post)
Thanks!!

Sign in to reply to this post

Jason ByrnesWebAssist

I'm not sure i understand the problem then.

your report as I understand it is that the update button shows if you *are not* logged in. is this not the problem?

If I am *not* logged in, I cannot see the results page as I am redirected to the login page. if I *am* logged in, I can see the update button, but I thought this was the desired result.

If not can you please offer a more concise description of what is wrong.

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