
<?php
require('header.php');
?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>

    .box {
  width: 40%;
  margin: 0 auto;
  background: rgba(255,255,255,0.2);
  padding: 35px;
  border: 2px solid #fff;
  border-radius: 20px/50px;
  background-clip: padding-box;
  text-align: center;
}

.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: opacity 500ms;
  visibility: hidden;
  opacity: 0;
}
.overlay:target {
  visibility: visible;
  opacity: 1;
}

.button3 {
  background-color: #4CAF50; /* Green */
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  width:70%;
}

.button5 {background-color: black
;} /* Black */

.popup {
  margin: 70px auto;
  padding: 20px;
  background: #fff;
  border-radius: 5px;
  width: 30%;
  position: relative;
  transition: all 5s ease-in-out;
}


.popup .close {
  position: absolute;
  top: 20px;
  right: 30px;
  transition: all 200ms;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}
.popup .close:hover {
  color: #06D85F;
}
.popup .content {
  max-height: 30%;
  overflow: auto;
}

@media screen and (max-width: 700px){
  .box{
    width: 70%;
  }
  .popup{
    width: 70%;
  }
}
</style>



        <!-- partial -->
        <div class="main-panel">
          <div class="content-wrapper">
            <div class="row">
              <div class="col-12 grid-margin stretch-card">
                <div class="card corona-gradient-card">
                  <div class="card-body py-0 px-0 px-sm-3">
                    <div class="row align-items-center">
                      <div class="col-4 col-sm-3 col-xl-2">
                        <img src="assets/images/dep.jpg" class="gradient-corona-img img-fluid" alt="">
                      </div>
                      <div class="col-5 col-sm-7 col-xl-8 p-0">
                        <h4 style="font-size:12px;padding:5px;margin:5px;" class="mb-1 mb-sm-0"><?php echo $notificati;?></h4>
                        <p class="mb-0 font-weight-normal d-none d-sm-block"></p>
                      </div>
                      <div class="col-3 col-sm-2 col-xl-2 pl-0 text-center">
                        <span>
                          <a href="../contact.php" target="_blank" class="btn btn-outline-light btn-rounded get-started-btn">Get in Touch</a>
                        </span>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="row">
              <div class="col-xl-3 col-sm-6 grid-margin stretch-card">
                <div class="card">
                  <div class="card-body">
                    <div class="row">
                      <div class="col-9">
                        <div class="d-flex align-items-center align-self-start">
                          <h3 class="mb-0"><?php echo $accountnumber ;?></h3>
                        
                        </div>
                      </div>
                      <div class="col-3">
                        <div class="icon icon-box-success ">
                          <span class="mdi mdi-account-card-details"></span>
                        </div>
                      </div>
                    </div>
                    <h6 class="text-muted font-weight-normal">Account Number</h6>
                  </div>
                </div>
              </div>
              <div class="col-xl-3 col-sm-6 grid-margin stretch-card">
                <div class="card">
                  <div class="card-body">
                    <div class="row">
                      <div class="col-9">
                        <div class="d-flex align-items-center align-self-start">
                          <h3 class="mb-0"><?php echo $type;?></h3>
                          <!--<p class="text-success ml-2 mb-0 font-weight-medium"></p>-->
                        </div>
                      </div>
                      <div class="col-3">
                        <div class="icon icon-box-primary">
                          <span class="mdi mdi-account-check"></span>
                        </div>
                      </div>
                    </div>
                    <h6 class="text-muted font-weight-normal">Status</h6>
                  </div>
                </div>
              </div>
              <div class="col-xl-3 col-sm-6 grid-margin stretch-card">
                <div class="card">
                  <div class="card-body">
                    <div class="row">
                      <div class="col-9">
                        <div class="d-flex align-items-center align-self-start">
                          <h3 class="mb-0"> &dollar;<?php echo  number_format($wallet, 2) ;?></h3>
                          <!--<p class="text-danger ml-2 mb-0 font-weight-medium">-2.4%</p>-->
                        </div>
                      </div>
                      <div class="col-3">
                        <div class="icon icon-box-success">
                          <span class="mdi mdi-wallet"></span>
                        </div>
                      </div>
                    </div>
                    <h6 class="text-muted font-weight-normal">Account Balance</h6>
                  </div>
                </div>
              </div>
              <div class="col-xl-3 col-sm-6 grid-margin stretch-card">
                <div class="card">
                  <div class="card-body">
                    <div class="row">
                      <div class="col-9">
                        <div class="d-flex align-items-center align-self-start">
                          <h3 style="align-items-left" class="mb-0">&dollar;</h3>
                          <!--<p class="text-success ml-2 mb-0 font-weight-medium">+3.5%</p>-->
                        </div>
                      </div>
                      <div class="col-3">
                        <div class="icon icon-box-success ">
                          <span class="mdi mdi-arrow-top-right icon-item"></span>
                        </div>
                      </div>
                    </div>
                    <h6 class="text-muted font-weight-normal">Account Currency</h6>
                  </div>
                </div>
              </div>
            </div>
     
     
       <!-- TradingView Widget BEGIN -->
<!--<div class="tradingview-widget-container">-->
<!--  <div class="tradingview-widget-container__widget"></div>-->
<!--  <div class="tradingview-widget-copyright"><a href="https://www.tradingview.com/" rel="noopener nofollow" target="_blank"><span class="blue-text"></span></a></div>-->
<!--  <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-ticker-tape.js" async>-->
<!--  {-->
<!--  "symbols": [-->
<!--    {-->
<!--      "proName": "FOREXCOM:SPXUSD",-->
<!--      "title": "S&P 500"-->
<!--    },-->
<!--    {-->
<!--      "proName": "FOREXCOM:NSXUSD",-->
<!--      "title": "US 100"-->
<!--    },-->
<!--    {-->
<!--      "proName": "FX_IDC:EURUSD",-->
<!--      "title": "EUR/USD"-->
<!--    },-->
<!--    {-->
<!--      "proName": "BITSTAMP:BTCUSD",-->
<!--      "title": "Bitcoin"-->
<!--    },-->
<!--    {-->
<!--      "proName": "BITSTAMP:ETHUSD",-->
<!--      "title": "Ethereum"-->
<!--    }-->
<!--  ],-->
<!--  "showSymbolLogo": true,-->
<!--  "colorTheme": "light",-->
<!--  "isTransparent": false,-->
<!--  "displayMode": "adaptive",-->
<!--  "locale": "en"-->
<!--}-->
<!--  </script>-->
<!--</div>-->
<!-- TradingView Widget END -->
  
     
       <!--<div class="row ">-->
       <!--       <div class="col-12 grid-margin">-->
       <!--         <div class="card">-->
       <!--           <div class="card-body">-->
       <!--             <h4 style="color:#0090e7;" class="card-title"> <span style="color:#f2a900;font-size:25px;" class="animate-charcter">Banking </span> on the go </h4>-->
               
       <!--         <div class="owl-carousel owl-theme full-width owl-carousel-dash portfolio-carousel" id="owl-carousel-basic">-->
       <!--               <div class="item">-->
       <!--                 <img src="assets/images/mobile-banking-1024x682.png" alt="">-->
       <!--               </div>-->
       <!--               <div class="item">-->
       <!--                 <img src="assets/images/shutterstock_1633978648.jpg" alt="">-->
       <!--               </div>-->
       <!--               <div class="item">-->
       <!--                 <img src="assets/images/peop.jpg" alt="">-->
       <!--               </div>                -->
       <!--               </div>-->
               
       <!--           </div>-->
       <!--         </div>-->
       <!--       </div>-->
       <!--     </div>-->
     

            
            <br>
            <!--second-->
                  <div class="row ">
              <div class="col-12 grid-margin">
                <div class="card">
                  <div class="card-body">
                   
                    
            <div class="container up">
                <div class="row align-items-center flex-row-reverse">
                    <div class="col-lg-6">
                        <div class="about-text go-to">
                            <h2 class="animate-charcter">Welcome</h2>
                            <h3 style="color:#fff;"><?php echo $firstname;?> <?php echo $lastname;?></h3>
                     
                        </div>
                    </div>
                    <div class="col-lg-6">
                        <div class="about-avatar">
                            <img style="width:70%;height:70%;border-radius:50%;" src="upload/<?php echo $avatar;?>" title="" alt="">
                        </div>
                    </div>
                </div>
                
                <?php
                $sql = "SELECT * FROM transaction WHERE accountnumber='".$accountnumber."' ";

if ($result = mysqli_query($db, $sql)) {

    $rowcount = mysqli_num_rows( $result );
    
 }
 
 //Credit
  $sql2 = "SELECT * FROM transaction WHERE sig='+' AND accountnumber='".$accountnumber."' ";

if ($result2 = mysqli_query($db, $sql2)) {

    $rowcount2 = mysqli_num_rows( $result2 );
    
 }
 
 //Debit
  $sql3 = "SELECT * FROM transaction WHERE sig='-' AND accountnumber='".$accountnumber."' ";

if ($result3 = mysqli_query($db, $sql3)) {

    $rowcount3 = mysqli_num_rows( $result3 );
    
 }
                
                ?>
                
                <br>
                <div class="counter">
                    <div class="row">
                        <div class="col-6 col-lg-3">
                            <div class="count-data text-center">
                                <h6 class="count h2" data-to="500" data-speed="500"></h6>
                                <p class="m-0px font-w-600"></p>
                            </div>
                        </div>
                        <div class="col-6 col-lg-3">
                            <div class="count-data text-center">
                                <h6 class="count h2" data-to="150" data-speed="150"></h6>
                                <p class="m-0px font-w-600"></p>
                            </div>
                        </div>
                        <div class="col-6 col-lg-3">
                            <div class="count-data text-center">
                                <h6 class="count h2" data-to="850" data-speed="850"><?php echo $rowcount3;?></h6>
                                <p class="m-0px font-w-600">Debit Transactions</p>
                            </div>
                        </div>
                        <div class="col-6 col-lg-3">
                            <div class="count-data text-center">
                                <h6 class="count h2" data-to="190" data-speed="190"><?php echo $rowcount2;?></h6>
                                <p class="m-0px font-w-600">Credit Transactions</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

       
                     </div>
                </div>
              </div>
            </div>
     
                 <!--second-->



                 <div class="row">
              <div class="col-sm-4 grid-margin">
                <div class="card">
                  <div class="card-body">
                    <h5>Account Type</h5>
                    <div class="row">
                      <div class="col-8 col-sm-12 col-xl-8 my-auto">
                        <div class="d-flex d-sm-block d-md-flex align-items-center">
                          <h2 class="mb-0">Savings</h2>
                         
                        </div>
                        <h6 class="text-muted font-weight-normal"></h6>
                      </div>
                      <div class="col-4 col-sm-12 col-xl-4 text-center text-xl-right">
                        <i class="icon-lg mdi mdi-codepen text-primary ml-auto"></i>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <div class="col-sm-4 grid-margin">
                <div class="card">
                  <div class="card-body">
                    <h5>Loans</h5>
                    <div class="row">
                      <div class="col-8 col-sm-12 col-xl-8 my-auto">
                        <div class="d-flex d-sm-block d-md-flex align-items-center">
                         
                          <!--<p class="text-success ml-2 mb-0 font-weight-medium">>+8.3%</p-->
                        </div>
                        <!--<h6 class="text-muted font-weight-normal"> 9.61% Since last month</h6>-->
                      </div>
                      <a href="loan.php" class="btnon button1" style="border-left:1px solid #0d8bf2">
  <span>Apply</span> </i>
  </a>
                    </div>
                  </div>
                </div>
              </div>
              <div class="col-sm-4 grid-margin">
                <div class="card">
                  <div class="card-body">
                    <h5>Send Money</h5>
                    <div class="row">
                      <div class="col-8 col-sm-12 col-xl-8 my-auto">
                        <div class="d-flex d-sm-block d-md-flex align-items-center">
                         
                          <!--<p class="text-success ml-2 mb-0 font-weight-medium">>+8.3%</p-->
                        </div>
                        <!--<h6 class="text-muted font-weight-normal"> 9.61% Since last month</h6>-->
                      </div>
                      <a href="#popup1" class="btnon button1" style="border-left:1px solid #0d8bf2">
  <span>Transfer</span> </i>
  
  </a>
  <div id="popup1" class="overlay">
	<div class="popup">
	<p>Send Money</p>

	<a style="text-decoration:none" href="local.php" class="button3 button5">Local Transfer</a>
	<br>
	<a style="text-decoration:none" href="international.php" class="button3 button5">International Transfer</a>
	<br>
	<a style="text-decoration:none" href="direct.php" class="button3 button5">Direct Transfer</a>

		<a class="close" href="#">&times;</a>
		<div class="content">
			Thank to pop me out of that button, but now i'm done so you can close this window.
		</div>
	</div>
</div>
                    </div>
                  </div>
                </div>
              </div>
            </div>

     
         
            <div class="row">
            </div>
          
           <div class="content-wrapper">
            <div class="page-header">
              <h3 class="page-title"> TRANSACTION HISTORY</h3>
              
            </div>
            
            <div class="container-xl">
            <div class="row">
             
            
              <div class="col-12 grid-margin">
                <div class="card">
                  <div class="card-body">
                    <h4 class="card-title">YOUR TRANSACTIONS</h4>
                    <div class="table-responsive">
                      <table class="table">
                       
                        <thead>
                       
                          <tr>
                            <!--<th>-->
                              <!--<div class="form-check form-check-muted m-0">-->
                              <!--  <label class="form-check-label">-->
                              <!--    <input type="checkbox" class="form-check-input">-->
                              <!--  </label>-->
                              <!--</div>-->
                            <!--</th>-->
                            <th> TRANSACTION TYPE </th>
                            <th>DESCRIPTION</th>
                            <th> STATUS </th>
                            <th> AMOUNT </th>
                            <th>PREBALANCE</th>
                            <th>POSTBALANCE</th>
                            <th>TIME</th>
                           <th>DATE</th>
                          <th>ID</th>

                          </tr>
                        </thead>
                        <tbody>
                                     <?php
//                         $query = mysqli_query($conn, "SELECT * FROM trade_history WHERE user_id = '$user_id'");
//                         while($row = mysqli_fetch_assoc($query)){
//                           $typec = $row["type"];
//                           $trans_id = $row["trade_id"];
//                           $amount = $row["amount"];
//                           $date = $row["date"];
//                           $status = $row["status"]; 
                          
//           //status                
// if ($status=='Processing'){
// $class="badge badge-outline-warning";
// }
// if ($status=='Successful'){
// $class="badge badge-outline-success";
// }
// // Transaction type
// if ($typec=='Debit Transaction'){
// $class2="FF1B00";
// }
// if ($typec=='Credit Transaction'){
// $class2="#00FF13 ";
// }

          $ddaa = mysqli_query($db,"SELECT id, amount, prebalance, postbalance, status, ref, date, time, description, sig FROM transaction WHERE accountnumber='".$accountnumber."' ORDER BY id DESC LIMIT 0,60000");

    while ($data = mysqli_fetch_array($ddaa))
    {


if($data[9]=="-"){
$sig = "<i class=\"fa fa-minus\" style=\"color: red;\"></i>";
$amo = number_format($data[1], 1);
$amount = "<b  style=\"color: red;\"> $ $amo &nbsp;&nbsp;&nbsp;</b>";
$paytxt = "<b  style=\"color: red;\"> Debit Transaction</b>";
}

if($data[9]=="+"){
$sig = "<i class=\"fa fa-plus\" style=\"color: green;\"></i>";
$amo = number_format($data[1], 1);
$amount = "<b style=\"color: green;\"> $ $amo &nbsp;&nbsp;&nbsp;</b>";
$paytxt = "<b style=\"color: green;\"> Credit Transaction</b>";
}


?>




                                                
                          <tr>
                            <!--<td>-->
                            <!--  <div class="form-check form-check-muted m-0">-->
                            <!--    <label class="form-check-label">-->
                            <!--      <input type="checkbox" class="form-check-input">-->
                            <!--    </label>-->
                            <!--  </div>-->
                            <!--</td>-->
                            <td>
                             
                              <span class="pl-2"><?php echo "$paytxt"; ?></span>
                            </td>
                            <td> <?php echo $data[8] ; ?></td>
                            <td> <?php echo $data[4] ; ?>	 </td>
                            <td> <?php echo $amount; ?>	</td>
                        <td>
                        <div class="<?php echo $class;?>"> $<?php echo number_format($data[2]) ; ?></div>
                            </td>
                             <td> $<?php echo number_format($data[3]) ; ?></td>
                              <td><?php echo $data[7] ; ?>	</td>
                                <td><?php echo $data[6] ; ?></td>
                                <td><?php echo $data[5] ; ?></td>
                          </tr>
                        <?php
                        }
                      ?>

                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            </div>
            
            
          </div>
          </div>
          </div>
          
<style>
.up{
    height:50%;
}
.gray-bg {
    background-color: #f5f5f5;
}
img {
    max-width: 100%;
}
img {
    vertical-align: middle;
    border-style: none;
}
/* About Me 
---------------------*/
.about-text h3 {
  font-size: 45px;
  font-weight: 700;
  margin: 0 0 6px;
}
@media (max-width: 767px) {
  .about-text h3 {
    font-size: 35px;
  }
}
.about-text h6 {
  font-weight: 600;
  margin-bottom: 15px;
}
@media (max-width: 767px) {
  .about-text h6 {
    font-size: 18px;
  }
}
.about-text p {
  font-size: 18px;
  max-width: 450px;
}
.about-text p mark {
  font-weight: 600;
  color: #20247b;
}

.about-list {
  padding-top: 10px;
}
.about-list .media {
  padding: 5px 0;
}
.about-list label {
  color: #20247b;
  font-weight: 600;
  width: 88px;
  margin: 0;
  position: relative;
}
.about-list label:after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 11px;
  width: 1px;
  height: 12px;
  background: #20247b;
  -moz-transform: rotate(15deg);
  -o-transform: rotate(15deg);
  -ms-transform: rotate(15deg);
  -webkit-transform: rotate(15deg);
  transform: rotate(15deg);
  margin: auto;
  opacity: 0.5;
}
.about-list p {
  margin: 0;
  font-size: 15px;
}

@media (max-width: 991px) {
  .about-avatar {
    margin-top: 30px;
  }
}

.about-section .counter {
  padding: 22px 20px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(31, 45, 61, 0.125);
}
.about-section .counter .count-data {
  margin-top: 10px;
  margin-bottom: 10px;
}
.about-section .counter .count {
  font-weight: 700;
  color: #20247b;
  margin: 0 0 5px;
}
.about-section .counter p {
  font-weight: 600;
  margin: 0;
}
mark {
    background-image: linear-gradient(rgba(252, 83, 86, 0.6), rgba(252, 83, 86, 0.6));
    background-size: 100% 3px;
    background-repeat: no-repeat;
    background-position: 0 bottom;
    background-color: transparent;
    padding: 0;
    color: currentColor;
}
.theme-color {
    color: #fc5356;
}
.dark-color {
    color: #20247b;
}






.button1 {
  transition: all 0.5s;
  cursor: pointer;
  
}

.button1 span {
  cursor: pointer;
  display: inline-block;
  position: relative;
  transition: 0.5s;
}

.button1 span:after {
  content: '\00bb';
  position: absolute;
  opacity: 0;
  top: 0;
  right: -20px;
  transition: 0.5s;
}

.button1:hover span {
  padding-right: 25px;
}

.button1:hover span:after {
  opacity: 1;
  right: 0;
}

/**/

.btnon {
 border-radius: 4px;
  background-color: black;
  border: none;
  color: #FFFFFF;
  text-align: center;
  font-size: 28px;
  padding: 20px;
  width: 250px;
  transition: all 0.5s;
  cursor: pointer;
  margin: 20px;
  margin-top:60px;

}

.dropdown {
  position: absolute;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  min-width: 160px;
  z-index: 1;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {background-color: grey}

.dropdown:hover .dropdown-content {
  display: block;
}

.btnon:hover, .dropdown:hover .btnon {
  background-color: black;
  color:white;
}



/**/
    .animate-charcter
{
   text-transform: uppercase;
  background-image: linear-gradient(
    -225deg,
    #fff 0%,
   #000 29%,
    #0090e7 67%,
    #f2a900 100%
    
  );
  background-size: auto auto;
  background-clip: border-box;
  background-size: 200% auto;
  color: #fff;
  background-clip: text;
  text-fill-color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textclip 2s linear infinite;
  display: inline-block;
  font-size: 36px;
}

@keyframes textclip {
  to {
    background-position: 100% center;
  }
}
  .animate-charcter-sec
  {  
       text-transform: uppercase;
  background-image: linear-gradient(
    -225deg,
    #f2a900 0%,
    #FF5733 29%,
   #f2a900 67%,
    yellow 100%
  );
  background-size: auto auto;
  background-clip: border-box;
  background-size: 200% auto;
  color: #fff;
  background-clip: text;
  text-fill-color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textclip 2s linear infinite;
  display: inline-block;
  font-size: 10px;
}

@keyframes textclip {
  to {
    background-position: 100% center;
  }
}
</style>


<?php require('footer.php');?>