<?php include 'include/header.php';

      
      $id = $this->uri->segment(4);
      if($id!=''){
        $fetch = $this->admin_common_model->get_where('place_booking',['id'=>$id]);
        $row = $fetch[0];
               
        if($row['image']!=''){
          $path111 = base_url("uploads/images/".$row['image']);
        }else{

          $path111 = base_url("assets/images/banner/user_d.png");

           }
      }
      
                      $username = $this->admin_common_model->get_where('users',['id'=>$row['user_id']]);
                      $drivername = $this->admin_common_model->get_where('users',['id'=>$row['provider_id']]);
                    
 ?>

    <body class="fixed-left">
        
        <!-- Begin page -->
        <div id="wrapper">
        
        <?php include 'include/side_menu.php';?>

      
            <div class="content-page">
                <!-- Start content -->
                <div class="content">
                    <div class="container">

                        <!-- Page-Title -->
                        <div class="row">
                            <div class="col-sm-12">
                                <h4 class="pull-left page-title">Welcome !</h4>
                                <ol class="breadcrumb pull-right">
                                    <li><a href="<?=base_url('admin/view_page/dashboard');?>"><?php $fetch_app_name = $this->admin_common_model->get_where('admin',['id'=>'1']);
                                echo $fetch_app_name[0]['app_name']; ?></a></li>
                                    <li><a href="<?=base_url('admin/view_page/complete_ride');?>">Order List</a></li>
                                    <li class="active">View Order</li>
                                </ol>
                            </div>
                        </div>

                        <!-- Start Widget -->
                
<div class="row">
                            <!-- Basic example -->
                            <div class="col-md-12">
                                <div class="panel panel-default">
                                    <div class="panel-heading"><h3 class="panel-title">VIEW ORDER</h3></div>
                                  
                                  
                                  
                                    <div class="row ">
        <div class="col-sm-12 cdG">
          <!--<p><?=$btn_name;?> and add them to this site.  </p>-->
        </div>
        <div class="col-sm-12 cdG">
          <?php
          $where = "(id = '$id') GROUP BY order_id";
 $iddd = $this->uri->segment(4);
    //$fetch = $this->admin_common_model->get_where('place_order',$where);

          $fetch = $this->admin_common_model->get_where('place_booking',['id'=>$iddd]);

          if ($fetch) {

           

              $products = $total = array();

              $fetch1 = $this->admin_common_model->get_where('places',['id'=>$fetch[0]['place_id']]);

 $product = array();
              
              $fetch[0]['product'] = $products; 
              $data[] = $fetch1[0];
          }
      // echo "<pre>";print_r($data);
          ?>


          <div class="bg-order">

            <div class="clearfix row">

              <div class="col-md-12">
                <table class="table">
                  <tbody>
                    <tr>
                      <td>Order ID</td>
                      <td><?php echo $fetch[0]['unique_code'];?></td>
                    </tr>
                   <tr>
                      <td>User Name</td>
                      <?php
                      $userdata = $this->admin_common_model->get_where('users',['id'=>$fetch[0]['user_id']]);
                      ?>
                      <td><?php echo $userdata[0]['first_name'].' '.$userdata[0]['last_name'];?></td>
                    </tr>
                   
                    <tr>
                      <td>Agency Name</td>
                      <?php
                      $userdata1 = $this->admin_common_model->get_where('users',['id'=>$fetch[0]['provider_id']]);
                      ?>
                      <td><?php echo $userdata1[0]['first_name'].' '. $userdata1[0]['last_name'];?></td>
                    </tr>
                    
                    <tr>
                      <td>Start Date</td>
                       <td><?php echo $fetch[0]['start_date'];?></td> 
                    </tr>
                    
                    <tr>
                      <td>End Date</td>
                       <td><?php echo $fetch[0]['end_date'];?></td> 
                    </tr>
                    
                    <tr>
                      <td>Total Day</td>
                       <td><?php echo $fetch[0]['total_day'];?></td> 
                    </tr>
                    
                    <tr>
                      <td>Total No. of guest</td>
                       <td><?php echo $fetch[0]['no_of_guest'];?></td> 
                    </tr>
                    
                    
                    <tr>
                      <td>Per Day Charge</td>
                       <td><?php echo $fetch[0]['per_day_rate'];?></td> 
                    </tr>
                    
                    
                    <tr>
                      <td>Total Amount</td>
                       <td><?php echo $fetch[0]['total_amount'];?></td> 
                    </tr>
                    
                    
                    <tr>
                      <td>Provider Amount</td>
                       <td><?php echo $fetch[0]['provider_amount'];?></td> 
                    </tr>
                    
                    
                    <tr>
                      <td>Admin Commission Amount</td>
                       <td><?php echo $fetch[0]['admin_commission'];?></td> 
                    </tr>
                    
                    
                    <tr>
                      <td>DiscountAmount</td>
                       <td><?php echo $fetch[0]['discount'];?></td> 
                    </tr>
                    
                    
                    <tr>
                      <td>PaymentStatus</td>
                       <td><?php echo $fetch[0]['payment_status'];?></td> 
                    </tr>
                    
                    
                    <tr>
                      <td>PaymentType</td>
                       <td><?php echo $fetch[0]['payment_type'];?></td> 
                    </tr>
                    
                    
                    <tr>
                      <td>Booking Date</td>
                       <td><?php echo $fetch[0]['date_time'];?></td> 
                    </tr>
                    
                   
                    
                   
         
                   
                  </tbody>
                </table>
              </div>

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


              <!--  <div class="wizard">
                  <div class="wizard-inner">
                    <div class="connecting-line"></div>
                    <ul class="nav nav-tabs" role="tablist">
                      
                     <li role="presentation" class="<?php if($data[0]['status']==$data[0]['status']){echo 'active';};?>">
                      <a>
                        <span class="round-tab"> 1 </span>
                        <p><?php echo $data[0]['status']?> Order</p>
                      </a>
                    </li>
 
                  </ul>
                </div>-->

            
         </div>
         
        

       </div> 
     </div>

   </div>

 </div>

 


</div><!-- /.col-sm-9 -->
                                </div> <!-- panel -->
                            </div> <!-- col-->
                            
                        
                           

                        </div> <!-- End row -->

                    </div> <!-- container -->
                               
                </div> <!-- content -->

           
            </div>
          
        </div>
        <!-- END wrapper -->


 <?php include 'include/footer.php';?>
