<?php
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <?php

        use App\Libraries\MyEncrypt;
        use App\Helpers\site_helper;
        $this->db = db_connect();
        $session = session();
        $this->common_model = model('CommonModel');

      $order_history = $this->db->query("SELECT * from api_trade_history where uuserid='".$session->get('uusersid')."' order by id desc")->getResult();

       echo view('user/common_style1');
       echo view('user/common_header');
    ?> 
 

<link rel="stylesheet" href="<?php echo base_url('styles/css/table.css');?>">


    <style type="text/css">
/*.table-responsive {
    overflow-x: visible !important;
}
table tr th {
    background: #203c9d none repeat scroll 0 0;
    color: #fff;
    font-size: 13px;
    font-weight: 300;
    padding: 16px 20px;
    text-align: left;
    text-transform: capitalize;
    white-space: nowrap;
}
input[type="text"], input[type="email"], input[type="password"], input[type="search"] {
    background-color: #fff;
    border: 1px solid #e1e1e1;
    color: #000;
    font-size: 14px;
    height: 42px;
    margin: 5px 0;
    padding: 10px 7px 10px 10px;
    width: 100%;
}*/

body{
    margin-top:20px;
    background:#fbfdff;
}

[class*="noty_theme__unify--v1"] {
  box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  padding: 1.57143rem;
}

.noty_theme__unify--v1--dark {
  background-color: #2e3c56;
}

.noty_theme__unify--v1--light {
  background-color: #fff;
  box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.05);
}

.noty_type__success.noty_theme__unify--v1 {
  background-color: #1cc9e4;
}

.noty_type__info.noty_theme__unify--v1 {
  background-color: #1d75e5;
}

.noty_type__error.noty_theme__unify--v1 {
  background-color: #e62154;
}

.noty_type__warning.noty_theme__unify--v1 {
  background-color: #e6a821;
}

.noty_body {
  font-weight: 400;
  font-size: 1rem;
  color: #fff;
}

[class*="noty_theme__unify--v1"] .noty_body {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
}

.noty_theme__unify--v1--light .noty_body {
  color: #41464B;
}

.noty_body__icon {
  position: relative;
  display: inline-block;
  color: #fff;
  text-align: center;
  border-radius: 50%;
}

.noty_body__icon::before {
  display: block;
}

.noty_body__icon > i {
  position: relative;
  top: 50%;
  display: block;
  -webkit-transform: translateY(-50%);
      -ms-transform: translateY(-50%);
          transform: translateY(-50%);
  z-index: 2;
}

.noty_theme__unify--v1 .noty_body__icon {
  background-color: rgba(245, 249, 249, 0.2);
}

.noty_theme__unify--v1--dark .noty_body__icon {
  background-color: rgba(245, 249, 249, 0.1);
}

.noty_theme__unify--v1--dark.noty_type__success .noty_body__icon {
  color: #1cc9e4;
}

.noty_theme__unify--v1--dark.noty_type__info .noty_body__icon {
  color: #1d75e5;
}

.noty_theme__unify--v1--dark.noty_type__error .noty_body__icon {
  color: #e62154;
}

.noty_theme__unify--v1--dark.noty_type__warning .noty_body__icon {
  color: #e6a821;
}

.noty_theme__unify--v1--light.noty_type__success .noty_body__icon {
  background-color: rgba(28, 201, 228, 0.15);
  color: #1cc9e4;
}

.noty_theme__unify--v1--light.noty_type__info .noty_body__icon {
  background-color: rgba(29, 117, 229, 0.15);
  color: #1d75e5;
}

.noty_theme__unify--v1--light.noty_type__error .noty_body__icon {
  background-color: rgba(230, 33, 84, 0.15);
  color: #e62154;
}

.noty_theme__unify--v1--light.noty_type__warning .noty_body__icon {
  background-color: rgba(230, 168, 33, 0.15);
  color: #e6a821;
}

[class*="noty_theme__unify--v1"] .noty_close_button {
  top: 14px;
  right: 14px;
  width: 0.85714rem;
  height: 0.85714rem;
  line-height: 0.85714rem;
  background-color: transparent;
  font-weight: 300;
  font-size: 1.71429rem;
  color: #fff;
  border-radius: 0;
}

.noty_theme__unify--v1--light .noty_close_button {
  color: #cad6d6;
}

.noty_progressbar {
  height: 0.5rem !important;
}

.noty_theme__unify--v1 .noty_progressbar {
  background-color: rgba(0, 0, 0, 0.08) !important;
}

.noty_theme__unify--v1--dark.noty_type__success .noty_progressbar {
  background-color: #1cc9e4;
}

.noty_theme__unify--v1--dark.noty_type__info .noty_progressbar {
  background-color: #1d75e5;
}

.noty_theme__unify--v1--dark.noty_type__error .noty_progressbar {
  background-color: #e62154;
}

.noty_theme__unify--v1--dark.noty_type__warning .noty_progressbar {
  background-color: #e6a821;
}

.noty_theme__unify--v1--light.noty_type__success .noty_progressbar {
  background-color: rgba(28, 201, 228, 0.15);
}

.noty_theme__unify--v1--light.noty_type__info .noty_progressbar {
  background-color: rgba(29, 117, 229, 0.15);
}

.noty_theme__unify--v1--light.noty_type__error .noty_progressbar {
  background-color: rgba(230, 33, 84, 0.15);
}

.noty_theme__unify--v1--light.noty_type__warning .noty_progressbar {
  background-color: rgba(230, 168, 33, 0.15);
}

  .g-mb-25 {
    margin-bottom: 1.78571rem !important;
  }
    </style>
    <style type="text/css">
/*body{margin-top:20px;}

.card-big-shadow {
    max-width: 320px;
    position: relative;
}

.coloured-cards .card {
    margin-top: 30px;
}

.card[data-radius="none"] {
    border-radius: 0px;
}
.card {
    border-radius: 8px;
    box-shadow: 0 2px 2px rgba(204, 197, 185, 0.5);
    background-color: #FFFFFF;
    color: #252422;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}


.card[data-background="image"] .title, .card[data-background="image"] .stats, .card[data-background="image"] .category, .card[data-background="image"] .description, .card[data-background="image"] .content, .card[data-background="image"] .card-footer, .card[data-background="image"] small, .card[data-background="image"] .content a, .card[data-background="color"] .title, .card[data-background="color"] .stats, .card[data-background="color"] .category, .card[data-background="color"] .description, .card[data-background="color"] .content, .card[data-background="color"] .card-footer, .card[data-background="color"] small, .card[data-background="color"] .content a {
    color: #FFFFFF;
}
.card.card-just-text .content {
    padding: 50px 65px;
    text-align: center;
}
.card .content {
    padding: 20px 20px 10px 20px;
}
.card[data-color="blue"] .category {
    color: #7a9e9f;
}

.card .category, .card .label {
    font-size: 14px;
    margin-bottom: 0px;
}
.card-big-shadow:before {
    background-image: url("http://static.tumblr.com/i21wc39/coTmrkw40/shadow.png");
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    bottom: -12%;
    content: "";
    display: block;
    left: -12%;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 0;
}
h4, .h4 {
    font-size: 1.5em;
    font-weight: 600;
    line-height: 1.2em;
}
h6, .h6 {
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
}
.card .description {
    font-size: 16px;
    color: #66615b;
}
.content-card{
    margin-top:30px;    
}
a:hover, a:focus {
    text-decoration: none;
}*/

/*======== COLORS ===========*/
/*.card[data-color="blue"] {
    background: #b8d8d8;
}
.card[data-color="blue"] .description {
    color: #506568;
}

.card[data-color="green"] {
    background: #d5e5a3;
}
.card[data-color="green"] .description {
    color: #60773d;
}
.card[data-color="green"] .category {
    color: #92ac56;
}

.card[data-color="yellow"] {
    background: #ffe28c;
}
.card[data-color="yellow"] .description {
    color: #b25825;
}
.card[data-color="yellow"] .category {
    color: #d88715;
}

.card[data-color="brown"] {
    background: #d6c1ab;
}
.card[data-color="brown"] .description {
    color: #75442e;
}
.card[data-color="brown"] .category {
    color: #a47e65;
}

.card[data-color="purple"] {
    background: #baa9ba;
}
.card[data-color="purple"] .description {
    color: #3a283d;
}
.card[data-color="purple"] .category {
    color: #5a283d;
}

.card[data-color="orange"] {
    background: #ff8f5e;
}
.card[data-color="orange"] .description {
    color: #772510;
}
.card[data-color="orange"] .category {
    color: #e95e37;
}*/
</style>

</head>
<body class="admin-inner">

<section class="white pt-10 pb-10">
<div class="container">
<div class="row  trading_pairbg bg-white inner-box mt-3 px-3 py-4">

<div class="col-lg-12">
<div class="right-block">
	<div class="inner-title pb-3">
	<h6 class="color-2"><i class="fab fa-bitcoin"></i> Order Message</h6>
	</div>
	<div class="container bootstrap snippets bootdeys">
<div class="row">
	<?php if($order_history) { 
		$color = ["blue","green","yellow","brown","purple","orange"];
		foreach ($order_history as $key => $value) {
		?>
   <!-- <div class="col-md-4 col-sm-6 content-card">
        <div class="card-big-shadow">
            <div class="card card-just-text" data-background="color" data-color="<?php echo  $color[rand(0, count($color) - 1)];;?>" data-radius="none">
                <div class="content">
                    <h6 class="category"></h6>
                    <h4 class="title"><a href="#"><?php echo date('Y-m-d H:i',substr($value->time, 0,-3));?></a></h4>
                    <?php if($value->type == 1) { ?>
                    <p class="description">There are new buy in BINANCE &nbsp;&nbsp; <?php echo strtoupper($value->pair);?> &nbsp;&nbsp; average transaction price &nbsp;&nbsp; <?php echo $value->live_price;?> &nbsp;&nbsp; quantity &nbsp;&nbsp; <?php echo $value->received_amount;?> &nbsp;&nbsp; deal amount &nbsp;&nbsp; <?php echo $value->quantity;?> </p>
                <?php } else { ?>
                    <p class="description">There are new sell in BINANCE &nbsp;&nbsp; <?php echo strtoupper($value->pair);?> &nbsp;&nbsp; average transaction price &nbsp;&nbsp; <?php echo $value->live_price;?> &nbsp;&nbsp; quantity &nbsp;&nbsp; <?php echo $value->received_amount;?>&nbsp;&nbsp; deal amount &nbsp;&nbsp; <?php echo $value->quantity;?> </p>
                <?php } ?> 	
                </div>
            </div>
        </div> 
    </div> -->

    <div class="col-md-6">
         <!-- Success -->
         <div class="g-brd-around g-brd-gray-light-v7 g-rounded-4 g-pa-15 g-pa-20--md g-mb-30">
            <center><h5 style="text-align: center;" class="d-flex align-self-center text-uppercase g-font-size-12 g-font-size-default--md g-color-black g-mb-20"><?php echo date('Y-m-d H:i',substr($value->time, 0,-3));?></h5><center>
            <div class="noty_bar noty_type__success noty_theme__unify--v1--light g-mb-25">
               <div class="noty_body">
                  <div class="g-mr-20">
                     <div class="noty_body__icon">
                        <i class="hs-admin-check"></i>
                     </div>
                  </div>
                  <?php if($value->type == 1) { ?>
                  <div>There are new buy in BINANCE &nbsp;&nbsp; <?php echo strtoupper($value->pair);?> &nbsp;&nbsp; average transaction price &nbsp;&nbsp; <?php echo $value->live_price;?> &nbsp;&nbsp; quantity &nbsp;&nbsp; <?php echo $value->received_amount;?> &nbsp;&nbsp; deal amount &nbsp;&nbsp; <?php echo $value->quantity;?> </div>
                  <?php  } else {  ?>
                 <div>There are new sell in BINANCE &nbsp;&nbsp; <?php echo strtoupper($value->pair);?> &nbsp;&nbsp; average transaction price &nbsp;&nbsp; <?php echo $value->live_price;?> &nbsp;&nbsp; quantity &nbsp;&nbsp; <?php echo $value->received_amount;?>&nbsp;&nbsp; deal amount &nbsp;&nbsp; <?php echo $value->quantity;?></div>
                 <?php } ?>
               </div>
            </div>
            </div>
        </div>
<?php } } else { ?>
    <div class="col-md-6">
         <!-- Success -->
         <div class="g-brd-around g-brd-gray-light-v7 g-rounded-4 g-pa-15 g-pa-20--md g-mb-30">
            <center><h5 style="text-align: center;" class="d-flex align-self-center text-uppercase g-font-size-12 g-font-size-default--md g-color-black g-mb-20"></h5><center>
            <div class="noty_bar noty_type__success noty_theme__unify--v1--light g-mb-25">
               <div class="noty_body">
                  <div class="g-mr-20">
                     <div class="noty_body__icon">
                        <i class="hs-admin-check"></i>
                     </div>
                  </div>
                  <div>No order messages available</div>
               </div>
            </div>
            </div>
        </div>
<?php } ?>	
</div>
    </div>
    </div>
    </div>
    </div>
  </div>
</div>
</section>

<br>
<br>

<?php
 echo view('user/footer1');
  echo view('user/common_script');
?>
  </body>
</html>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo base_url('/styles/js/datatables.min.js');?>"></script>

<script type="text/javascript">
  
    $(document).ready(function(){
      $('.main-table table').dataTable({
          "language": { search: "" },
          "Info": false
    });
    });


</script>