public function index($product_slug = NULL, $color_slug = NULL, $language = NULL) { $this->load->helper('url'); $this->load->database(); $this->load->helper('entry'); if (!$product_slug || !$color_slug) { redirect("/"); } // grab selected product data and color $data['product'] = $this->db->select('*')->from('ds_product')->where('slug', $product_slug)->get()->row_array(); $data['color'] = $this->db->select('*')->from('ds_colors')->where('slug', $color_slug)->get()->row_array(); $data['og'] = array('title' => $data['product'][dblang('name')], 'url' => 'http://declareandshare.ca/declared/index/' . $product_slug . '/' . $color_slug, 'description' => str_replace(array('[[PROD]]', '[[COLOR]]'), array($data['product'][dblang('name')], $data['color'][dblang('name')]), lang('fb_desc')), 'image' => 'http://declareandshare.ca/img/product/' . $product_slug . '/share/' . stripdash($color_slug) . '.jpg'); if ($language) { $data['og']['url'] .= '/' . $language; } $this->load->view('layout/header', $data); $this->load->view('declared', $data); $this->load->view('layout/footer'); }
?> "; var product_slug = "<?php echo $product['slug']; ?> "; var color_slug = "<?php echo $colors[0]['slug']; ?> "; var color_name = "<?php echo $colors[0][dblang('name')]; ?> "; var color_image_slug = '<?php echo stripdash($colors[0]['slug']); ?> '; var base_url = server_name+"declared/index/"; var media_base_url = server_name+"img/product/"; var forward_url = server_name+"share/enter/"; var tw_share = "<?php echo str_replace('[[PROD]]', html_entity_decode($product[dblang('name')]), lang('tw_desc')); ?> "; var pin_share = "<?php echo str_replace('[[PROD]]', html_entity_decode($product[dblang('name')]), lang('pin_desc')); ?> "; </script>
</tr> </table></td> </tr> <tr> <td valign="top" width="617" align="left"> <!-- DYNAMIC CONTENT START --> <table border="0" cellspacing="0" cellpadding="0" width="617" style="table-layout: fixed" bgcolor="#ffffff"> <tr> <td valign="top" width="28" align="left"></td> <td id="PRODUCT_IMAGE" height="315" valign="top" width="300" align="center" style="line-height: 0px"><img src="http://declareandshare.ca/img/product/<?php echo $product['slug']; ?> /<?php echo stripdash($color['slug']); ?> .jpg" width="228" alt="placeholder"></td> <td valign="center" width="250" align="left" style="padding-left: 15px;"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td id="PRODUCT TITLE" valign="top" width="250" align="left"><font face="Arial, Helvetica, sans-serif" style="color: #666666; font-size: 15px; font-weight: bold;"><?php echo $product[dblang('name')]; ?> </font></td> </tr> <tr> <td height="20px"></td> </tr> <tr>