<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
    $this->load->view('user/common_style');
 ?>
<link rel="stylesheet" href="<?php echo base_url();?>styles/fonts/Socialico/stylesheet.css">
<link href="<?php echo base_url();?>styles/css/table.css" type="text/css" rel="stylesheet" />
	<script src="<?php echo base_url();?>styles/js/modernizr.js"></script>
  <style>
.accordion_top_button_area button[type=submit]{
  font-size: 14px;
  color: #fff;
  text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 50px;
  display: block;
  text-align: center;
}
.datatable select {
 background-size: 35% auto;

  }
</style>
</head>
  <body>
    <div id="preloader">
      <div class="preloader_spinner"> </div>
    </div>
    <section class="body_wrapper home_one">
      <?php
        $this->load->view('user/header');
        $this->load->view('user/login_header');
      ?>
 
      <section class="dmain">
      	<div class="container">
            <h2 class="section_hedings1"><?php echo $historytitle; ?> <span><?php echo $this->lang->line('trans_his_title'); ?></span></h2><br />
              <div class="gry ">
                
              <div class="row ">
                <div class="col-lg-12"> <div class="title">
                <h2></h2>
                </div>
                </div>
              </div>
                <form class="form-validate history"  action="<?php echo $action; ?>" method="post">
                  <div class="row">
                    <div class="col-lg-12">
                     
                      <div class="col-lg-12 col-xs-12 col-sm-12 pull-right">
                      <div class="row">
                        <div class="col-lg-4">
                         <?php if(isset($post_value)){   ?>
                          <select name="from_date">
                            <?php
                              for($i=1;$i<=31;$i++) {
                                if(strlen($i)==1) $i='0'.$i;
                                  if($post_value['from_date']==$i)
                                    echo "<option value=$i selected>$i</option>";
                                  else
                                  echo "<option value=$i>$i</option>";
                              }
                            ?>
                          </select>
                           <? }  else { ?>
                            <select name="from_date">
                            <?php
                            for($i=1;$i<=31;$i++) {
                              if(strlen($i)==1) $i='0'.$i;
                              if($day==$i)
                              echo "<option value=$i selected>$i</option>";
                              else
                              echo "<option value=$i>$i</option>";
                             }
                              ?>
                          </select>
                          <?php } ?>
                        </div>
                        <div class="col-lg-4">
                         <?php if(isset($post_value)){   ?>
                          <select name="from_month">
                            <?php
                              for($i=1;$i<=12;$i++) {
                              if($post_value['from_month']==$i)
                                echo "<option value=$i selected>".$monarr[$i]."</option>";
                              else
                                echo "<option value=$i>".$monarr[$i]."</option>";
                              }
                           ?>
                          </select>
                           <? }  else { ?>
                           <select name="from_month">
                            <?php
                              for($i=1;$i<=12;$i++) {
                              if($month==$i)
                                echo "<option value=$i selected>".$monarr[$i]."</option>";
                              else
                                echo "<option value=$i>".$monarr[$i]."</option>";
                              }
                           ?>
                          </select>
                           <?php } ?>
                        </div>
                        <div class="col-lg-4">
                          <?php if(isset($post_value)){   ?>
                          <select name="from_year">
                             <?php
                              for($i=$year-3;$i<=$year;$i++) {
                                if($post_value['from_year']==$i)
                                echo "<option value=$i selected>$i</option>";
                                else
                                echo "<option value=$i>$i</option>";
                              }
                            ?>
                          </select>
                            <? }  else { ?>
                             <select name="from_year">
                             <?php
                              for($i=$year-3;$i<=$year;$i++) {
                                if($i==$year)
                                echo "<option value=$i selected>$i</option>";
                                else
                                echo "<option value=$i>$i</option>";
                              }
                            ?>
                          </select>
                          <?php } ?>
                        </div>
                        </div>
                      </div>
                    </div>
                  </div>
                 <div class="row">
              <div class="col-lg-12">
               
                <div class="col-lg-12 col-xs-12 col-sm-12 pull-right">
                  <div class="row">
                    <div class="col-lg-4">
                   <?php if(isset($post_value)){   ?>
                    <select name="to_date">
                      <?php
                      for($i=1;$i<=31;$i++) {
                        if(strlen($i)==1) $i='0'.$i;
                        if($post_value['to_date']==$i){
                        echo "<option value=$i selected>$i</option>";
                        }
                        else{
                         echo "<option value=$i>$i</option>";
                      }}
                        ?>
                    </select>
                    <? }  else { ?>
                    <select name="to_date">
                      <?php
                      $number1 = cal_days_in_month(CAL_GREGORIAN, $month, $year);
                      for($i=1;$i<=31;$i++) {
                        if(strlen($i)==1) $i='0'.$i;
                        if($day==$i)
                        echo "<option value=$i selected>$i</option>";
                        else
                        echo "<option value=$i>$i</option>";
                       }
                        ?>
                        </select>
                <?php } ?>

                  </div>
                  <div class="col-lg-4">
                   <?php if(isset($post_value)){   ?>
                    <select name="to_month">
                      <?php
                        for($i=1;$i<=12;$i++) {
                        if($post_value['to_month']==$i)
                          echo "<option value=$i selected>".$monarr[$i]."</option>";
                        else
                          echo "<option value=$i>".$monarr[$i]."</option>";
                        }
                     ?>
                    </select>
                     <? }  else { ?>
                      <select name="to_month">
                      <?php
                        for($i=1;$i<=12;$i++) {
                        if($month==$i)
                          echo "<option value=$i selected>".$monarr[$i]."</option>";
                        else
                          echo "<option value=$i>".$monarr[$i]."</option>";
                        }
                     ?>
                    </select>
                    <?php } ?>

                  </div>
                  <div class="col-lg-4">
                   <?php if(isset($post_value)){   ?>
                    <select name="to_year">
                       <?php
                        for($i=$year-3;$i<=$year;$i++) {
                          if($post_value['to_year']==$i)
                          echo "<option value=$i selected>$i</option>";
                          else
                          echo "<option value=$i>$i</option>";
                        }
                      ?>
                    </select>
                     <? }  else { ?>
                      <select name="to_year">
                       <?php
                        for($i=$year-3;$i<=$year;$i++) {
                          if($i==$year)
                          echo "<option value=$i selected>$i</option>";
                          else
                          echo "<option value=$i>$i</option>";
                        }
                      ?>
                    </select>
                    <?php } ?>
                  </div>      </div>
                  
                </div>
              </div>
            </div>
                   </div>
                 
                  
            
              <div class="col-lg-4 col-lg-offset-5 ">
            
                 <div class="cmmn">
                    <div class="contact_page_btn">
                      <button type="submit"><?php echo $this->lang->line('contact_submit'); ?></button>
                    </div>
                    <div style="clear:both;"><br></div>
                  </div> </div>
                    </div></form>
                    
                    </section>
                    <section class=" dmain1">
          	          <div class="container">
                       	<div class="row">
                          <div class="col-lg-12">
                            <div class="datatable">
                              <?php $currency_info = defaultcurrency();?>
                            	<table>
                                <colgroup>
                                  <col width="20%">
                                  <col width="20%">
                                  <col width="25%">
                                  <col width="25%">
                                  <col width="10%">
                                </colgroup>
                              	<thead>
                                  <tr>
                                    <th><?php echo $this->lang->line('trans_date'); ?> </th>
                                    <th><?php echo $this->lang->line('transactionID'); ?></th>
                                    <th><?php echo $this->lang->line('trans_amnt'); ?> </th>
                                    <th><?php echo $this->lang->line('trans_descr'); ?></th>
                                    <th><?php echo $this->lang->line('trans_mode'); ?></th>
                                  </tr>
                                </thead>
                                <tbody>
                                  <?php 
                                    if($search_res) { 
                                      foreach ($search_res as $res) {
                                        if($res->payment_id == '0') {
                                          $payment_value = '';
                                          $img_alt = "";
                                        } else {
                                          $condition = "payment_key in('logo') AND payment_id = '".$res->payment_id."'";
                                          $payment_image = $this->finance_model->Paymentimage($condition);
                                          if($payment_image) {
                                            $payment_value = $payment_image->payment_value;
                                            $img_alt = "payment image";
                                          } else {
                                            $payment_value = "placeholder.jpg";
                                            $img_alt = "payment removed";
                                          }
                                        }
                                         
                                         $cur=$res->currency;
                                         if($cur=='1')
                                          $curr_name="USD";
                                        if($cur=='2')
                                          $curr_name='BTC';
                                        if($cur=='3')
                                          $curr_name='ETH';
                                  ?>
                                        <tr>
                                          <td><?php echo $res->date;?></td>
                                          <td><?php echo $res->transactionid; ?></td>
                                       <!--   <td><?php echo $currency_info->currency_symbol."".number_format($res->amount, $currency_info->deimal_point, '.', '').' '.strtoupper($currency_info->currency_unit);?> </td>-->
                                       <td><?php echo $res->amount.' '.$curr_name;?></td>
                                          <td><?php echo ucfirst($res->description); ?></td>
                                                          
                                        <td><?php if($payment_value) { ?><img src="<?php echo base_url();?>content/payment/<?php echo $payment_value; ?>" width="60" alt="<?php echo $img_alt;?>"/><?php }else { echo "-"; ?><?php }?></td>
                                          
                                        </tr>
                                  <?php 
                                      } 
                                    } 
                                  ?>
                                </tbody>
                              </table>
                            </div>
                          </div>
                        </div>
          	          </div>
                    </section>
                
                    <section class="dmain">
                    </section>
  
    <?php
        $this->load->view('user/footer');
    ?>
</section>


<script src="<?php echo base_url();?>styles/js/jquery-1.12.2.min.js"></script>

<script src="<?php echo base_url();?>styles/js/jquery.meanmenu.js"></script>
<script src="<?php echo base_url();?>styles/js/owl.carousel.min.js"></script>
<script src="<?php echo base_url();?>styles/js/waypoints.min.js"></script>
<script src="<?php echo base_url();?>styles/js/jquery.counterup.min.js"></script>
<script src="<?php echo base_url();?>styles/js/jquery.mixitup.min.js"></script>
<script src="<?php echo base_url();?>styles/js/waypoints.min.js"></script>
<script src="<?php echo base_url();?>styles/js/instafeed.min.js"></script>
<script src="<?php echo base_url();?>styles/js/bootstrap.min.js"></script>



<script src="<?php echo base_url();?>styles/js/main.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>styles/js/owl.carousel.min.js"></script>
<script type="text/javascript">



	jQuery(document).ready(function($) {
	$("#owl-example").owlCarousel({   
	 nav:true,
	 
	 items : 8, 
    itemsCustom : false,
    itemsDesktop : [1199,8],
    itemsDesktopSmall : [980,5],
    itemsTablet: [768,5],
    itemsTabletSmall: [768,4],
    itemsMobile : [479,2],
    singleItem : false,
    itemsScaleUp : true,
	
	    navigation : true,
    navigationText : ["",""],
    rewindNav : true,
    scrollPerPage : true,
	});
	});
	 
 
	
	</script>
    

<script type="text/javascript" src="<?php echo base_url();?>styles/js/datatables.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>styles/js/application.js"></script>

<script type="text/javascript">

$(document).ready(function() {
$('.datatable table').dataTable(
{
        "paginate": false,
        "filter": false,
        "Info": false
                 } );

 
} );
</script>
  <script type="text/javascript" src="<?php echo base_url();?>assets/js/formValidation.js"></script>
 <script type="text/javascript" src="<?php echo base_url();?>assets/js/bootstrap.js"></script>
 
</body>
</html>
