02.06.2013 Views

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 6-8. Clicking the Log Out button removes the user data from the session<br />

CHAPTER 6 ■ PASSWORD PROTECTION SENSITIVE ACTIONS AND AREAS<br />

■ Note Now that you know the login is working, remove the Logged In!/Logged Out! message logic <strong>and</strong> the<br />

paragraph tags that enclose it from index.php.<br />

Displaying Admin Tools Only to Administrators<br />

Your users can log in <strong>and</strong> log out; the last steps you need to take are to make sure that all actions <strong>and</strong><br />

options that require administrative access are only shown to users who are logged in.<br />

Showing Admin Options to Administrators<br />

The buttons for adding <strong>and</strong> editing events should not be displayed unless a user is logged in. To perform<br />

this check, you need to modify both the _adminGeneralOptions() <strong>and</strong> _adminEntryOptions() methods in<br />

the Calendar class.<br />

223

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!