13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

690 Chapter 30 Building a Mailing List Manager<br />

Not<br />

logged in<br />

New<br />

Account<br />

Show<br />

all lists<br />

Login<br />

Figure 30.1<br />

Users can choose only a limited number of actions when they<br />

are not logged in.<br />

Figure 30.2 shows the actions a user can take after logging in. He can change his<br />

account setup (email address <strong>and</strong> preferences), change his password, <strong>and</strong> change which<br />

lists he is subscribed to.<br />

Logged in<br />

Account<br />

Settings<br />

Show<br />

my lists<br />

Show<br />

other lists<br />

Change<br />

Password<br />

Unsub<br />

Info<br />

Archive<br />

Subscribe<br />

Figure 30.2<br />

After logging in, users can change their preferences through a<br />

variety of options.<br />

Figure 30.3 shows the actions available if an administrator has logged in. As you can see,<br />

an administrator has most of the functionality available to a user <strong>and</strong> some additional<br />

options. She can also create new mailing lists, create new messages for a mailing list by<br />

uploading files, <strong>and</strong> preview messages before sending them.<br />

Because this application uses an event-driven approach again, the backbone of the<br />

application is contained in one file, index.php, which calls on a set of function libraries.<br />

An overview of the files in this application is shown in Table 30.1.

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

Saved successfully!

Ooh no, something went wrong!