<?php
/**
 * Page Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2012 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version GIT: $Id: Author: DrByte  Sun Aug 19 09:47:29 2012 -0400 Modified in v1.5.1 $
 */
?>
<div class="centerColumn" id="reviewsWrite">
<?php echo zen_draw_form('product_reviews_write', zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'action=process&products_id=' . $_GET['products_id'], 'SSL'), 'post', 'onsubmit="return checkForm(product_reviews_write);"'); ?>
  <div class="product-info-wrap">
    <div class="row">

      <?php if (zen_not_null($products_image)) : ?>
      <div class="product-images col-md-6" itemtype="http://schema.org/ImageGallery">
        <div id="productReviewsDefaultProductImage"><?php require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?></div>
      </div>
      <?php endif; ?>

      <div class="product-details col-md-6">
        <div class="product-header">
          <h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1>

          <h2 id="productPrices" class="productGeneral"><?php echo $products_price; ?></h2>

          <?php echo '<a href="' . zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('reviews_id'))) . '">' . BUTTON_GOTO_PROD_DETAILS_ALT . '</a>'; ?>

          <div class="product-share">
            <ul>
              <li><a href="https://www.facebook.com/sharer.php?u=<?php echo urlencode(htmlspecialchars_decode(zen_href_link(zen_get_info_page((int)$_GET['products_id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$_GET['products_id'])) . '&products_id=' . (int)$_GET['products_id'] . '&amp;p[images][0]=' . (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ) . $products_image_large, $request_type, false))); ?>" class="facebook-share" title="Share on Facebook" target="_blank"><i class="fa fa-facebook"></i></a></li> 
              <li><a href="http://www.twitter.com/share?url=<?php echo urlencode(htmlspecialchars_decode(zen_href_link(zen_get_info_page((int)$_GET['products_id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$_GET['products_id'])) . '&products_id=' . (int)$_GET['products_id'], $request_type, false))); ?>" class="twitter-share" title="Share on Twitter" target="_blank"><i class="fa fa-twitter"></i></a></li> 
              <li><a href="https://plus.google.com/share?url=<?php echo urlencode(htmlspecialchars_decode(zen_href_link(zen_get_info_page((int)$_GET['products_id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$_GET['products_id'])) . '&products_id=' . (int)$_GET['products_id'], $request_type, false))); ?>" class="google-plus-share" title="Share on Google Plus" target="_blank"><i class="fa fa-google-plus"></i></a></li> 
              <li><a href="https://pinterest.com/pin/create/button/?url=<?php echo urlencode(htmlspecialchars_decode(zen_href_link(zen_get_info_page((int)$_GET['products_id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$_GET['products_id'])) . '&products_id=' . (int)$_GET['products_id'], $request_type, false))); ?>&amp;media=<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ) . $products_image_large; ?>&amp;description=" class="pinterest-share" title="Share on Pinterest" target="_blank"><i class="fa fa-pinterest"></i></a></li> 
              <li><a href="mailto:please_enter_your@emailaddresshere.com?subject=<?php echo urlencode($products_name); ?>&amp;body=<?php echo urlencode(htmlspecialchars_decode(zen_href_link(zen_get_info_page((int)$_GET['products_id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id((int)$_GET['products_id'])) . '&products_id=' . (int)$_GET['products_id'], $request_type, false))); ?>" title="Email a Friend"><i class="fa fa-envelope"></i></a></li>
            </ul>
          </div>
        </div>
      </div>

    </div>
    <div class="reviews-wrap">
      <h3 id="reviewsWriteReviewer" class="section-title"><?php echo SUB_TITLE_FROM, zen_output_string_protected($customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname']); ?></h3>

      <?php if ($messageStack->size('review_text') > 0) echo $messageStack->output('review_text'); ?>

      <div id="reviewsWriteReviewsRate" class="center"><?php echo SUB_TITLE_RATING; ?></div>

      <div class="ratingRow">
      <?php echo zen_draw_radio_field('rating', '1', '', 'id="rating-1"'); ?>
      <?php echo '<label class="" for="rating-1"><span class="the-rating" title="1">' . genesis_get_rating_html( 1 ) . '</span></label> '; ?>

      <?php echo zen_draw_radio_field('rating', '2', '', 'id="rating-2"'); ?>
      <?php echo '<label class="" for="rating-2"><span class="the-rating" title="2">' . genesis_get_rating_html( 2 ) . '</span></label>'; ?>

      <?php echo zen_draw_radio_field('rating', '3', '', 'id="rating-3"'); ?>
      <?php echo '<label class="" for="rating-3"><span class="the-rating" title="3">' . genesis_get_rating_html( 3 ) . '</span></label>'; ?>

      <?php echo zen_draw_radio_field('rating', '4', '', 'id="rating-4"'); ?>
      <?php echo '<label class="" for="rating-4"><span class="the-rating" title="4">' . genesis_get_rating_html( 4 ) . '</span></label>'; ?>

      <?php echo zen_draw_radio_field('rating', '5', '', 'id="rating-5"'); ?>
      <?php echo '<label class="" for="rating-5"><span class="the-rating" title="5">' . genesis_get_rating_html( 5 ) . '</span></label>'; ?>
      </div><br>

      <label id="textAreaReviews" for="review-text"><?php echo SUB_TITLE_REVIEW; ?></label>
      <?php echo zen_draw_textarea_field('review_text', 60, 5, '', 'id="review-text"'); ?>
      <?php echo zen_draw_input_field('should_be_empty', '', ' size="60" id="RAS" style="visibility:hidden; display:none;" autocomplete="off"'); ?>

      <div class="buttonRow forward"><input class="button" type="submit" value="<?php echo BUTTON_SUBMIT_ALT; ?>"></div>
      <br class="clearBoth" />

      <div id="reviewsWriteReviewsNotice" class="notice"><?php echo TEXT_NO_HTML . (REVIEWS_APPROVAL == '1' ? '<br />' . TEXT_APPROVAL_REQUIRED: ''); ?></div>
      </form>

    </div>

  </div>
</div>
