Professional CodeIgniter
Chapter 7: Improving the Dashboard 198 the following URL: http://www.codeigniter.com/wiki/CSVReader. Essentially, this library a ...
Chapter 7: Improving the Dashboard 199 Figure 7-6 The next part is where you start using the CSVReader library. You ’ re going t ...
Chapter 7: Improving the Dashboard 200 Now it ’ s time to work inside the admin/products controller. There you ’ re going to cre ...
Chapter 7: Improving the Dashboard 201 echo “ < th > ”.$hdr.” < /th > \n”; } } ? > < /tr > Next, loop throu ...
Chapter 7: Improving the Dashboard 202 Figure 7-7 Now turn your attention to the data array that you end up with at the end of t ...
Chapter 7: Improving the Dashboard 203 [line_1] = > Array ( [id] = > 2 [name] = > Game 2 [shortdesc] = > This is a v ...
Chapter 7: Improving the Dashboard 204 function csv2db(){ unset($_POST[‘submit’]); unset($_POST[‘csvgo’]); foreach ($_POST as $l ...
Chapter 7: Improving the Dashboard 205 She thinks while you take notes. She ’ s pondering the second issue, what to do with prod ...
Chapter 7: Improving the Dashboard 206 Of course, if Claudia had wanted to limit her employees ’ accessibility, you would handle ...
Chapter 7: Improving the Dashboard 207 Now that you have this function in place, you can rewrite the delete() controller functio ...
Chapter 7: Improving the Dashboard 208 < ul > < ?php foreach ($this- > session- > userdata(‘orphans’) as $id = &g ...
Chapter 7: Improving the Dashboard 209 You ’ re not done yet, though. You still need to create the MProducts function reassignPr ...
Chapter 7: Improving the Dashboard 210 Reworking Colors and Sizes for Products Reworking the way you ’ re handling colors and si ...
Chapter 7: Improving the Dashboard 211 The products_colors and products_sizes tables keep track of which selections have been ma ...
Chapter 7: Improving the Dashboard 212 Here ’ s the MSizes model (/system/application/models/msizes.php): < ?php class MSizes ...
Chapter 7: Improving the Dashboard 213 function create(){ if ($this- > input- > post(‘name’)){ $this- > MColors- > c ...
Chapter 7: Improving the Dashboard 214 function getColor($id){ $data = array(); $options = array(‘id’ = > $id); $Q = $this- & ...
Chapter 7: Improving the Dashboard 215 While you ’ re at it, create a getActiveColors() function as well. You need it shortly: f ...
Chapter 7: Improving the Dashboard 216 Figure 7-10 If you were to load the admin/colors/index controller in your browser, you wo ...
Chapter 7: Improving the Dashboard 217 echo form_dropdown(‘status’,$options) .” < /p > ”; echo form_submit(‘submit’,’creat ...
«
7
8
9
10
11
12
13
14
15
16
»
Free download pdf