<html>

<head>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">

  <title>Ink Pinned</title>
  <link rel="icon" type="image/x-icon" href="http://137.184.111.69/tattoo/assets/f.png">
  <script src="http://137.184.111.69/tattoo/assets/theme/vendor/jquery/jquery.min.js"></script>
  <!-- Custom fonts for this template-->
  <link href="http://137.184.111.69/tattoo/assets/theme/vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">

  <!-- Custom styles for this template-->
  <link href="http://137.184.111.69/tattoo/assets/theme/css/sb-admin-2.css" rel="stylesheet">
  <link href="http://137.184.111.69/tattoo/assets/theme/vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
  <link href="http://137.184.111.69/tattoo/assets/plugins/toast/toast.min.css" rel="stylesheet">
  <!-- Bootstrap core JavaScript-->
  <script src="http://137.184.111.69/tattoo/assets/theme/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

  <!-- Core plugin JavaScript-->
  <script src="http://137.184.111.69/tattoo/assets/theme/vendor/jquery-easing/jquery.easing.min.js"></script>


  <style>
    .primary-header {
      justify-content: space-between;
      align-items: center;
      padding: 1rem;
    }

    .flex-new-header {
      display: flex;
      gap: var(--gap, 1rem);
    }

    .logo-header>a {
      display: block;
      text-decoration: none;
      line-height: 0;
    }

    .logo-header .logo-image {
      width: 150px;
      height: auto;
    }

    .app-title h4 {
      font-size: 28px;
      font-weight: 600;
      color: #FFFFFF;
    }

    .location-center {
      display: flex;
      justify-content: center;
      width: 100%;
      align-items: center;
    }
    .bg-color{
      background-color: #000000;
      background: url("http://137.184.111.69/tattoo/assets/bg-image-full-tattoo.png");
      width: 100%;
      background-repeat: no-repeat;
      background-position: center;
      background-size: cover;
    }
    
    .section-bg-color{
      background-color: #000000;
      padding-bottom: 3rem;
    }

    .card.card-bg-color {
    background-color: #262525;
    border: 0px;
    border-radius: 20px;
}

.btn-info-information .nav.nav-pills{
  width: 100%;
  padding: 20px;
  padding-bottom: 0px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-title{
  font-size: 25px;
  font-weight: 500;
  color: #FFFFFF;
}

.nav-link.active.appView{
  border-radius: 25px;

  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #FFFFFF;
  background: rgb(255,0,255);
background: linear-gradient(90deg, #FF00FF 20%, #1AA7EC 50%, #FF00FF 83%);
font-size: 14px;
font-weight: 600;
text-transform: uppercase;
}

  </style>

</head>

<body>
<div class="bg-color">
  <div class="location-center text-center">
    <div class="primary-header flex-new-header">
      <div class="flex-new-header" style="align-items: center;">
        <div class="logo-header mt-3">
          <a href="#">
            <!-- Sample logo SVG, can be replaced with <img> too -->
            <img src="http://137.184.111.69/tattoo/assets/tattoo-logo.png" class="logo-image" alt="logo">
          </a>
        </div>
        <!-- <div class="app-title">
          <h4 style="margin: 0px;">Ink Pinned</h4>
        </div> -->
      </div>
    </div>
  </div>

  <div class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-12">
          <h1 class="m-0 text-white" style="
    text-align: center;
    font-weight: 600;
    color: #FFFFFF;
    font-size: 35px;
    margin-top: 3% !important;
    margin-bottom: 2% !important;
">User Profile
          </h1>
        </div><!-- /.col -->
        <div class="col-sm-6">
        </div><!-- /.col -->
      </div><!-- /.row -->
    </div><!-- /.container-fluid -->
  </div>

  <!-- Main content -->
  <section class="content section-bg-color">
    <div class="container-fluid">
      <div class="row">
        <div class="col-md-3" style="display: none;">

          <!-- Profile Image -->
          <div class="card card-primary card-outline">
            <div class="card-body box-profile">
              <div class="text-center">

              </div>

              <h3 class="profile-username text-center"><?= ucwords($vehicledetails['v_name']); ?></h3>

              <p class="text-muted text-center"><?= ucwords($vehicledetails['v_type']); ?></p>

              <p class="text-muted text-center"><?= ($vehicledetails['v_is_active'] == 1) ? '<span class="right badge badge-success">Active</span>' : '<span class="right badge badge-danger">Inactive</span>' ?></p>

              <ul class="list-group list-group-unbordered mb-3">
                <li class="list-group-item">
                  <b>Bookings</b> <a class="float-right"><?= count($bookings); ?></a>
                </li>
                <li class="list-group-item">
                  <b>Geofence</b> <a class="float-right"><?= count($vechicle_geofence); ?></a>
                </li>
                <li class="list-group-item">
                  <b>Notifications</b> <a class="float-right"><?= count($geofence_events); ?></a>
                </li>
              </ul>

            </div>
            <!-- /.card-body -->
          </div>
          <!-- /.card -->


        </div>
        <!-- /.col -->
        <div class="col-md-10 mx-auto">
          <div class="card card-bg-color">
            <div class="btn-info-information">
              <ul class="nav nav-pills">
                <h5 class="filter-title">
                  Basic Information
                </h5>
                <li class="nav-item" style="display: flex">

                  <a class="nav-link active appView" href="https://apps.apple.com/us/app/inkpinned-find-tattoo-artists/id6448706653" style="margin-right: 20px;" >View In IOS App</a>
                  <a class="nav-link active appView" href="https://play.google.com/store/apps/details?id=com.buzzware.tattoo" >View In Android App</a>

                </li>
                <!--  <li class="nav-item"><a class="nav-link " href="#bookings" data-toggle="tab">Bookings</a></li>-->
                <!--  <li class="nav-item"><a class="nav-link" href="#vechicle_geofence" data-toggle="tab">Geofence</a></li>-->
                <!--<li class="nav-item"><a class="nav-link" href="#vechicle_incomexpense" data-toggle="tab">Income & Expense</a></li>-->
              </ul>
            </div><!-- /.card-header -->
            <div class="card-body">
              <div class="tab-content">
                <div class="tab-pane " id="bookings">
                  <table id="bookingstbl" class="table table-striped projects">
                    <thead>
                      <tr>
                        <th class="percent1">
                          #
                        </th>
                        <th class="percent25">
                          Driver
                        </th>
                        <th class="percent25">
                          Customer
                        </th>
                        <th class="percent25">
                          From & To
                        </th>
                        <th class="percent25">
                          Booking Value
                        </th>

                        <th class="percent25">
                          Trip Status
                        </th>
                        <th class="percent25">
                          Action
                        </th>
                      </tr>
                    </thead>
                    <tbody>
                      <?php if (!empty($bookings)) {
                        $count = 1;
                        foreach ($bookings as $bookingsdata) {
                      ?>
                          <tr>
                            <td>
                              <?php echo output($count);
                              $count++; ?>
                            </td>
                            <td><?= (isset($bookingsdata['t_driver_details']->d_name)) ? $bookingsdata['t_driver_details']->d_name : '<span class="badge badge-danger">Yet to Assign</span>'; ?></td>
                            <td>
                              <?php echo output($bookingsdata['t_customer_details']->c_name); ?>
                            </td>
                            <td>
                              <?php echo '<small>' . output($bookingsdata['t_trip_fromlocation']) . '</small>';
                              echo '<br><span class="badge badge-success">to</span><br>'; ?>
                              <?php echo '<small>' . output($bookingsdata['t_trip_tolocation']) . '</small>'; ?>
                            </td>
                            <td>
                              <?php echo output($bookingsdata['t_trip_amount']); ?>
                            </td>

                            <td>
                              <?php
                              switch ($bookingsdata['t_trip_status']) {
                                case 'ongoing':
                                  $status = '<span class="badge badge-info">Ongoing</span>';
                                  break;
                                case 'completed':
                                  $status = '<span class="badge badge-success">Completed</span>';
                                  break;
                                case 'yettostart':
                                  $status = '<span class="badge badge-warning">Yet to start</span>';
                                  break;
                                case 'cancelled':
                                  $status = '<span class="badge badge-danger">Cancelled</span>';
                                  break;
                                case 'yettoconfirm':
                                  $status = '<span class="badge badge-danger">Yet to Confirm</span>';
                                  break;
                              }

                              ?>
                              <?= $status ?>
                            </td>
                            <td> <a class="icon" target="_blank" href="<?php echo base_url(); ?>trips/details/<?php echo output($bookingsdata['t_id']); ?>">
                                <i class="fa fa-eye"></i>
                              </a>
                            </td>
                          </tr>
                      <?php }
                      } ?>
                    </tbody>
                  </table>

                </div>
                <!-- /.tab-pane -->
                <div class="tab-pane" id="vechicle_geofence">
                  <!-- The timeline -->
                  <table id="vgeofencetbl" class="table table-striped projects">
                    <thead>
                      <tr>
                        <th class="percent1">
                          #
                        </th>
                        <th class="percent25">
                          Name
                        </th>
                        <th class="percent25">
                          Description
                        </th>
                        <th class="percent25">
                          Action
                        </th>

                      </tr>
                    </thead>
                    <tbody>
                      <?php if (!empty($vechicle_geofence)) {
                        $count = 1;
                        foreach ($vechicle_geofence as $vechicle_geofence) {
                      ?>
                          <tr>
                            <td>
                              <?php echo output($count);
                              $count++; ?>
                            </td>
                            <td>
                              <?php echo output($vechicle_geofence['geo_name']); ?>
                            </td>
                            <td>
                              <?php echo output($vechicle_geofence['geo_description']); ?>
                            </td>
                            <td> <a class="icon" href="<?php echo base_url(); ?>geofence">
                                <i class="fa fa-eye"></i>
                              </a>
                            </td>
                          </tr>
                      <?php }
                      } ?>
                    </tbody>
                  </table>
                </div>

                <div class="tab-pane" id="vechicle_incomexpense">
                  <table id="incomexpenstbl" class="table table-striped projects">
                    <thead>
                      <tr>
                        <th class="percent1">
                          #
                        </th>
                        <th class="percent25">
                          Date
                        </th>
                        <th class="percent25">
                          Description
                        </th>
                        <th class="percent25">
                          Amount
                        </th>
                        <th class="percent25">
                          Type
                        </th>
                        <th class="percent25">
                          Action
                        </th>
                      </tr>
                    </thead>
                    <tbody>
                      <?php if (!empty($vechicle_incomexpense)) {
                        $count = 1;
                        foreach ($vechicle_incomexpense as $incomexpensdata) {
                      ?>
                          <tr>
                            <td>
                              <?php echo output($count);
                              $count++; ?>
                            </td>
                            <td>
                              <?php echo output($incomexpensdata['ie_date']); ?>
                            </td>
                            <td>
                              <?php echo output($incomexpensdata['ie_description']); ?>
                            </td>
                            <td>
                              <?php echo output($incomexpensdata['ie_amount']); ?>
                            </td>
                            <td>
                              <?php echo ($incomexpensdata['ie_type'] == 'income') ? '<span class="right badge badge-success">Income</span>' : '<span class="right badge badge-danger">Expense</span>'; ?>
                            </td>
                            <td> <a class="icon" href="<?php echo base_url(); ?>incomexpense">
                                <i class="fa fa-eye"></i>
                              </a>
                            </td>
                          </tr>
                      <?php }
                      } ?>
                    </tbody>
                  </table>
                </div>
                <!-- /.tab-pane -->

                <div class="tab-pane active" id="basicinfo">
                  <table class="table table-sm table-bordered">
                    <tbody>

                      <tr style="display: none;">
                        <td>Email</td>
                        <td><?= output($user['email']) ?></td>
                      </tr>

                      <tr>
                        <td>User Name.</td>
                        <td><?= output($user['userName']) ?></td>
                      </tr>
                      <tr>
                        <td>Category.</td>
                        <td><?= output($user['category']) ?></td>
                      </tr>
                      <tr>
                        <td>About Me.</td>
                        <td><?= output($user['aboutMe']) ?></td>
                      </tr>

                      <tr>
                        <td>Profile Image.</td>
                        <td>
                          <?php if ($user['image'] != "") { ?>

                            <img class="img-thumbnail" width="100" height="100" src="<?php echo output($user['image']); ?>">
                          <?php } else { ?>
                            <img class="img-thumbnail" src="http://placehold.jp/100x100.png">
                          <?php } ?>
                        </td>
                      </tr>
                      <tr>
                        <td>Banner Image.</td>
                        <td>
                          <?php if ($user['wallImage'] != "") { ?>

                            <img class="img-thumbnail" width="100" height="100" src="<?php echo output($user['wallImage']); ?>">
                          <?php } else { ?>
                            <img class="img-thumbnail" src="http://placehold.jp/100x100.png">
                          <?php } ?>
                        </td>
                      </tr>




                    </tbody>
                  </table>
                  <div class="col-sm-3">

                  </div>
                </div>
                <!-- /.tab-pane -->
              </div>
              <!-- /.tab-content -->
            </div><!-- /.card-body -->
          </div>
          <!-- /.nav-tabs-custom -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </div><!-- /.container-fluid -->
  </section>
  <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  </div>
</body>

</html>