<?php $this->load->view("top"); ?>

<div class="page-title">
    <h2><span><?php //echo $heading_title; ?></span></h2>
    <div class="buttons">
       
     </div>
</div>


<div style="clear:both;"></div>
<!-- <div style="background-Color:#F8EA4A;margin:5px;padding:5px;">
    <h3><span>Product Name: </span><?php //echo $pres['product_name'];?></h3>
  </div> -->
<?php @session_start();
 //$this->session->flashdata('message'); ?>
  <section class="banner_category" style="background-image: url('<?php echo theme_url();?>images/listing-banner.jpg');">
    <div class="container">
     
      <h1 class="banner_title">My Account</h1>
    </div>
  </section>
  <section class="my_account_page">
<div class="container">
    <ul class="account_breadcrumb">
      <li><a href="<?=site_url();?>" title="Home">Home</a>
            </li>
            <li><a href="<?=base_url('my-account');?>" title="My Account">My Account</a>
            </li>
            <li><a href="<?=base_url('my-orders');?>" title="My Orders">My Orders</a>
            </li>
           <li class="active">Ratings &amp; Reviews</li>
			</ul>

<div class="row">

  <div class="col-md-3 col-md-pull-9">

<?php $this->load->view("left"); ?>
</div>
<div class="col-md-9 col-md-push-3">
<div class="right_side">
<h1>Ratings &amp; Reviews</h1>
<?php     echo error_message();
          echo validation_message();
         /// $this->session->flashdata('success');
        //   if(isset($proRes['success_message'])){
        //   echo "heloo";print_r($proRes);die;
        // }
          ?>
<div class="review_right">
<div class="order_item">
<div class="wishlist_body">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-3">
    
   <?php 

  $query = $this->db->query("SELECT * FROM wps_products_media WHERE products_id =".$proRes['products_id']."");
    $row_founds = $query->num_rows();
    if($row_founds > 0) {
      $result[] = $query->row_array();
    }
    //echo "<pre>";print_r($result[0]['media']);
  ?>
<a href="" title="<?php echo $proRes['product_name']; ?>" target="_blank">
  <img src="<?php echo get_image('products', $result[0]['media'], '110', '67', 'R'); ?>" alt="<?php echo $proRes['product_name']; ?>" title="<?php echo $proRes['product_name']; ?>">
</a>
</div>

<div class="col-lg-10 col-md-10 col-sm-9">
<div class="wishlist_info"> 
<a href="<?php echo site_url($proRes['friendly_url']);?>"><?php echo $proRes['product_name'];?></a>
<!--<p><?php echo $proRes['products_description'];?></p>-->
    <br/>
<strong style="color: brown;"><i class="fa fa-inr"></i> <?php echo $proRes['product_price'];?></strong>
</div>
</div>

</div>
</div>

</div>
</div>

</div>

<!-- <form> -->
<?php echo form_open_multipart(current_url_query_string(), 'class="form-horizontal"'); ?> 
    <?php if ($this->session->flashdata('success')) echo '
          <div class="alert alert-success success" style="padding: 8px 8px 8px 40px;">' . $this->session->flashdata('success') . '</div>
          <br/>'; ?>
 <label class="rate_block">Rate This Product</label>


      <div class="rating-css">
    <div class="star-icon">
                                         <?php
     $rating_opts = $this->config->item('rating_opts');
     $max_star = 5;
     $starArray =$this->config->item('starArray');
 
     foreach ($starArray as $key => $value) {
      ?>
    
  
      <input type="radio" name="ads_rating" id="rating<?php echo $key;?>" value="<?php echo $key;?>">
      <label for="rating<?php echo $key;?>" class="fa fa-star" title="<?php echo $value;?>"></label>
        
   
   
      <?php
       # code...
     }

     ?>
     
 </div>
  </div>
<?php echo form_error('ads_rating');?>
     
<div class="clearfix"></div>

<div class="form-group">
<label class="review_title">Review This Product</label>
<textarea name="comment" class="form-control" rows="5" cols="50" id="comment" > <?php echo set_value('comment');?></textarea>
     <?php echo form_error('comment');?>

</div>
<div class="form-group">
    <label class="">Images</label>
      <div class="">      
        <input id="img1" name="img1" type="file" class="validate" style="" accept="image/png, image/gif, image/jpeg"/>
      </div>
  </div>
<input class="star star-4" id="star-4" type="hidden" name="products_id" value="<?php echo $proRes['products_id'];?>">
<button tabindex="9" class="modal_btn save_btn" type="submit" name="submit">Submit</button>
<a href="javascript:void()" id="add_cancel" class="modal_btn cancel">Cancel</a>
<!-- </form> -->
<?php echo form_close();?>
</div>
</div>
</div>



</div>
</div>
</section>

<div style="clear:both;"></div>
                        
<?php $this->load->view("bottom"); ?>