close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Common Directory in Admin

Thread began 11/03/2010 10:15 am by saf01 | Last modified 11/09/2010 9:52 am by Jason Byrnes | 1618 views | 14 replies |

saf01

Common Directory in Admin

Hi. SS creates a common directory inside admin folder. In a URL when accessing these there is no access / rule check to go back to the admin login screen. Is the common folder or the files insiide it used by SS? Can I delete this folder? Or how can I add an access check so that when a file is accessed it jumps back to the admin login screen? Plz advise. Thx.

Sign in to reply to this post

Jason ByrnesWebAssist

add the following code at line 1 of each of those files:

php:
<?php require_once( "../../WA_SecurityAssist/Helper_PHP.php" ); ?>

<?php
if (!WA_Auth_RulePasses("Administrator")){
    
WA_Auth_RestrictAccess("../users_login.php");
}
?>
Sign in to reply to this post

saf01

Thanks. Ive tried that and get the following message.

Warning: Cannot modify header information - headers already sent by admin\common\addpage.php:2) in WA_SecurityAssist\Helper_PHP.php on line 67

Any help appreciated.

Sign in to reply to this post

Jason ByrnesWebAssist

the cannot modify headers error occurs if there is white space between closing php blocks "?>" and opening php code blocks "<?php"

the make sure there are no blank lines or blank spaces between code blocks, if you can find the problem, send a copy of your page so I can look at the code.

Sign in to reply to this post

saf01

There was a space in between the code and deleted it, now it works. thx for that.

There is also a pages.php in admin folder, which doesn't have an access check - Im just trying to secure files from direct access. Please can you help with the pages.php page - how to add access rules.

Sign in to reply to this post

saf01

Hi. After adding the access ceck in the files in common directory, logged into admin and when I click on home, for example, it loads another admin screen instead of the edititable regions. This happens on clicking on all the pages to edit. Please help. cheers

Sign in to reply to this post

Jason ByrnesWebAssist

I not sure I follow, can you send screen shots showing the problem?

Sign in to reply to this post

saf01

Hi Jason. Ive attached my admin screen after applying access check. to the files in the common folder. As you can see if I click on any page link it loads another admin screen rather than the page edit screen. Please advise.

Sign in to reply to this post

Jason ByrnesWebAssist

add this at line 1 of each of the pages in the common folder:

php:
<?php require_once( "../../WA_Globals/WA_Globals.php" ); ?>
Sign in to reply to this post

saf01

Thx Jason, that works!

There's also a pages.php in the admin folder which displays content when accessed directly from browser. Please could you help in applying access check to this file?

Many thanks

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