There are six view files in this application, and these are as follows:
discussions/new.php
: This displays a form to the user, allowing them to create a discussioncomments/view.php
: This displays all active comments within a discussionadmin/login.php
: This displays a login form for the user; don't forget to add thesignin.css
script, which you can find later in this chaptercommon/login_header.php
: Theviews/admin/login.php
view requires different resources from the rest of the application, which is supported by this header
The discussions/view.php
view file displays a list of all active discussions as well as sorting options.
Create the /path/to/codeigniter/views/discussions/view.php
file and add the following code to it:
SORT: <?php echo anchor('discussions/index/sort/age/' . (($dir == 'ASC') ? 'DESC' : 'ASC'),'Newest ' . (($dir ==...