tailieunhanh - PHP and MySQL Web Development - P123

PHP and MySQL Web Development - P123: 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. | 582 Chapter 26 Building a Content Management System Listing Continued if story published print a href story . story id . unpublish a else print a href story . story id . publish a print a href story . story id . delete a print a href story . story id . edit a print td tr print table This script should be made available only to the people who are authorized to publish stories to the live site. In our sample application this would be the site editor but there is no access control on this script for simplicity. It should however be protected in a live situation. This is very similar to except that the editor is given a screen showing the stories for every writer not just her if statement ensures that appropriate options are presented for each story. Published stories can be unpublished and unpublished stories can be published or deleted. These three links submit to and respectively. The script uses the following SQL query update stories set published now where id story This will mark a story as published and authorize it for public viewing. Similarly uses the following query to mark a story as unpublished and stop it from being displayed to the public update stories set published null where id story The edit link appears regardless of whether a story is published so the editor can always make changes. This is different to the writers level of access where they can only modify a story before it has been published. Extending the Project There are several ways this project could be extended to make a more comprehensive content management system Next 583 You could allow groups of users to work on stories together collaboration . You could implement a more flexible page layout so that editors can position text and images on the page. An image library could be built so that frequently used .

TỪ KHÓA LIÊN QUAN