Specifications
LISTING 28.2 Continued
$buttons[0] = ‘change-password’;
$buttons[1] = ‘account-settings’;
$buttons[2] = ‘show-my-lists’;
$buttons[3] = ‘show-other-lists’;
$buttons[4] = ‘log-out’;
}
else if(check_admin_user())
{
// if an administrator
$buttons[0] = ‘change-password’;
$buttons[1] = ‘create-list’;
$buttons[2] = ‘create-mail’;
$buttons[3] = ‘view-mail’;
$buttons[4] = ‘log-out’;
$buttons[5] = ‘show-all-lists’;
$buttons[6] = ‘show-my-lists’;
$buttons[7] = ‘show-other-lists’;
}
else
{
// if not logged in at all
$buttons[0] = ‘new-account’;
$buttons[1] = ‘show-all-lists’;
$buttons[4] = ‘log-in’;
}
if($action)
{
// display header with application name and description of page or action
do_html_header(“Pyramid-MLM - “.
format_action($action));
}
else
{
// display header with just application name
do_html_header(“Pyramid-MLM”);
}
display_toolbar($buttons);
//display any text generated by functions called before header
echo $status;
/**********************************************************************
* Section 3: perform action
*********************************************************************/
Building a Mailing List Manager
C
HAPTER 28
28
BUILDING A
MAILING LIST
MANAGER
665
34 7842 CH28 3/6/01 3:46 PM Page 665