<!doctype html>
<html lang="en" translate="no" class="w-[640px] mx-auto md:w-full">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Revenue</title>
      <?php echo view('user/layout/head');?>
      <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/2.0.8/css/dataTables.dataTables.min.css">
   </head>
   <style>
      .nav-item
      {
      border:2px solid  rgba(140,98,10,1) !important;
      }
      .sam .active {
      background: linear-gradient(180deg, rgba(179,137,34,1) 0%, rgba(140,98,10,1) 50%, rgba(179,137,34,1) 100%, rgba(14,72,62,1) 100%) !important;
      border-radius: 0px !important;
      }
      .head {
      background: linear-gradient(180deg, rgba(179,137,34,1) 0%, rgba(140,98,10,1) 50%, rgba(179,137,34,1) 100%, rgba(14,72,62,1) 100%);
      color: #fff;
      border: 1px;
      }
      .dt-paging 
      {
      text-align:center ;
      margin-top:15px;
      }
      div.dt-container .dt-paging .dt-paging-button.disabled, div.dt-container .dt-paging .dt-paging-button.disabled:hover, div.dt-container .dt-paging .dt-paging-button.disabled:active {
      color: #fff !important;
      }
      div.dt-container .dt-paging .dt-paging-button {
      color: #fff !important;
      padding:0px 10px 0px 10px !important;
      }
      .dt-paging-button
      {
      font-size:20px !important;
      color:#fff !important;
      padding:0px 10px 0px 10px !important;
      }
      .dt-paging .current
      {
      border : 1px solid #e49a00 !important;
      /* border-radius : 20px !important; */
      background : #e49a00 !important;
      }
      .dt-empty
      {
      text-align:center !important;
      }
      
   </style>
   <body class="reg-overflow">
      <section class="dash-banner-bg banner-bg">
         <div class="container">
         <!---header start---->
         <?php echo view('user/layout/header');?>
         <!---header end---->
         <!---banner start---->
         <div class="row">
            <div class="col-lg-12">
               <?php 
                  use App\Libraries\MyEncrypt;
                  use App\Helpers\site_helper;
                  use App\Helpers\form_helper;
                  $this->db = db_connect();
                  $this->session = session();
                  $this->common_model = model('CommonModel');
                  helper('form_helper');
                  
                  
                  $id = 'NyYmemh5aXA=';
                          
                  $myencrypt = new MyEncrypt;
                  $coinid = $myencrypt->decode($id);
                  $user=$this->session->get('uusersid');
                  $buy_bal=curbalance($this->session->get('uusersid'),$coinid);
                  $bal=str_replace(",","", $buy_bal);
                  
                  ?>
               <div class="dash-wrap">
                  <div class="title text-center py-1">
                     <h2 class="text-primary ">Revenue</h2>
                  </div>
                  <div class="view-toggle">
                    <button id="card-view">Card View</button>
                    <button id="list-view">List View</button>
                </div>
                  <div class="team-tab">
                     <ul class="nav sam d-flex justify-content-center ps-0" id="pills-tab" role="tablist">
                        <li class="nav-item" role="presentation">
                           <button class="nav-link active" id="pills-dep2-tab " data-bs-toggle="pill" data-bs-target="#pills-dep2"
                              type="button" role="tab" aria-controls="pills-dep2" aria-selected="true">
                              <div class="make-list">
                                 <div class="process">
                                    <span>All</span>
                                 </div>
                              </div>
                           </button>
                        </li>
                        <li class="nav-item" role="presentation">
                           <button class="nav-link" id="pills-dep3-tab " data-bs-toggle="pill" data-bs-target="#pills-dep3"
                              type="button" role="tab" aria-controls="pills-dep3" aria-selected="true">
                              <div class="make-list">
                                 <div class="process">
                                    <span>Buy</span>
                                 </div>
                              </div>
                           </button>
                        </li>
                        
                     </ul>
                     <div class="tab-content" id="pills-tabContent">
                        
                        <div class="tab-pane fade show active  " id="pills-dep2" role="tabpanel" aria-labelledby="pills-dep2-tab">
                           <div class="search-bar my-2">
                              <form class="form-inline my-2 my-lg-0">
                                 <input class="form-control mr-sm-2" id="myInput" type="search" placeholder="Search username...." aria-label="Search">
                              </form>
                           </div>
                           <div class="table-responsive trans position-relative">
                              <table class="trans_info" id="example1">
                                 <thead class="head">
                                 <tr>
                                <th>S.No </th>
                                <th>Trading pair </th>
                                <th>Buy in/Sell </th>
                                <th>Time </th>
                                <th>Order Number </th>
                                <th>Quantity </th>
                                <th>Average buyin price (USDT)</th>
                                <th>profit(USDT)</th>
                                <th>profit(%)</th>
                              </tr>
                                 </thead>
                                 <tbody id="myTable">
                                 <tr role="row" class="odd">
                      <td class="text-center sorting_1">1</td>
                              <td><img height="20" width="20" src="http://demo.myslworld.com/tradingbot/styles/images/tradingpair_images/ETHUSDT.png"> ETHUSDT</td>
                              <td><span class="fail"> Sell </span></td>
                              <td>2023-07-15 01:26:03</td>
                               <td><button type="button" class="btn btn-outline-success" onclick="orderModal(3509068,'ETHUSDT');" data-toggle="modal" data-target="#exampleModal5" id="orderModal" style="padding: 10px 17px 7px 13px !important;"><span>3509068</span></button></td>
                              <!-- <td></td> -->
                              <td>2829.21855590</td>
                              <td>1930.01</td>
                              <td>2828.22</td>
                              <td> 110.395 </td>
                            <div></div></tr><tr role="row" class="even">
                      <td class="text-center sorting_1">2</td>
                              <td><img height="20" width="20" src="http://demo.myslworld.com/tradingbot/styles/images/tradingpair_images/BTCUSDT.png"> BTCUSDT</td>
                              <td><span class="fail"> Sell </span></td>
                              <td>2023-06-23 02:05:40</td>
                               <td><button type="button" class="btn btn-outline-success" onclick="orderModal(6965840,'BTCUSDT');" data-toggle="modal" data-target="#exampleModal5" id="orderModal" style="padding: 10px 17px 7px 13px !important;"><span>6965840</span></button></td>
                              <!-- <td></td> -->
                              <td>2971.70628876</td>
                              <td>29992.6</td>
                              <td>2970.71</td>
                              <td> 115.957 </td>
                            </tr><tr role="row" class="odd">
                      <td class="text-center sorting_1">3</td>
                              <td><img height="20" width="20" src="http://demo.myslworld.com/tradingbot/styles/images/tradingpair_images/BTCUSDT.png"> BTCUSDT</td>
                              <td><span class="success"> Buy </span></td>
                              <td>2023-06-14 12:54:36</td>
                               <td><button type="button" class="btn btn-outline-success" onclick="orderModal(2834066,'BTCUSDT');" data-toggle="modal" data-target="#exampleModal5" id="orderModal" style="padding: 10px 17px 7px 13px !important;"><span>2834066</span></button></td>
                              <!-- <td></td> -->
                              <td>10.99170700</td>
                              <td>25862.8</td>
                              <td>---</td>
                              <td> --- </td>
                            </tr><tr role="row" class="even">
                      <td class="text-center sorting_1">4</td>
                              <td><img height="20" width="20" src="http://demo.myslworld.com/tradingbot/styles/images/tradingpair_images/BTCUSDT.png"> BTCUSDT</td>
                              <td><span class="success"> Buy </span></td>
                              <td>2023-06-14 12:54:15</td>
                               <td><button type="button" class="btn btn-outline-success" onclick="orderModal(2833967,'BTCUSDT');" data-toggle="modal" data-target="#exampleModal5" id="orderModal" style="padding: 10px 17px 7px 13px !important;"><span>2833967</span></button></td>
                              <!-- <td></td> -->
                              <td>1279.97519408</td>
                              <td>25857</td>
                              <td>---</td>
                              <td> --- </td>
                            </tr><tr role="row" class="odd">
                      <td class="text-center sorting_1">5</td>
                              <td><img height="20" width="20" src="http://demo.myslworld.com/tradingbot/styles/images/tradingpair_images/BTCUSDT.png"> BTCUSDT</td>
                              <td><span class="success"> Buy </span></td>
                              <td>2023-06-14 12:54:00</td>
                               <td><button type="button" class="btn btn-outline-success" onclick="orderModal(2833892,'BTCUSDT');" data-toggle="modal" data-target="#exampleModal5" id="orderModal" style="padding: 10px 17px 7px 13px !important;"><span>2833892</span></button></td>
                              <!-- <td></td> -->
                              <td>639.98521274</td>
                              <td>25853.8</td>
                              <td>---</td>
                              <td> --- </td>
                            </tr><tr role="row" class="even">
                      <td class="text-center sorting_1">6</td>
                              <td><img height="20" width="20" src="http://demo.myslworld.com/tradingbot/styles/images/tradingpair_images/BTCUSDT.png"> BTCUSDT</td>
                              <td><span class="success"> Buy </span></td>
                              <td>2023-06-14 12:53:43</td>
                               <td><button type="button" class="btn btn-outline-success" onclick="orderModal(2833814,'BTCUSDT');" data-toggle="modal" data-target="#exampleModal5" id="orderModal" style="padding: 10px 17px 7px 13px !important;"><span>2833814</span></button></td>
                              <!-- <td></td> -->
                              <td>319.99484608</td>
                              <td>25856.1</td>
                              <td>---</td>
                              <td> --- </td>
                            </tr><tr role="row" class="odd">
                      <td class="text-center sorting_1">7</td>
                              <td><img height="20" width="20" src="http://demo.myslworld.com/tradingbot/styles/images/tradingpair_images/BTCUSDT.png"> BTCUSDT</td>
                              <td><span class="success"> Buy </span></td>
                              <td>2023-06-14 12:53:25</td>
                               <td><button type="button" class="btn btn-outline-success" onclick="orderModal(2833739,'BTCUSDT');" data-toggle="modal" data-target="#exampleModal5" id="orderModal" style="padding: 10px 17px 7px 13px !important;"><span>2833739</span></button></td>
                              <!-- <td></td> -->
                              <td>159.99179196</td>
                              <td>25855.2</td>
                              <td>---</td>
                              <td> --- </td>
                            </tr><tr role="row" class="even">
                      <td class="text-center sorting_1">8</td>
                              <td><img height="20" width="20" src="http://demo.myslworld.com/tradingbot/styles/images/tradingpair_images/BTCUSDT.png"> BTCUSDT</td>
                              <td><span class="success"> Buy </span></td>
                              <td>2023-06-14 12:53:02</td>
                               <td><button type="button" class="btn btn-outline-success" onclick="orderModal(2833638,'BTCUSDT');" data-toggle="modal" data-target="#exampleModal5" id="orderModal" style="padding: 10px 17px 7px 13px !important;"><span>2833638</span></button></td>
                              <!-- <td></td> -->
                              <td>79.98621720</td>
                              <td>25860.4</td>
                              <td>---</td>
                              <td> --- </td>
                            </tr><tr role="row" class="odd">
                      <td class="text-center sorting_1">9</td>
                              <td><img height="20" width="20" src="http://demo.myslworld.com/tradingbot/styles/images/tradingpair_images/BTCUSDT.png"> BTCUSDT</td>
                              <td><span class="success"> Buy </span></td>
                              <td>2023-06-14 12:52:50</td>
                               <td><button type="button" class="btn btn-outline-success" onclick="orderModal(2833572,'BTCUSDT');" data-toggle="modal" data-target="#exampleModal5" id="orderModal" style="padding: 10px 17px 7px 13px !important;"><span>2833572</span></button></td>
                              <!-- <td></td> -->
                              <td>39.98971722</td>
                              <td>25866.6</td>
                              <td>---</td>
                              <td> --- </td>
                            </tr><tr role="row" class="even">
                      <td class="text-center sorting_1">10</td>
                              <td><img height="20" width="20" src="http://demo.myslworld.com/tradingbot/styles/images/tradingpair_images/BTCUSDT.png"> BTCUSDT</td>
                              <td><span class="success"> Buy </span></td>
                              <td>2023-06-14 12:52:34</td>
                               <td><button type="button" class="btn btn-outline-success" onclick="orderModal(2833508,'BTCUSDT');" data-toggle="modal" data-target="#exampleModal5" id="orderModal" style="padding: 10px 17px 7px 13px !important;"><span>2833508</span></button></td>
                              <!-- <td></td> -->
                              <td>19.99462671</td>
                              <td>25866.3</td>
                              <td>---</td>
                              <td> --- </td>
                            </tr>
                                  
                                     
                                 </tbody>
                              </table>
                           </div>
                        </div>
                        <div class="tab-pane fade  " id="pills-dep3" role="tabpanel" aria-labelledby="pills-dep3-tab">
                           <div class="search-bar my-2">
                              <form class="form-inline my-2 my-lg-0">
                                 <input class="form-control mr-sm-2" id="myInput1" type="search" placeholder="Search username...." aria-label="Search">
                              </form>
                           </div>
                           <div class="table-responsive trans position-relative">
                              <table class="trans_info" id="example3" style="width:100%">
                                 <thead class="head">
                                    <tr class="text-center">
                                       <th class="th">Exchange</th>
                                       <th class="th">Order Number</th>
                                       <th class="th">Profit</th>
                                       <th class="th">Time</th>
                                    </tr>
                                 </thead>
                                 <tbody id="myTable1" class="text-center">
                                   
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                     <!---banner end---->
                  </div>
               </div>
            </div>
            <?php echo view('user/layout/footer');?>
         </div>
      </section>
      <?php echo view('user/layout/footer-script');?>
      <script src="https://cdn.datatables.net/2.0.8/js/dataTables.min.js"></script>
      <!-- <script src="http://demo.myslworld.com/ARM008/styles/web_style/js/jquery.dataTables.min.js"></script> -->
      <script>
         $(document).ready(function(){
         $("#myInput").on("keyup", function() {
         var value = $(this).val().toLowerCase();
         $("#myTable tr").filter(function() {
         $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
         });
         });
         
         $("#myInput1").on("keyup", function() {
         var value = $(this).val().toLowerCase();
         $("#myTable1 tr").filter(function() {
         $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
         });
         });


         $('#card-view').on('click', function() {
          $('#example1').removeClass('list-view').addClass('card-view');
          table.columns.adjust().draw();
        });

        $('#list-view').on('click', function() {
            $('#example1').removeClass('card-view').addClass('list-view');
            table.columns.adjust().draw();
        });

         
         $('#example1').DataTable({
         pagingType: 'full_numbers',
         searching: false,
         info:false,
         lengthChange: false,
         pageLength : 3,
         
         
         
         });
         
         $('#example3').DataTable({
         pagingType: 'full_numbers',
         searching: false,
         info:false,
         lengthChange: false,
         pageLength : 10
         
         
         });
         });
      </script>
   </body>
</html>