<div class="my-account">
  <div class="heading">
        <dl class="acctip">
            <dt>My Questions</dt>
        </dl>
  </div>
    <div id="customer-questions">
    <?php foreach ($question_data as $question){?>
    <div class="questions_list cont clearfix">
        <div class="col-sm-8">
        	<div class="crt-product clearfix">
              <a href="index.php?controller=product&amp;product_id=<?php echo $question['product_id'];?>" class="crt-product_img"><img src="<?php echo $question['thumb'];?>"></a>
          </div>
            <div class="item_price">
           		<span class="special-price"><?php echo $question['price'];?></span>           
            </div>
            <div class="item-question">
                <div class="rating">
                    <span class="nostar">
                        <span class="nstar" style="width:<?php echo $question['review_avg'];?>%;"></span>
                    </span> 
                </div>
                (<?php echo $question['review_count'];?>)<span class="line">|</span>Orders (<?php echo $question['sold'];?>) 
            </span>
            </div>
        </div>        
        <div class="pro_questions_right col-sm-16">
            <h2 class="questions_title"><a href="<?php echo $question['product_href'];?>"><?php echo $question['name'];?></a> </h2>
            <ul class="qa-list">
            	<li class="question question-element clearfix">
                	<div class="pr-qa">
                        <b class="pr-question_nr">Q</b>
                        <div class="pr-question_title"><p><?php echo $question['text'];?></p></div>
                        <div class="pr-question_author">
                        	<i class="pr-question_author_date"><?php echo date('m/d/Y', strtotime($question['date_added']));?></i>
                        </div>
                    </div>
                </li>
                <li class="answer question-element clearfix">
                    <div class="pr-qa hasVoting">
                        <b class="pr-question_nr">A</b>
                        <div class="pr-question_text answer"><?php echo $question['reply_text'];?></div>
                        <div class="pr-question_author">
                            <i class="pr-question_author_date"><?php echo date('m/d/Y', strtotime($question['date_modified']));?></i>
                        </div>
                    </div>
              </li>
            </ul>    
        </div>
    </div>
    <?php }?>    
    <!--page-->
    <div class="toolbar clearfix">
          <div class="sorter_bottom">
               <div class="col-sm-7 left"><?php echo $text_results;?></div>
               <div class="col-sm-17 right">                   
                    <a href="<?php echo $action . '&page=' . (($page>1)?($page-1):$page); ?>"><?php echo 'Previous'?></a>                     
                    <?php foreach ($pages as $f_page) { ?>        
                    <?php if ( $f_page['value'] < ($page - 2) ) {continue; } ?>
                    <?php if ( $f_page['value'] > ($page + 4) ) {continue; } ?>                                               
                    <?php if ($f_page['value'] == $page) { ?>
                    <b class="selected"><?php $x = explode(" ",$f_page['text']);echo $x[0]; ?></b>
                    <?php } else { ?>
                      <a class="page_btn" href="<?php echo $action . '&page=' . $f_page['value']; ?>"><?php $x = explode(" ",$f_page['text']);echo $x[0]; ?></a></td>
                    <?php } ?>   
                    <?php } ?>                       
                    <a class="page_btn" href="<?php echo $action . '&page=' . (($page<count($pages))?($page+1):$page); ?>"><?php echo 'Next'?></a>                     
                    <label>Go to Page</label>
                    <select onchange="return SelectPage(this.value)" style="width:50px;">
                        <?php foreach ($pages as $f_page){?>
                        <option value="<?php echo $f_page['value']?>" <?php if ($f_page['value'] == $page){echo 'selected';}?>><?php echo $f_page['value']?></option>
                        <?php };?>
                    </select>
                    <script type="text/javascript">
						function SelectPage(page) {
							window.location.href="<?php echo $action; ?>&page=" + page;
						}
					</script>
             </div>
          </div>
     </div>
    <!--end_page-->
    <div class="clearfix" style="text-align:right; margin-top:20px;"><a class="btn_button btn_gray" onclick="window.history.back(-1)" style="margin:0;"><i class="icon-back"></i>Back</a></div>
    </div>
</div>