<?php include("includes/header.php"); ?>
<?php include("includes/auto_out.php"); ?>
<!DOCTYPE html>
<html>
<head>
	<title>Dashboard | <?php echo $sitename; ?></title>
	
	   <!----------------------------------------------------------------------->
	   <meta charset="utf-8">
	   <meta name="viewport" content="width=device-width, initial-scale=1">
	   <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
	   <script src="bootstrap/js/jquery.min.js"></script>
	   <script src="bootstrap/js/bootstrap.min.js"></script>
	   <!----------------------------------------------------------------------->
	   <link rel="icon" href="images/fav-icon.ico" type="image/x-icon" />
	  <!-- <link rel="shortcut icon" href="images/fav-icon.ico" type="image/x-icon" />
	   <!----------------------------------------------------------------------->
	   <!-------------------Constumized CSS--------------------------->
	   <link rel="stylesheet" type="text/css" href="css/style.cs">

	   <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
	   <style>
        body{
          background-color: #f5f5f5;
        }
	   	.icons-links{
	   	  text-decoration: none;
	   	  color: #555;
	   	  font-size: 16px;
	   	  font-weight: bolder;
	   	}
	   	.icons-links:hover{
	   	  color:#0c2074;
	   	  text-decoration: none;
	   	}
	   </style>
	   
</head>
<body>
	<?php  include("includes/dashboard_nav.php"); ?>
    <br>
	<div class="container-fluid">
		

        <div class="row">
			<div class="col-sm-2">
				<?php include("includes/sidebar.php"); ?>
			    <?php include("includes/side.php"); ?>
			</div>
			<div class="col-sm-10">
               <div class="row">

                   <!------------------LEFT ROW ---------------------------->
                   <div class="col-sm-8">
                       <div class="row">
                           <div class="col-sm-6">
                                <div class="panel panel-default">
                                 <div class="panel-body">
                                   <img src="images/5928961.png" width="35">&nbsp;&nbsp;<b>Available Balance</b>
                                   <br><br><hr>
                                   <div align="right">
                                   <span style="font-size: 16px;">Account Balance:</span>
                                   <br>
                                   <span style="color:rgb(45, 156, 219); font-size: 23px;"><?php echo $b_currency; ?><?php echo $amount; ?></span>
                                   <br>
                                   
                                   </div>
                                 </div>
                               </div>
                           </div>
                           <div class="col-sm-6">
                                <div class="panel panel-default">
                                 <div class="panel-body">
                                   <img src="images/733329.png" width="35">&nbsp;&nbsp;<b>Total Balance</b>
                                   <br><br><hr>
                                   <div align="right">
                                   <span style="font-size: 16px;">Total:</span>
                                   <br>
                                   <span style="color:#00d67d; font-size: 23px;"><?php echo $b_currency; ?><?php echo $amount; ?></span>
                                   <br>
                                   
                                    
                                   </div>
                                 </div>
                               </div>
                           </div>
                       </div>
                       <!------------------------------------------------------>
                       <div class="row">
                         <div class="col-sm-12">
                            <div class="panel panel-default">
                             <div class="panel-body">
                               <h4 style=""><img src="images/3527271.png" width="25px"> &nbsp;OTHER BALANCE</h4>
                               <hr>

                               <div class="row">
                                

                                 <div class="col-sm-3" align="center">
                                   <img src="images/349228.png" class="img-responsive" style="margin-top: 15px;" width="50">
                                  <br>
                                  <span style="font-size:12px; font-weight: bold;"><?php echo $b_currency; ?><?php echo number_format($amex_card_balance, 2); ?></span><br>
                                  <span style="font-size:14px;">AMEX</span><br><br>
                                   
                                   <div class="hidden-md hidden-lg"><hr></div>
                                 </div>

                                 <div class="col-sm-3" align="center">
                                   <img src="images/349230.png" class="img-responsive" style="margin-top: 15px;" width="50">
                                  <br>
                                  <span style="font-size:12px; font-weight: bold;"><?php echo $b_currency; ?><?php echo number_format($discover_card_balance, 2); ?></span><br>
                                  <span style="font-size:14px;">DISCOVER</span><br><br>
                                   
                                   <div class="hidden-md hidden-lg"><hr></div>
                                 </div>


                                 <div class="col-sm-3" align="center">
                                   <img src="images/4221696.png" class="img-responsive" style="margin-top: 15px;" width="50">
                                   <br>
                                   <span style="font-size:12px; font-weight: bold;"><?php echo $b_currency; ?><?php echo number_format($home_loan_balance, 2); ?></span><br>
                                   <span style="font-size:14px;">HOME LOAN</span><br><br>
                                    
                                    <div class="hidden-md hidden-lg"><hr></div>
                                  </div>

                                  <div class="col-sm-3" align="center">
                                    <img src="images/3130571.png" class="img-responsive" style="margin-top: 15px;" width="50">
                                   <br>
                                   <span style="font-size:12px; font-weight: bold;"><?php echo $b_currency; ?><?php echo number_format($business_loan_balance, 2); ?></span><br>
                                   <span style="font-size:14px;">BUSINESS LOAN</span><br><br>
                                    
                                    <div class="hidden-md hidden-lg"><hr></div>
                                  </div>
                                 
                               </div>

                               <br>
                               
                             </div>
                           </div>
                         </div>
                       </div>
                       
                       
                       <!------------------------------------------------------>
                       <!------------------------------------------------------>
                       <div class="row">
                         <div class="col-sm-12">
                            <div class="panel panel-default">
                             <div class="panel-body">
                               <h4 style="">CARDS</h4>
                               <hr>

                               <div class="row">
                                 <div class="col-xs-3" align="right">
                                   <img src="images/1086741.png" class="img-responsive" style="margin-top: 15px;" width="150">
                                 </div>
                                 <div class="col-xs-9">
                                   <h3>Apply For Credit Cards</h3>
                                   <p>Welcome to <?php echo $sitename; ?>, Apply For Credit Cards to be delivered to your doorstep today.</p>
                                   <br>
                                   <a href="request-cards.php" target="_blank" class="btn btn-primary">Apply</a>
                                 </div>
                               </div>

                               <br>
                               
                             </div>
                           </div>
                         </div>
                       </div>
                       <!------------------------------------------------------>
                       <div class="row">
                         <div class="col-sm-12">
                            <div class="panel panel-default">
                             <div class="panel-body">
                               <h4 style="">LOANS</h4>
                               <hr>

                               <div class="row">
                                <div class="col-xs-9" align="right">
                                   <h3>Apply For Loans</h3>
                                   <p>Welcome to <?php echo $sitename; ?>, Apply For loans to be delivered to your doorstep today.</p>
                                   <br>
                                   <a href="loans.php" target="_blank" class="btn btn-primary">Apply</a>
                                 </div>
                                 <div class="col-xs-3" align="left">
                                   <img src="images/1907675.png" class="img-responsive" style="margin-top: 15px;" width="150">
                                 </div>
                                 
                               </div>

                               <br>
                               
                             </div>
                           </div>
                         </div>
                       </div>
                       <!------------------------------------------------------>
                       <div class="row">
                         <div class="col-sm-12">
                            <div class="panel panel-default">
                             <div class="panel-body">
                               <h4 style="">BILL PAY</h4>
                               <hr>

                               <div class="row">

                                <div class="col-xs-3" align="right">
                                  <img src="images/1611236.png" class="img-responsive" style="margin-top: 15px;" width="150">
                                </div>
                                <div class="col-xs-9" align="left">
                                   <h3>Pay Your Bills</h3>
                                   <p>Welcome to <?php echo $sitename; ?>, Pay your bills using our services below.</p>
                                   <br>
                                   <a href="bill-pay.php" class="btn btn-primary">Pay Bills</a>
                                 </div>
                                 
                               </div>

                               <br>
                               
                             </div>
                           </div>
                         </div>
                       </div>
                       <!------------------------------------------------------>
                       <div class="row">
                         <div class="col-sm-12">
                            <div class="panel panel-default">
                             <div class="panel-body">
                               <h4 style="">TRANSFER FUNDS</h4>
                               <hr>

                               <div class="row">

                                <div class="col-sm-4" align="center">
                                 <img src="images/1990568.png" class="img-responsive" style="margin-top: 15px;" width="50">
                                  <br>
                                  <span style="text-transform: uppercase;">Same Transfer</span><br><br>

                                  <?php
                                    if($account_status == "Active"){
                                      echo '<a href="same-digital-transfer.php" class="btn btn-primary">Transfer</a>';
                                    }elseif($account_status == "Dormant"){
                                      echo '<a href="account-dormant.php" class="btn btn-primary">Transfer</a>';
                                    }else{
                                      echo '<a href="account-deactivated.php" class="btn btn-primary">Transfer</a>';
                                    }
                                  ?>
                                   <div class="hidden-md hidden-lg"><hr></div>
                                </div>


                                <div class="col-sm-4" align="center">
                                  <img src="images/3029373.png" class="img-responsive" style="margin-top: 15px;" width="50">
                                  <br>
                                  <span style="text-transform: uppercase;">Local Transfer</span><br><br>

                                  <?php
                                    if($account_status == "Active"){
                                      echo '<a href="other-digital-transfer.php" class="btn btn-primary">Transfer</a>';
                                    }elseif($account_status == "Dormant"){
                                      echo '<a href="account-dormant.php" class="btn btn-primary">Transfer</a>';
                                    }else{
                                      echo '<a href="account-deactivated.php" class="btn btn-primary">Transfer</a>';
                                    }
                                  ?>
                                   <div class="hidden-md hidden-lg"><hr></div>
                                 </div>

                                 <div class="col-sm-4" align="center">
                                   <img src="images/1771174.png" class="img-responsive" style="margin-top: 15px;" width="50">
                                  <br>
                                  <span style="text-transform: uppercase;">International Transfer</span><br><br>
                                  <?php
                                    if($account_status == "Active"){
                                      echo '<a href="international-wire-transfer.php" class="btn btn-primary">Transfer</a>';
                                    }elseif($account_status == "Dormant"){
                                      echo '<a href="account-dormant.php" class="btn btn-primary">Transfer</a>';
                                    }else{
                                      echo '<a href="account-deactivated.php" class="btn btn-primary">Transfer</a>';
                                    }
                                  ?>
                          
                                   <div class="hidden-md hidden-lg"><hr></div>
                                 </div>
                                 
                               </div>

                               <br>
                               
                             </div>
                           </div>
                         </div>
                       </div>
                       <!------------------------------------------------------>
                       <div class="row">
                         <div class="col-sm-12">
                            <div class="panel panel-default">
                             <div class="panel-body">
                               <h4 style=""><img src="images/3652221.png" width="28"> RECENT TRANSACTIONS</h4>
                               <hr>

                               <form>
                                 <input type="text" class="form-control input-lg" style="border-radius: 0px;" value="" placeholder="Search transactions..." />
                               </form>

                               

                                <div class="row">
                                  <div class="col-xs-6">
                                    <form action="transactions.php" method="GET">
                                    <select name="filter" onchange="this.form.submit()" class="form-control input-lg" style="border-radius: 0px;">
                                      <option>Filter</option>
                                      <option>All Trasactions</option>
                                      <option>Same Bank Trasactions</option>
                                      <option>Local Bank Trasactions</option>
                                      <option>Interanational Bank Trasactions</option>
                                    </select>
                                  </form>
                                  </div>
                                  <div class="col-xs-6">
                                    <form action="transactions.php" method="GET">
                                    <select name="status" onchange="this.form.submit()" class="form-control input-lg" style="border-radius: 0px;">
                                      <option>Status</option>
                                      <option>All Trasactions</option>
                                      <option>Pending</option>
                                      <option>Success</option>
                                      <option>Declined</option>
                                    </select>
                                     </form>
                                  </div>
                                </div>
                                 
                              

                               <div class="row">

                                <div class="col-sm-12" align="left">
                        <?php
                        $query = mysqli_query($conn, "SELECT * FROM transfer WHERE account_id = '$u_dbid' ORDER BY id DESC LIMIT 5");
                        $numrow = mysqli_num_rows($query);
                        if($numrow >= 1){
                           include("transaction-details.php");
                               echo '<div align="right"><a href="transactions.php" class="btn btn-primary" style="">View More &nbsp;&nbsp;<i class="fa fa-caret-right"></i></a></div>';
                        }else{
                         echo '<br><br><br><br><div align="center"><img  src="images/353553535.png" width="140"/><br>
                       <h2><small>No transaction.</small></h2>
                       <p>You dont have any transactions yet.</p></div>';
                        }
                         ?> 
                         
                       </div>
                                 
                               </div>

                               <br>
                               
                             </div>
                           </div>
                         </div>
                       </div>
                   </div>
                   <!-----------------/LEFT ROW ---------------------------->

                   <!------------------------------------------------------->

                   <!------------------RIGHT ROW --------------------------->
                   <div class="col-sm-4">

                    <div class="row">
                      <div class="col-sm-12">
                         <div class="panel panel-default">
                          <div class="panel-body">
                            <img src="images/4643473.png" width="35">&nbsp;&nbsp;<b>Host Location </b>
                            <br><br><hr>
                            <div align="right">
                            <span style="font-size: 16px;">IP Address:</span>
                            <br>
                            <span style="color:rgb(45, 156, 219); font-size: 23px;"><?php echo $_SERVER['REMOTE_ADDR']; ?></span>
                            <br>
                            
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>

                    <div class="row">
                      <div class="col-sm-12">
                         <div class="panel panel-default">
                          <div class="panel-body">
                            <h4 style="">STOCK MARKET</h4>
                            <hr>

                            <!-- TradingView Widget BEGIN -->
                            <div class="tradingview-widget-container">
                              <div class="tradingview-widget-container__widget"></div>
                              <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-hotlists.js" async>
                              {
                              "colorTheme": "light",
                              "dateRange": "12M",
                              "exchange": "US",
                              "showChart": true,
                              "locale": "en",
                              "largeChartUrl": "",
                              "isTransparent": true,
                              "showSymbolLogo": false,
                              "showFloatingTooltip": false,
                              "width": "100%",
                              "height": "530",
                              "plotLineColorGrowing": "rgba(41, 98, 255, 1)",
                              "plotLineColorFalling": "rgba(41, 98, 255, 1)",
                              "gridLineColor": "rgba(240, 243, 250, 0)",
                              "scaleFontColor": "rgba(120, 123, 134, 1)",
                              "belowLineFillColorGrowing": "rgba(41, 98, 255, 0.12)",
                              "belowLineFillColorFalling": "rgba(41, 98, 255, 0.12)",
                              "belowLineFillColorGrowingBottom": "rgba(41, 98, 255, 0)",
                              "belowLineFillColorFallingBottom": "rgba(41, 98, 255, 0)",
                              "symbolActiveColor": "rgba(41, 98, 255, 0.12)"
                            }
                              </script>
                            </div>
                            <!-- TradingView Widget END -->
                            
                          </div>
                        </div>
                      </div>
                    </div>


                    <!--------------------------------->

                    <div class="row">
                      <div class="col-sm-12">
                         <div class="panel panel-default">
                          <div class="panel-body">
                            <h4 style=""></h4>
                            <hr>

                            <!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div class="tradingview-widget-container__widget"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-timeline.js" async>
  {
  "feedMode": "market",
  "colorTheme": "light",
  "isTransparent": true,
  "displayMode": "regular",
  "width": "100%",
  "height": "100%",
  "locale": "en",
  "market": "stock"
}
  </script>
</div>
<!-- TradingView Widget END -->
                            
                          </div>
                        </div>
                      </div>
                    </div>
                          
                    
                   </div>
                   <!-----------------/RIGHT ROW --------------------------->
               </div>
			</div>
		</div>
	</div>
</body>
</html>