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'); }
<img src="/img/product/<?php echo $product['slug']; ?> .jpg" alt="<?php echo $product[dblang('name')]; ?> " /> </div> <p> </p> <h3><?php echo $product[dblang('name')]; ?> </h3> <ul> <?php echo $product[dblang('features')]; ?> </ul> <a href="/share/index/<?php echo $product['slug']; ?> " class="btn home-click" data-product="<?php echo $product['slug']; ?> "><?php echo lang('declare_btn'); ?> </a> </div> </div> <?php
<p><?=lang('find_your_mixer_text')?></p> <a href="http://www.kitchenaid.ca/<?=lang('lang_code')?>/findyourmixer/" class="btn" onclick="te('common','skip-share','');"><?=lang('find_your_mixer_link')?></a> </div> </div> <div class="col-xs-12 col-md-4"> <div class="footer-box"> <h4><?=lang('what_color_title')?></h4> <p><?=lang('what_color_text')?></p> <a href="http://kitchenaidcolourology.ca/" target="_blank" class="btn" onclick="te('common','external-link','colourology');"><?=lang('what_color_link')?></a> </div> </div> <div class="col-xs-12 col-md-4"> <div class="footer-box"> <h4><?=lang('where_to_buy_title')?></h4> <p><?=lang('where_to_buy_text')?></p> <a href="/<?=dblang('where-to-buy')?>.pdf" class="btn" onclick="te('common','where-to-buy','');"><?=lang('where_to_buy_link')?></a> </div> </div> </div> <div class="row"> <div class="col-xs-12"> <div class="links text-center"> <a href="http://www.kitchenaid.ca/<?=lang('lang_code')?>/" class="space" onclick="te('common','external-link','kitchenaid-ca');">KitchenAid.ca</a> <a href="http://blog.kitchenaid.ca/declare-share-rules-regulations/" target="_blank" class="space" onclick="te('common','external-link','kablog-contest-rules');"><?=lang('contest')?></a> <a href="<?=lang('privacy_link')?>" onclick="te('common','privacy','');"><?=lang('privacy')?></a> </div> <div class="legal text-center"><?=lang('legal')?></div> </div> </div> </div>
?> "; 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>
</div> <div class="col-xs-9 col-md-7"> <select name="color_id" id="input_color_id" class="form-control"<? if (!count($colors)) echo 'disabled="disabled"'?>> <option value="0"><?php echo lang('entry_color_select'); ?> </option> <? if (count($colors)) : foreach ($colors as $product_color) : ?> <option value="<?php echo $product_color['id']; ?> " <?php echo $selected_color == $product_color['slug'] ? 'selected="selected"' : ''; ?> ><?php echo $product_color[dblang('name')]; ?> </option> <? endforeach; endif; ?> </select> <p class="text-danger invisible"><?php echo lang('entry_color_error'); ?> </p> </div> </div> <div class="row m_t form-group"> <div class="col-xs-12 col-md-9 col-md-offset-3"> <input type="checkbox" id="input_terms" name="terms_and_conditions" /> <label for="input_terms"><span></span><?php
<tr> <td valign="center" width="500" height="75" align="center"> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="center" align="center"><a name="WhereToBuy" href="http://declareandshare.ca/<?php echo dblang('where-to-buy'); ?> .pdf" target="_new" ><img border="0" alt="Where to Buy" style="display: block" src="http://declareandshare.ca/img/email/<?php echo dblang('where-to-buy-BTN'); ?> .png" /></a></td> <td valign="center" align="center"><a name="Share" href="http://declareandshare.ca/<?php echo lang('short'); ?> " target="_new" ><img border="0" alt="Share Your Own" style="display: block" src="http://declareandshare.ca/img/email/<?php echo dblang('share-BTN'); ?> .png" /></a></td> </tr> </table> </td> </tr> <tr> <td height="75" valign="center" width="566" align="center" style="font-family: Helvetica, Arial, sans-serif; text-decoration: none; vertical-align: middle;"><img src="http://declareandshare.ca/img/email/kitchenaid-logo.png" width="224" height="23" alt=""/></td> </tr> <tr> <td height="22" valign="top" width="566" align="left"></td> </tr> <tr> <td width="262" height="28" align="center" class="underline footText black floatL center mtop" valign="bottom" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; font-family: Helvetica, Arial, sans-serif; -webkit-text-size-adjust: none; color: #000000; font-size: 11px;">Whirlpool Canada LP<br>
<div id="home-header"> <p> </p> <div id="snowy-hill"> <img id="banner" src="/img/layout/home/declare-and-share-<?php echo dblang('banner'); ?> .png" alt="declare-and-share-banner"> <img id="candy" src="../../img/layout/home/candy-canes-md.png" alt="candy-canes-md"> <p><?php echo lang('sugar_plums_closed'); ?> </p> </div> </div>
<div class="row"> <div class="col-xs-12 col-md-4 "> <img id="product-img" src="/img/product/<?php echo $product['slug']; ?> /<?php echo stripdash($color['slug']); ?> .jpg" alt="<?php echo $product['name']; ?> Product Image" /> </div> <div class="col-xs-12 col-md-8"> <p><?php echo $product[dblang('description')]; ?> </p> </div> </div> <div class="row m_t"> <div class="col-xs-12 text-center"> <a onclick="te('from-share','where-to-buy','')" class="btn" href="/"><?php echo lang('where_to_buy'); ?> </a> </div> </div> </div>