Connecting a List Page to a Reports Page

13 posts by 3 authors in: Forums > CMS Builder
Last Post: September 30, 2013   (RSS)

By Jason - September 26, 2013

Hi,

You can check to see if there is a url entered before outputting a link like this:

<?php if ($record['ses_url']): ?>
  <a href="<?php echo htmlencode($record['ses_url']) ?>" class="captions">Info</a>
<?php endif ?>

For logins, are you using the website membership plugin?  If so, you can use a similar method to the above to check to see if a person is logged in.  We do this by checking for the $CURRENT_USER variable like this:

<?php if ($CURRENT_USER): ?>
  <a href="cdb-stallion-reports.php?title=<?php echo $record['title']; ?>" > <?php echo $reportCount;?> Reports</a>
<?php endif ?>

In addition to this, you should put code on your cdb-stallion-reports.php page that will redirect a user back to a login page if they are not currently logged in.    You can do this like this:

if (!$CURRENT_USER) { websiteLogin_redirectToLogin(); }

With the website membership plugin, there is a code generator that will help you to create signup, login, profile, and forgot password pages.

hope this helps

---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Jason - September 30, 2013

Hi Tina,

No problem.  All of our upgrades are done by donation, which you can process here:

http://www.interactivetools.com/order/upgrade.php

There are details that come with the upgraded version on the best way to upgrade your installation. We also have an online doc for this here:

http://www.interactivetools.com/docs/cmsbuilder/upgrade.html

Hope this helps,

---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/