<script src="<?php echo base_url();?>ckeditor/ckeditor.js"></script>
      <section class="content-header">
      <h1>

        Change Membership Invoice Type 

      </h1>

      <ol class="breadcrumb">

        <li><a href="<?php echo base_url().'admin';?>"><i class="fa fa-dashboard"></i> Home</a></li>

        <li><a href="<?php echo base_url('admin/order');?>">Orders </a></li>

        <li class="active"> Change Membership Invoice Type</li>

      </ol>

    </section>

    

    <section class="content">

      <div class="row">

      <?php echo $this->utility->showMsg();?>

        <div class="col-md-12">

        <div class="loader" style="display:none;"><img src='<?php echo base_url();?>assets/images/loading.gif' alt='loading' /></div>

          <!-- Horizontal Form -->

          <div class="box box-info">

            <div class="box-header with-border">

              <h3 class="box-title">Change Membership Invoice Type </h3>

            </div>

            <!-- /.box-header -->

            <!-- form start -->
            <div class="box-body">
              <h3>Order Details</h3>
              <table id="example11" class="table table-bordered table-striped">
                <thead>
                  <th>#</th>
                  <th>Order Number</th>
                  <th>Product</th>
                  <th>Cart value(&euro;)</th>
                  <th>Total(&euro;)</th>
                  <th>Duration</th>
                  <th>Status</th>
                </thead>
                 <?php if(count($order_details)>0)
                { ?>
                <tbody>
                
                <tr>
                    <td><?php echo $i;?></td>
                    <td><?php echo $order_details['order_id_masked']; ?></td>
                    <td><?php if($order_details['article_id']==4){ echo 'Premium Membership'; } elseif($order_details['article_id']==5){ echo 'Basic Membership'; }?></td>
                    <td><?php echo number_format($order_details['total_base']/100, 2,',', '.');?></td>
                    <td><?php echo number_format($order_details['total_sum']/100, 2,',', '.'); ?></td>
                    <td><?php if($order_details['time'] == 182) { echo '6 Months'; } else{ echo '12 Months'; }?></td> 
                    <td><?php if($order_details['payed'] == 1) { echo 'Paid'; } else{ echo 'Not Paid'; }?></td> 
                </tr>
                </tbody>
                <?php } ?>
              </table>
            </div>
            <form id="add_frm" name="add_frm" class="form-horizontal" method="post" action="" enctype="multipart/form-data">

              <div class="box-body">

                <div class="form-group">

                  <label class="col-sm-2 control-label">Select Type</label>

                  <div class="col-sm-6">

                    <select class="form-control" id="type" name="type" value="" >
                      <option value="">--Select--</option>
                      <?php if($memberships_half){ 
                          foreach ($memberships_half as $key => $value) { ?>
                              <option value="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></option>
                      <?php  }
                        }
                      ?>
                      <?php if($memberships){ 
                          foreach ($memberships as $key => $value) { ?>
                              <option value="<?php echo $value['id']; ?>"><?php echo ucfirst($value['alias']); ?> 12 Months</option>
                      <?php  }
                        }
                      ?>
                    </select>

                  </div>

                </div>
                
              </div>

              <div class="box-footer">

                <button type="button" onclick="return_back()"class="btn btn-default  margin-left  " >Cancel</button>

                <input type="submit" class="btn btn-info " value="Update" id="add">

              </div>

              <input type="hidden" name="frmSecurity" value="<?php echo $this->utility->getSecurity();?>"/>

            </form>

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

    <style type="text/css">

    .loader{

      position: fixed;

      left: 0;

      top: 0;

      right: 0;

      bottom: 0;

      width: 100%;

      height: 100%;

      background-color: rgba(0, 0, 0, 0.60);

      z-index: 9999;

      text-align: center;

    }

    .loader img{

      z-index: 99999;

      margin-top: 10%;

    }

    </style>

   

   <script type="text/javascript">
    function return_back()
    {
      var back_url='<?php echo base_url()?>admin/order';
      window.location=back_url;
    }
   </script>