Professional CodeIgniter
Chapter 6: Creating a Dashboard 158 #globalnav li a { float: left; padding: 10px 12px; text-decoration: none; color: #999; borde ...
Chapter 6: Creating a Dashboard 159 Figure 6-3 When you ’ re all done, upload your files and log in to the dashboard. You should ...
Chapter 6: Creating a Dashboard 160 Figure 6-4 Now when an admin logs out, he or she should see an error message similar to the ...
Chapter 6: Creating a Dashboard 161 There ’ s nothing surprising here. You ’ re merely calling up a list of categories using get ...
Chapter 6: Creating a Dashboard 162 Figure 6-5 Creating the Category Management Tools Now it ’ s time to create a simple form th ...
Chapter 6: Creating a Dashboard 163 redirect(‘admin/categories/index’,’refresh’); }else{ $data[‘title’] = “Create Category”; $da ...
Chapter 6: Creating a Dashboard 164 Now that the controller and model have been updated, simply create the view with a form in i ...
Chapter 6: Creating a Dashboard 165 Figure 6-6 Go ahead and test the form by creating a new category. You should see a success m ...
Chapter 6: Creating a Dashboard 166 Notice that the category ID is passed to the function as an argument. Also notice that its d ...
Chapter 6: Creating a Dashboard 167 echo “ < p > < label for=’parent’ > Category Parent < /label > < br/ &g ...
Chapter 6: Creating a Dashboard 168 Start with the controller by creating a simple delete() function: function delete($id){ $thi ...
Chapter 6: Creating a Dashboard 169 That ’ s it! Claudia now has a working administrative tool that will let her manage her cate ...
Chapter 6: Creating a Dashboard 170 echo “ < td align=’center’ > ”; echo anchor(‘admin/products/edit/’.$list[‘id’],’edit’) ...
Chapter 6: Creating a Dashboard 171 If no POST data are detected, show the form, but along the way, gather up all subcategories ...
Chapter 6: Creating a Dashboard 172 $config[‘upload_path’] = ‘./images/’; $config[‘allowed_types’] = ‘gif|jpg|png’; $config[‘max ...
Chapter 6: Creating a Dashboard 173 echo “ < p > < label for=’parent’ > Category < /label > < br/ > ”; e ...
Chapter 6: Creating a Dashboard 174 Figure 6-10 Creating the Product Edit Page The edit() function of the admin/products control ...
Chapter 6: Creating a Dashboard 175 In this case, you only have to create one new MProducts function, one called updateProduct() ...
Chapter 6: Creating a Dashboard 176 < h1 > < ?php echo $title;? > < /h1 > < ?php echo form_open_multipart(‘ ...
Chapter 6: Creating a Dashboard 177 Your Edit form should look like Figure 6 - 11 when all is said and done. Figure 6-11 Creatin ...
«
5
6
7
8
9
10
11
12
13
14
»
Free download pdf