<div class="content-wrapper">
 <section class="content-header">
  <h1>
    <?= $page_title ?>
    <small><?= $page_desc ?></small>
  </h1>
  <ol class="breadcrumb">
   <li><a href="<?= base_url() ?>"><i class="fa fa-star-o" aria-hidden="true"></i>Home</a></li>
   <li><?= $menu ?></li>
   <li class="active"><?= $sub_menu ?></li>
 </ol>
</section>
<section class="content">
  <div class="row">
   <div class="col-md-12">
      <?php if($this->session->flashdata('message')) { 
        $flashdata = $this->session->flashdata('message'); ?>
        <div class="alert alert-<?= $flashdata['class'] ?>">
         <button class="close" data-dismiss="alert" type="button">×</button>
         <?= $flashdata['message'] ?>
       </div>
     <?php } ?>
   </div>
  <div class="col-md-12">
  <div class="box box-warning">
   <div class="box-header with-border">
     <div class="col-md-6"><h3 class="box-title">Driver Details</h3></div>
     <div class="col-md-6" align="right">
        <a class="btn btn-sm btn-primary" href="<?= base_url('Driver/edit/'.encode_param($driver_id)) ?>">Edit</a>
        <a class="btn btn-sm btn-primary" href="<?= base_url('Driver/driver_list') ?>">Back</a>
     </div>
   </div>
   <div class="box-body">
    <div>
      <div class="col-md-12">
        <div class="col-md-6">
           <div class="col-md-2"> Name </div> 
           <div class="col-md-1"> : </div> 
           <div class="col-md-3"> Name </div> 
        </div>
      </div>
      <?php
        $row = 0;
        $row_html = '<div class="col-md-2"> {:label} </div>
                     <div class="col-md-1"> : </div> 
                     <div class="col-md-3"> {:value} </div>'
        foreach($ride_data AS $key => $ride){
          echo ($row == 0)?'<div class="col-md-12">':'';
          echo ($row == 0)?'<div class="col-md-6">':'';
          echo str_replace(array('{:label}','{:value}'), array($key,$ride), $row_html);
          echo ($col == 2)?'</div>':'';
          echo ($col == 1)?'</div>':'';
        }
      ?>
    </div>
  </div>
</section>
</div>
