tailieunhanh - PHP and MySQL Web Development - P125

PHP and MySQL Web Development - P125: PHP and MySQL Web Development teaches the reader to develop dynamic, secure, commercial Web sites. Using the same accessible, popular teaching style of the first edition, this best-selling book has been updated to reflect the rapidly changing landscape of MySQL and PHP. | 592 Chapter 27 Building a Web-Based Email Service Listing Continued if action log-out session_destroy unset action unset HTTP_SESSION_VARS need to process choose delete or store account before drawing header switch action case delete-account delete_account HTTP_SESSION_VARS auth_user account break case store-settings store_account_settings HTTP_SESSION_VARS auth_user HTTP_POST_VARS break case select-account if have chosen a valid account store it as a session variable if account account_exists HTTP_SESSION_VARS auth_user account HTTP_SESSION_VARS selected_account account set the buttons that will be on the tool bar buttons 0 view-mailbox buttons 1 new-message buttons 2 account-setup only offer a log out button if logged in if check_auth_user buttons 4 log-out Stage 2 headers Send the HTML headers and menu bar appropriate to current action if action Script Architecture 593 Listing Continued display header with application name and description of page or action do_html_header HTTP_SESSION_VARS auth_user Warm Mail - . format_action action HTTP_SESSION_VARS selected_account else display header with just application name do_html_header HTTP_SESSION_VARS auth_user Warm Mail HTTP_SESSION_VARS selected_account display_toolbar buttons Stage 3 body Depending on action show appropriate main body content display any text generated by functions called before header echo status if check_auth_user echo p You need to log in if action action log-out echo to go to .format_action action echo . p br br display_login_form action else switch action if we have chosen to setup a new account or have just added or deleted an account show account setup page case store-settings case account-setup case delete-account display_account_setup HTTP_SESSION_VARS auth_user break case send-message if send_message to cc subject message echo p Message sent. p br br br br br br 594 Chapter 27 Building a Web-Based Email Service Listing Continued else echo p Could not send message. p br br .

TỪ KHÓA LIÊN QUAN