Professional CodeIgniter

(singke) #1

Chapter 6: Creating a Dashboard


186


$_SESSION[‘username’] = $row[‘username’];
}else{
$this- > session- > set_flashdata(‘error’, ‘Sorry, your username or password is
incorrect!’);
}
}

It ’ s that simple to secure an application. Please note that in this particular application, you want to use
substr() to cut your encrypted string down to a maximum of 16 characters, as that is the size of the
password field you ’ re using. The SHA1 hash process converts most strings to 32 - or 64 - length strings,
and you want to compare the right things.

Revisiting the Sprint Backlog


You know there are still a few things left on your to - do list, but honestly you ’ ve completed a heck of a lot
of work in a very short period of time. It ’ s time to review the backlog to see how far you ’ ve come.


  1. Create a series of admin controllers (in their own folder). DONE.

  2. Secure those controllers and build a login form on the public side. DONE.

  3. Create a new model for admin users. DONE.

  4. Create controllers and views to administer those users. DONE.

  5. Expand, as needed, the models for orders, products, and categories. DONE.

  6. Create a dashboard view. DONE.

  7. Create CRUD (create, review, update, delete) screens for products and categories. DONE.

  8. Create import and export functions for products and categories.

  9. Add an easy way to assign products to categories and groups in batch mode.


Conclusion


In this chapter, you built a series of basic administrative tools that allow Claudia the ability to manage
her eCommerce site. In the next chapter, you will complete the two items left on the backlog and gather
feedback from the client, who no doubt will have additional upgrades for you.

As you continue working with CodeIgniter, keep the following points in mind:

It is entirely appropriate to organize controllers and views into folders.

Creating forms that allow you to create or edit data is fairly simple, and once you create the first
step, it ’ s easy to create similar tools for other tables.


Free download pdf